Skip to content

Commit be48f9e

Browse files
Breaking changes.
1 parent aeb134e commit be48f9e

File tree

4 files changed

+27
-17
lines changed

4 files changed

+27
-17
lines changed

README.md

+13-4
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,25 @@ A hand motion capture from a single color camera + Unity + a virtual webcam (you
88

99
## How to use
1010

11-
1) Install dependencies
11+
1) Do steps (Prepare MANO, ...) from the original [Usage](https://github.com/CalciferZh/minimal-hand#usage) section of the minimal-hand repository
1212

13-
2) Run the *app1.py* script
13+
2) [Optional] Install the OBS virtual camera as described in the [pyvirtualcam](https://github.com/letmaik/pyvirtualcam) repository
1414

15-
3) Run the *Main.unity* scene
15+
3) Run the *app1.py* script
16+
17+
4) Run the *Main.unity* scene (Unity 2020 is required for C# 8 support)
1618

1719
## Tips
1820

1921
* Use the debug.ipynb Jupyter notebook to execute step-by-step
2022

2123
## Known issues
2224

23-
* 24 FPS on Nvidia GTX 1080 is rather few
25+
* 24 FPS on Nvidia GTX 1080 is rather few
26+
* 2 FPS on TensorFlow >= 2.2.2
27+
28+
## Advantages
29+
30+
* Tensorflow 2
31+
* PEP-8
32+
* Multiplatform

UnityProject/Assets/Scripts/Client.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private void Update()
6262

6363
renderTexture = new RenderTexture(frameWidth, frameHeight, depth: 24);
6464
receiveTexture = new Texture2D(frameWidth, frameHeight, TextureFormat.RGB24, mipChain: false);
65-
sendTexture = new Texture2D(frameWidth, frameHeight, TextureFormat.RGBA32, mipChain: false);
65+
sendTexture = new Texture2D(frameWidth, frameHeight, TextureFormat.RGB24, mipChain: false);
6666
image.texture = receiveTexture;
6767

6868
_initialized = true;

app1.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ def __call__(self):
6565

6666
def display(msg, info_frame_, cam, recv_fps):
6767
proc_frame = np.frombuffer(msg[0], dtype=info_frame_.dtype)
68-
proc_frame.shape = (info_frame_.shape[0], info_frame_.shape[1], 4)
68+
proc_frame.shape = info_frame_.shape
6969
proc_frame = np.flip(proc_frame, axis=0)
7070
cam.send(proc_frame)
71-
proc_frame = cv2.cvtColor(proc_frame, cv2.COLOR_RGBA2BGR)
71+
proc_frame = cv2.cvtColor(proc_frame, cv2.COLOR_RGB2BGR)
7272
cv2.imshow('Webcam', proc_frame)
7373
cv2.waitKey(1)
7474
# recv_fps()

requirements.txt

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
pygame==1.9.6
2-
open3d==0.9.0.0
3-
tensorflow_gpu==2.2.0
4-
transforms3d==0.3.1
5-
keyboard==0.13.5
6-
opencv_python==4.2.0.34
7-
numpy==1.18.4
8-
scipy
9-
chumpy
10-
pyvirtualcam
1+
pygame # 1.9.6
2+
open3d # 0.9.0.0
3+
tensorflow_gpu==2.2.2 # 2.2.2
4+
transforms3d # 0.3.1
5+
keyboard # 0.13.5
6+
opencv_python # 4.5.1.48
7+
numpy # 1.19.5
8+
scipy # 1.5.4
9+
chumpy #0.7.0
10+
pyvirtualcam # 0.6.0
11+
jupyterlab # 3.0.12

0 commit comments

Comments
 (0)