├── .devcontainer └── devcontainer.json ├── .env ├── .gitignore ├── .pylintrc ├── Dockerfile ├── README.md ├── common ├── __init__.py ├── calibrate.py ├── factory.py ├── image.py ├── mva19.py ├── opencv_grabbers.py └── pipeline.py ├── config ├── Makefile.config.caffe └── Makefile.config.openpose ├── cudnn └── README.md ├── docker-compose.yml ├── handpose.py ├── handpose_simon_backend.py ├── lib └── README.md ├── models ├── hand_left_skinned.bbn ├── hand_left_skinned.blend ├── hand_left_skinned.bmesh ├── hand_left_skinned.btn ├── hand_left_skinned.xml ├── hand_skinned.bbn ├── hand_skinned.blend ├── hand_skinned.blend1 ├── hand_skinned.bmesh ├── hand_skinned.btn ├── hand_skinned.xml └── mobnet4f_cmu_adadelta_t1_model.pb ├── openpose_models └── getModels.sh └── res ├── calib_webcam_mshd_vga.json ├── full_pipeline.png └── overview.png /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "dockerComposeFile": [ 3 | "../docker-compose.yml" 4 | ], 5 | "service": "dev", 6 | "workspaceFolder": "/workspace", 7 | "shutdownAction": "stopCompose", 8 | "customizations": { 9 | "vscode": { 10 | "extensions": [ 11 | "mutantdino.resourcemonitor", 12 | "nvidia.nsight-vscode-edition", 13 | "ms-python.python", 14 | "charliermarsh.ruff", 15 | "ms-azuretools.vscode-docker", 16 | "GitHub.copilot", 17 | "GitHub.copilot-chat" 18 | ] 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | LD_LIBRARY_PATH=lib 2 | PYTHONPATH=lib 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | lib/*.so* 3 | **/*.pyc 4 | openpose_models 5 | -------------------------------------------------------------------------------- /.pylintrc: -------------------------------------------------------------------------------- 1 | [MASTER] 2 | 3 | # A comma-separated list of package or module names from where C extensions may 4 | # be loaded. Extensions are loading into the active Python interpreter and may 5 | # run arbitrary code. 6 | extension-pkg-whitelist=numpy, PyMBVCore, PyCeresIK, PyJointTools 7 | 8 | # Add files or directories to the blacklist. They should be base names, not 9 | # paths. 10 | ignore=CVS 11 | 12 | # Add files or directories matching the regex patterns to the blacklist. The 13 | # regex matches against base names, not paths. 14 | ignore-patterns= 15 | 16 | # Python code to execute, usually for sys.path manipulation such as 17 | # pygtk.require(). 18 | #init-hook= 19 | 20 | # Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the 21 | # number of processors available to use. 22 | jobs=1 23 | 24 | # Control the amount of potential inferred values when inferring a single 25 | # object. This can help the performance when dealing with large functions or 26 | # complex, nested conditions. 27 | limit-inference-results=100 28 | 29 | # List of plugins (as comma separated values of python modules names) to load, 30 | # usually to register additional checkers. 31 | load-plugins= 32 | 33 | # Pickle collected data for later comparisons. 34 | persistent=yes 35 | 36 | # Specify a configuration file. 37 | #rcfile= 38 | 39 | # When enabled, pylint would attempt to guess common misconfiguration and emit 40 | # user-friendly hints instead of false-positive error messages. 41 | suggestion-mode=yes 42 | 43 | # Allow loading of arbitrary C extensions. Extensions are imported into the 44 | # active Python interpreter and may run arbitrary code. 45 | unsafe-load-any-extension=no 46 | 47 | 48 | [MESSAGES CONTROL] 49 | 50 | # Only show warnings with the listed confidence levels. Leave empty to show 51 | # all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED. 52 | confidence= 53 | 54 | # Disable the message, report, category or checker with the given id(s). You 55 | # can either give multiple identifiers separated by comma (,) or put this 56 | # option multiple times (only on the command line, not in the configuration 57 | # file where it should appear only once). You can also use "--disable=all" to 58 | # disable everything first and then reenable specific checks. For example, if 59 | # you want to run only the similarities checker, you can use "--disable=all 60 | # --enable=similarities". If you want to run only the classes checker, but have 61 | # no Warning level messages displayed, use "--disable=all --enable=classes 62 | # --disable=W". 63 | disable=print-statement, 64 | parameter-unpacking, 65 | unpacking-in-except, 66 | old-raise-syntax, 67 | backtick, 68 | long-suffix, 69 | old-ne-operator, 70 | old-octal-literal, 71 | import-star-module-level, 72 | non-ascii-bytes-literal, 73 | raw-checker-failed, 74 | bad-inline-option, 75 | locally-disabled, 76 | file-ignored, 77 | suppressed-message, 78 | useless-suppression, 79 | deprecated-pragma, 80 | use-symbolic-message-instead, 81 | apply-builtin, 82 | basestring-builtin, 83 | buffer-builtin, 84 | cmp-builtin, 85 | coerce-builtin, 86 | execfile-builtin, 87 | file-builtin, 88 | long-builtin, 89 | raw_input-builtin, 90 | reduce-builtin, 91 | standarderror-builtin, 92 | unicode-builtin, 93 | xrange-builtin, 94 | coerce-method, 95 | delslice-method, 96 | getslice-method, 97 | setslice-method, 98 | no-absolute-import, 99 | old-division, 100 | dict-iter-method, 101 | dict-view-method, 102 | next-method-called, 103 | metaclass-assignment, 104 | indexing-exception, 105 | raising-string, 106 | reload-builtin, 107 | oct-method, 108 | hex-method, 109 | nonzero-method, 110 | cmp-method, 111 | input-builtin, 112 | round-builtin, 113 | intern-builtin, 114 | unichr-builtin, 115 | map-builtin-not-iterating, 116 | zip-builtin-not-iterating, 117 | range-builtin-not-iterating, 118 | filter-builtin-not-iterating, 119 | using-cmp-argument, 120 | eq-without-hash, 121 | div-method, 122 | idiv-method, 123 | rdiv-method, 124 | exception-message-attribute, 125 | invalid-str-codec, 126 | sys-max-int, 127 | bad-python3-import, 128 | deprecated-string-function, 129 | deprecated-str-translate-call, 130 | deprecated-itertools-function, 131 | deprecated-types-field, 132 | next-method-defined, 133 | dict-items-not-iterating, 134 | dict-keys-not-iterating, 135 | dict-values-not-iterating, 136 | deprecated-operator-function, 137 | deprecated-urllib-function, 138 | xreadlines-attribute, 139 | deprecated-sys-function, 140 | exception-escape, 141 | comprehension-escape 142 | 143 | # Enable the message, report, category or checker with the given id(s). You can 144 | # either give multiple identifier separated by comma (,) or put this option 145 | # multiple time (only on the command line, not in the configuration file where 146 | # it should appear only once). See also the "--disable" option for examples. 147 | enable=c-extension-no-member 148 | 149 | 150 | [REPORTS] 151 | 152 | # Python expression which should return a note less than 10 (10 is the highest 153 | # note). You have access to the variables errors warning, statement which 154 | # respectively contain the number of errors / warnings messages and the total 155 | # number of statements analyzed. This is used by the global evaluation report 156 | # (RP0004). 157 | evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) 158 | 159 | # Template used to display messages. This is a python new-style format string 160 | # used to format the message information. See doc for all details. 161 | #msg-template= 162 | 163 | # Set the output format. Available formats are text, parseable, colorized, json 164 | # and msvs (visual studio). You can also give a reporter class, e.g. 165 | # mypackage.mymodule.MyReporterClass. 166 | output-format=text 167 | 168 | # Tells whether to display a full report or only the messages. 169 | reports=no 170 | 171 | # Activate the evaluation score. 172 | score=yes 173 | 174 | 175 | [REFACTORING] 176 | 177 | # Maximum number of nested blocks for function / method body 178 | max-nested-blocks=5 179 | 180 | # Complete name of functions that never returns. When checking for 181 | # inconsistent-return-statements if a never returning function is called then 182 | # it will be considered as an explicit return statement and no message will be 183 | # printed. 184 | never-returning-functions=sys.exit 185 | 186 | 187 | [STRING] 188 | 189 | # This flag controls whether the implicit-str-concat-in-sequence should 190 | # generate a warning on implicit string concatenation in sequences defined over 191 | # several lines. 192 | check-str-concat-over-line-jumps=no 193 | 194 | 195 | [SPELLING] 196 | 197 | # Limits count of emitted suggestions for spelling mistakes. 198 | max-spelling-suggestions=4 199 | 200 | # Spelling dictionary name. Available dictionaries: none. To make it working 201 | # install python-enchant package.. 202 | spelling-dict= 203 | 204 | # List of comma separated words that should not be checked. 205 | spelling-ignore-words= 206 | 207 | # A path to a file that contains private dictionary; one word per line. 208 | spelling-private-dict-file= 209 | 210 | # Tells whether to store unknown words to indicated private dictionary in 211 | # --spelling-private-dict-file option instead of raising a message. 212 | spelling-store-unknown-words=no 213 | 214 | 215 | [TYPECHECK] 216 | 217 | # List of decorators that produce context managers, such as 218 | # contextlib.contextmanager. Add to this list to register other decorators that 219 | # produce valid context managers. 220 | contextmanager-decorators=contextlib.contextmanager 221 | 222 | # List of members which are set dynamically and missed by pylint inference 223 | # system, and so shouldn't trigger E1101 when accessed. Python regular 224 | # expressions are accepted. 225 | generated-members= 226 | 227 | # Tells whether missing members accessed in mixin class should be ignored. A 228 | # mixin class is detected if its name ends with "mixin" (case insensitive). 229 | ignore-mixin-members=yes 230 | 231 | # Tells whether to warn about missing members when the owner of the attribute 232 | # is inferred to be None. 233 | ignore-none=yes 234 | 235 | # This flag controls whether pylint should warn about no-member and similar 236 | # checks whenever an opaque object is returned when inferring. The inference 237 | # can return multiple potential results while evaluating a Python object, but 238 | # some branches might not be evaluated, which results in partial inference. In 239 | # that case, it might be useful to still emit no-member and other checks for 240 | # the rest of the inferred objects. 241 | ignore-on-opaque-inference=yes 242 | 243 | # List of class names for which member attributes should not be checked (useful 244 | # for classes with dynamically set attributes). This supports the use of 245 | # qualified names. 246 | ignored-classes=optparse.Values,thread._local,_thread._local 247 | 248 | # List of module names for which member attributes should not be checked 249 | # (useful for modules/projects where namespaces are manipulated during runtime 250 | # and thus existing member attributes cannot be deduced by static analysis. It 251 | # supports qualified module names, as well as Unix pattern matching. 252 | ignored-modules= 253 | 254 | # Show a hint with possible names when a member name was not found. The aspect 255 | # of finding the hint is based on edit distance. 256 | missing-member-hint=yes 257 | 258 | # The minimum edit distance a name should have in order to be considered a 259 | # similar match for a missing member name. 260 | missing-member-hint-distance=1 261 | 262 | # The total number of similar names that should be taken in consideration when 263 | # showing a hint for a missing member. 264 | missing-member-max-choices=1 265 | 266 | 267 | [MISCELLANEOUS] 268 | 269 | # List of note tags to take in consideration, separated by a comma. 270 | notes=FIXME, 271 | XXX, 272 | TODO 273 | 274 | 275 | [VARIABLES] 276 | 277 | # List of additional names supposed to be defined in builtins. Remember that 278 | # you should avoid defining new builtins when possible. 279 | additional-builtins= 280 | 281 | # Tells whether unused global variables should be treated as a violation. 282 | allow-global-unused-variables=yes 283 | 284 | # List of strings which can identify a callback function by name. A callback 285 | # name must start or end with one of those strings. 286 | callbacks=cb_, 287 | _cb 288 | 289 | # A regular expression matching the name of dummy variables (i.e. expected to 290 | # not be used). 291 | dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_ 292 | 293 | # Argument names that match this expression will be ignored. Default to name 294 | # with leading underscore. 295 | ignored-argument-names=_.*|^ignored_|^unused_ 296 | 297 | # Tells whether we should check for unused import in __init__ files. 298 | init-import=no 299 | 300 | # List of qualified module names which can have objects that can redefine 301 | # builtins. 302 | redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io 303 | 304 | 305 | [LOGGING] 306 | 307 | # Format style used to check logging format string. `old` means using % 308 | # formatting, while `new` is for `{}` formatting. 309 | logging-format-style=old 310 | 311 | # Logging modules to check that the string format arguments are in logging 312 | # function parameter format. 313 | logging-modules=logging 314 | 315 | 316 | [BASIC] 317 | 318 | # Naming style matching correct argument names. 319 | argument-naming-style=snake_case 320 | 321 | # Regular expression matching correct argument names. Overrides argument- 322 | # naming-style. 323 | #argument-rgx= 324 | 325 | # Naming style matching correct attribute names. 326 | attr-naming-style=snake_case 327 | 328 | # Regular expression matching correct attribute names. Overrides attr-naming- 329 | # style. 330 | #attr-rgx= 331 | 332 | # Bad variable names which should always be refused, separated by a comma. 333 | bad-names=foo, 334 | bar, 335 | baz, 336 | toto, 337 | tutu, 338 | tata 339 | 340 | # Naming style matching correct class attribute names. 341 | class-attribute-naming-style=any 342 | 343 | # Regular expression matching correct class attribute names. Overrides class- 344 | # attribute-naming-style. 345 | #class-attribute-rgx= 346 | 347 | # Naming style matching correct class names. 348 | class-naming-style=PascalCase 349 | 350 | # Regular expression matching correct class names. Overrides class-naming- 351 | # style. 352 | #class-rgx= 353 | 354 | # Naming style matching correct constant names. 355 | const-naming-style=UPPER_CASE 356 | 357 | # Regular expression matching correct constant names. Overrides const-naming- 358 | # style. 359 | #const-rgx= 360 | 361 | # Minimum line length for functions/classes that require docstrings, shorter 362 | # ones are exempt. 363 | docstring-min-length=-1 364 | 365 | # Naming style matching correct function names. 366 | function-naming-style=snake_case 367 | 368 | # Regular expression matching correct function names. Overrides function- 369 | # naming-style. 370 | #function-rgx= 371 | 372 | # Good variable names which should always be accepted, separated by a comma. 373 | good-names=i, 374 | j, 375 | k, 376 | ex, 377 | Run, 378 | _ 379 | 380 | # Include a hint for the correct naming format with invalid-name. 381 | include-naming-hint=no 382 | 383 | # Naming style matching correct inline iteration names. 384 | inlinevar-naming-style=any 385 | 386 | # Regular expression matching correct inline iteration names. Overrides 387 | # inlinevar-naming-style. 388 | #inlinevar-rgx= 389 | 390 | # Naming style matching correct method names. 391 | method-naming-style=snake_case 392 | 393 | # Regular expression matching correct method names. Overrides method-naming- 394 | # style. 395 | #method-rgx= 396 | 397 | # Naming style matching correct module names. 398 | module-naming-style=snake_case 399 | 400 | # Regular expression matching correct module names. Overrides module-naming- 401 | # style. 402 | #module-rgx= 403 | 404 | # Colon-delimited sets of names that determine each other's naming style when 405 | # the name regexes allow several styles. 406 | name-group= 407 | 408 | # Regular expression which should only match function or class names that do 409 | # not require a docstring. 410 | no-docstring-rgx=^_ 411 | 412 | # List of decorators that produce properties, such as abc.abstractproperty. Add 413 | # to this list to register other decorators that produce valid properties. 414 | # These decorators are taken in consideration only for invalid-name. 415 | property-classes=abc.abstractproperty 416 | 417 | # Naming style matching correct variable names. 418 | variable-naming-style=snake_case 419 | 420 | # Regular expression matching correct variable names. Overrides variable- 421 | # naming-style. 422 | #variable-rgx= 423 | 424 | 425 | [SIMILARITIES] 426 | 427 | # Ignore comments when computing similarities. 428 | ignore-comments=yes 429 | 430 | # Ignore docstrings when computing similarities. 431 | ignore-docstrings=yes 432 | 433 | # Ignore imports when computing similarities. 434 | ignore-imports=no 435 | 436 | # Minimum lines number of a similarity. 437 | min-similarity-lines=4 438 | 439 | 440 | [FORMAT] 441 | 442 | # Expected format of line ending, e.g. empty (any line ending), LF or CRLF. 443 | expected-line-ending-format= 444 | 445 | # Regexp for a line that is allowed to be longer than the limit. 446 | ignore-long-lines=^\s*(# )??$ 447 | 448 | # Number of spaces of indent required inside a hanging or continued line. 449 | indent-after-paren=4 450 | 451 | # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 452 | # tab). 453 | indent-string=' ' 454 | 455 | # Maximum number of characters on a single line. 456 | max-line-length=100 457 | 458 | # Maximum number of lines in a module. 459 | max-module-lines=1000 460 | 461 | # List of optional constructs for which whitespace checking is disabled. `dict- 462 | # separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}. 463 | # `trailing-comma` allows a space between comma and closing bracket: (a, ). 464 | # `empty-line` allows space-only lines. 465 | no-space-check=trailing-comma, 466 | dict-separator 467 | 468 | # Allow the body of a class to be on the same line as the declaration if body 469 | # contains single statement. 470 | single-line-class-stmt=no 471 | 472 | # Allow the body of an if to be on the same line as the test if there is no 473 | # else. 474 | single-line-if-stmt=no 475 | 476 | 477 | [DESIGN] 478 | 479 | # Maximum number of arguments for function / method. 480 | max-args=5 481 | 482 | # Maximum number of attributes for a class (see R0902). 483 | max-attributes=7 484 | 485 | # Maximum number of boolean expressions in an if statement. 486 | max-bool-expr=5 487 | 488 | # Maximum number of branch for function / method body. 489 | max-branches=12 490 | 491 | # Maximum number of locals for function / method body. 492 | max-locals=15 493 | 494 | # Maximum number of parents for a class (see R0901). 495 | max-parents=7 496 | 497 | # Maximum number of public methods for a class (see R0904). 498 | max-public-methods=20 499 | 500 | # Maximum number of return / yield for function / method body. 501 | max-returns=6 502 | 503 | # Maximum number of statements in function / method body. 504 | max-statements=50 505 | 506 | # Minimum number of public methods for a class (see R0903). 507 | min-public-methods=2 508 | 509 | 510 | [CLASSES] 511 | 512 | # List of method names used to declare (i.e. assign) instance attributes. 513 | defining-attr-methods=__init__, 514 | __new__, 515 | setUp 516 | 517 | # List of member names, which should be excluded from the protected access 518 | # warning. 519 | exclude-protected=_asdict, 520 | _fields, 521 | _replace, 522 | _source, 523 | _make 524 | 525 | # List of valid names for the first argument in a class method. 526 | valid-classmethod-first-arg=cls 527 | 528 | # List of valid names for the first argument in a metaclass class method. 529 | valid-metaclass-classmethod-first-arg=cls 530 | 531 | 532 | [IMPORTS] 533 | 534 | # Allow wildcard imports from modules that define __all__. 535 | allow-wildcard-with-all=no 536 | 537 | # Analyse import fallback blocks. This can be used to support both Python 2 and 538 | # 3 compatible code, which means that the block might have code that exists 539 | # only in one or another interpreter, leading to false positives when analysed. 540 | analyse-fallback-blocks=no 541 | 542 | # Deprecated modules which should not be used, separated by a comma. 543 | deprecated-modules=optparse,tkinter.tix 544 | 545 | # Create a graph of external dependencies in the given file (report RP0402 must 546 | # not be disabled). 547 | ext-import-graph= 548 | 549 | # Create a graph of every (i.e. internal and external) dependencies in the 550 | # given file (report RP0402 must not be disabled). 551 | import-graph= 552 | 553 | # Create a graph of internal dependencies in the given file (report RP0402 must 554 | # not be disabled). 555 | int-import-graph= 556 | 557 | # Force import order to recognize a module as part of the standard 558 | # compatibility libraries. 559 | known-standard-library= 560 | 561 | # Force import order to recognize a module as part of a third party library. 562 | known-third-party=enchant 563 | 564 | 565 | [EXCEPTIONS] 566 | 567 | # Exceptions that will emit a warning when being caught. Defaults to 568 | # "BaseException, Exception". 569 | overgeneral-exceptions=BaseException, 570 | Exception 571 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # WACV18 Monocular 3D hand pose estimation Docker 2 | 3 | # FROM nvcr.io/nvidia/cuda:10.2-cudnn7-devel-ubuntu16.04 4 | # FROM nvidia/opengl:1.2-glvnd-devel-ubuntu16.04 5 | FROM nvidia/cudagl:10.1-devel-ubuntu16.04 6 | 7 | RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A4B469963BF863CC 8 | RUN apt-get update 9 | 10 | ENV LC_ALL=C 11 | ENV MAKEFLAGS="-j$(nproc)" 12 | 13 | RUN DEBIAN_FRONTEND="noninteractive" TZ="Europe/Athens" apt-get install -y tzdata 14 | RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y libboost-all-dev libpython-dev \ 15 | git cmake vim libgoogle-glog-dev libprotobuf-dev protobuf-compiler \ 16 | libhdf5-dev libatlas-base-dev liblmdb-dev libleveldb-dev \ 17 | libsnappy-dev wget unzip apt-utils \ 18 | libtbb-dev libglew-dev libopenni-dev libglm-dev freeglut3-dev libeigen3-dev \ 19 | ffmpeg x264 libx264-dev \ 20 | libgtk2.0-dev pkg-config 21 | 22 | # needed by MonoHand3D 23 | 24 | RUN apt-get install -y libcholmod3.0.6 25 | # libopenni0 26 | 27 | RUN apt-get install -y python3 python3-pip python3-distutils-extra 28 | 29 | RUN pip3 install numpy==1.12.1 30 | RUN pip3 install scikit-build==0.6.0 31 | RUN pip3 install opencv-python==3.4.3.18 32 | 33 | RUN apt-get install -y libopenexr-dev 34 | 35 | RUN apt-get install -y libbulletdynamics2.83.6 36 | 37 | # RUN pip install scipy 38 | 39 | ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/workspace/lib 40 | 41 | # Enable OpenGL support 42 | # RUN apt-get install -y -qq --no-install-recommends libglvnd0 libgl1 libglx0 libegl1 libxext6 libx11-6 43 | # Env vars for the nvidia-container-runtime. 44 | ENV NVIDIA_VISIBLE_DEVICES all 45 | ENV NVIDIA_DRIVER_CAPABILITIES graphics,utility,compute 46 | 47 | 48 | # Build opencv 49 | RUN mkdir opencv && cd opencv && wget https://github.com/opencv/opencv/archive/3.4.11.zip && unzip 3.4.11.zip && rm 3.4.11.zip && \ 50 | mkdir build && cd build && \ 51 | cmake -DWITH_CUDA=ON -DBUILD_EXAMPLES=OFF -DOPENCV_GENERATE_PKGCONFIG=ON ../opencv-3.4.11 && \ 52 | make -j`nproc` && make install 53 | 54 | 55 | # WACV18 is an old project. The current version Openpose is not compatible any more. 56 | # We clone and checkout the last compatible version (see PyOpenpose README). 57 | RUN git clone https://github.com/CMU-Perceptual-Computing-Lab/openpose.git && \ 58 | cd openpose && git checkout e38269862f05beca9497960eef3d35f9eecc0808 && \ 59 | git submodule update --init --recursive 60 | 61 | # NOTE: Openpose comes with a CMake build system. 62 | # Unfortunatelly the commit we are using here has a bug that breaks the caffe build system for 63 | # GPUs newer than Pascal. So we are using the old Makefiles for this Dockerfile. 64 | 65 | RUN apt-get install -y python3-dev python3-numpy 66 | 67 | COPY cudnn/*.deb /tmp/ 68 | RUN dpkg -i /tmp/libcudnn7_7.6.5.32-1+cuda10.1_amd64.deb /tmp/libcudnn7-dev_7.6.5.32-1+cuda10.1_amd64.deb 69 | 70 | # Build caffee 71 | COPY config/Makefile.config.caffe openpose/3rdparty/caffe/Makefile.config 72 | RUN cd openpose/3rdparty/caffe/ && \ 73 | make all -j`nproc` && make distribute -j`nproc` 74 | 75 | # Build Openpose 76 | COPY config/Makefile.config.openpose openpose/Makefile.config 77 | RUN cd openpose && cp ubuntu_deprecated/Makefile.example Makefile && \ 78 | make all -j`nproc` && make distribute -j`nproc` 79 | 80 | # This would be normally done by cmake but since we used the Makefiles for openpose build: 81 | RUN cp -r openpose/3rdparty/caffe/distribute/* openpose/distribute && \ 82 | ln -s /workspace/openpose_models openpose/distribute/models 83 | 84 | # Setup environment variables needed by PyOpenpose 85 | # Environment variables are set in the image and inherited by the container. 86 | # applications running in the container have access to these environment vars. 87 | ENV OPENPOSE_ROOT=/openpose/distribute 88 | ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${OPENPOSE_ROOT}/lib" 89 | 90 | # Build PyOpenPose 91 | RUN git clone https://github.com/FORTH-ModelBasedTracker/PyOpenPose.git && \ 92 | mkdir PyOpenPose/build && cd PyOpenPose/build && cmake .. -DWITH_PYTHON3=1 && \ 93 | make -j`nproc` && make install 94 | 95 | ENV PYTHONPATH=/usr/local/lib:$PYTHONPATH 96 | ENV LD_LIBRARY_PATH=/workspace/lib:/usr/local/lib:$LD_LIBRARY_PATH 97 | 98 | 99 | # Env vars for the nvidia-container-runtime. 100 | ENV NVIDIA_VISIBLE_DEVICES all 101 | ENV NVIDIA_DRIVER_CAPABILITIES graphics,utility,compute 102 | 103 | # Set the workspace location (where new code will go) 104 | WORKDIR /workspace 105 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Monocular RGB, real time 3D hand pose estimation in the wild 2 | 3 | This repository contains scripts for testing the work: 4 | "Using a single RGB frame for real time 3D hand pose estimation in the wild" 5 | 6 | You can download the full paper from [here](http://users.ics.forth.gr/~argyros/mypapers/2018_03_WACV_rgbmonohand.pdf) 7 | 8 | 9 | [![3D Hand pose estimation on a wild youtube video](http://img.youtube.com/vi/VoWAmtga9fg/0.jpg)](http://www.youtube.com/watch?v=VoWAmtga9fg "WACV18") 10 | 11 | ## Overview 12 | 13 | Our method the enables the real-time estimation of the full 3D pose of one or more human hands using a single commodity RGB camera. Recent work in the area has displayed impressive progress using RGBD input. However, since the introduction of RGBD sensors, there has been little progress for the case of monocular color input. 14 | 15 | We capitalize on the latest advancements of deep learning, combining them with the power of generative hand pose estimation techniques to achieve real-time monocular 3D hand pose estimation in unrestricted scenarios. More specifically, given an RGB image and the relevant camera calibration information, we employ a state-of-the-art detector to localize hands. 16 | 17 | Subsequently we run a pretrained network that estimates the 2D location of hand joints (i.e by [Gouidis et al](http://users.ics.forth.gr/~argyros/mypapers/2019_05_MVA_hand2Dkeypoints.pdf) or by [Simon et al](https://arxiv.org/abs/1704.07809)). On the final step, non-linear least-squares minimization fits a 3D model of the hand to the estimated 2D joint positions, recovering the 3D hand pose. 18 | ![Pipeline](res/full_pipeline.png) 19 | 20 | ## Requirements 21 | 22 | This work depends on a set (currently) closed source of C++ libraries developed at [CVRL-FORTH](http://www.ics.forth.gr/cvrl). We provide **Ubuntu 16.04 binaries** for these libraries. Follow the instructions [here](lib/README.md) to download them and set your environment properly. 23 | 24 | You will need **Python 3.x** to run the scripts. 25 | The following python libraries are required: 26 | 27 | ```bash 28 | sudo pip3 install numpy opencv-python 29 | ``` 30 | 31 | If you use the provided pretrained network for 2D Joint estimation (by Goudis et al) you will also need to istall **tensorflow**. 32 | 33 | ```bash 34 | pip3 install tensorflow-gpu 35 | ``` 36 | NOTE: The script was tested with tensorflow 1.12.0 and CUDA 9.0 37 | 38 | If you use the 2D joint estimator of Simon et al you will need to install [Openpose](https://github.com/CMU-Perceptual-Computing-Lab/openpose) and [PyOpenPose](https://github.com/FORTH-ModelBasedTracker/PyOpenPose). Follow the installation instructions on these projects. 39 | 40 | ## Hand detector 41 | 42 | On our paper we use a retrained YOLO detector to detect hands (left, right) and heads in the input image. 43 | The codebase in this project does not include that part of the pipeline. 44 | The example scripts use an initial bounding box and tracking to crop the user's hand in the images and pass it to the 2D joint estimator. 45 | 46 | ## Usage 47 | 48 | You can use the 3D hand pose estimation with any 2D joint estimator. We provide two different example scripts: 49 | 50 | ### handpose.py 51 | 52 | The **handpose.py** script uses the 2D hand joint estimator of [Gouidis et al](http://users.ics.forth.gr/~argyros/mypapers/2019_05_MVA_hand2Dkeypoints.pdf). 53 | 54 | ### handpose_simon_backend.py 55 | 56 | This script uses the 2D hand joint estimator by Simon et al. You will need to properly install Openpose and PyOpenPose before running this script. 57 | 58 | 59 | ## Docker 60 | 61 | Since this is a (very) old project the only good way to test it on modern linux distros is using docker. 62 | 63 | You need to download cudnn7 deb packages from nvidia (requires registration) and place them in the cudnn folder. 64 | See [here](cudnn/README.md) for details. 65 | 66 | Finally go to the openpose_models folder and run the getModels.sh script to download the required openpose models. 67 | 68 | You can use the devcontainer with vscode or build it on CLI with docker-compose. 69 | This will create an image with ubuntu16.04 and all required libraries to test the project. 70 | You can build and run it from CLI using the following commands: 71 | 72 | ```bash 73 | docker-compose build 74 | docker-compose up -d 75 | xhost + 76 | docker exec -it devcontainer_dev_1 python3 handpose_simon_backend.py 77 | ``` 78 | -------------------------------------------------------------------------------- /common/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Adapted from the MonoHand3D codebase for the MonocularRGB_3D_Handpose project (github release) 3 | 4 | @author: Paschalis Panteleris (padeler@ics.forth.gr) 5 | """ 6 | -------------------------------------------------------------------------------- /common/calibrate.py: -------------------------------------------------------------------------------- 1 | """ 2 | Adapted from PyCvUtils project for the MonocularRGB_3D_Handpose project. 3 | 4 | @author: Paschalis Panteleris (padeler@ics.forth.gr) 5 | """ 6 | 7 | import json 8 | import numpy as np 9 | import PyMBVCore as Core 10 | 11 | def PackOpenCVCalib(repErr,mtx, dist, rvec, tvec,imgSize,cameraId=0): 12 | 13 | camera = { 14 | "Dims":imgSize, 15 | "CameraMatrix":mtx.tolist(), 16 | "Distortion":dist.flatten().tolist(), 17 | "Rotation":rvec.flatten().tolist(), 18 | "Translation":tvec.flatten().tolist(), 19 | "CalibReprError":repErr, 20 | "CameraID":cameraId, 21 | } 22 | return camera 23 | 24 | 25 | def OpenCVCalib2CameraMeta(calibDict,znear=100,zfar=10000): 26 | cameraFrustrum = Core.CameraFrustum() 27 | mtx = np.array(calibDict["CameraMatrix"],dtype=np.float32) 28 | size = tuple(calibDict["Dims"]) 29 | k1,k2,p1,p2,k3 = calibDict["Distortion"] 30 | cameraId = calibDict["CameraID"] 31 | rvec = np.array(calibDict["Rotation"],dtype=np.float32) 32 | tvec = np.array(calibDict["Translation"],dtype=np.float32) 33 | 34 | cameraFrustrum.OpenCV_setIntrinsics(mtx,size,znear,zfar) 35 | cameraFrustrum.OpenCV_setExtrinsics(tvec,rvec) 36 | cameraMeta = Core.CameraMeta(cameraFrustrum,size[0],size[1],k1,k2,p1,p2,k3,cameraId) 37 | 38 | return cameraMeta 39 | 40 | def CameraMeta2OpenCVCalib(cameraMeta): 41 | dims = cameraMeta.size 42 | dist = np.array([cameraMeta.k1,cameraMeta.k2,cameraMeta.p1,cameraMeta.p2,cameraMeta.k3],dtype=np.float32) 43 | mtx = cameraMeta.camera.OpenCV_getIntrinsics(dims) 44 | tvec,rvec = cameraMeta.camera.OpenCV_getExtrinsics() 45 | camId = cameraMeta.cameraId 46 | return PackOpenCVCalib(-1,mtx,dist,rvec,tvec,dims,camId) 47 | 48 | 49 | def SaveOpenCVCalib(calibDict, filename): 50 | with open(filename,"w") as f: 51 | json.dump(calibDict,f, indent=4, separators=(',', ': ')) 52 | 53 | 54 | def LoadOpenCVCalib(filename): 55 | with open(filename,"r") as f: 56 | calibDict = json.load(f) 57 | return calibDict 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /common/factory.py: -------------------------------------------------------------------------------- 1 | """ 2 | Adapted from the MonoHand3D codebase for the MonocularRGB_3D_Handpose project (github release) 3 | 4 | @author: Paschalis Panteleris (padeler@ics.forth.gr) 5 | """ 6 | 7 | import PyMBVCore as Core 8 | import PyMBVDecoding 9 | import PyMBVAcquisition 10 | import PyMBVRendering 11 | import PyMBVLibraries as Libraries 12 | import PyMBVParticleFilter as pf 13 | import PyCeresIK as IK 14 | import numpy as np 15 | 16 | mmanager = Core.MeshManager() 17 | 18 | class Model(object): 19 | def __init__(self, model3d, decoder, bones_map, landmarks_vector): 20 | self.model3d = model3d 21 | self.decoder = decoder 22 | self.bones_map = bones_map 23 | self.landmarks_vector = landmarks_vector 24 | 25 | self.init_pose = Core.ParamVector(model3d.default_state) 26 | self.low_bounds = np.array(model3d.low_bounds) 27 | self.high_bounds = np.array(model3d.high_bounds) 28 | 29 | self.bounds_mask = Core.UIntVector(set(range(len(self.low_bounds))) - {3, 4, 5, 6}) 30 | self.low_bounds[[0, 1, 2]] = [-3000, -3000, 50] 31 | self.high_bounds[[0, 1, 2]] = [3000, 3000, 4000] 32 | 33 | 34 | def reset_pose(self): 35 | self.init_pose = Core.ParamVector(self.model3d.default_state) 36 | 37 | 38 | class HandPoseEstimator(object): 39 | 40 | def __init__(self, config): 41 | 42 | self.model = create_model(config["model"]) 43 | custom_init = config.get("model_init_pose", None) 44 | if custom_init is not None: 45 | self.model.init_pose = Core.ParamVector(custom_init) 46 | 47 | self.ba = IK.ModelAwareBundleAdjuster() 48 | self.ba.model_to_keypoints = config["model_map"] 49 | self.ba.max_iterations = config["ba_iter"] 50 | 51 | self.ba.decoder = self.model.decoder 52 | self.ba.landmarks = self.model.landmarks_vector 53 | 54 | self.ba.bounds_mask = self.model.bounds_mask 55 | self.ba.low_bounds = Core.ParamVector(self.model.low_bounds) 56 | self.ba.high_bounds = Core.ParamVector(self.model.high_bounds) 57 | 58 | # self.ba.ceres_report = True 59 | self.last_result = self.last_score = None 60 | 61 | def estimate(self, obs_vec): 62 | 63 | score, res = self.ba.solve(obs_vec, Core.ParamVector(self.model.init_pose)) 64 | 65 | self.last_score = score 66 | self.last_result = res 67 | 68 | return score, res 69 | 70 | def print_report(self): 71 | succ_steps = self.ba.summary.num_successful_steps 72 | fail_steps = self.ba.summary.num_unsuccessful_steps 73 | total_steps = self.ba.summary.num_iterations 74 | print("[", total_steps, succ_steps, fail_steps, "]", "[", self.last_score, "]", self.ba.summary.message)# , "==>", self.last_result) 75 | 76 | 77 | 78 | def create_model(model_xml): 79 | model3d = pf.Model3dMeta.create(model_xml) 80 | model3d.setupMeshManager(mmanager) 81 | print('Model Factory, loaded model from <', model_xml, '>', ', bones:', model3d.n_bones, ', dims:', model3d.n_dims) 82 | 83 | decoder = model3d.createDecoder() 84 | decoder.loadMeshTickets(mmanager) 85 | 86 | # Create Landmarks 87 | model_parts = model3d.parts 88 | model_parts.genBonesMap() 89 | print("Model Factory, Parts Map:", model_parts.parts_map) 90 | 91 | names_l = names_g = model3d.parts.parts_map['all'] 92 | 93 | init_positions = Core.Vector3fStorage([Core.Vector3(0, 0, 0)] * len(names_l)) 94 | source_ref = pf.ReferenceFrame.RFGeomLocal 95 | dest_ref = pf.ReferenceFrame.RFModel 96 | bmap = model3d.parts.bones_map 97 | landmarks = pf.Landmark3dInfoSkinned.create_multiple(names_l, names_g, source_ref, init_positions, bmap) 98 | landmarks_decoder = pf.LandmarksDecoder() 99 | landmarks_decoder.convertReferenceFrame(dest_ref, decoder.kinematics, landmarks) 100 | 101 | landmarks_vector = IK.LandmarksVector() 102 | for l in landmarks: 103 | landmarks_vector.append(l) 104 | 105 | tickets = Core.MeshTicketList() 106 | mmanager.enumerateMeshes(tickets) 107 | last = 0 108 | for idx, t in enumerate(tickets): 109 | last = t 110 | 111 | bonesMap = Libraries.BonesMap({last: model3d.n_bones}) 112 | 113 | return Model(model3d, decoder, bonesMap, landmarks_vector) -------------------------------------------------------------------------------- /common/image.py: -------------------------------------------------------------------------------- 1 | """ 2 | Adapted from PyCvUtils project for the MonocularRGB_3D_Handpose project. 3 | 4 | @author: Paschalis Panteleris (padeler@ics.forth.gr) 5 | """ 6 | 7 | import numpy as np 8 | import cv2 9 | 10 | 11 | def show(label, img, delay=-1): 12 | if len(img.shape)==2 and img.dtype!=np.uint8: 13 | img = cv2.normalize(img,None,0,255,cv2.NORM_MINMAX,cv2.CV_8UC1) 14 | cv2.imshow(label,img) 15 | 16 | if delay>-1: 17 | return cv2.waitKey(delay) 18 | 19 | 20 | -------------------------------------------------------------------------------- /common/mva19.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Adapted from the MonoHand3D codebase for the MonocularRGB_3D_Handpose project (github release) 3 | 4 | @author: Paschalis Panteleris (padeler@ics.forth.gr) 5 | ''' 6 | 7 | import numpy as np 8 | import cv2 9 | 10 | 11 | # find connection in the specified sequence, center 29 is in the position 15 12 | limbSeq = [[0, 1], [0, 5], [0, 9], [0, 13], [0, 17], # palm 13 | [1, 2], [2, 3], [3,4], # thump 14 | [5, 6], [6, 7], [7, 8], # index 15 | [9, 10], [10, 11], [11, 12], # middle 16 | [13, 14], [14, 15], [15, 16], # ring 17 | [17, 18], [18, 19], [19, 20], # pinky 18 | ] 19 | 20 | # visualize 21 | colors = [[255,255,255], 22 | [255, 0, 0], [255, 60, 0], [255, 120, 0], [255, 180, 0], 23 | [0, 255, 0], [60, 255, 0], [120, 255, 0], [180, 255, 0], 24 | [0, 255, 0], [0, 255, 60], [0, 255, 120], [0, 255, 180], 25 | [0, 0, 255], [0, 60, 255], [0, 120, 255], [0, 180, 255], 26 | [0, 0, 255], [60, 0, 255], [120, 0, 255], [180, 0, 255],] 27 | 28 | def peaks_to_hand(peaks, dx,dy): 29 | hand = [] 30 | for joints in peaks: 31 | sel = sorted(joints, key=lambda x: x.score, reverse=True) 32 | 33 | if len(sel)>0: 34 | p = sel[0] 35 | x,y,score = p.x+dx, p.y+dy, p.score 36 | hand.append([x,y,score]) 37 | else: 38 | hand.append([0,0,0]) 39 | 40 | return np.array(hand,dtype=np.float32) 41 | 42 | 43 | def visualize_2dhand_skeleton(canvas, hand, stickwidth = 3, thre=0.1): 44 | 45 | for pair in limbSeq: 46 | if hand[pair[0]][2]>thre and hand[pair[1]][2]>thre: 47 | x0,y0 = hand[pair[0]][:2] 48 | x1,y1 = hand[pair[1]][:2] 49 | x0 = int(x0) 50 | x1 = int(x1) 51 | y0 = int(y0) 52 | y1 = int(y1) 53 | cv2.line(canvas,(x0,y0), (x1,y1), colors[pair[1]%len(colors)], thickness=stickwidth,lineType=cv2.LINE_AA) 54 | 55 | return canvas 56 | 57 | def visualize_3dhand_skeleton(canvas, hand, stickwidth = 10, txt_size=0.5): 58 | 59 | for pair in limbSeq: 60 | x0,y0 = hand[pair[0]][:2] 61 | x1,y1 = hand[pair[1]][:2] 62 | x0 = int(x0) 63 | x1 = int(x1) 64 | y0 = int(y0) 65 | y1 = int(y1) 66 | cv2.line(canvas,(x0,y0), (x1,y1), colors[pair[1]%len(colors)], thickness=stickwidth,lineType=cv2.LINE_AA) 67 | 68 | for i, p in enumerate(hand): 69 | x,y = int(p[0]), int(p[1]) 70 | cv2.circle(canvas, (x,y), 4, colors[i%len(colors)], thickness=stickwidth, lineType=cv2.LINE_AA) 71 | if txt_size>0: 72 | cv2.putText(canvas, str(i), (x+5,y), 0, txt_size, colors[i%len(colors)],lineType=cv2.LINE_AA) 73 | 74 | 75 | return canvas 76 | 77 | 78 | def load_graph(model_file): 79 | import tensorflow as tf 80 | 81 | graph = tf.Graph() 82 | graph_def = tf.GraphDef() 83 | 84 | with open(model_file, "rb") as f: 85 | graph_def.ParseFromString(f.read()) 86 | with graph.as_default(): 87 | tf.import_graph_def(graph_def) 88 | 89 | return graph 90 | 91 | def padRightDownCorner(img, stride, padValue): 92 | h = img.shape[0] 93 | w = img.shape[1] 94 | 95 | pad = 4 * [None] 96 | pad[0] = 0 # up 97 | pad[1] = 0 # left 98 | pad[2] = 0 if (h%stride==0) else stride - (h % stride) # down 99 | pad[3] = 0 if (w%stride==0) else stride - (w % stride) # right 100 | 101 | img_padded = img 102 | pad_up = np.tile(img_padded[0:1,:,:]*0 + padValue, (pad[0], 1, 1)) 103 | img_padded = np.concatenate((pad_up, img_padded), axis=0) 104 | pad_left = np.tile(img_padded[:,0:1,:]*0 + padValue, (1, pad[1], 1)) 105 | img_padded = np.concatenate((pad_left, img_padded), axis=1) 106 | pad_down = np.tile(img_padded[-2:-1,:,:]*0 + padValue, (pad[2], 1, 1)) 107 | img_padded = np.concatenate((img_padded, pad_down), axis=0) 108 | pad_right = np.tile(img_padded[:,-2:-1,:]*0 + padValue, (1, pad[3], 1)) 109 | img_padded = np.concatenate((img_padded, pad_right), axis=1) 110 | 111 | return img_padded, pad 112 | 113 | def preprocess(oriImg, boxsize=368, stride=8, padValue=128): 114 | scale = float(boxsize) / float(oriImg.shape[0]) 115 | 116 | imageToTest = cv2.resize(oriImg, (0, 0), fx=scale, fy=scale, interpolation=cv2.INTER_CUBIC) 117 | imageToTest_padded, pad = padRightDownCorner(imageToTest, stride, padValue) 118 | input_img = np.transpose(np.float32(imageToTest_padded[:,:,:,np.newaxis]), (3,0,1,2)) # required shape (1, width, height, channels) 119 | 120 | return input_img, pad 121 | 122 | 123 | def update_bbox(p2d, dims, pad=0.3): 124 | x = np.min(p2d[:,0]) 125 | y = np.min(p2d[:,1]) 126 | xm = np.max(p2d[:,0]) 127 | ym = np.max(p2d[:,1]) 128 | 129 | cx = (x+xm)/2 130 | cy = (y+ym)/2 131 | w = xm - x 132 | h = ym - y 133 | b = max((w,h,224)) 134 | b = int(b + b*pad) 135 | 136 | x = cx-b/2 137 | y = cy-b/2 138 | 139 | x = max(0,int(x)) 140 | y = max(0,int(y)) 141 | 142 | x = min(x, dims[0]-b) 143 | y = min(y, dims[1]-b) 144 | 145 | 146 | return [x,y,b,b] 147 | 148 | 149 | 150 | class Estimator(object): 151 | def __init__(self, model_file, input_layer="input_1", output_layer="k2tfout_0"): 152 | import tensorflow as tf 153 | 154 | input_name = "import/" + input_layer 155 | output_name = "import/" + output_layer 156 | 157 | self.graph = load_graph(model_file) 158 | self.input_operation = self.graph.get_operation_by_name(input_name) 159 | self.output_operation = self.graph.get_operation_by_name(output_name) 160 | self.sess = tf.Session(graph=self.graph) 161 | 162 | 163 | def predict(self, img): 164 | results = self.sess.run(self.output_operation.outputs[0], feed_dict={self.input_operation.outputs[0]: img}) 165 | return np.squeeze(results) 166 | 167 | -------------------------------------------------------------------------------- /common/opencv_grabbers.py: -------------------------------------------------------------------------------- 1 | """ 2 | Adapted from PyCvUtils project for the MonocularRGB_3D_Handpose project. 3 | 4 | @author: Paschalis Panteleris (padeler@ics.forth.gr) 5 | """ 6 | 7 | import cv2 8 | from common.calibrate import OpenCVCalib2CameraMeta, LoadOpenCVCalib 9 | 10 | class OpenCVGrabber(object): 11 | ''' 12 | A wrapper grabber for the opencv VideoCapture object that exposes the MBV Grabber API 13 | ''' 14 | 15 | 16 | def __init__(self, cam_id = 0, calib_file = None, mirror = False): 17 | self.cam_id = cam_id 18 | self.mirror = mirror 19 | if calib_file is not None: 20 | self.calib = OpenCVCalib2CameraMeta(LoadOpenCVCalib(calib_file)) 21 | 22 | else: 23 | self.calib = None 24 | 25 | self.cap = cv2.VideoCapture(cam_id) 26 | # TODO Get these values from parameters in the constructor 27 | self.cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 480) 28 | self.cap.set(cv2.CAP_PROP_FRAME_WIDTH, 640) 29 | self.cap.set(cv2.CAP_PROP_BRIGHTNESS, 0.5) 30 | 31 | def initialize(self): 32 | pass 33 | 34 | def grab(self): 35 | try: 36 | ret, frame = self.cap.read() 37 | if not ret: 38 | raise Exception("VideoCapture.read() returned False") 39 | if self.mirror: 40 | frame = cv2.flip(frame, 1) 41 | 42 | return [frame,], [self.calib,] 43 | except Exception as e: 44 | print("Failed to grab image from opencv capture object. %s" % e) 45 | raise e 46 | 47 | 48 | 49 | if __name__ == '__main__': 50 | import sys 51 | src = 0 52 | if len(sys.argv)>1: 53 | src = sys.argv[1] 54 | try: 55 | src = int(src) 56 | except: # ignore if not an int (probably a url of file path) 57 | pass 58 | print("Grabbing from ", src) 59 | grabber = OpenCVGrabber(src) 60 | k = 0 61 | while k & 0xFF!=ord('q'): 62 | imgs, clbs = grabber.grab() 63 | cv2.imshow("GRAB", imgs[0]) 64 | k = cv2.waitKey(1) 65 | -------------------------------------------------------------------------------- /common/pipeline.py: -------------------------------------------------------------------------------- 1 | """ 2 | Adapted from the MonoHand3D codebase for the MonocularRGB_3D_Handpose project (github release) 3 | 4 | support methods used in the hand pose pipeline 5 | @author: Paschalis Panteleris (padeler@ics.forth.gr) 6 | """ 7 | 8 | import PyMBVCore as Core 9 | import PyMBVDecoding as Decondign 10 | import PyMBVAcquisition 11 | import PyMBVRendering as Rendering 12 | import PyMBVLibraries as Libraries 13 | import numpy as np 14 | import cv2 15 | 16 | 17 | class HandVisualizer(object): 18 | def __init__(self, mmanager, viz_dims=(1600, 900)): 19 | self.mmanager = mmanager 20 | w, h = viz_dims 21 | renderer = Rendering.RendererOGLCudaExposed.get(w,h) 22 | renderer.culling = Rendering.RendererOGLBase.Culling.CullNone 23 | erenderer = Rendering.ExposedRenderer(renderer, renderer) 24 | rhelper = Libraries.RenderingHelper() 25 | rhelper.renderer = renderer 26 | raccess = Libraries.RenderingAccessor() 27 | raccess.exposer = erenderer 28 | 29 | self.rhelper = rhelper 30 | self.raccess = raccess 31 | self.renderer = renderer 32 | 33 | def render(self, hand_model, pose, clb, flag=Rendering.Renderer.WriteFlag.WriteAll): 34 | 35 | self.rhelper.bonesMap = hand_model.bones_map 36 | self.rhelper.decoder = hand_model.decoder 37 | 38 | self.renderer.setSize(1, 1, int(clb.width), int(clb.height)) 39 | self.renderer.uploadViewMatrices(Core.MatrixVector([clb.camera.Graphics_getViewTransform()])) 40 | self.renderer.uploadProjectionMatrices(Core.MatrixVector([clb.camera.Graphics_getProjectionTransform()])) 41 | 42 | self.rhelper.render(flag, 1, 1, int(clb.width), int(clb.height), [pose, ], self.mmanager) 43 | 44 | def getDepth(self, color_map = cv2.COLORMAP_RAINBOW): 45 | depth = self.raccess.getPositionMap()[:, :, 2] 46 | mask = np.ones(depth.shape, dtype=np.ubyte) 47 | mask[depth == 0] = 0 48 | dmap = cv2.normalize(depth,None,0,255,cv2.NORM_MINMAX,cv2.CV_8UC1, mask) 49 | 50 | if color_map is not None: 51 | dmapColor = cv2.applyColorMap(dmap, cv2.COLORMAP_RAINBOW) 52 | dmapColor[dmap == 0] = 0 53 | return dmapColor 54 | else: 55 | return dmap 56 | 57 | def showDepth(self, windowTitle="Depth"): 58 | dmapColor = self.getDepth() 59 | cv2.imshow(windowTitle, dmapColor) 60 | 61 | def showNormals(self, windowTitle="Normals"): 62 | nmap = (self.raccess.getNormalMap()[:, :, :3] * 255).astype(np.ubyte) 63 | cv2.imshow(windowTitle, nmap) 64 | 65 | 66 | 67 | 68 | def draw_rect(viz, label, bb, box_color=(155, 100, 100), text_color=(220, 200, 200)): 69 | x, y, w, h = bb 70 | cv2.rectangle(viz, (x, y), (x + w, y + h), box_color, 2) 71 | cv2.putText(viz, label, (x+4, y+h-10), 0, 0.5, text_color, 1, cv2.LINE_AA) 72 | 73 | def draw_hands(viz, bb): 74 | left = bb[:4] 75 | right = bb[4:] 76 | if left[2] > 0: 77 | draw_rect(viz, "", left, box_color=(0, 255, 0), text_color=(200, 200, 0)) 78 | if right[2] > 0: 79 | draw_rect(viz, "", right) 80 | 81 | 82 | def draw_points2D(img, points, color, size, show_idx=False): 83 | 84 | for idx, p in enumerate(points): 85 | center = tuple(int(v) for v in p) 86 | cv2.circle(img, center, size, color) 87 | if show_idx: 88 | cv2.putText(img, str(idx), center, 0, 0.3, (71, 99, 255), 1) 89 | 90 | return img 91 | 92 | 93 | -------------------------------------------------------------------------------- /config/Makefile.config.caffe: -------------------------------------------------------------------------------- 1 | ## Refer to http://caffe.berkeleyvision.org/installation.html 2 | # Contributions simplifying and improving our build system are welcome! 3 | 4 | # cuDNN acceleration switch (uncomment to build with cuDNN). 5 | USE_CUDNN := 1 6 | 7 | # CPU-only switch (uncomment to build without GPU support). 8 | # CPU_ONLY := 1 9 | 10 | # uncomment to disable IO dependencies and corresponding data layers 11 | # USE_OPENCV := 0 12 | # USE_LEVELDB := 0 13 | # USE_LMDB := 0 14 | 15 | # uncomment to allow MDB_NOLOCK when reading LMDB files (only if necessary) 16 | # You should not set this flag if you will be reading LMDBs with any 17 | # possibility of simultaneous read and write 18 | # ALLOW_LMDB_NOLOCK := 1 19 | 20 | # Uncomment if you're using OpenCV 3 21 | OPENCV_VERSION := 3 22 | 23 | # To customize your choice of compiler, uncomment and set the following. 24 | # N.B. the default for Linux is g++ and the default for OSX is clang++ 25 | # CUSTOM_CXX := g++ 26 | 27 | # CUDA directory contains bin/ and lib/ directories that we need. 28 | CUDA_DIR := /usr/local/cuda 29 | # On Ubuntu 14.04, if cuda tools are installed via 30 | # "sudo apt-get install nvidia-cuda-toolkit" then use this instead: 31 | # CUDA_DIR := /usr 32 | 33 | # CUDA architecture setting: going with all of them. 34 | # For CUDA < 6.0, comment the *_50 through *_61 lines for compatibility. 35 | # For CUDA < 8.0, comment the *_60 and *_61 lines for compatibility. 36 | CUDA_ARCH := -gencode arch=compute_30,code=sm_30 \ 37 | -gencode arch=compute_35,code=sm_35 \ 38 | -gencode arch=compute_50,code=sm_50 \ 39 | -gencode arch=compute_52,code=sm_52 \ 40 | -gencode arch=compute_60,code=sm_60 \ 41 | -gencode arch=compute_61,code=sm_61 \ 42 | -gencode arch=compute_61,code=compute_61 43 | # Deprecated 44 | # CUDA_ARCH := -gencode arch=compute_20,code=sm_20 \ 45 | # -gencode arch=compute_20,code=sm_21 \ 46 | # -gencode arch=compute_30,code=sm_30 \ 47 | # -gencode arch=compute_35,code=sm_35 \ 48 | # -gencode arch=compute_50,code=sm_50 \ 49 | # -gencode arch=compute_52,code=sm_52 \ 50 | # -gencode arch=compute_60,code=sm_60 \ 51 | # -gencode arch=compute_61,code=sm_61 \ 52 | # -gencode arch=compute_61,code=compute_61 53 | 54 | # BLAS choice: 55 | # atlas for ATLAS (default) 56 | # mkl for MKL 57 | # open for OpenBlas 58 | BLAS := atlas 59 | # Custom (MKL/ATLAS/OpenBLAS) include and lib directories. 60 | # Leave commented to accept the defaults for your choice of BLAS 61 | # (which should work)! 62 | # BLAS_INCLUDE := /path/to/your/blas 63 | # BLAS_LIB := /path/to/your/blas 64 | 65 | # Homebrew puts openblas in a directory that is not on the standard search path 66 | # BLAS_INCLUDE := $(shell brew --prefix openblas)/include 67 | # BLAS_LIB := $(shell brew --prefix openblas)/lib 68 | 69 | # This is required only if you will compile the matlab interface. 70 | # MATLAB directory should contain the mex binary in /bin. 71 | # MATLAB_DIR := /usr/local 72 | # MATLAB_DIR := /Applications/MATLAB_R2012b.app 73 | 74 | # NOTE: this is required only if you will compile the python interface. 75 | # We need to be able to find Python.h and numpy/arrayobject.h. 76 | PYTHON_INCLUDE := /usr/include/python2.7 \ 77 | /usr/lib/python2.7/dist-packages/numpy/core/include 78 | # Anaconda Python distribution is quite popular. Include path: 79 | # Verify anaconda location, sometimes it's in root. 80 | # ANACONDA_HOME := $(HOME)/anaconda 81 | # PYTHON_INCLUDE := $(ANACONDA_HOME)/include \ 82 | # $(ANACONDA_HOME)/include/python2.7 \ 83 | # $(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include 84 | 85 | # Uncomment to use Python 3 (default is Python 2) 86 | PYTHON_LIBRARIES := boost_python-py35 python3.5m 87 | PYTHON_INCLUDE := /usr/include/python3.5m \ 88 | /usr/lib/python3.5/dist-packages/numpy/core/include 89 | 90 | # We need to be able to find libpythonX.X.so or .dylib. 91 | PYTHON_LIB := /usr/lib /usr/local/lib 92 | # PYTHON_LIB := $(ANACONDA_HOME)/lib 93 | 94 | # Homebrew installs numpy in a non standard path (keg only) 95 | # PYTHON_INCLUDE += $(dir $(shell python -c 'import numpy.core; print(numpy.core.__file__)'))/include 96 | # PYTHON_LIB += $(shell brew --prefix numpy)/lib 97 | 98 | # Uncomment to support layers written in Python (will link against Python libs) 99 | # WITH_PYTHON_LAYER := 1 100 | 101 | # Whatever else you find you need goes here. 102 | INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial 103 | LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/hdf5/serial 104 | 105 | # If Homebrew is installed at a non standard location (for example your home directory) and you use it for general dependencies 106 | # INCLUDE_DIRS += $(shell brew --prefix)/include 107 | # LIBRARY_DIRS += $(shell brew --prefix)/lib 108 | 109 | # NCCL acceleration switch (uncomment to build with NCCL) 110 | # https://github.com/NVIDIA/nccl (last tested version: v1.2.3-1+cuda8.0) 111 | # USE_NCCL := 1 112 | 113 | # Uncomment to use `pkg-config` to specify OpenCV library paths. 114 | # (Usually not necessary -- OpenCV libraries are normally installed in one of the above $LIBRARY_DIRS.) 115 | # USE_PKG_CONFIG := 1 116 | 117 | # N.B. both build and distribute dirs are cleared on `make clean` 118 | BUILD_DIR := build 119 | DISTRIBUTE_DIR := distribute 120 | 121 | # Uncomment for debugging. Does not work on OSX due to https://github.com/BVLC/caffe/issues/171 122 | # DEBUG := 1 123 | 124 | # The ID of the GPU that 'make runtest' will use to run unit tests. 125 | TEST_GPUID := 0 126 | 127 | # enable pretty build (comment to see full commands) 128 | Q ?= @ 129 | -------------------------------------------------------------------------------- /config/Makefile.config.openpose: -------------------------------------------------------------------------------- 1 | ## Refer to http://caffe.berkeleyvision.org/installation.html 2 | # Contributions simplifying and improving our build system are welcome! 3 | 4 | # CPU-only switch (comment to build without GPU support). 5 | USE_CUDA := 1 6 | 7 | # uncomment to disable IO dependencies and corresponding data layers 8 | # USE_OPENCV := 0 9 | # USE_LEVELDB := 0 10 | # USE_LMDB := 0 11 | 12 | # uncomment to allow MDB_NOLOCK when reading LMDB files (only if necessary) 13 | # You should not set this flag if you will be reading LMDBs with any 14 | # possibility of simultaneous read and write 15 | # ALLOW_LMDB_NOLOCK := 1 16 | 17 | # Uncomment if you're using OpenCV 3 18 | OPENCV_VERSION := 3 19 | 20 | # To customize your choice of compiler, uncomment and set the following. 21 | # N.B. the default for Linux is g++ and the default for OSX is clang++ 22 | # CUSTOM_CXX := g++ 23 | 24 | # CUDA directory contains bin/ and lib/ directories that we need. 25 | CUDA_DIR := /usr/local/cuda 26 | # On Ubuntu 14.04, if cuda tools are installed via 27 | # "sudo apt-get install nvidia-cuda-toolkit" then use this instead: 28 | # CUDA_DIR := /usr 29 | 30 | # CUDA architecture setting: going with all of them. 31 | # For CUDA < 6.0, comment the *_50 through *_61 lines for compatibility. 32 | # For CUDA < 8.0, comment the *_60 and *_61 lines for compatibility. 33 | CUDA_ARCH := -gencode arch=compute_30,code=sm_30 \ 34 | -gencode arch=compute_35,code=sm_35 \ 35 | -gencode arch=compute_50,code=sm_50 \ 36 | -gencode arch=compute_52,code=sm_52 \ 37 | -gencode arch=compute_60,code=sm_60 \ 38 | -gencode arch=compute_61,code=sm_61 \ 39 | -gencode arch=compute_61,code=compute_61 40 | # Deprecated 41 | # CUDA_ARCH := -gencode arch=compute_20,code=sm_20 \ 42 | # -gencode arch=compute_20,code=sm_21 \ 43 | # -gencode arch=compute_30,code=sm_30 \ 44 | # -gencode arch=compute_35,code=sm_35 \ 45 | # -gencode arch=compute_50,code=sm_50 \ 46 | # -gencode arch=compute_52,code=sm_52 \ 47 | # -gencode arch=compute_60,code=sm_60 \ 48 | # -gencode arch=compute_61,code=sm_61 \ 49 | # -gencode arch=compute_61,code=compute_61 50 | 51 | # Uncomment to enable op::Profiler 52 | # PROFILER_ENABLED := 1 53 | 54 | # DEEP_NET choice: 55 | # caffe for Caffe (default and only option so far) 56 | DEEP_NET := caffe 57 | 58 | # Caffe directory 59 | CAFFE_DIR := 3rdparty/caffe/distribute 60 | 61 | # Faster GUI display 62 | # WITH_OPENCV_WITH_OPENGL := 1 63 | # OpenPose 3-D Reconstruction 64 | # WITH_3D_RENDERER := 1 65 | # WITH_CERES := 1 66 | # WITH_FLIR_CAMERA := 1 67 | # Eigen directory (Ceres) 68 | # WITH_EIGEN := 1 69 | EIGEN_DIR := /usr/include/eigen3/ 70 | # Spinnaker directory 71 | SPINNAKER_DIR := /usr/include/spinnaker 72 | 73 | # Whatever else you find you need goes here. 74 | INCLUDE_DIRS := /usr/local/include /usr/include/hdf5/serial 75 | LIBRARY_DIRS := /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/hdf5/serial 76 | 77 | # If Homebrew is installed at a non standard location (for example your home directory) and you use it for general dependencies 78 | # INCLUDE_DIRS += $(shell brew --prefix)/include 79 | # LIBRARY_DIRS += $(shell brew --prefix)/lib 80 | 81 | # Uncomment to use `pkg-config` to specify OpenCV library paths. 82 | # (Usually not necessary -- OpenCV libraries are normally installed in one of the above $LIBRARY_DIRS.) 83 | # USE_PKG_CONFIG := 1 84 | 85 | BUILD_DIR := build 86 | DISTRIBUTE_DIR := distribute 87 | 88 | # Uncomment for debugging. Does not work on OSX due to https://github.com/BVLC/caffe/issues/171 89 | # DEBUG := 1 90 | 91 | # The ID of the GPU that 'make runtest' will use to run unit tests. 92 | TEST_GPUID := 0 93 | 94 | # enable pretty build (comment to see full commands) 95 | Q ?= @ 96 | -------------------------------------------------------------------------------- /cudnn/README.md: -------------------------------------------------------------------------------- 1 | # Download cudnn deb packages from NVIDIA 2 | 3 | [CUDNN Archive](https://developer.nvidia.com/rdp/cudnn-archive) 4 | 5 | Download cudnn 7.6.5 for ubuntu 16.04. 6 | 7 | Two deb files: 8 | - libcudnn7-dev_7.6.5.32-1+cuda10.1_amd64.deb 9 | - libcudnn7_7.6.5.32-1+cuda10.1_amd64.deb 10 | 11 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "2.3" 2 | services: 3 | dev: 4 | build: . 5 | runtime: nvidia 6 | shm_size: 8GB 7 | privileged: true 8 | ipc: host 9 | environment: 10 | DISPLAY: ${DISPLAY} 11 | # ports: 12 | # - 8888:8888 13 | volumes: 14 | # Mounts the project folder to '/workspace'. While this file is in .devcontainer, 15 | # mounts are relative to the first file in the list, which is a level up. 16 | - /tmp/.X11-unix:/tmp/.X11-unix 17 | - ${HOME}/.Xauthority:/root/.Xauthority 18 | - /run/jtop.sock:/run/jtop.sock 19 | - .:/workspace:cached 20 | 21 | devices: 22 | - /dev/video0:/dev/video0 23 | # [Optional] Required for ptrace-based debuggers like C++, Go, and Rust 24 | cap_add: 25 | - SYS_PTRACE 26 | security_opt: 27 | - seccomp:unconfined 28 | 29 | # Overrides default command so things don't shut down after the process ends. 30 | command: sleep infinity 31 | -------------------------------------------------------------------------------- /handpose.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Adapted from the MonoHand3D codebase for the MonocularRGB_3D_Handpose project (github release) 3 | 4 | This script uses the 2D joint estimator of Gouidis et al. 5 | 6 | @author: Paschalis Panteleris (padeler@ics.forth.gr) 7 | ''' 8 | 9 | import sys 10 | sys.path.append("lib") 11 | 12 | import time 13 | import os 14 | 15 | import cv2 16 | import numpy as np 17 | 18 | import PyCeresIK as IK 19 | 20 | from common import image 21 | from common.opencv_grabbers import OpenCVGrabber 22 | from common.calibrate import OpenCVCalib2CameraMeta, LoadOpenCVCalib 23 | 24 | from common import factory 25 | from common import pipeline 26 | 27 | 28 | import PyMBVCore as Core 29 | import PyJointTools as jt 30 | 31 | from common import mva19 32 | 33 | 34 | def mono_hand_loop(acq, outSize, config, track=False, paused=False, with_renderer=False): 35 | 36 | print("Initialize WACV18 3D Pose estimator (IK)...") 37 | pose_estimator = factory.HandPoseEstimator(config) 38 | 39 | if with_renderer: 40 | print("Initialize Hand Visualizer...") 41 | hand_visualizer = pipeline.HandVisualizer(factory.mmanager, outSize) 42 | 43 | print("Initialize MVA19 CVRL Hand pose net...") 44 | estimator = mva19.Estimator(config["model_file"], config["input_layer"], config["output_layer"]) 45 | 46 | left_hand_model = config["model_left"] 47 | started = False 48 | delay = {True: 0, False: 1} 49 | ik_ms = est_ms = 0 50 | p2d = bbox = None 51 | count = 0 52 | mbv_viz = opviz = None 53 | smoothing = config.get("smoothing", 0) 54 | boxsize = config["boxsize"] 55 | stride = config["stride"] 56 | peaks_thre = config["peaks_thre"] 57 | print("Entering main Loop.") 58 | 59 | while True: 60 | try: 61 | imgs, clbs = acq.grab() 62 | if imgs is None or len(imgs)==0: 63 | break 64 | except Exception as e: 65 | print("Failed to grab", e) 66 | break 67 | 68 | st = time.time() 69 | bgr = imgs[0] 70 | clb = clbs[0] 71 | 72 | # compute kp using model initial pose 73 | points2d = pose_estimator.ba.decodeAndProject(pose_estimator.model.init_pose, clb) 74 | oldKp = np.array(points2d).reshape(-1, 2) 75 | 76 | if bbox is None: 77 | bbox = config["default_bbox"] 78 | 79 | score = -1 80 | result_pose = None 81 | crop_viz = None 82 | 83 | # STEP2 detect 2D joints for the detected hand. 84 | if started and bbox is not None: 85 | x,y,w,h = bbox 86 | # print("BBOX: ",bbox) 87 | crop = bgr[y:y+h,x:x+w] 88 | img, pad = mva19.preprocess(crop, boxsize, stride) 89 | 90 | t = time.time() 91 | hm = estimator.predict(img) 92 | est_ms = (time.time() - t) 93 | 94 | # use joint tools to recover keypoints 95 | scale = float(boxsize) / float(crop.shape[0]) 96 | scale = stride/scale 97 | ocparts = np.zeros_like(hm[...,0]) 98 | peaks = jt.FindPeaks(hm[...,:-1], ocparts, peaks_thre, scale, scale) 99 | 100 | # convert peaks to hand keypoints 101 | hand = mva19.peaks_to_hand(peaks, x, y) 102 | 103 | if hand is not None: 104 | keypoints = hand 105 | 106 | mask = keypoints[:, 2] < peaks_thre 107 | keypoints[mask] = [0, 0, 1.0] 108 | 109 | if track: 110 | keypoints[mask, :2] = oldKp[mask] 111 | 112 | keypoints[:, 2] = keypoints[:, 2]**3 113 | 114 | rgbKp = IK.Observations(IK.ObservationType.COLOR, clb, keypoints) 115 | obsVec = IK.ObservationsVector([rgbKp, ]) 116 | t = time.time() 117 | score, res = pose_estimator.estimate(obsVec) 118 | ik_ms = (time.time() - t) 119 | # print(count,) 120 | pose_estimator.print_report() 121 | 122 | if track: 123 | result_pose = list(smoothing * np.array(pose_estimator.model.init_pose) + (1.0 - smoothing) * np.array(res)) 124 | else: 125 | result_pose = list(res) 126 | 127 | # score is the residual, the lower the better, 0 is best 128 | # -1 is failed optimization. 129 | if track: 130 | if -1 < score:# < 20000: 131 | pose_estimator.model.init_pose = Core.ParamVector(result_pose) 132 | else: 133 | print("\n===>Reseting init position for IK<===\n") 134 | pose_estimator.model.reset_pose() 135 | 136 | if score > -1: # compute result points 137 | p2d = np.array(pose_estimator.ba.decodeAndProject(Core.ParamVector(result_pose), clb)).reshape(-1, 2) 138 | # scale = w/config.boxsize 139 | bbox = mva19.update_bbox(p2d,bgr.shape[1::-1]) 140 | 141 | 142 | 143 | viz = np.copy(bgr) 144 | viz2d = np.zeros_like(bgr) 145 | if started and result_pose is not None: 146 | viz2d = mva19.visualize_2dhand_skeleton(viz2d, hand, thre=peaks_thre) 147 | cv2.imshow("2D CNN estimation",viz2d) 148 | header = "FPS OPT+VIZ %03d, OPT %03d (CNN %03d, 3D %03d)"%(1/(time.time()-st),1/(est_ms+ik_ms),1.0/est_ms, 1.0/ik_ms) 149 | 150 | if with_renderer: 151 | hand_visualizer.render(pose_estimator.model, Core.ParamVector(result_pose), clb) 152 | mbv_viz = hand_visualizer.getDepth() 153 | cv2.imshow("MBV VIZ", mbv_viz) 154 | mask = mbv_viz != [0, 0, 0] 155 | viz[mask] = mbv_viz[mask] 156 | else: 157 | viz = mva19.visualize_3dhand_skeleton(viz, p2d) 158 | pipeline.draw_rect(viz, "Hand", bbox, box_color=(0, 255, 0), text_color=(200, 200, 0)) 159 | 160 | 161 | else: 162 | header = "Press 's' to start, 'r' to reset pose, 'p' to pause frame." 163 | 164 | 165 | 166 | cv2.putText(viz, header, (20, 20), 0, 0.7, (50, 20, 20), 1, cv2.LINE_AA) 167 | cv2.imshow("3D Hand Model reprojection", viz) 168 | 169 | key = cv2.waitKey(delay[paused]) 170 | if key & 255 == ord('p'): 171 | paused = not paused 172 | if key & 255 == ord('q'): 173 | break 174 | if key & 255 == ord('r'): 175 | print("\n===>Reseting init position for IK<===\n") 176 | pose_estimator.model.reset_pose() 177 | bbox = config['default_bbox'] 178 | print("RESETING BBOX",bbox) 179 | if key & 255 == ord('s'): 180 | started = not started 181 | 182 | 183 | count += 1 184 | 185 | 186 | 187 | 188 | if __name__ == '__main__': 189 | 190 | config = { 191 | "model": "models/hand_skinned.xml", "model_left": False, 192 | "model_init_pose": [-109.80840809323652, 95.70022984677065, 584.613931114289, 292.3322807284121, -1547.742897973965, -61.60146881490577, 435.33025195547793, 1.5707458637241434, 0.21444030289465843, 0.11033385117688158, 0.021952050059337137, 0.5716581133215294, 0.02969734913698679, 0.03414155945643072, 0.0, 1.1504613679382742, -0.5235922979328, 0.15626331136368257, 0.03656410417088128, 8.59579088582312e-07, 0.35789633949684985, 0.00012514308785717494, 0.005923001258945023, 0.24864102398139007, 0.2518954858979162, 0.0, 3.814694400000002e-13], 193 | "model_map": IK.ModelAwareBundleAdjuster.HAND_SKINNED_TO_OP_RIGHT_HAND, 194 | 195 | "ba_iter": 100, 196 | "padding": 0.3, 197 | "minDim": 170, 198 | 199 | "smoothing": 0.2, 200 | 201 | "model_file": "models/mobnet4f_cmu_adadelta_t1_model.pb", 202 | "input_layer": "input_1", 203 | "output_layer": "k2tfout_0", 204 | "stride": 4, 205 | "boxsize": 224, 206 | "peaks_thre": 0.1, 207 | 208 | # default bbox for the hand location 209 | "default_bbox": [170,80,300,300], 210 | } 211 | 212 | # NOTE: You can replace the camera id with a video filename. 213 | acq = OpenCVGrabber(0, calib_file="res/calib_webcam_mshd_vga.json") 214 | acq.initialize() 215 | mono_hand_loop(acq, (640,480), config, track=True, with_renderer=True) 216 | 217 | -------------------------------------------------------------------------------- /handpose_simon_backend.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Adapted from the MonoHand3D codebase for the MonocularRGB_3D_Handpose project (github release) 3 | 4 | This script uses the 2D hand joint estimation network by Simon et al. (Available through the Openpose project) 5 | 6 | @author: Paschalis Panteleris (padeler@ics.forth.gr) 7 | ''' 8 | 9 | import sys 10 | sys.path.append("lib") 11 | 12 | import time 13 | import os 14 | 15 | import cv2 16 | import numpy as np 17 | 18 | import PyCeresIK as IK 19 | 20 | from common import image 21 | from common.opencv_grabbers import OpenCVGrabber 22 | from common.calibrate import OpenCVCalib2CameraMeta, LoadOpenCVCalib 23 | 24 | from common import factory 25 | from common import pipeline 26 | 27 | 28 | import PyMBVCore as Core 29 | import PyJointTools as jt 30 | 31 | import PyOpenPose as OP 32 | 33 | from common import mva19 34 | 35 | 36 | def mono_hand_loop(acq, outSize, config, track=False, paused=False, with_renderer=False): 37 | 38 | print("Initialize WACV18 3D Pose estimator (IK)...") 39 | pose_estimator = factory.HandPoseEstimator(config) 40 | 41 | if with_renderer: 42 | print("Initialize Hand Visualizer...") 43 | hand_visualizer = pipeline.HandVisualizer(factory.mmanager, outSize) 44 | 45 | print("Initialize openpose. Net output size",outSize,"...") 46 | op = OP.OpenPose((160, 160), config["handnet_dims"], tuple(outSize), "COCO", config["OPENPOSE_ROOT"] + os.sep + "models" + os.sep, 0, 47 | False, OP.OpenPose.ScaleMode.ZeroToOne, False, True) 48 | 49 | 50 | 51 | left_hand_model = config["model_left"] 52 | started = False 53 | delay = {True: 0, False: 1} 54 | ik_ms = est_ms = 0 55 | p2d = bbox = None 56 | count = 0 57 | mbv_viz = opviz = None 58 | smoothing = config.get("smoothing", 0) 59 | boxsize = config["handnet_dims"][0] 60 | stride = 8 61 | peaks_thre = config["peaks_thre"] 62 | print("Entering main Loop.") 63 | 64 | while True: 65 | try: 66 | imgs, clbs = acq.grab() 67 | if imgs is None or len(imgs)==0: 68 | break 69 | except Exception as e: 70 | print("Failed to grab", e) 71 | break 72 | 73 | st = time.time() 74 | bgr = imgs[0] 75 | clb = clbs[0] 76 | 77 | # compute kp using model initial pose 78 | points2d = pose_estimator.ba.decodeAndProject(pose_estimator.model.init_pose, clb) 79 | oldKp = np.array(points2d).reshape(-1, 2) 80 | 81 | if bbox is None: 82 | bbox = config["default_bbox"] 83 | 84 | score = -1 85 | result_pose = None 86 | crop_viz = None 87 | 88 | # STEP2 detect 2D joints for the detected hand. 89 | if started and bbox is not None: 90 | x,y,w,h = bbox 91 | # print("BBOX: ",bbox) 92 | crop = bgr[y:y+h,x:x+w] 93 | img, pad = mva19.preprocess(crop, boxsize, stride) 94 | 95 | t = time.time() 96 | if left_hand_model: 97 | op.detectHands(bgr, np.array([bbox+[0,0,0,0]],dtype=np.int32)) 98 | else: 99 | op.detectHands(bgr, np.array([[0,0,0,0]+bbox],dtype=np.int32)) 100 | 101 | op_ms = (time.time() - t) * 1000.0 102 | 103 | opviz = op.render(np.copy(bgr)) 104 | cv2.imshow("OPVIZ", opviz) 105 | 106 | leftHands, rightHands = op.getKeypoints(op.KeypointType.HAND) 107 | hands = leftHands if left_hand_model else rightHands 108 | 109 | if hands is not None: 110 | keypoints = hands[0][:,:3] 111 | 112 | mask = keypoints[:, 2] < peaks_thre 113 | keypoints[mask] = [0, 0, 1.0] 114 | 115 | if track: 116 | keypoints[mask, :2] = oldKp[mask] 117 | 118 | keypoints[:, 2] = keypoints[:, 2]**3 119 | 120 | rgbKp = IK.Observations(IK.ObservationType.COLOR, clb, keypoints) 121 | obsVec = IK.ObservationsVector([rgbKp, ]) 122 | t = time.time() 123 | score, res = pose_estimator.estimate(obsVec) 124 | ik_ms = (time.time() - t) 125 | # print(count,) 126 | pose_estimator.print_report() 127 | 128 | if track: 129 | result_pose = list(smoothing * np.array(pose_estimator.model.init_pose) + (1.0 - smoothing) * np.array(res)) 130 | else: 131 | result_pose = list(res) 132 | 133 | # score is the residual, the lower the better, 0 is best 134 | # -1 is failed optimization. 135 | if track: 136 | if -1 < score:# < 20000: 137 | pose_estimator.model.init_pose = Core.ParamVector(result_pose) 138 | else: 139 | print("\n===>Reseting init position for IK<===\n") 140 | pose_estimator.model.reset_pose() 141 | 142 | if score > -1: # compute result points 143 | p2d = np.array(pose_estimator.ba.decodeAndProject(Core.ParamVector(result_pose), clb)).reshape(-1, 2) 144 | # scale = w/config.boxsize 145 | bbox = mva19.update_bbox(p2d,bgr.shape[1::-1]) 146 | 147 | 148 | 149 | viz = np.copy(bgr) 150 | viz2d = np.zeros_like(bgr) 151 | if started and result_pose is not None: 152 | viz2d = mva19.visualize_2dhand_skeleton(viz2d, keypoints, thre=peaks_thre) 153 | cv2.imshow("2D CNN estimation",viz2d) 154 | header = "FPS OPT+VIZ %03d, OPT %03fms (CNN %03fms, 3D %03fms)"%(1/(time.time()-st),(est_ms+ik_ms),est_ms, ik_ms) 155 | 156 | if with_renderer: 157 | hand_visualizer.render(pose_estimator.model, Core.ParamVector(result_pose), clb) 158 | mbv_viz = hand_visualizer.getDepth() 159 | cv2.imshow("MBV VIZ", mbv_viz) 160 | mask = mbv_viz != [0, 0, 0] 161 | viz[mask] = mbv_viz[mask] 162 | else: 163 | viz = mva19.visualize_3dhand_skeleton(viz, p2d) 164 | pipeline.draw_rect(viz, "Hand", bbox, box_color=(0, 255, 0), text_color=(200, 200, 0)) 165 | 166 | 167 | else: 168 | header = "Press 's' to start, 'r' to reset pose, 'p' to pause frame." 169 | 170 | 171 | 172 | cv2.putText(viz, header, (20, 20), 0, 0.7, (50, 20, 20), 1, cv2.LINE_AA) 173 | cv2.imshow("3D Hand Model reprojection", viz) 174 | 175 | key = cv2.waitKey(delay[paused]) 176 | if key & 255 == ord('p'): 177 | paused = not paused 178 | if key & 255 == ord('q'): 179 | break 180 | if key & 255 == ord('r'): 181 | print("\n===>Reseting init position for IK<===\n") 182 | pose_estimator.model.reset_pose() 183 | bbox = config['default_bbox'] 184 | print("RESETING BBOX",bbox) 185 | if key & 255 == ord('s'): 186 | started = not started 187 | 188 | 189 | count += 1 190 | 191 | 192 | 193 | 194 | if __name__ == '__main__': 195 | 196 | config = { 197 | # Right hand model config 198 | "model": "models/hand_skinned.xml", "model_left": False, 199 | 200 | # Left hand model config 201 | # "model": "models/hand_left_skinned.xml", "model_left": True, 202 | 203 | "model_init_pose": [-109.80840809323652, 95.70022984677065, 584.613931114289, 292.3322807284121, -1547.742897973965, -61.60146881490577, 435.33025195547793, 1.5707458637241434, 0.21444030289465843, 0.11033385117688158, 0.021952050059337137, 0.5716581133215294, 0.02969734913698679, 0.03414155945643072, 0.0, 1.1504613679382742, -0.5235922979328, 0.15626331136368257, 0.03656410417088128, 8.59579088582312e-07, 0.35789633949684985, 0.00012514308785717494, 0.005923001258945023, 0.24864102398139007, 0.2518954858979162, 0.0, 3.814694400000002e-13], 204 | "model_map": IK.ModelAwareBundleAdjuster.HAND_SKINNED_TO_OP_RIGHT_HAND, 205 | 206 | "OPENPOSE_ROOT": os.environ["OPENPOSE_ROOT"], 207 | 208 | "handnet_dims": (304, 304), 209 | "ba_iter": 200, 210 | 211 | "padding": 0.3, 212 | "minDim": 170, 213 | "peaks_thre": 0.1, 214 | 215 | "smoothing": 0.2, 216 | 217 | # default bbox for the hand location 218 | "default_bbox": [170,80,300,300], 219 | 220 | } 221 | 222 | 223 | # NOTE: You can replace the camera id with a video filename. 224 | acq = OpenCVGrabber(0, calib_file="res/calib_webcam_mshd_vga.json") 225 | acq.initialize() 226 | mono_hand_loop(acq, (640,480), config, track=True, with_renderer=True) 227 | 228 | -------------------------------------------------------------------------------- /lib/README.md: -------------------------------------------------------------------------------- 1 | # Libraries for MonocularRGB 3D Handpose estimation (WACV18) 2 | 3 | ## Binaries for **Ubuntu 16.04** 4 | 5 | Please download the libraries package from [here](http://cvrlcode.ics.forth.gr/files/wacv18/wacv18_libs_v1.0.tgz) 6 | the files and place them in this folder. 7 | 8 | There is a number of dependencies (ubuntu packages) you will need to install with apt: 9 | 10 | ```bash 11 | sudo apt install libgoogle-glog-dev libtbb-dev libcholmod3.0.6 libatlas-base-dev libopenni0 libbulletdynamics2.83.6 12 | ``` 13 | 14 | ## Environment 15 | 16 | You must set your **LD_LIBRARY_PATH** to point also to this folder ie: 17 | 18 | ```bash 19 | export LD_LIBRARY_PATH=$REPO_FOLDER/lib:$LD_LIBRARY_PATH 20 | ``` 21 | 22 | -------------------------------------------------------------------------------- /models/hand_left_skinned.bbn: -------------------------------------------------------------------------------- 1 | 22 serialization::archive 12 1 0 2 | 0 6 hand.R 16 0 9.94069755077362061e-01 -4.00644391775131226e-02 1.01095229387283325e-01 0.00000000000000000e+00 -1.01503036916255951e-01 -8.27347207814455032e-03 9.94800746440887451e-01 0.00000000000000000e+00 -3.90197075903415680e-02 -9.99162793159484863e-01 -1.22909257188439369e-02 0.00000000000000000e+00 -7.45058059692382812e-06 1.86264514923095703e-06 -6.98491930961608887e-07 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 0 0 5 1 0 1 0 3 | 1 12 f_pinky.01.R 16 0 9.28546071052551270e-01 -3.65002840757369995e-01 -6.76402524113655090e-02 0.00000000000000000e+00 3.71188044548034668e-01 9.15217459201812744e-01 1.56833380460739136e-01 0.00000000000000000e+00 4.66090999543666840e-03 -1.70734286308288574e-01 9.85306084156036377e-01 0.00000000000000000e+00 3.99274937808513641e+01 7.03901946544647217e+01 -2.20289453864097595e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 4 | 2 12 f_pinky.02.R 16 0 9.87331271171569824e-01 3.33260409533977509e-02 -1.55133843421936035e-01 0.00000000000000000e+00 -1.23157622292637825e-02 9.90840911865234375e-01 1.34471490979194641e-01 0.00000000000000000e+00 1.58194333314895630e-01 -1.30857318639755249e-01 9.78698611259460449e-01 0.00000000000000000e+00 1.39698386192321777e-06 2.28805392980575562e+01 3.49245965480804443e-07 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 5 | 3 12 f_pinky.03.R 16 0 9.72030460834503174e-01 -1.30221620202064514e-02 -2.34493568539619446e-01 0.00000000000000000e+00 2.11357772350311279e-02 9.99260485172271729e-01 3.21207121014595032e-02 0.00000000000000000e+00 2.33901858329772949e-01 -3.61784622073173523e-02 9.71586942672729492e-01 0.00000000000000000e+00 -4.65661287307739258e-06 1.50977233424782753e+01 -2.79396772384643555e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 6 | 4 16 f_pinky.03.R.004 16 0 9.08230066299438477e-01 2.76809960603713989e-01 3.13838571310043335e-01 0.00000000000000000e+00 -1.30871117115020752e-01 9.00229811668395996e-01 -4.15281951427459717e-01 0.00000000000000000e+00 -3.97480994462966919e-01 3.36099088191986084e-01 8.53842079639434814e-01 0.00000000000000000e+00 -3.25962901115417480e-06 1.94368325173854828e+01 -1.86264514923095703e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 0 1 0 7 | 5 13 f_middle.01.R 16 0 9.44843292236328125e-01 -1.45251438021659851e-01 -2.93553084135055542e-01 0.00000000000000000e+00 1.52552872896194458e-01 9.88293230533599854e-01 2.00149021111428738e-03 0.00000000000000000e+00 2.89825826883316040e-01 -4.66734580695629120e-02 9.55940663814544678e-01 0.00000000000000000e+00 1.23689812608063221e+00 8.80728736519813538e+01 -1.90390134230256081e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 8 | 6 13 f_middle.02.R 16 0 9.85155642032623291e-01 1.23416371643543243e-01 -1.19318604469299316e-01 0.00000000000000000e+00 -1.02014616131782532e-01 9.79924380779266357e-01 1.71293005347251892e-01 0.00000000000000000e+00 1.38063594698905945e-01 -1.56578004360198975e-01 9.77968275547027588e-01 0.00000000000000000e+00 -5.52972778677940369e-07 3.38882356882095337e+01 -2.91038304567337036e-07 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 9 | 7 13 f_middle.03.R 16 0 9.75227475166320801e-01 -2.55289170891046524e-02 2.19726935029029846e-01 0.00000000000000000e+00 2.41801124066114426e-02 9.99668776988983154e-01 8.82619712501764297e-03 0.00000000000000000e+00 -2.19879418611526489e-01 -3.29451705329120159e-03 9.75521564483642578e-01 0.00000000000000000e+00 -1.16415321826934814e-06 2.65811067074537277e+01 -3.49245965480804443e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 10 | 8 17 f_middle.03.R.001 16 0 9.86530125141143799e-01 2.12369058281183243e-02 1.62195980548858643e-01 0.00000000000000000e+00 1.30481496453285217e-02 9.78161215782165527e-01 -2.07437440752983093e-01 0.00000000000000000e+00 -1.63059115409851074e-01 2.06759616732597351e-01 9.64708387851715088e-01 0.00000000000000000e+00 -8.14907252788543701e-07 2.59108319878578186e+01 2.50292941927909851e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 0 1 0 11 | 9 11 f_ring.01.R 16 0 8.96658778190612793e-01 -2.98955142498016357e-01 -3.26540619134902954e-01 0.00000000000000000e+00 3.11469584703445435e-01 9.50143873691558838e-01 -1.46029610186815262e-02 0.00000000000000000e+00 3.14626157283782959e-01 -8.86135846376419067e-02 9.45070385932922363e-01 0.00000000000000000e+00 2.10528690367937088e+01 8.04450139403343201e+01 -3.89283918775618076e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 12 | 10 11 f_ring.02.R 16 0 9.85014915466308594e-01 1.03135295212268829e-01 1.38234853744506836e-01 0.00000000000000000e+00 -1.27100035548210144e-01 9.75861608982086182e-01 1.77593961358070374e-01 0.00000000000000000e+00 -1.16581872105598450e-01 -1.92502319812774658e-01 9.74346756935119629e-01 0.00000000000000000e+00 -4.07453626394271851e-07 2.99394726753234863e+01 0.00000000000000000e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 13 | 11 11 f_ring.03.R 16 0 9.90363180637359619e-01 -5.41466474533081055e-02 -1.27470746636390686e-01 0.00000000000000000e+00 5.50017878413200378e-02 9.98481094837188721e-01 3.19544970989227295e-03 0.00000000000000000e+00 1.27104073762893677e-01 -1.01757533848285675e-02 9.91837263107299805e-01 0.00000000000000000e+00 1.16415321826934814e-06 2.51962766051292419e+01 -1.62981450557708740e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 14 | 12 15 f_ring.03.R.001 16 0 9.48534905910491943e-01 1.94614693522453308e-01 2.49813526868820190e-01 0.00000000000000000e+00 -1.30262285470962524e-01 9.58825170993804932e-01 -2.52360910177230835e-01 0.00000000000000000e+00 -2.88640618324279785e-01 2.06831842660903931e-01 9.34830009937286377e-01 0.00000000000000000e+00 -1.62981450557708740e-06 2.60439869016408920e+01 3.25962901115417480e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 0 1 0 15 | 13 10 thumb.01.R 16 0 5.18561780452728271e-01 8.09060394763946533e-01 -2.76613771915435791e-01 0.00000000000000000e+00 -5.48799932003021240e-01 5.63015460968017578e-01 6.17925763130187988e-01 0.00000000000000000e+00 6.55677020549774170e-01 -1.68627083301544189e-01 7.35970556735992432e-01 0.00000000000000000e+00 -2.49536503106355667e+01 2.45662443339824677e+01 4.44448832422494888e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 16 | 14 10 thumb.02.R 16 0 5.18783330917358398e-01 -3.22493493556976318e-01 -7.91746079921722412e-01 0.00000000000000000e+00 3.33420962095260620e-01 9.29106771945953369e-01 -1.59972548484802246e-01 0.00000000000000000e+00 7.87206768989562988e-01 -1.80993646383285522e-01 5.89531302452087402e-01 0.00000000000000000e+00 -4.65661287307739258e-06 3.16911004483699799e+01 -1.39698386192321777e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 17 | 15 10 thumb.03.R 16 0 9.99760568141937256e-01 1.63592062890529633e-02 1.45249031484127045e-02 0.00000000000000000e+00 -1.73584558069705963e-02 9.97284233570098877e-01 7.15730041265487671e-02 0.00000000000000000e+00 -1.33145526051521301e-02 -7.18079805374145508e-02 9.97329473495483398e-01 0.00000000000000000e+00 4.65661287307739258e-07 3.81900556385517120e+01 2.79396772384643555e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 18 | 16 14 thumb.03.R.001 16 0 -7.08575546741485596e-02 -4.73784625530242920e-01 8.77785742282867432e-01 0.00000000000000000e+00 3.93755167722702026e-01 7.95247137546539307e-01 4.61019575595855713e-01 0.00000000000000000e+00 -9.16480243206024170e-01 3.78299236297607422e-01 1.30205780267715454e-01 0.00000000000000000e+00 -1.39698386192321777e-06 2.47499607503414154e+01 -1.39698386192321777e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 0 1 0 19 | 17 12 f_index.01.R 16 0 9.33493733406066895e-01 1.37373656034469604e-01 -3.31237047910690308e-01 0.00000000000000000e+00 -1.23981490731239319e-01 9.90387082099914551e-01 6.13371841609477997e-02 0.00000000000000000e+00 3.36478918790817261e-01 -1.61906220018863678e-02 9.41551864147186279e-01 0.00000000000000000e+00 -2.54517830908298492e+01 8.93787518143653870e+01 -2.10339366458356380e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 20 | 18 12 f_index.02.R 16 0 9.79103147983551025e-01 -3.30032259225845337e-02 2.00668305158615112e-01 0.00000000000000000e+00 -7.73940235376358032e-03 9.79981899261474609e-01 1.98936447501182556e-01 0.00000000000000000e+00 -2.03216791152954102e-01 -1.96332350373268127e-01 9.59247887134552002e-01 0.00000000000000000e+00 2.47382558882236481e-07 2.68096104264259338e+01 -5.82076609134674072e-08 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 21 | 19 12 f_index.03.R 16 0 9.87482905387878418e-01 7.42267817258834839e-03 -1.57550588250160217e-01 0.00000000000000000e+00 -2.14019417762756348e-03 9.99430596828460693e-01 3.36720570921897888e-02 0.00000000000000000e+00 1.57710850238800049e-01 -3.29133756458759308e-02 9.86936748027801514e-01 0.00000000000000000e+00 1.62981450557708740e-06 2.40588970482349396e+01 2.79396772384643555e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 22 | 20 16 f_index.03.R.001 16 0 9.39084291458129883e-01 -1.66422232985496521e-01 3.00706773996353149e-01 0.00000000000000000e+00 2.40588113665580750e-01 9.43136036396026611e-01 -2.29371815919876099e-01 0.00000000000000000e+00 -2.45434865355491638e-01 2.87745952606201172e-01 9.25723433494567871e-01 0.00000000000000000e+00 -2.56113708019256592e-06 2.46616713702678680e+01 9.31322574615478516e-07 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 0 1 23 | -------------------------------------------------------------------------------- /models/hand_left_skinned.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FORTH-ModelBasedTracker/MonocularRGB_3D_Handpose_WACV18/7e900546830a4598879891d97f6649abfb8c16da/models/hand_left_skinned.blend -------------------------------------------------------------------------------- /models/hand_left_skinned.btn: -------------------------------------------------------------------------------- 1 | 22 serialization::archive 12 1 0 2 | 0 6 global 7 0 0.00000000000000000e+00 0.00000000000000000e+00 3.00000000000000000e+03 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 1.00000000000000000e+00 7 0 0 1 2 3 4 5 6 11 0 0 0 1 1 0 1 0 3 | 1 4 Tm2s 16 0 1.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 1.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 1.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 4 | 2 6 hand.R 16 0 9.94069755077362061e-01 -4.00644391775131226e-02 1.01095229387283325e-01 0.00000000000000000e+00 -1.01503036916255951e-01 -8.27347207814455032e-03 9.94800746440887451e-01 0.00000000000000000e+00 -3.90197075903415680e-02 -9.99162793159484863e-01 -1.22909257188439369e-02 0.00000000000000000e+00 -7.45058059692382812e-06 1.86264514923095703e-06 -6.98491930961608887e-07 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 6 1 0 5 | 3 10 hand.R_m2b 16 0 9.94069695472717285e-01 -1.01503036916255951e-01 -3.90197299420833588e-02 -0.00000000000000000e+00 -4.00644056499004364e-02 -8.27333237975835800e-03 -9.99162912368774414e-01 0.00000000000000000e+00 1.01095244288444519e-01 9.94800925254821777e-01 -1.22910719364881516e-02 -0.00000000000000000e+00 7.55163664933888867e-06 -4.59857776857752754e-08 1.56178114885108243e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 57 /home/padeler/work/LevmarIK/model/hand_left_skinned.bmesh 0 1 0 6 | 4 12 f_pinky.01.R 16 0 9.28546071052551270e-01 -3.65002840757369995e-01 -6.76402524113655090e-02 0.00000000000000000e+00 3.71188044548034668e-01 9.15217459201812744e-01 1.56833380460739136e-01 0.00000000000000000e+00 4.66090999543666840e-03 -1.70734286308288574e-01 9.85306084156036377e-01 0.00000000000000000e+00 3.99274937808513641e+01 7.03901946544647217e+01 -2.20289453864097595e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 7 | 5 16 f_pinky.01.R_rot 3 0 3.72528994319054618e-08 0.00000000000000000e+00 -1.49011611938476562e-08 3 0 7 -1 8 1 0 2 1 0 8 | 6 16 f_pinky.01.R_m2b 16 0 9.62727665901184082e-01 2.69969761371612549e-01 -1.64830572903156281e-02 -0.00000000000000000e+00 3.34017798304557800e-02 -1.79145425558090210e-01 -9.83255565166473389e-01 0.00000000000000000e+00 -2.68402159214019775e-01 9.46056663990020752e-01 -1.81485876441001892e-01 -0.00000000000000000e+00 -1.15308947861194611e+01 -7.88974314928054810e+01 1.40024460852146149e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 57 /home/padeler/work/LevmarIK/model/hand_left_skinned.bmesh 0 1 0 9 | 7 12 f_pinky.02.R 16 0 9.87331271171569824e-01 3.33260409533977509e-02 -1.55133843421936035e-01 0.00000000000000000e+00 -1.23157622292637825e-02 9.90840911865234375e-01 1.34471490979194641e-01 0.00000000000000000e+00 1.58194333314895630e-01 -1.30857318639755249e-01 9.78698611259460449e-01 0.00000000000000000e+00 1.39698386192321777e-06 2.28805392980575562e+01 3.49245965480804443e-07 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 10 | 8 16 f_pinky.02.R_rot 3 0 2.23517417907714844e-08 -2.98023223876953125e-08 0.00000000000000000e+00 3 0 9 -1 -1 1 0 2 1 0 11 | 9 16 f_pinky.02.R_m2b 16 0 9.62085008621215820e-01 2.53423869609832764e-01 1.00838601589202881e-01 -0.00000000000000000e+00 1.79544568061828613e-01 -3.10135841369628906e-01 -9.33584332466125488e-01 0.00000000000000000e+00 -2.05318868160247803e-01 9.16292548179626465e-01 -3.43878090381622314e-01 -0.00000000000000000e+00 -1.69489234685897827e+01 -9.88208428025245667e+01 2.51984409987926483e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 57 /home/padeler/work/LevmarIK/model/hand_left_skinned.bmesh 0 1 0 12 | 10 12 f_pinky.03.R 16 0 9.72030460834503174e-01 -1.30221620202064514e-02 -2.34493568539619446e-01 0.00000000000000000e+00 2.11357772350311279e-02 9.99260485172271729e-01 3.21207121014595032e-02 0.00000000000000000e+00 2.33901858329772949e-01 -3.61784622073173523e-02 9.71586942672729492e-01 0.00000000000000000e+00 -4.65661287307739258e-06 1.50977233424782753e+01 -2.79396772384643555e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 13 | 11 16 f_pinky.03.R_rot 3 0 0.00000000000000000e+00 5.96046376699632674e-08 1.49011594174908168e-08 3 0 10 -1 -1 1 0 2 1 0 14 | 12 16 f_pinky.03.R_m2b 16 0 9.08229827880859375e-01 2.76809900999069214e-01 3.13838422298431396e-01 -0.00000000000000000e+00 3.97480905055999756e-01 -3.36099028587341309e-01 -8.53842139244079590e-01 0.00000000000000000e+00 -1.30871132016181946e-01 9.00229811668395996e-01 -4.15281951427459717e-01 -0.00000000000000000e+00 -2.09002755582332611e+01 -1.13383159041404724e+02 2.46394909918308258e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 57 /home/padeler/work/LevmarIK/model/hand_left_skinned.bmesh 0 1 0 15 | 13 16 f_pinky.03.R.004 16 0 9.08230066299438477e-01 2.76809960603713989e-01 3.13838571310043335e-01 0.00000000000000000e+00 -1.30871117115020752e-01 9.00229811668395996e-01 -4.15281951427459717e-01 0.00000000000000000e+00 -3.97480994462966919e-01 3.36099088191986084e-01 8.53842079639434814e-01 0.00000000000000000e+00 -3.25962901115417480e-06 1.94368325173854828e+01 -1.86264514923095703e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 16 | 14 20 f_pinky.03.R.004_m2b 16 0 9.99999761581420898e-01 2.98023223876953125e-08 -5.96046305645359098e-08 -0.00000000000000000e+00 -8.94069458468038647e-08 8.94069671630859375e-08 -1.00000000000000000e+00 0.00000000000000000e+00 -1.49011576411339774e-08 1.00000000000000000e+00 8.88178207941888419e-16 -0.00000000000000000e+00 -4.80153150856494904e+01 -1.27065598964691162e+02 -1.52949830517172813e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 57 /home/padeler/work/LevmarIK/model/hand_left_skinned.bmesh 0 1 0 17 | 15 13 f_middle.01.R 16 0 9.44843292236328125e-01 -1.45251438021659851e-01 -2.93553084135055542e-01 0.00000000000000000e+00 1.52552872896194458e-01 9.88293230533599854e-01 2.00149021111428738e-03 0.00000000000000000e+00 2.89825826883316040e-01 -4.66734580695629120e-02 9.55940663814544678e-01 0.00000000000000000e+00 1.23689812608063221e+00 8.80728736519813538e+01 -1.90390134230256081e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 18 | 16 17 f_middle.01.R_rot 3 0 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 3 0 11 -1 12 1 0 2 1 0 19 | 17 17 f_middle.01.R_m2b 16 0 9.65437769889831543e-01 5.12553378939628601e-02 2.55544006824493408e-01 -0.00000000000000000e+00 2.56654441356658936e-01 -1.62882301956415176e-02 -9.66366052627563477e-01 0.00000000000000000e+00 -4.53690029680728912e-02 9.98552918434143066e-01 -2.88803242146968842e-02 -0.00000000000000000e+00 1.10651450231671333e+01 -8.72267261147499084e+01 5.57220121845602989e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 57 /home/padeler/work/LevmarIK/model/hand_left_skinned.bmesh 0 1 0 20 | 18 13 f_middle.02.R 16 0 9.85155642032623291e-01 1.23416371643543243e-01 -1.19318604469299316e-01 0.00000000000000000e+00 -1.02014616131782532e-01 9.79924380779266357e-01 1.71293005347251892e-01 0.00000000000000000e+00 1.38063594698905945e-01 -1.56578004360198975e-01 9.77968275547027588e-01 0.00000000000000000e+00 -5.52972778677940369e-07 3.38882356882095337e+01 -2.91038304567337036e-07 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 21 | 19 17 f_middle.02.R_rot 3 0 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 3 0 13 -1 -1 1 0 2 1 0 22 | 20 17 f_middle.02.R_m2b 16 0 9.26940977573394775e-01 -4.48950426653027534e-03 3.75180244445800781e-01 -0.00000000000000000e+00 3.66139769554138184e-01 -2.07675471901893616e-01 -9.07090246677398682e-01 0.00000000000000000e+00 8.19882079958915710e-02 9.78187680244445801e-01 -1.90859273076057434e-01 -0.00000000000000000e+00 -4.71154693514108658e+00 -1.18857830762863159e+02 2.59410664439201355e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 57 /home/padeler/work/LevmarIK/model/hand_left_skinned.bmesh 0 1 0 23 | 21 13 f_middle.03.R 16 0 9.75227475166320801e-01 -2.55289170891046524e-02 2.19726935029029846e-01 0.00000000000000000e+00 2.41801124066114426e-02 9.99668776988983154e-01 8.82619712501764297e-03 0.00000000000000000e+00 -2.19879418611526489e-01 -3.29451705329120159e-03 9.75521564483642578e-01 0.00000000000000000e+00 -1.16415321826934814e-06 2.65811067074537277e+01 -3.49245965480804443e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 24 | 22 17 f_middle.03.R_rot 3 0 -2.23517382380578056e-08 0.00000000000000000e+00 -2.98023188349816337e-08 3 0 14 -1 -1 1 0 2 1 0 25 | 23 17 f_middle.03.R_m2b 16 0 9.86529886722564697e-01 2.12369300425052643e-02 1.62195935845375061e-01 -0.00000000000000000e+00 1.63059100508689880e-01 -2.06759497523307800e-01 -9.64708387851715088e-01 0.00000000000000000e+00 1.30481552332639694e-02 9.78161394596099854e-01 -2.07437485456466675e-01 -0.00000000000000000e+00 4.81801945716142654e+00 -1.45275712013244629e+02 2.68211942166090012e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 57 /home/padeler/work/LevmarIK/model/hand_left_skinned.bmesh 0 1 0 26 | 24 17 f_middle.03.R.001 16 0 9.86530125141143799e-01 2.12369058281183243e-02 1.62195980548858643e-01 0.00000000000000000e+00 1.30481496453285217e-02 9.78161215782165527e-01 -2.07437440752983093e-01 0.00000000000000000e+00 -1.63059115409851074e-01 2.06759616732597351e-01 9.64708387851715088e-01 0.00000000000000000e+00 -8.14907252788543701e-07 2.59108319878578186e+01 2.50292941927909851e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 27 | 25 21 f_middle.03.R.001_m2b 16 0 9.99999821186065674e-01 2.98023223876953125e-08 -4.44089209850062616e-16 -0.00000000000000000e+00 -1.49011585293123971e-08 1.19209317972490680e-07 -1.00000000000000000e+00 0.00000000000000000e+00 -2.22044604925031308e-16 1.00000023841857910e+00 -1.49011647465613351e-08 -0.00000000000000000e+00 5.46793732792139053e+00 -1.72948926687240601e+02 -1.03054605424404144e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 57 /home/padeler/work/LevmarIK/model/hand_left_skinned.bmesh 0 1 0 28 | 26 11 f_ring.01.R 16 0 8.96658778190612793e-01 -2.98955142498016357e-01 -3.26540619134902954e-01 0.00000000000000000e+00 3.11469584703445435e-01 9.50143873691558838e-01 -1.46029610186815262e-02 0.00000000000000000e+00 3.14626157283782959e-01 -8.86135846376419067e-02 9.45070385932922363e-01 0.00000000000000000e+00 2.10528690367937088e+01 8.04450139403343201e+01 -3.89283918775618076e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 29 | 27 15 f_ring.01.R_rot 3 0 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 3 0 15 -1 16 1 0 2 1 0 30 | 28 15 f_ring.01.R_m2b 16 0 9.34427857398986816e-01 2.13749796152114868e-01 2.84878581762313843e-01 -0.00000000000000000e+00 2.92816489934921265e-01 -5.74896996840834618e-03 -9.56151485443115234e-01 0.00000000000000000e+00 -2.02739372849464417e-01 9.76871669292449951e-01 -6.79616034030914307e-02 -0.00000000000000000e+00 3.90104390680789948e+00 -8.30485150218009949e+01 4.18374827131628990e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 57 /home/padeler/work/LevmarIK/model/hand_left_skinned.bmesh 0 1 0 31 | 29 11 f_ring.02.R 16 0 9.85014915466308594e-01 1.03135295212268829e-01 1.38234853744506836e-01 0.00000000000000000e+00 -1.27100035548210144e-01 9.75861608982086182e-01 1.77593961358070374e-01 0.00000000000000000e+00 -1.16581872105598450e-01 -1.92502319812774658e-01 9.74346756935119629e-01 0.00000000000000000e+00 -4.07453626394271851e-07 2.99394726753234863e+01 0.00000000000000000e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 32 | 30 15 f_ring.02.R_rot 3 0 -1.49011611938476562e-08 7.45058059692382812e-09 -1.49011611938476562e-08 3 0 17 -1 -1 1 0 2 1 0 33 | 31 15 f_ring.02.R_m2b 16 0 9.81850564479827881e-01 1.40417113900184631e-01 1.27485811710357666e-01 -0.00000000000000000e+00 1.55662223696708679e-01 -2.12633892893791199e-01 -9.64653432369232178e-01 0.00000000000000000e+00 -1.08346007764339447e-01 9.66990232467651367e-01 -2.30632513761520386e-01 -0.00000000000000000e+00 -7.23212165758013725e+00 -1.10013470053672791e+02 2.53720805048942566e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 57 /home/padeler/work/LevmarIK/model/hand_left_skinned.bmesh 0 1 0 34 | 32 11 f_ring.03.R 16 0 9.90363180637359619e-01 -5.41466474533081055e-02 -1.27470746636390686e-01 0.00000000000000000e+00 5.50017878413200378e-02 9.98481094837188721e-01 3.19544970989227295e-03 0.00000000000000000e+00 1.27104073762893677e-01 -1.01757533848285675e-02 9.91837263107299805e-01 0.00000000000000000e+00 1.16415321826934814e-06 2.51962766051292419e+01 -1.62981450557708740e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 35 | 33 15 f_ring.03.R_rot 3 0 1.49011611938476562e-08 7.45058059692382812e-09 0.00000000000000000e+00 3 0 18 -1 -1 1 0 2 1 0 36 | 34 15 f_ring.03.R_m2b 16 0 9.48534965515136719e-01 1.94614738225936890e-01 2.49813556671142578e-01 -0.00000000000000000e+00 2.88640618324279785e-01 -2.06831723451614380e-01 -9.34830009937286377e-01 0.00000000000000000e+00 -1.30262315273284912e-01 9.58825409412384033e-01 -2.52360969781875610e-01 -0.00000000000000000e+00 -3.07547207921743393e+00 -1.35321095585823059e+02 2.56216060370206833e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 57 /home/padeler/work/LevmarIK/model/hand_left_skinned.bmesh 0 1 0 37 | 35 15 f_ring.03.R.001 16 0 9.48534905910491943e-01 1.94614693522453308e-01 2.49813526868820190e-01 0.00000000000000000e+00 -1.30262285470962524e-01 9.58825170993804932e-01 -2.52360910177230835e-01 0.00000000000000000e+00 -2.88640618324279785e-01 2.06831842660903931e-01 9.34830009937286377e-01 0.00000000000000000e+00 -1.62981450557708740e-06 2.60439869016408920e+01 3.25962901115417480e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 38 | 36 19 f_ring.03.R.001_m2b 16 0 1.00000011920928955e+00 2.98023294931226701e-08 2.98023259404089913e-08 -0.00000000000000000e+00 1.49011629702044957e-08 1.19209317972490680e-07 -1.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 1.00000023841857910e+00 0.00000000000000000e+00 -0.00000000000000000e+00 -2.79205814003944397e+01 -1.60786166787147522e+02 -8.53588711470365524e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 57 /home/padeler/work/LevmarIK/model/hand_left_skinned.bmesh 0 1 0 39 | 37 10 thumb.01.R 16 0 5.18561780452728271e-01 8.09060394763946533e-01 -2.76613771915435791e-01 0.00000000000000000e+00 -5.48799932003021240e-01 5.63015460968017578e-01 6.17925763130187988e-01 0.00000000000000000e+00 6.55677020549774170e-01 -1.68627083301544189e-01 7.35970556735992432e-01 0.00000000000000000e+00 -2.49536503106355667e+01 2.45662443339824677e+01 4.44448832422494888e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 40 | 38 14 thumb.01.R_rot 3 0 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 3 0 19 -1 20 1 0 2 1 0 41 | 39 14 thumb.01.R_m2b 16 0 4.44157898426055908e-01 -6.26804471015930176e-01 6.40187442302703857e-01 -0.00000000000000000e+00 2.48912692070007324e-01 -6.00079178810119629e-01 -7.60228633880615234e-01 0.00000000000000000e+00 8.60677897930145264e-01 4.97012257575988770e-01 -1.10510408878326416e-01 -0.00000000000000000e+00 -5.70615287870168686e+00 -3.02721057087182999e+01 1.72330625355243683e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 57 /home/padeler/work/LevmarIK/model/hand_left_skinned.bmesh 0 1 0 42 | 40 10 thumb.02.R 16 0 5.18783330917358398e-01 -3.22493493556976318e-01 -7.91746079921722412e-01 0.00000000000000000e+00 3.33420962095260620e-01 9.29106771945953369e-01 -1.59972548484802246e-01 0.00000000000000000e+00 7.87206768989562988e-01 -1.80993646383285522e-01 5.89531302452087402e-01 0.00000000000000000e+00 -4.65661287307739258e-06 3.16911004483699799e+01 -1.39698386192321777e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 43 | 41 14 thumb.02.R_rot 3 0 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 3 0 21 -1 -1 1 0 2 1 0 44 | 42 14 thumb.02.R_m2b 16 0 -7.43037387728691101e-02 -5.36688983440399170e-01 8.40501904487609863e-01 -0.00000000000000000e+00 9.24561321735382080e-01 -3.52929145097732544e-01 -1.43622145056724548e-01 0.00000000000000000e+00 3.73718351125717163e-01 7.66424059867858887e-01 5.22425889968872070e-01 -0.00000000000000000e+00 3.37826600298285484e+00 -6.22297860682010651e+01 1.68824512511491776e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 57 /home/padeler/work/LevmarIK/model/hand_left_skinned.bmesh 0 1 0 45 | 43 10 thumb.03.R 16 0 9.99760568141937256e-01 1.63592062890529633e-02 1.45249031484127045e-02 0.00000000000000000e+00 -1.73584558069705963e-02 9.97284233570098877e-01 7.15730041265487671e-02 0.00000000000000000e+00 -1.33145526051521301e-02 -7.18079805374145508e-02 9.97329473495483398e-01 0.00000000000000000e+00 4.65661287307739258e-07 3.81900556385517120e+01 2.79396772384643555e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 46 | 44 14 thumb.03.R_rot 3 0 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 3 0 22 -1 -1 1 0 2 1 0 47 | 45 14 thumb.03.R_m2b 16 0 -7.08575695753097534e-02 -4.73784536123275757e-01 8.77785503864288330e-01 -0.00000000000000000e+00 9.16480481624603271e-01 -3.78299236297607422e-01 -1.30205646157264709e-01 0.00000000000000000e+00 3.93755197525024414e-01 7.95247137546539307e-01 4.61019605398178101e-01 -0.00000000000000000e+00 1.97988795116543770e+00 -9.89974588155746460e+01 2.40033362060785294e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 57 /home/padeler/work/LevmarIK/model/hand_left_skinned.bmesh 0 1 0 48 | 46 14 thumb.03.R.001 16 0 -7.08575546741485596e-02 -4.73784625530242920e-01 8.77785742282867432e-01 0.00000000000000000e+00 3.93755167722702026e-01 7.95247137546539307e-01 4.61019575595855713e-01 0.00000000000000000e+00 -9.16480243206024170e-01 3.78299236297607422e-01 1.30205780267715454e-01 0.00000000000000000e+00 -1.39698386192321777e-06 2.47499607503414154e+01 -1.39698386192321777e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 49 | 47 18 thumb.03.R.001_m2b 16 0 9.99999821186065674e-01 -5.96046341172495886e-08 7.45058237328066753e-09 -0.00000000000000000e+00 1.11758716059284779e-07 1.37835769464800251e-07 -1.00000023841857910e+00 0.00000000000000000e+00 2.98023206113384731e-08 1.00000000000000000e+00 -3.72529100900464982e-08 -0.00000000000000000e+00 7.95590952038764954e+01 -8.65641757845878601e+01 -4.55027148127555847e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 57 /home/padeler/work/LevmarIK/model/hand_left_skinned.bmesh 0 1 0 50 | 48 12 f_index.01.R 16 0 9.33493733406066895e-01 1.37373656034469604e-01 -3.31237047910690308e-01 0.00000000000000000e+00 -1.23981490731239319e-01 9.90387082099914551e-01 6.13371841609477997e-02 0.00000000000000000e+00 3.36478918790817261e-01 -1.61906220018863678e-02 9.41551864147186279e-01 0.00000000000000000e+00 -2.54517830908298492e+01 8.93787518143653870e+01 -2.10339366458356380e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 51 | 49 16 f_index.01.R_rot 3 0 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 3 0 23 -1 24 1 0 2 1 0 52 | 50 16 f_index.01.R_m2b 16 0 9.26938712596893311e-01 -2.26166844367980957e-01 2.99387812614440918e-01 -0.00000000000000000e+00 2.92423278093338013e-01 -6.45123794674873352e-02 -9.54110383987426758e-01 0.00000000000000000e+00 2.35102444887161255e-01 9.71949934959411621e-01 6.33730273693799973e-03 -0.00000000000000000e+00 1.07840793207287788e+01 -9.15460810065269470e+01 1.19915427640080452e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 57 /home/padeler/work/LevmarIK/model/hand_left_skinned.bmesh 0 1 0 53 | 51 12 f_index.02.R 16 0 9.79103147983551025e-01 -3.30032259225845337e-02 2.00668305158615112e-01 0.00000000000000000e+00 -7.73940235376358032e-03 9.79981899261474609e-01 1.98936447501182556e-01 0.00000000000000000e+00 -2.03216791152954102e-01 -1.96332350373268127e-01 9.59247887134552002e-01 0.00000000000000000e+00 2.47382558882236481e-07 2.68096104264259338e+01 -5.82076609134674072e-08 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 54 | 52 16 f_index.02.R_rot 3 0 -1.98342604562640190e-08 9.31322574615478516e-10 -9.31322574615478516e-10 3 0 25 -1 -1 1 0 2 1 0 55 | 53 16 f_index.02.R_m2b 16 0 9.75110471248626709e-01 -1.69254198670387268e-01 1.43221452832221985e-01 -0.00000000000000000e+00 9.69820171594619751e-02 -2.55291461944580078e-01 -9.61987912654876709e-01 0.00000000000000000e+00 1.99383765459060669e-01 9.51934456825256348e-01 -2.32522949576377869e-01 -0.00000000000000000e+00 1.68711673468351364e+01 -1.13684326410293579e+02 3.25484089553356171e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 57 /home/padeler/work/LevmarIK/model/hand_left_skinned.bmesh 0 1 0 56 | 54 12 f_index.03.R 16 0 9.87482905387878418e-01 7.42267817258834839e-03 -1.57550588250160217e-01 0.00000000000000000e+00 -2.14019417762756348e-03 9.99430596828460693e-01 3.36720570921897888e-02 0.00000000000000000e+00 1.57710850238800049e-01 -3.29133756458759308e-02 9.86936748027801514e-01 0.00000000000000000e+00 1.62981450557708740e-06 2.40588970482349396e+01 2.79396772384643555e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 57 | 55 16 f_index.03.R_rot 3 0 2.98023223876953125e-08 2.79396772384643555e-09 -9.31322574615478516e-10 3 0 26 -1 -1 1 0 2 1 0 58 | 56 16 f_index.03.R_m2b 16 0 9.39084172248840332e-01 -1.66422218084335327e-01 3.00706714391708374e-01 -0.00000000000000000e+00 2.45434939861297607e-01 -2.87745773792266846e-01 -9.25723493099212646e-01 0.00000000000000000e+00 2.40588128566741943e-01 9.43136215209960938e-01 -2.29371815919876099e-01 -0.00000000000000000e+00 1.05095468461513519e+01 -1.36604934930801392e+02 3.93175780773162842e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 57 /home/padeler/work/LevmarIK/model/hand_left_skinned.bmesh 0 1 0 59 | 57 16 f_index.03.R.001 16 0 9.39084291458129883e-01 -1.66422232985496521e-01 3.00706773996353149e-01 0.00000000000000000e+00 2.40588113665580750e-01 9.43136036396026611e-01 -2.29371815919876099e-01 0.00000000000000000e+00 -2.45434865355491638e-01 2.87745952606201172e-01 9.25723433494567871e-01 0.00000000000000000e+00 -2.56113708019256592e-06 2.46616713702678680e+01 9.31322574615478516e-07 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 60 | 58 20 f_index.03.R.001_m2b 16 0 9.99999880790710449e-01 1.49011682992750139e-08 -2.98023170586247943e-08 -0.00000000000000000e+00 2.98023152822679549e-08 1.93715138152583677e-07 -1.00000000000000000e+00 0.00000000000000000e+00 -2.23517453434851632e-08 1.00000023841857910e+00 5.96046589862453402e-08 -0.00000000000000000e+00 4.85307611525058746e+01 -1.58586278557777405e+02 -1.25860227271914482e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 57 /home/padeler/work/LevmarIK/model/hand_left_skinned.bmesh 0 1 61 | -------------------------------------------------------------------------------- /models/hand_left_skinned.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | hand_left_skinned 5 | hand_left_skinned 6 | skinned 7 | 27 8 | -5000,-5000,500,-1,-1,-1,-1,0,-0.523599,0,0,0,-0.523599,0,0,0,-0.523599,0,0,0,-0.523599,0,0,0,-0.523599,0,0 9 | 5000,5000,5000,1,1,1,1,1.5708,0.523599,1.5708,1.5708,1.5708,0.523599,1.5708,1.5708,1.5708,0.523599,1.5708,1.5708,1.5708,0.523599,1.5708,1.5708,1.5708,0.523599,1.5708,1.5708 10 | 0,0,3000,0,0,0,1,3.72529e-08,-1.49012e-08,2.23517e-08,0,0,0,0,-2.23517e-08,0,0,-1.49012e-08,1.49012e-08,0,0,0,0,0,0,-1.98343e-08,2.98023e-08 11 | t,t,t,q,q,q,q,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e 12 | X,Y,Z,X,Y,Z,W,X,Z,X,X,X,Z,X,X,X,Z,X,X,X,Z,X,X,X,Z,X,X 13 | 1,1,1,1,1,1,1,2,2,3,4,5,5,6,7,8,8,9,10,11,11,12,13,14,14,15,16 14 | global,global,global,global,global,global,global,f_pinky.01.R_rot,f_pinky.01.R_rot,f_pinky.02.R_rot,f_pinky.03.R_rot,f_middle.01.R_rot,f_middle.01.R_rot,f_middle.02.R_rot,f_middle.03.R_rot,f_ring.01.R_rot,f_ring.01.R_rot,f_ring.02.R_rot,f_ring.03.R_rot,thumb.01.R_rot,thumb.01.R_rot,thumb.02.R_rot,thumb.03.R_rot,f_index.01.R_rot,f_index.01.R_rot,f_index.02.R_rot,f_index.03.R_rot 15 | 16 | 17 | 18 | 19 | all 20 | 1.0 21 | hand.R,f_pinky.01.R,f_pinky.02.R,f_pinky.03.R,f_pinky.03.R.004,f_middle.01.R,f_middle.02.R,f_middle.03.R,f_middle.03.R.001,f_ring.01.R,f_ring.02.R,f_ring.03.R,f_ring.03.R.001,thumb.01.R,thumb.02.R,thumb.03.R,thumb.03.R.001,f_index.01.R,f_index.02.R,f_index.03.R,f_index.03.R.001 22 | 23 | 24 | 25 | 26 | 27 | 28 | main 29 | 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26 30 | 31 | 32 | 21 33 | 34 | -------------------------------------------------------------------------------- /models/hand_skinned.bbn: -------------------------------------------------------------------------------- 1 | 22 serialization::archive 12 1 0 2 | 0 6 hand.R 16 0 9.94069755077362061e-01 4.00644391775131226e-02 -1.01095229387283325e-01 0.00000000000000000e+00 1.01503036916255951e-01 -8.27347207814455032e-03 9.94800746440887451e-01 0.00000000000000000e+00 3.90197075903415680e-02 -9.99162793159484863e-01 -1.22909257188439369e-02 0.00000000000000000e+00 7.45058059692382812e-06 1.86264514923095703e-06 -6.98491930961608887e-07 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 0 0 5 1 0 1 0 3 | 1 12 f_pinky.01.R 16 0 9.28546071052551270e-01 3.65002810955047607e-01 6.76402822136878967e-02 0.00000000000000000e+00 -3.71188044548034668e-01 9.15217459201812744e-01 1.56833380460739136e-01 0.00000000000000000e+00 -4.66093607246875763e-03 -1.70734286308288574e-01 9.85306084156036377e-01 0.00000000000000000e+00 -3.99274937808513641e+01 7.03901946544647217e+01 -2.20289453864097595e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 4 | 2 12 f_pinky.02.R 16 0 9.87331271171569824e-01 -3.33260521292686462e-02 1.55133932828903198e-01 0.00000000000000000e+00 1.23157426714897156e-02 9.90840911865234375e-01 1.34471550583839417e-01 0.00000000000000000e+00 -1.58194422721862793e-01 -1.30857333540916443e-01 9.78698551654815674e-01 0.00000000000000000e+00 -5.02041075378656387e-06 2.28805374354124069e+01 5.82076609134674072e-07 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 5 | 3 12 f_pinky.03.R 16 0 9.72030520439147949e-01 1.30221620202064514e-02 2.34493508934974670e-01 0.00000000000000000e+00 -2.11357809603214264e-02 9.99260485172271729e-01 3.21206226944923401e-02 0.00000000000000000e+00 -2.33901768922805786e-01 -3.61783578991889954e-02 9.71587002277374268e-01 0.00000000000000000e+00 -5.12227416038513184e-06 1.50977168232202530e+01 3.25962901115417480e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 6 | 4 16 f_pinky.03.R.004 16 0 9.08229947090148926e-01 -2.76809960603713989e-01 -3.13838660717010498e-01 0.00000000000000000e+00 1.30871117115020752e-01 9.00229930877685547e-01 -4.15282011032104492e-01 0.00000000000000000e+00 3.97480964660644531e-01 3.36099088191986084e-01 8.53841900825500488e-01 0.00000000000000000e+00 1.39698386192321777e-06 1.94368213415145874e+01 -2.79396772384643555e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 0 1 0 7 | 5 13 f_middle.01.R 16 0 9.44843173027038574e-01 1.45251423120498657e-01 2.93553143739700317e-01 0.00000000000000000e+00 -1.52552887797355652e-01 9.88293230533599854e-01 2.00148974545300007e-03 0.00000000000000000e+00 -2.89825856685638428e-01 -4.66734655201435089e-02 9.55940604209899902e-01 0.00000000000000000e+00 -1.23689812608063221e+00 8.80728736519813538e+01 -1.90390134230256081e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 8 | 6 13 f_middle.02.R 16 0 9.85155642032623291e-01 -1.23416386544704437e-01 1.19318492710590363e-01 0.00000000000000000e+00 1.02014638483524323e-01 9.79924321174621582e-01 1.71293005347251892e-01 0.00000000000000000e+00 -1.38063490390777588e-01 -1.56578034162521362e-01 9.77968335151672363e-01 0.00000000000000000e+00 5.23868948221206665e-07 3.38882356882095337e+01 -1.74622982740402222e-07 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 9 | 7 13 f_middle.03.R 16 0 9.75227355957031250e-01 2.55289208143949509e-02 -2.19726920127868652e-01 0.00000000000000000e+00 -2.41801105439662933e-02 9.99668717384338379e-01 8.82616639137268066e-03 0.00000000000000000e+00 2.19879403710365295e-01 -3.29449190758168697e-03 9.75521504878997803e-01 0.00000000000000000e+00 1.16415321826934814e-07 2.65811067074537277e+01 -2.79396772384643555e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 10 | 8 17 f_middle.03.R.001 16 0 9.86530065536499023e-01 -2.12369002401828766e-02 -1.62195920944213867e-01 0.00000000000000000e+00 -1.30481449887156487e-02 9.78161215782165527e-01 -2.07437440752983093e-01 0.00000000000000000e+00 1.63059055805206299e-01 2.06759601831436157e-01 9.64708328247070312e-01 0.00000000000000000e+00 -5.82076609134674072e-07 2.59108170866966248e+01 8.73114913702011108e-07 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 0 1 0 11 | 9 11 f_ring.01.R 16 0 8.96658778190612793e-01 2.98955142498016357e-01 3.26540619134902954e-01 0.00000000000000000e+00 -3.11469584703445435e-01 9.50143873691558838e-01 -1.46029610186815262e-02 0.00000000000000000e+00 -3.14626157283782959e-01 -8.86135846376419067e-02 9.45070385932922363e-01 0.00000000000000000e+00 -2.10528690367937088e+01 8.04450139403343201e+01 -3.89283918775618076e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 12 | 10 11 f_ring.02.R 16 0 9.85014855861663818e-01 -1.03135280311107635e-01 -1.38234928250312805e-01 0.00000000000000000e+00 1.27100035548210144e-01 9.75861608982086182e-01 1.77593961358070374e-01 0.00000000000000000e+00 1.16581924259662628e-01 -1.92502349615097046e-01 9.74346756935119629e-01 0.00000000000000000e+00 4.07453626394271851e-07 2.99394726753234863e+01 0.00000000000000000e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 13 | 11 11 f_ring.03.R 16 0 9.90363121032714844e-01 5.41466325521469116e-02 1.27470836043357849e-01 0.00000000000000000e+00 -5.50017580389976501e-02 9.98481094837188721e-01 3.19543667137622833e-03 0.00000000000000000e+00 -1.27104192972183228e-01 -1.01757757365703583e-02 9.91837143898010254e-01 0.00000000000000000e+00 -3.20142135024070740e-06 2.51962840557098389e+01 -2.56113708019256592e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 14 | 12 15 f_ring.03.R.001 16 0 9.48534846305847168e-01 -1.94614678621292114e-01 -2.49813511967658997e-01 0.00000000000000000e+00 1.30262270569801331e-01 9.58825111389160156e-01 -2.52360969781875610e-01 0.00000000000000000e+00 2.88640677928924561e-01 2.06831872463226318e-01 9.34829950332641602e-01 0.00000000000000000e+00 1.16415321826934814e-06 2.60439720004796982e+01 2.79396772384643555e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 0 1 0 15 | 13 10 thumb.01.R 16 0 5.18561780452728271e-01 -8.09060394763946533e-01 2.76613771915435791e-01 0.00000000000000000e+00 5.48799932003021240e-01 5.63015460968017578e-01 6.17925763130187988e-01 0.00000000000000000e+00 -6.55677020549774170e-01 -1.68627083301544189e-01 7.35970556735992432e-01 0.00000000000000000e+00 2.49536503106355667e+01 2.45662443339824677e+01 4.44448832422494888e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 16 | 14 10 thumb.02.R 16 0 5.18783330917358398e-01 3.22493493556976318e-01 7.91746079921722412e-01 0.00000000000000000e+00 -3.33420962095260620e-01 9.29106771945953369e-01 -1.59972548484802246e-01 0.00000000000000000e+00 -7.87206768989562988e-01 -1.80993646383285522e-01 5.89531302452087402e-01 0.00000000000000000e+00 4.65661287307739258e-06 3.16911004483699799e+01 -1.39698386192321777e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 17 | 15 10 thumb.03.R 16 0 9.99760508537292480e-01 -1.63591913878917694e-02 -1.45247988402843475e-02 0.00000000000000000e+00 1.73584558069705963e-02 9.97284233570098877e-01 7.15730041265487671e-02 0.00000000000000000e+00 1.33144557476043701e-02 -7.18080103397369385e-02 9.97329473495483398e-01 0.00000000000000000e+00 -4.65661287307739258e-07 3.81900556385517120e+01 2.79396772384643555e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 18 | 16 14 thumb.03.R.001 16 0 -7.08576738834381104e-02 4.73784506320953369e-01 -8.77785682678222656e-01 0.00000000000000000e+00 -3.93755048513412476e-01 7.95247077941894531e-01 4.61019605398178101e-01 0.00000000000000000e+00 9.16480422019958496e-01 3.78299355506896973e-01 1.30205690860748291e-01 0.00000000000000000e+00 1.39698386192321777e-06 2.47499663382768631e+01 -9.31322574615478516e-07 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 0 1 0 19 | 17 12 f_index.01.R 16 0 9.33493733406066895e-01 -1.37373656034469604e-01 3.31237047910690308e-01 0.00000000000000000e+00 1.23981490731239319e-01 9.90387082099914551e-01 6.13371841609477997e-02 0.00000000000000000e+00 -3.36478918790817261e-01 -1.61906220018863678e-02 9.41551864147186279e-01 0.00000000000000000e+00 2.54517830908298492e+01 8.93787518143653870e+01 -2.10339366458356380e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 20 | 18 12 f_index.02.R 16 0 9.79103147983551025e-01 3.30032259225845337e-02 -2.00668334960937500e-01 0.00000000000000000e+00 7.73940235376358032e-03 9.79981899261474609e-01 1.98936447501182556e-01 0.00000000000000000e+00 2.03216806054115295e-01 -1.96332365274429321e-01 9.59247887134552002e-01 0.00000000000000000e+00 -2.47382558882236481e-07 2.68096104264259338e+01 -5.82076609134674072e-08 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 21 | 19 12 f_index.03.R 16 0 9.87482964992523193e-01 -7.42267072200775146e-03 1.57550632953643799e-01 0.00000000000000000e+00 2.14019417762756348e-03 9.99430716037750244e-01 3.36720608174800873e-02 0.00000000000000000e+00 -1.57710850238800049e-01 -3.29133644700050354e-02 9.86936748027801514e-01 0.00000000000000000e+00 1.97906047105789185e-06 2.40588970482349396e+01 0.00000000000000000e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 22 | 20 16 f_index.03.R.001 16 0 9.39084291458129883e-01 1.66422232985496521e-01 -3.00706773996353149e-01 0.00000000000000000e+00 -2.40588173270225525e-01 9.43136096000671387e-01 -2.29371860623359680e-01 0.00000000000000000e+00 2.45434850454330444e-01 2.87745922803878784e-01 9.25723433494567871e-01 0.00000000000000000e+00 1.86264514923095703e-06 2.46616564691066742e+01 1.86264514923095703e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 0 1 23 | -------------------------------------------------------------------------------- /models/hand_skinned.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FORTH-ModelBasedTracker/MonocularRGB_3D_Handpose_WACV18/7e900546830a4598879891d97f6649abfb8c16da/models/hand_skinned.blend -------------------------------------------------------------------------------- /models/hand_skinned.blend1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FORTH-ModelBasedTracker/MonocularRGB_3D_Handpose_WACV18/7e900546830a4598879891d97f6649abfb8c16da/models/hand_skinned.blend1 -------------------------------------------------------------------------------- /models/hand_skinned.btn: -------------------------------------------------------------------------------- 1 | 22 serialization::archive 12 1 0 2 | 0 6 global 7 0 0.00000000000000000e+00 0.00000000000000000e+00 3.00000000000000000e+03 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 1.00000000000000000e+00 7 0 0 1 2 3 4 5 6 11 0 0 0 1 1 0 1 0 3 | 1 4 Tm2s 16 0 1.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 1.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 1.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 4 | 2 6 hand.R 16 0 9.94069755077362061e-01 4.00644391775131226e-02 -1.01095229387283325e-01 0.00000000000000000e+00 1.01503036916255951e-01 -8.27347207814455032e-03 9.94800746440887451e-01 0.00000000000000000e+00 3.90197075903415680e-02 -9.99162793159484863e-01 -1.22909257188439369e-02 0.00000000000000000e+00 7.45058059692382812e-06 1.86264514923095703e-06 -6.98491930961608887e-07 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 6 1 0 5 | 3 10 hand.R_m2b 16 0 9.94069695472717285e-01 1.01503036916255951e-01 3.90197299420833588e-02 -0.00000000000000000e+00 4.00644056499004364e-02 -8.27333237975835800e-03 -9.99162912368774414e-01 0.00000000000000000e+00 -1.01095244288444519e-01 9.94800925254821777e-01 -1.22910719364881516e-02 -0.00000000000000000e+00 -7.55163664933888867e-06 -4.59857776857752754e-08 1.56178114885108243e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 52 /home/padeler/work/LevmarIK/model/hand_skinned.bmesh 0 1 0 6 | 4 12 f_pinky.01.R 16 0 9.28546071052551270e-01 3.65002810955047607e-01 6.76402822136878967e-02 0.00000000000000000e+00 -3.71188044548034668e-01 9.15217459201812744e-01 1.56833380460739136e-01 0.00000000000000000e+00 -4.66093607246875763e-03 -1.70734286308288574e-01 9.85306084156036377e-01 0.00000000000000000e+00 -3.99274937808513641e+01 7.03901946544647217e+01 -2.20289453864097595e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 7 | 5 16 f_pinky.01.R_rot 3 0 3.72528994319054618e-08 0.00000000000000000e+00 -1.49011611938476562e-08 3 0 7 -1 8 1 0 2 1 0 8 | 6 16 f_pinky.01.R_m2b 16 0 9.62727665901184082e-01 -2.69969731569290161e-01 1.64830274879932404e-02 -0.00000000000000000e+00 -3.34018059074878693e-02 -1.79145425558090210e-01 -9.83255565166473389e-01 0.00000000000000000e+00 2.68402129411697388e-01 9.46056663990020752e-01 -1.81485876441001892e-01 -0.00000000000000000e+00 1.15308947861194611e+01 -7.88974314928054810e+01 1.40024451538920403e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 52 /home/padeler/work/LevmarIK/model/hand_skinned.bmesh 0 1 0 9 | 7 12 f_pinky.02.R 16 0 9.87331271171569824e-01 -3.33260521292686462e-02 1.55133932828903198e-01 0.00000000000000000e+00 1.23157426714897156e-02 9.90840911865234375e-01 1.34471550583839417e-01 0.00000000000000000e+00 -1.58194422721862793e-01 -1.30857333540916443e-01 9.78698551654815674e-01 0.00000000000000000e+00 -5.02041075378656387e-06 2.28805374354124069e+01 5.82076609134674072e-07 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 10 | 8 16 f_pinky.02.R_rot 3 0 2.23517417907714844e-08 -2.98023223876953125e-08 0.00000000000000000e+00 3 0 9 -1 -1 1 0 2 1 0 11 | 9 16 f_pinky.02.R_m2b 16 0 9.62085068225860596e-01 -2.53423869609832764e-01 -1.00838720798492432e-01 -0.00000000000000000e+00 -1.79544702172279358e-01 -3.10135871171951294e-01 -9.33584392070770264e-01 0.00000000000000000e+00 2.05318823456764221e-01 9.16292548179626465e-01 -3.43878179788589478e-01 -0.00000000000000000e+00 1.69489216059446335e+01 -9.88208502531051636e+01 2.51984484493732452e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 52 /home/padeler/work/LevmarIK/model/hand_skinned.bmesh 0 1 0 12 | 10 12 f_pinky.03.R 16 0 9.72030520439147949e-01 1.30221620202064514e-02 2.34493508934974670e-01 0.00000000000000000e+00 -2.11357809603214264e-02 9.99260485172271729e-01 3.21206226944923401e-02 0.00000000000000000e+00 -2.33901768922805786e-01 -3.61783578991889954e-02 9.71587002277374268e-01 0.00000000000000000e+00 -5.12227416038513184e-06 1.50977168232202530e+01 3.25962901115417480e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 13 | 11 16 f_pinky.03.R_rot 3 0 0.00000000000000000e+00 5.96046376699632674e-08 1.49011594174908168e-08 3 0 10 -1 -1 1 0 2 1 0 14 | 12 16 f_pinky.03.R_m2b 16 0 9.08229768276214600e-01 -2.76809841394424438e-01 -3.13838481903076172e-01 -0.00000000000000000e+00 -3.97480905055999756e-01 -3.36098968982696533e-01 -8.53842139244079590e-01 0.00000000000000000e+00 1.30871102213859558e-01 9.00229811668395996e-01 -4.15281951427459717e-01 -0.00000000000000000e+00 2.09002736955881119e+01 -1.13383166491985321e+02 2.46394872665405273e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 52 /home/padeler/work/LevmarIK/model/hand_skinned.bmesh 0 1 0 15 | 13 16 f_pinky.03.R.004 16 0 9.08229947090148926e-01 -2.76809960603713989e-01 -3.13838660717010498e-01 0.00000000000000000e+00 1.30871117115020752e-01 9.00229930877685547e-01 -4.15282011032104492e-01 0.00000000000000000e+00 3.97480964660644531e-01 3.36099088191986084e-01 8.53841900825500488e-01 0.00000000000000000e+00 1.39698386192321777e-06 1.94368213415145874e+01 -2.79396772384643555e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 16 | 14 20 f_pinky.03.R.004_m2b 16 0 9.99999761581420898e-01 1.49011309957813864e-08 1.19209275339926535e-07 -0.00000000000000000e+00 8.94069600576585799e-08 2.08616256713867188e-07 -1.00000011920928955e+00 0.00000000000000000e+00 -0.00000000000000000e+00 9.99999880790710449e-01 0.00000000000000000e+00 -0.00000000000000000e+00 4.80153188109397888e+01 -1.27065584063529968e+02 -1.52949821203947067e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 52 /home/padeler/work/LevmarIK/model/hand_skinned.bmesh 0 1 0 17 | 15 13 f_middle.01.R 16 0 9.44843173027038574e-01 1.45251423120498657e-01 2.93553143739700317e-01 0.00000000000000000e+00 -1.52552887797355652e-01 9.88293230533599854e-01 2.00148974545300007e-03 0.00000000000000000e+00 -2.89825856685638428e-01 -4.66734655201435089e-02 9.55940604209899902e-01 0.00000000000000000e+00 -1.23689812608063221e+00 8.80728736519813538e+01 -1.90390134230256081e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 18 | 16 17 f_middle.01.R_rot 3 0 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 3 0 11 -1 12 1 0 2 1 0 19 | 17 17 f_middle.01.R_m2b 16 0 9.65437769889831543e-01 -5.12553229928016663e-02 -2.55544096231460571e-01 -0.00000000000000000e+00 -2.56654500961303711e-01 -1.62882357835769653e-02 -9.66366052627563477e-01 0.00000000000000000e+00 4.53690178692340851e-02 9.98552858829498291e-01 -2.88803316652774811e-02 -0.00000000000000000e+00 -1.10651459544897079e+01 -8.72267186641693115e+01 5.57220261543989182e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 52 /home/padeler/work/LevmarIK/model/hand_skinned.bmesh 0 1 0 20 | 18 13 f_middle.02.R 16 0 9.85155642032623291e-01 -1.23416386544704437e-01 1.19318492710590363e-01 0.00000000000000000e+00 1.02014638483524323e-01 9.79924321174621582e-01 1.71293005347251892e-01 0.00000000000000000e+00 -1.38063490390777588e-01 -1.56578034162521362e-01 9.77968335151672363e-01 0.00000000000000000e+00 5.23868948221206665e-07 3.38882356882095337e+01 -1.74622982740402222e-07 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 21 | 19 17 f_middle.02.R_rot 3 0 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 3 0 13 -1 -1 1 0 2 1 0 22 | 20 17 f_middle.02.R_m2b 16 0 9.26940977573394775e-01 4.48953406885266304e-03 -3.75180214643478394e-01 -0.00000000000000000e+00 -3.66139709949493408e-01 -2.07675516605377197e-01 -9.07090187072753906e-01 0.00000000000000000e+00 -8.19882005453109741e-02 9.78187620639801025e-01 -1.90859287977218628e-01 -0.00000000000000000e+00 4.71154553815722466e+00 -1.18857830762863159e+02 2.59410683065652847e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 52 /home/padeler/work/LevmarIK/model/hand_skinned.bmesh 0 1 0 23 | 21 13 f_middle.03.R 16 0 9.75227355957031250e-01 2.55289208143949509e-02 -2.19726920127868652e-01 0.00000000000000000e+00 -2.41801105439662933e-02 9.99668717384338379e-01 8.82616639137268066e-03 0.00000000000000000e+00 2.19879403710365295e-01 -3.29449190758168697e-03 9.75521504878997803e-01 0.00000000000000000e+00 1.16415321826934814e-07 2.65811067074537277e+01 -2.79396772384643555e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 24 | 22 17 f_middle.03.R_rot 3 0 -2.23517382380578056e-08 0.00000000000000000e+00 -2.98023188349816337e-08 3 0 14 -1 -1 1 0 2 1 0 25 | 23 17 f_middle.03.R_m2b 16 0 9.86529946327209473e-01 -2.12369021028280258e-02 -1.62195906043052673e-01 -0.00000000000000000e+00 -1.63059070706367493e-01 -2.06759527325630188e-01 -9.64708387851715088e-01 0.00000000000000000e+00 -1.30481505766510963e-02 9.78161394596099854e-01 -2.07437485456466675e-01 -0.00000000000000000e+00 -4.81802085414528847e+00 -1.45275726914405823e+02 2.68211923539638519e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 52 /home/padeler/work/LevmarIK/model/hand_skinned.bmesh 0 1 0 26 | 24 17 f_middle.03.R.001 16 0 9.86530065536499023e-01 -2.12369002401828766e-02 -1.62195920944213867e-01 0.00000000000000000e+00 -1.30481449887156487e-02 9.78161215782165527e-01 -2.07437440752983093e-01 0.00000000000000000e+00 1.63059055805206299e-01 2.06759601831436157e-01 9.64708328247070312e-01 0.00000000000000000e+00 -5.82076609134674072e-07 2.59108170866966248e+01 8.73114913702011108e-07 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 27 | 25 21 f_middle.03.R.001_m2b 16 0 9.99999880790710449e-01 -3.72529074255112391e-09 5.55111578487027274e-17 -0.00000000000000000e+00 -0.00000000000000000e+00 8.94069955847953679e-08 -1.00000011920928955e+00 0.00000000000000000e+00 0.00000000000000000e+00 1.00000011920928955e+00 -1.49011647465613351e-08 -0.00000000000000000e+00 -5.46793686226010323e+00 -1.72948896884918213e+02 -1.03054596111178398e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 52 /home/padeler/work/LevmarIK/model/hand_skinned.bmesh 0 1 0 28 | 26 11 f_ring.01.R 16 0 8.96658778190612793e-01 2.98955142498016357e-01 3.26540619134902954e-01 0.00000000000000000e+00 -3.11469584703445435e-01 9.50143873691558838e-01 -1.46029610186815262e-02 0.00000000000000000e+00 -3.14626157283782959e-01 -8.86135846376419067e-02 9.45070385932922363e-01 0.00000000000000000e+00 -2.10528690367937088e+01 8.04450139403343201e+01 -3.89283918775618076e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 29 | 27 15 f_ring.01.R_rot 3 0 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 3 0 15 -1 16 1 0 2 1 0 30 | 28 15 f_ring.01.R_m2b 16 0 9.34427857398986816e-01 -2.13749796152114868e-01 -2.84878581762313843e-01 -0.00000000000000000e+00 -2.92816489934921265e-01 -5.74896996840834618e-03 -9.56151485443115234e-01 0.00000000000000000e+00 2.02739372849464417e-01 9.76871669292449951e-01 -6.79616034030914307e-02 -0.00000000000000000e+00 -3.90104390680789948e+00 -8.30485150218009949e+01 4.18374827131628990e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 52 /home/padeler/work/LevmarIK/model/hand_skinned.bmesh 0 1 0 31 | 29 11 f_ring.02.R 16 0 9.85014855861663818e-01 -1.03135280311107635e-01 -1.38234928250312805e-01 0.00000000000000000e+00 1.27100035548210144e-01 9.75861608982086182e-01 1.77593961358070374e-01 0.00000000000000000e+00 1.16581924259662628e-01 -1.92502349615097046e-01 9.74346756935119629e-01 0.00000000000000000e+00 4.07453626394271851e-07 2.99394726753234863e+01 0.00000000000000000e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 32 | 30 15 f_ring.02.R_rot 3 0 -1.49011611938476562e-08 7.45058059692382812e-09 -1.49011611938476562e-08 3 0 17 -1 -1 1 0 2 1 0 33 | 31 15 f_ring.02.R_m2b 16 0 9.81850564479827881e-01 -1.40417113900184631e-01 -1.27485752105712891e-01 -0.00000000000000000e+00 -1.55662178993225098e-01 -2.12633922696113586e-01 -9.64653432369232178e-01 0.00000000000000000e+00 1.08346030116081238e-01 9.66990232467651367e-01 -2.30632513761520386e-01 -0.00000000000000000e+00 7.23211886361241341e+00 -1.10013462603092194e+02 2.53720805048942566e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 52 /home/padeler/work/LevmarIK/model/hand_skinned.bmesh 0 1 0 34 | 32 11 f_ring.03.R 16 0 9.90363121032714844e-01 5.41466325521469116e-02 1.27470836043357849e-01 0.00000000000000000e+00 -5.50017580389976501e-02 9.98481094837188721e-01 3.19543667137622833e-03 0.00000000000000000e+00 -1.27104192972183228e-01 -1.01757757365703583e-02 9.91837143898010254e-01 0.00000000000000000e+00 -3.20142135024070740e-06 2.51962840557098389e+01 -2.56113708019256592e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 35 | 33 15 f_ring.03.R_rot 3 0 1.49011611938476562e-08 7.45058059692382812e-09 0.00000000000000000e+00 3 0 18 -1 -1 1 0 2 1 0 36 | 34 15 f_ring.03.R_m2b 16 0 9.48534965515136719e-01 -1.94614723324775696e-01 -2.49813616275787354e-01 -0.00000000000000000e+00 -2.88640707731246948e-01 -2.06831768155097961e-01 -9.34830069541931152e-01 0.00000000000000000e+00 1.30262285470962524e-01 9.58825349807739258e-01 -2.52360999584197998e-01 -0.00000000000000000e+00 3.07547627016901970e+00 -1.35321095585823059e+02 2.56216060370206833e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 52 /home/padeler/work/LevmarIK/model/hand_skinned.bmesh 0 1 0 37 | 35 15 f_ring.03.R.001 16 0 9.48534846305847168e-01 -1.94614678621292114e-01 -2.49813511967658997e-01 0.00000000000000000e+00 1.30262270569801331e-01 9.58825111389160156e-01 -2.52360969781875610e-01 0.00000000000000000e+00 2.88640677928924561e-01 2.06831872463226318e-01 9.34829950332641602e-01 0.00000000000000000e+00 1.16415321826934814e-06 2.60439720004796982e+01 2.79396772384643555e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 38 | 36 19 f_ring.03.R.001_m2b 16 0 1.00000011920928955e+00 9.99201230382409239e-15 -7.45058272855203541e-08 -0.00000000000000000e+00 -2.98023330458363489e-08 1.34110507588047767e-07 -1.00000011920928955e+00 0.00000000000000000e+00 -2.23517488961988420e-08 1.00000023841857910e+00 1.49011682992750139e-08 -0.00000000000000000e+00 2.79205888509750366e+01 -1.60786181688308716e+02 -8.53589177131652832e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 52 /home/padeler/work/LevmarIK/model/hand_skinned.bmesh 0 1 0 39 | 37 10 thumb.01.R 16 0 5.18561780452728271e-01 -8.09060394763946533e-01 2.76613771915435791e-01 0.00000000000000000e+00 5.48799932003021240e-01 5.63015460968017578e-01 6.17925763130187988e-01 0.00000000000000000e+00 -6.55677020549774170e-01 -1.68627083301544189e-01 7.35970556735992432e-01 0.00000000000000000e+00 2.49536503106355667e+01 2.45662443339824677e+01 4.44448832422494888e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 40 | 38 14 thumb.01.R_rot 3 0 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 3 0 19 -1 20 1 0 2 1 0 41 | 39 14 thumb.01.R_m2b 16 0 4.44157898426055908e-01 6.26804471015930176e-01 -6.40187442302703857e-01 -0.00000000000000000e+00 -2.48912692070007324e-01 -6.00079178810119629e-01 -7.60228633880615234e-01 0.00000000000000000e+00 -8.60677897930145264e-01 4.97012257575988770e-01 -1.10510408878326416e-01 -0.00000000000000000e+00 5.70615287870168686e+00 -3.02721057087182999e+01 1.72330625355243683e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 52 /home/padeler/work/LevmarIK/model/hand_skinned.bmesh 0 1 0 42 | 40 10 thumb.02.R 16 0 5.18783330917358398e-01 3.22493493556976318e-01 7.91746079921722412e-01 0.00000000000000000e+00 -3.33420962095260620e-01 9.29106771945953369e-01 -1.59972548484802246e-01 0.00000000000000000e+00 -7.87206768989562988e-01 -1.80993646383285522e-01 5.89531302452087402e-01 0.00000000000000000e+00 4.65661287307739258e-06 3.16911004483699799e+01 -1.39698386192321777e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 43 | 41 14 thumb.02.R_rot 3 0 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 3 0 21 -1 -1 1 0 2 1 0 44 | 42 14 thumb.02.R_m2b 16 0 -7.43037387728691101e-02 5.36688983440399170e-01 -8.40501904487609863e-01 -0.00000000000000000e+00 -9.24561321735382080e-01 -3.52929145097732544e-01 -1.43622145056724548e-01 0.00000000000000000e+00 -3.73718351125717163e-01 7.66424059867858887e-01 5.22425889968872070e-01 -0.00000000000000000e+00 -3.37826600298285484e+00 -6.22297860682010651e+01 1.68824512511491776e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 52 /home/padeler/work/LevmarIK/model/hand_skinned.bmesh 0 1 0 45 | 43 10 thumb.03.R 16 0 9.99760508537292480e-01 -1.63591913878917694e-02 -1.45247988402843475e-02 0.00000000000000000e+00 1.73584558069705963e-02 9.97284233570098877e-01 7.15730041265487671e-02 0.00000000000000000e+00 1.33144557476043701e-02 -7.18080103397369385e-02 9.97329473495483398e-01 0.00000000000000000e+00 -4.65661287307739258e-07 3.81900556385517120e+01 2.79396772384643555e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 46 | 44 14 thumb.03.R_rot 3 0 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 3 0 22 -1 -1 1 0 2 1 0 47 | 45 14 thumb.03.R_m2b 16 0 -7.08576589822769165e-02 4.73784565925598145e-01 -8.77785503864288330e-01 -0.00000000000000000e+00 -9.16480541229248047e-01 -3.78299266099929810e-01 -1.30205541849136353e-01 0.00000000000000000e+00 -3.93755167722702026e-01 7.95247197151184082e-01 4.61019665002822876e-01 -0.00000000000000000e+00 -1.97988422587513924e+00 -9.89974662661552429e+01 2.40033380687236786e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 52 /home/padeler/work/LevmarIK/model/hand_skinned.bmesh 0 1 0 48 | 46 14 thumb.03.R.001 16 0 -7.08576738834381104e-02 4.73784506320953369e-01 -8.77785682678222656e-01 0.00000000000000000e+00 -3.93755048513412476e-01 7.95247077941894531e-01 4.61019605398178101e-01 0.00000000000000000e+00 9.16480422019958496e-01 3.78299355506896973e-01 1.30205690860748291e-01 0.00000000000000000e+00 1.39698386192321777e-06 2.47499663382768631e+01 -9.31322574615478516e-07 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 49 | 47 18 thumb.03.R.001_m2b 16 0 9.99999880790710449e-01 1.19209275339926535e-07 5.96046341172495886e-08 -0.00000000000000000e+00 -8.94069600576585799e-08 1.89989833643267048e-07 -1.00000011920928955e+00 0.00000000000000000e+00 -4.99600403432967806e-15 1.00000011920928955e+00 -5.58793651350697473e-08 -0.00000000000000000e+00 -7.95591026544570923e+01 -8.65641757845878601e+01 -4.55027110874652863e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 52 /home/padeler/work/LevmarIK/model/hand_skinned.bmesh 0 1 0 50 | 48 12 f_index.01.R 16 0 9.33493733406066895e-01 -1.37373656034469604e-01 3.31237047910690308e-01 0.00000000000000000e+00 1.23981490731239319e-01 9.90387082099914551e-01 6.13371841609477997e-02 0.00000000000000000e+00 -3.36478918790817261e-01 -1.61906220018863678e-02 9.41551864147186279e-01 0.00000000000000000e+00 2.54517830908298492e+01 8.93787518143653870e+01 -2.10339366458356380e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 51 | 49 16 f_index.01.R_rot 3 0 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 3 0 23 -1 24 1 0 2 1 0 52 | 50 16 f_index.01.R_m2b 16 0 9.26938712596893311e-01 2.26166844367980957e-01 -2.99387812614440918e-01 -0.00000000000000000e+00 -2.92423278093338013e-01 -6.45123794674873352e-02 -9.54110383987426758e-01 0.00000000000000000e+00 -2.35102444887161255e-01 9.71949934959411621e-01 6.33730273693799973e-03 -0.00000000000000000e+00 -1.07840793207287788e+01 -9.15460810065269470e+01 1.19915427640080452e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 52 /home/padeler/work/LevmarIK/model/hand_skinned.bmesh 0 1 0 53 | 51 12 f_index.02.R 16 0 9.79103147983551025e-01 3.30032259225845337e-02 -2.00668334960937500e-01 0.00000000000000000e+00 7.73940235376358032e-03 9.79981899261474609e-01 1.98936447501182556e-01 0.00000000000000000e+00 2.03216806054115295e-01 -1.96332365274429321e-01 9.59247887134552002e-01 0.00000000000000000e+00 -2.47382558882236481e-07 2.68096104264259338e+01 -5.82076609134674072e-08 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 54 | 52 16 f_index.02.R_rot 3 0 -1.98342604562640190e-08 9.31322574615478516e-10 -9.31322574615478516e-10 3 0 25 -1 -1 1 0 2 1 0 55 | 53 16 f_index.02.R_m2b 16 0 9.75110530853271484e-01 1.69254213571548462e-01 -1.43221423029899597e-01 -0.00000000000000000e+00 -9.69820022583007812e-02 -2.55291491746902466e-01 -9.61987912654876709e-01 0.00000000000000000e+00 -1.99383765459060669e-01 9.51934456825256348e-01 -2.32522964477539062e-01 -0.00000000000000000e+00 -1.68711673468351364e+01 -1.13684326410293579e+02 3.25484089553356171e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 52 /home/padeler/work/LevmarIK/model/hand_skinned.bmesh 0 1 0 56 | 54 12 f_index.03.R 16 0 9.87482964992523193e-01 -7.42267072200775146e-03 1.57550632953643799e-01 0.00000000000000000e+00 2.14019417762756348e-03 9.99430716037750244e-01 3.36720608174800873e-02 0.00000000000000000e+00 -1.57710850238800049e-01 -3.29133644700050354e-02 9.86936748027801514e-01 0.00000000000000000e+00 1.97906047105789185e-06 2.40588970482349396e+01 0.00000000000000000e+00 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 57 | 55 16 f_index.03.R_rot 3 0 2.98023223876953125e-08 2.79396772384643555e-09 -9.31322574615478516e-10 3 0 26 -1 -1 1 0 2 1 0 58 | 56 16 f_index.03.R_m2b 16 0 9.39084172248840332e-01 1.66422203183174133e-01 -3.00706744194030762e-01 -0.00000000000000000e+00 -2.45434924960136414e-01 -2.87745743989944458e-01 -9.25723493099212646e-01 0.00000000000000000e+00 -2.40588128566741943e-01 9.43136096000671387e-01 -2.29371815919876099e-01 -0.00000000000000000e+00 -1.05095477774739265e+01 -1.36604920029640198e+02 3.93175780773162842e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 52 /home/padeler/work/LevmarIK/model/hand_skinned.bmesh 0 1 0 59 | 57 16 f_index.03.R.001 16 0 9.39084291458129883e-01 1.66422232985496521e-01 -3.00706773996353149e-01 0.00000000000000000e+00 -2.40588173270225525e-01 9.43136096000671387e-01 -2.29371860623359680e-01 0.00000000000000000e+00 2.45434850454330444e-01 2.87745922803878784e-01 9.25723433494567871e-01 0.00000000000000000e+00 1.86264514923095703e-06 2.46616564691066742e+01 1.86264514923095703e-06 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 0 1 1 0 60 | 58 20 f_index.03.R.001_m2b 16 0 9.99999880790710449e-01 -2.23517400144146450e-08 -1.33226752367106944e-15 -0.00000000000000000e+00 -2.98023117295542761e-08 2.08616256713867188e-07 -1.00000000000000000e+00 0.00000000000000000e+00 2.98023188349816337e-08 1.00000000000000000e+00 5.96046447753906250e-08 -0.00000000000000000e+00 -4.85307574272155762e+01 -1.58586248755455017e+02 -1.25860217958688736e+01 1.00000000000000000e+00 16 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 9 52 /home/padeler/work/LevmarIK/model/hand_skinned.bmesh 0 1 61 | -------------------------------------------------------------------------------- /models/hand_skinned.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | hand_skinned 5 | hand_skinned 6 | skinned 7 | 27 8 | -5000,-5000,500,-1,-1,-1,-1,0,-0.523599,0,0,0,-0.523599,0,0,0,-0.523599,0,0,0,-0.523599,0,0,0,-0.523599,0,0 9 | 5000,5000,5000,1,1,1,1,1.5708,0.523599,1.5708,1.5708,1.5708,0.523599,1.5708,1.5708,1.5708,0.523599,1.5708,1.5708,1.5708,0.523599,1.5708,1.5708,1.5708,0.523599,1.5708,1.5708 10 | 0,0,3000,0,0,0,1,3.72529e-08,-1.49012e-08,2.23517e-08,0,0,0,0,-2.23517e-08,0,0,-1.49012e-08,1.49012e-08,0,0,0,0,0,0,-1.98343e-08,2.98023e-08 11 | t,t,t,q,q,q,q,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e 12 | X,Y,Z,X,Y,Z,W,X,Z,X,X,X,Z,X,X,X,Z,X,X,X,Z,X,X,X,Z,X,X 13 | 1,1,1,1,1,1,1,2,2,3,4,5,5,6,7,8,8,9,10,11,11,12,13,14,14,15,16 14 | global,global,global,global,global,global,global,f_pinky.01.R_rot,f_pinky.01.R_rot,f_pinky.02.R_rot,f_pinky.03.R_rot,f_middle.01.R_rot,f_middle.01.R_rot,f_middle.02.R_rot,f_middle.03.R_rot,f_ring.01.R_rot,f_ring.01.R_rot,f_ring.02.R_rot,f_ring.03.R_rot,thumb.01.R_rot,thumb.01.R_rot,thumb.02.R_rot,thumb.03.R_rot,f_index.01.R_rot,f_index.01.R_rot,f_index.02.R_rot,f_index.03.R_rot 15 | 16 | 17 | 18 | 19 | all 20 | 1.0 21 | hand.R,f_pinky.01.R,f_pinky.02.R,f_pinky.03.R,f_pinky.03.R.004,f_middle.01.R,f_middle.02.R,f_middle.03.R,f_middle.03.R.001,f_ring.01.R,f_ring.02.R,f_ring.03.R,f_ring.03.R.001,thumb.01.R,thumb.02.R,thumb.03.R,thumb.03.R.001,f_index.01.R,f_index.02.R,f_index.03.R,f_index.03.R.001 22 | 23 | 24 | 25 | 26 | 27 | 28 | main 29 | 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26 30 | 31 | 32 | 21 33 | 34 | -------------------------------------------------------------------------------- /models/mobnet4f_cmu_adadelta_t1_model.pb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FORTH-ModelBasedTracker/MonocularRGB_3D_Handpose_WACV18/7e900546830a4598879891d97f6649abfb8c16da/models/mobnet4f_cmu_adadelta_t1_model.pb -------------------------------------------------------------------------------- /openpose_models/getModels.sh: -------------------------------------------------------------------------------- 1 | wget -c http://cvrlcode.ics.forth.gr/web_share/openpose_models.tgz 2 | tar -zxvf openpose_models.tgz 3 | rm openpose_models.tgz 4 | -------------------------------------------------------------------------------- /res/calib_webcam_mshd_vga.json: -------------------------------------------------------------------------------- 1 | { 2 | "CalibReprError": 0.22683652780513805, 3 | "CameraMatrix": [ 4 | [ 5 | 677.2458625466664, 6 | 0.0, 7 | 319.9475633489432 8 | ], 9 | [ 10 | 0.0, 11 | 680.2429731706618, 12 | 238.82859474169499 13 | ], 14 | [ 15 | 0.0, 16 | 0.0, 17 | 1.0 18 | ] 19 | ], 20 | "CameraID": 0, 21 | "Distortion": [ 22 | 0.18681114967853352, 23 | -1.373415281351234, 24 | 0.0, 25 | 0.0, 26 | 2.6679646461641733 27 | ], 28 | "Dims": [ 29 | 640, 30 | 480 31 | ], 32 | "Translation": [ 33 | 0.45741679812645997, 34 | -5.431948788406406, 35 | 19.02926322842629 36 | ], 37 | "Rotation": [ 38 | -0.1679926547280827, 39 | -0.0489874819276265, 40 | 1.6331950639580286 41 | ] 42 | } -------------------------------------------------------------------------------- /res/full_pipeline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FORTH-ModelBasedTracker/MonocularRGB_3D_Handpose_WACV18/7e900546830a4598879891d97f6649abfb8c16da/res/full_pipeline.png -------------------------------------------------------------------------------- /res/overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FORTH-ModelBasedTracker/MonocularRGB_3D_Handpose_WACV18/7e900546830a4598879891d97f6649abfb8c16da/res/overview.png --------------------------------------------------------------------------------