Skip to content

Commit 7e4c9ea

Browse files
TF 2, both hands, Unity.
1 parent 5e0fb10 commit 7e4c9ea

File tree

550 files changed

+1630534
-134
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

550 files changed

+1630534
-134
lines changed

.gitignore

+83-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ parts/
2222
sdist/
2323
var/
2424
wheels/
25-
pip-wheel-metadata/
2625
share/python-wheels/
2726
*.egg-info/
2827
.installed.cfg
@@ -52,6 +51,7 @@ coverage.xml
5251
*.py,cover
5352
.hypothesis/
5453
.pytest_cache/
54+
cover/
5555

5656
# Translations
5757
*.mo
@@ -74,6 +74,7 @@ instance/
7474
docs/_build/
7575

7676
# PyBuilder
77+
.pybuilder/
7778
target/
7879

7980
# Jupyter Notebook
@@ -84,7 +85,9 @@ profile_default/
8485
ipython_config.py
8586

8687
# pyenv
87-
.python-version
88+
# For a library or package, you might want to ignore these files since the code is
89+
# intended to run in multiple environments; otherwise, check them in:
90+
# .python-version
8891

8992
# pipenv
9093
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
@@ -129,3 +132,81 @@ dmypy.json
129132

130133
# Pyre type checker
131134
.pyre/
135+
136+
# pytype static type analyzer
137+
.pytype/
138+
139+
# Cython debug symbols
140+
cython_debug/
141+
142+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
143+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
144+
145+
# User-specific stuff
146+
.idea/**/workspace.xml
147+
.idea/**/tasks.xml
148+
.idea/**/usage.statistics.xml
149+
.idea/**/dictionaries
150+
.idea/**/shelf
151+
152+
# Generated files
153+
.idea/**/contentModel.xml
154+
155+
# Sensitive or high-churn files
156+
.idea/**/dataSources/
157+
.idea/**/dataSources.ids
158+
.idea/**/dataSources.local.xml
159+
.idea/**/sqlDataSources.xml
160+
.idea/**/dynamic.xml
161+
.idea/**/uiDesigner.xml
162+
.idea/**/dbnavigator.xml
163+
164+
# Gradle
165+
.idea/**/gradle.xml
166+
.idea/**/libraries
167+
168+
# Gradle and Maven with auto-import
169+
# When using Gradle or Maven with auto-import, you should exclude module files,
170+
# since they will be recreated, and may cause churn. Uncomment if using
171+
# auto-import.
172+
# .idea/artifacts
173+
# .idea/compiler.xml
174+
# .idea/jarRepositories.xml
175+
# .idea/modules.xml
176+
# .idea/*.iml
177+
# .idea/modules
178+
# *.iml
179+
# *.ipr
180+
181+
# CMake
182+
cmake-build-*/
183+
184+
# Mongo Explorer plugin
185+
.idea/**/mongoSettings.xml
186+
187+
# File-based project format
188+
*.iws
189+
190+
# IntelliJ
191+
out/
192+
193+
# mpeltonen/sbt-idea plugin
194+
.idea_modules/
195+
196+
# JIRA plugin
197+
atlassian-ide-plugin.xml
198+
199+
# Cursive Clojure plugin
200+
.idea/replstate.xml
201+
202+
# Crashlytics plugin (for Android Studio and IntelliJ)
203+
com_crashlytics_export_strings.xml
204+
crashlytics.properties
205+
crashlytics-build.properties
206+
fabric.properties
207+
208+
# Editor-based Rest Client
209+
.idea/httpRequests
210+
211+
# Android studio 3.1+ serialized cache file
212+
.idea/caches/build_file_checksums.ser

README.md

+10-70
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,19 @@
1-
# Minimal Hand
1+
# Unity Minimal Hand
22

3-
A minimal solution to hand motion capture from a single color camera at over 100fps.
4-
Easy to use, plug to run.
3+
A hand motion capture from a single color camera + Unity + a virtual webcam.
54

6-
![teaser](teaser.gif)
5+
![](media/screenshot.png)
76

8-
This project provides the core components for hand motion capture:
9-
1. estimating joint **locations** from a monocular RGB image (DetNet)
10-
1. estimating joint **rotations** from locations (IKNet)
7+
## [Demo](https://www.youtube.com/watch?v=q_P_4KuAIVw)
118

12-
We focus on:
13-
1. ease of use (all you need is a webcam)
14-
1. time efficiency (on our 1080Ti, 8.9ms for DetNet, 0.9ms for IKNet)
15-
1. robustness to occlusion, hand-object interaction, fast motion, changing scale and view point
9+
## How to use
1610

