Implementation of the paper Toward fast and accurate human pose estimation via soft-gated skip connections by Bulat et al. and Stacked Hourglass Networks for Human Pose Estimation by Newell et al. using tensorflow keras.
This work has been done as part of a student course at Intelligent Process Automation and Robotics Lab (IPR).
Initial requirements:
pip install tf-hourglass-networks
git clone https://github.com/benjs/hourglass_networks.git hg-nets
cd hg-nets
python3 -m venv venv/
source venv/bin/activate
pip install -r requirements.txt
Start training with
python -m hourglass.training --config default_config.yaml --visible-devices 0
or in short
python -m hourglass.training -c default_config.yaml -v 0
Most parameters are adjusted in the config file and some can be changed through passing args.
See python -m hourglass.training --help
for more information.
Download the mpii dataset images from their official site
and the converted annotations train.h5
and valid.h5
by Newell et al. from the stacked hourglass repository.
Specify the path to both parent directories in the config file.
# Paths are relative to home
mpii_annot_dir: 'mpii_annot'
mpii_image_dir: 'mpii_images'
The training process can be viewed either through tensorboard or Weights and Biases. Adjust the following line in your config file.
logger: 'wandb' # or 'tensorboard'
Add
overwrite_config: default_config.yaml
to a config file to take all parameters from another config file and update them with the parameters from the current file. The files have to be in the same directory.
Run all unit tests with
python -m pytest