Skip to content

Commit 72b662a

Browse files
committed
Use palm detection model without custom op.
1 parent cff8c32 commit 72b662a

File tree

6 files changed

+6
-11
lines changed

6 files changed

+6
-11
lines changed

.gitattributes

Lines changed: 0 additions & 1 deletion
This file was deleted.

Dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
FROM python:3.6
1+
FROM python:3.7
22

33
COPY . /root/hand_tracking
44

55
WORKDIR /root/hand_tracking
66

7-
RUN pip install opencv-python Pillow
8-
9-
RUN pip install tensorflow-1.14.1-cp36-cp36m-linux_x86_64.whl
7+
RUN pip install opencv-python Pillow tensorflow
108

119
ENTRYPOINT python run.py

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
## Hand tracking
22

33
### 1. ファイル説明
4-
- `palm_detection.tflite`(手のひら検出)モデルファイルと`hand_landmark.tflite`(ランマーク検出)モデルファイル:[*mediapipe*]レポジトリよりダウンロードしました。
4+
- `palm_detection_without_custom_op.tflite`(手のひら検出)モデルファイル:[*mediapipe-models*]レポジトリよりダウンロードしました。
5+
- `hand_landmark.tflite`(ランマーク検出)モデルファイル:[*mediapipe*]レポジトリよりダウンロードしました。
56
- `anchors.csv`ファイルと`hand_tracker.py`ファイル:[*hand_tracking*]レポジトリよりダウンロードしました。
6-
- `tensorflow-1.14.1-cp36-cp36m-linux_x86_64.whl`wheelファイル:[*tensorflow*ソースからのビルド][*hand_tracking*]レポジトリの説明を参考し、Python APIによる上記のモデルファイルを使えるこのカスタムwheelファイルを*tensorflow*ソースから作成しました。
77
- `convert.py`ファイル:この[gist]よりコピーしました。
88

99
### 2. 実施方法
@@ -25,6 +25,7 @@ $ docker run --rm --device=/dev/video0:/dev/video0 -v /tmp/.X11-unix:/tmp/.X11-u
2525
### 3. 結果
2626
![Result](/output.gif?raw=true "Result")
2727

28+
[*mediapipe-models*]: https://github.com/junhwanjang/mediapipe-models/tree/master/palm_detection/mediapipe_models
2829
[*mediapipe*]: https://github.com/google/mediapipe/tree/master/mediapipe/models
2930
[*hand_tracking*]: https://github.com/wolterlw/hand_tracking
3031
[*tensorflow*ソースからのビルド]: https://www.tensorflow.org/install/source#docker_linux_builds

run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from hand_tracker import HandTracker
33

44
WINDOW = "Hand Tracking"
5-
PALM_MODEL_PATH = "./palm_detection.tflite"
5+
PALM_MODEL_PATH = "./palm_detection_without_custom_op.tflite"
66
LANDMARK_MODEL_PATH = "./hand_landmark.tflite"
77
ANCHORS_PATH = "./anchors.csv"
88
OUTPUT_PATH = "output.avi"

tensorflow-1.14.1-cp36-cp36m-linux_x86_64.whl

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)