17-
Some links:
18-
[\[video\]](https://youtu.be/OIRulRoBdL4)
19-
[\[paper\]](https://calciferzh.github.io/files/zhou2020monocular.pdf)
20-
[\[supp doc\]](https://calciferzh.github.io/files/zhou2020monocular_supp.pdf)
21-
[\[webpage\]](https://calciferzh.github.io/publications/zhou2020monocular)
11+
1) Install dependencies
2212

23-
The author is too busy to collect the training code for release.
24-
On the other hand, it should not be difficult to implement the training part.
25-
Feel free to open an issue for any encountered problems.
13+
2) Run the *app1.py* script
2614

27-
## Usage
15+
3) Run the *Main.unity* scene
2816

29-
### Install dependencies
30-
Please check `requirements.txt`. All dependencies are available via pip and conda.
17+
## Known issues
3118

32-
### Prepare MANO hand model
33-
1. Download MANO model from [here](https://mano.is.tue.mpg.de/) and unzip it.
34-
1. In `config.py`, set `OFFICIAL_MANO_PATH` to the **left hand** model.
35-
1. Run `python prepare_mano.py`, you will get the converted MANO model that is compatible with this project at `config.HAND_MESH_MODEL_PATH`.
36-
37-
### Prepare pre-trained network models
38-
1. Download models from [here](https://drive.google.com/open?id=1ZnDYF9rHKbef27tiHkWrLznqe18le7ol).
39-
1. Put `detnet.ckpt.*` in `model/detnet`, and `iknet.ckpt.*` in `model/iknet`.
40-
1. Check `config.py`, make sure all required files are there.
41-
42-
### Run the demo for webcam input
43-
1. `python app.py`
44-
1. Put your **right hand** in front of the camera. The pre-trained model is for left hand, but the input would be flipped internally.
45-
1. Press `ESC` to quit.
46-
1. Although the model is robust to variant scales, most ideally the image should be 1.3x larger than the hand bounding box. A good bounding box may result in better accuracy. You can track the bounding box with the 2D predictions of the model.
47-
48-
We found that the model may fail on some "simple" poses. We think this is because such poses were no presented in the training data. We are working on a v2 version with further extended data to tackle this problem.
49-
50-
### Use the models in your project
51-
Please check `wrappers.py`.
52-
53-
## IKNet Alternative
54-
We also provide an optimization-based IK solver [here](https://github.com/CalciferZh/Minimal-IK).
55-
56-
## Dataset
57-
The detection model is trained with following datasets:
58-
* [CMU HandDB](http://domedb.perception.cs.cmu.edu/handdb.html)
59-
* [Rendered Handpose Dataset](https://lmb.informatik.uni-freiburg.de/resources/datasets/RenderedHandposeDataset.en.html)
60-
* [GANerated Hands Dataset](https://handtracker.mpi-inf.mpg.de/projects/GANeratedHands/GANeratedDataset.htm)
61-
62-
The IK model is trained with the poses shipped with [MANO](https://mano.is.tue.mpg.de/).
63-
64-
## Citation
65-
66-
This is the official implementation of the paper "Monocular Real-time Hand Shape and Motion Capture using Multi-modal Data" (CVPR 2020).
67-
68-
The quantitative numbers reported in the paper can be found in `plot.py`.
69-
70-
If you find the project helpful, please consider citing us:
71-
```
72-
@inproceedings{zhou2020monocular,
73-
title={Monocular Real-time Hand Shape and Motion Capture using Multi-modal Data},
74-
author={Zhou, Yuxiao and Habermann, Marc and Xu, Weipeng and Habibie, Ikhsanul and Theobalt, Christian and Xu, Feng},
75-
booktitle={Proceedings of the IEEE International Conference on Computer Vision},
76-
pages={0--0},
77-
year={2020}
78-
}
79-
```
19+
* 24 FPS on Nvidia GTX 1080 is rather few

UnityProject/.gitignore

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# This .gitignore file should be placed at the root of your Unity project directory
2+
#
3+
# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore
4+
#
5+
/[Ll]ibrary/
6+
/[Tt]emp/
7+
/[Oo]bj/
8+
/[Bb]uild/
9+
/[Bb]uilds/
10+
/[Ll]ogs/
11+
/[Uu]ser[Ss]ettings/
12+
13+
# MemoryCaptures can get excessive in size.
14+
# They also could contain extremely sensitive data
15+
/[Mm]emoryCaptures/
16+
17+
# Asset meta data should only be ignored when the corresponding asset is also ignored
18+
!/[Aa]ssets/**/*.meta
19+
20+
# Uncomment this line if you wish to ignore the asset store tools plugin
21+
# /[Aa]ssets/AssetStoreTools*
22+
23+
# Autogenerated Jetbrains Rider plugin
24+
/[Aa]ssets/Plugins/Editor/JetBrains*
25+
26+
# Visual Studio cache directory
27+
.vs/
28+
29+
# Gradle cache directory
30+
.gradle/
31+
32+
# Autogenerated VS/MD/Consulo solution and project files
33+
ExportedObj/
34+
.consulo/
35+
*.csproj
36+
*.unityproj
37+
*.sln
38+
*.suo
39+
*.tmp
40+
*.user
41+
*.userprefs
42+
*.pidb
43+
*.booproj
44+
*.svd
45+
*.pdb
46+
*.mdb
47+
*.opendb
48+
*.VC.db
49+
50+
# Unity3D generated meta files
51+
*.pidb.meta
52+
*.pdb.meta
53+
*.mdb.meta
54+
55+
# Unity3D generated file on crash reports
56+
sysinfo.txt
57+
58+
# Builds
59+
*.apk
60+
*.aab
61+
*.unitypackage
62+
63+
# Crashlytics generated file
64+
crashlytics-build.properties
65+
66+
# Packed Addressables
67+
/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*
68+
69+
# Temporary auto-generated Android Assets
70+
/[Aa]ssets/[Ss]treamingAssets/aa.meta
71+
/[Aa]ssets/[Ss]treamingAssets/aa/*

UnityProject/.vsconfig

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"version": "1.0",
3+
"components": [
4+
"Microsoft.VisualStudio.Workload.ManagedGame"
5+
]
6+
}

UnityProject/Assets/Hovl Studio.meta

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnityProject/Assets/Hovl Studio/Procedural fire.meta

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnityProject/Assets/Hovl Studio/Procedural fire/Demo scene.meta

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Loading

UnityProject/Assets/Hovl Studio/Procedural fire/Demo scene/Concrete slab.png.meta

+84
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Loading

0 commit comments

Comments
 (0)