Skip to content

Commit a974b2d

Browse files
Update README.md
1 parent 3b22d5c commit a974b2d

File tree

1 file changed

+13
-28
lines changed

1 file changed

+13
-28
lines changed

README.md

Lines changed: 13 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
## PoseNet Python
22

3-
This repository contains a pure Python implementation (multi-pose only) of the Google TensorFlow.js Posenet model. For a (slightly faster) PyTorch implementation that followed from this, see (https://github.com/rwightman/posenet-pytorch)
4-
5-
I first adapted the JS code more or less verbatim and found the performance was low so made some vectorized numpy/scipy version of a few key functions (named `_fast`).
3+
This repository contains a pure Python implementation (multi-pose only) of the Google TensorFlow.js Posenet model.
64

75
Further optimization is possible
86
* The base MobileNet models have a throughput of 200-300 fps on a GTX 1080 Ti (or better)
@@ -11,26 +9,10 @@ Further optimization is possible
119
* My 'fast' post processing results in 90-110fps
1210
* A Cython or pure C++ port would be even better...
1311

14-
### Install
15-
16-
A suitable Python 3.x environment with a recent version of Tensorflow is required.
17-
18-
Development and testing was done with Conda Python 3.6.8 and Tensorflow 1.12.0 on Linux.
19-
20-
Windows 10 with the latest (as of 2019-01-19) 64-bit Python 3.7 Anaconda installer was also tested.
21-
22-
If you want to use the webcam demo, a pip version of opencv (`pip install opencv-python`) is required instead of the conda version. Anaconda's default opencv does not include ffpmeg/VideoCapture support. Also, you may have to force install version 3.4.x as 4.x has a broken drawKeypoints binding.
23-
24-
A conda environment setup as below should suffice:
25-
```
26-
conda install tensorflow-gpu scipy pyyaml python=3.6
27-
pip install opencv-python==3.4.5.20
28-
29-
```
3012

3113
### Usage
3214

33-
There are three demo apps in the root that utilize the PoseNet model. They are very basic and could definitely be improved.
15+
There are multiple demo apps in the root that utilize the PoseNet model. They are very basic and could definitely be improved.
3416

3517
The first time these apps are run (or the library is used) model weights will be downloaded from the TensorFlow.js version and converted on the fly.
3618

@@ -50,7 +32,17 @@ A minimal performance benchmark based on image_demo. Images in `--image_dir` are
5032

5133
#### webcam_demo.py
5234

53-
The webcam demo uses OpenCV to capture images from a connected webcam. The result is overlayed with the keypoints and skeletons and rendered to the screen. The default args for the webcam_demo assume device_id=0 for the camera and that 1280x720 resolution is possible.
35+
Shows a stick figure pose in real-time using a web-cam. To overlay the stick figure on background turn on the "bgimage" parameter
36+
37+
#### webcam_demo_react.py
38+
39+
Fun game that uses hand detection and calculates reaction time taken to touch targets with hand.
40+
41+
#### webcam_demo_circles2.py
42+
43+
Matches real-time pose to a pre-set pose based on lower body keypoints.
44+
45+
5446

5547
### Credits
5648

@@ -60,10 +52,3 @@ This port and my work is in no way related to Google.
6052

6153
The Python conversion code that started me on my way was adapted from the CoreML port at https://github.com/infocom-tpo/PoseNet-CoreML
6254

63-
### TODO (someday, maybe)
64-
* More stringent verification of correctness against the original implementation
65-
* Performance improvements (especially edge loops in 'decode.py')
66-
* OpenGL rendering/drawing
67-
* Comment interfaces, tensor dimensions, etc
68-
* Implement batch inference for image_demo
69-

0 commit comments

Comments
 (0)