BB-Pose is a Tensorflow 2 training pipeline for human pose estimation. The aim of this codebase is to set up a foundation on which future projects might be able to build upon. Supported models currently include:
Supported datasets currently include:
Note: This repository has only been tested on Ubuntu 18.04 and Debian (Sid).
Clone this repository:
git clone https://github.com/salinasJJ/BBpose.git
Create a virtual environment (using Pipenv or Conda for example).
Install the project onto your system:
pip install -e BBpose
Install dependencies:
pip install -r BBpose/bbpose/requirements.txt
Make script executable:
chmod +x BBpose/bbpose/ingestion/scripts/data.sh
This project is setup around a config file which contains numerous adjustable parameters. Any changes to how the project runs must be done here by updating the params. There are 3 main commands to update the params:
python BBpose/bbpose/main.py reset
python BBpose/bbpose/main.py update \
--version 0 \
--dataset mpii \
--batch_per_replica 32 \
--use_records True \
--num_epochs 200 \
--num_filters 144 \
python BBpose/bbpose/main.py force \
--train_size 22245 \
--validate_size 2958 \
Note #1: The 'reset' command will clear out all user-defined values as well as those of the hidden params. Without these pre-defined params, the model will fail to work properly, if at all. Please use this command carefully.
Note #2: CHECK VERSION NUMBER! Users should get into the practice of always checking which version number is being set in order to avoid overwriting old models.
Note #3: Do not set the path to 'img_dir' within the data directory. Best to place it in a directory outside of the project.
There are many params, some of which are interconnected to one another, and some which have limitations. Please see Glossary for a full breakdown of all these params.
That was the hard part. From here on out, the commands to create the datasets, train, and test are simple one liners.
In order to create the datasets, we can make use of the 'ingest' command. This command contains two options:
To setup and start downloading, call:
python BBpose/bbpose/main.py ingest --setup --generate
Note: The 'setup' option will clear everything in the data directory. So, if downloading is interrupted, make sure to only use 'generate' to restart downloading.
python BBpose/bbpose/main.py ingest --generate
To start training on a brand new model, call:
python BBpose/bbpose/main.py train
If training is interupted for any reason, you can easily restart from where you left off:
python BBpose/bbpose/main.py train --restore
To evaluate your trained model:
python BBpose/bbpose/main.py test
Contributions from the community are welcomed.
BB-Pose is licensed under MIT.