You have to implement a system which, given a video stream from you webcam, detect a person who is hailing a cap. That is, if either hand is above the head, we should print "Someone is hailing a taxi!".
All code edits should occur in assignment.py in the src folder.
There are two parts to this task:
- install and run the assignment.py script (70%)
- implement the code to be able to dectect someone hailing (30%)
You need to install dependencies below.
- python3
- tensorflow 1.4.1+
- opencv3, protobuf, python3-tk
The point of this assignment for you to research what is required and how it can be installed.
$ git clone https://www.github.com/ishaanv/tf-openpose
$ cd tf-openpose
$ pip3 install -r requirements.txt
Requirements files in python contain some of the dependencies.
You can test the inference feature with a by capturing video from your webcam.
$ python3 src/assignment.py
Then you will see the screen as below with pafmap, heatmap, result and etc.
Read the code and TODOs in assignment.py. Uncomment the line:
print([(POSE_COCO_BODY_PARTS[k], v.x, v.y) for k,v in human.body_parts.items()])
and run it to see what happens.
1 May 2018. Marking will be done in the labs on the day.
[1] https://github.com/CMU-Perceptual-Computing-Lab/openpose
[2] Training Codes : https://github.com/ZheC/Realtime_Multi-Person_Pose_Estimation
[3] Custom Caffe by Openpose : https://github.com/CMU-Perceptual-Computing-Lab/caffe_train
[4] Keras Openpose : https://github.com/michalfaber/keras_Realtime_Multi-Person_Pose_Estimation
[1] Arxiv Paper : https://arxiv.org/abs/1701.00295
[2] https://github.com/DenisTome/Lifting-from-the-Deep-release
[1] Original Paper : https://arxiv.org/abs/1704.04861
[2] Pretrained model : https://github.com/tensorflow/models/blob/master/slim/nets/mobilenet_v1.md
[1] Tensorpack : https://github.com/ppwwyyxx/tensorpack
[1] Freeze graph : https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/tools/freeze_graph.py
[2] Optimize graph : https://codelabs.developers.google.com/codelabs/tensorflow-for-poets-2