You Only Pose Once - Neural network for pose Estimation
Is an adaptation of the YOLOv1 algorithm and made using Darkflow. Where by a new framework is added that is based on the original YOLOv1 framework in Darkflow.
YOPO is split into two parts: the pre-processing and the YOPO network.
Let pip install darkflow globally in dev mode (still globally accessible, but changes to the code immediately take effect)
pip3 install -e .
Install with pip globally
pip3 install -r requirements.txt --user
The human pose dataset weights can be downloaded form here - https://1drv.ms/f/s!Ao7rGgBsjbqiiqwNhPhjgikppDSgMw
If no weight files are present please contact rij12@aber.ac.uk
The preprocessing part requires:
The project was developed with pycharm so to run it from the command you must export the path for example:
export PYTHONPATH=/home/USER/git/YOPO
Just build the Cython extensions in place.
python3 setup.py build_ext --inplace
Each limb is defined in a text file labels.txt
The preprocessing must have been completed with images and label folder created(default: YOPO/YOPO_preprocessing/data/darkflow).
Training the network:
For any addtional options use:
python3 ./flow --h
```
python3 ./flow --model NETWORK_CONFIG_PATH --load YOLO_WEIGHTS_PATH --train --annotation LABELS_PATH --dataset DATASET_PATH --epoch 20000 --gpu 0.9 --summary OUTPATH --batch 8
```
The weight outputted from the training of the network are save in a folder called ckpt that will be create during training.
Testing the network
Where
—threshold the minimum probability a box must have before it’s shown on the output images
python3 ./flow --imgdir sub_set/images --model /home/richard/git/YOPO/cfg/yopo.cfg --load -1 --threshold 0.1
IOU unit tests:
python3 test/YOPO/test_calculate_IOU.py
Darkflow tests that require “buildPath” to be change to cloned repo root.
pytest -x --cov=./
This project is an adapted folk of Darkflow (https://github.com/thtrieu/darkflow), with the attempt of creating a human pose estimation system.
YOLO papers, Real-time object detection and classification. Paper: version 1, version 2.
Read more about YOLO (in darknet) and download weight files here.