Train hourglass neural networks via tensorflow keras.
Project description
tf.keras Implementation of Hourglass Models for Human Pose Estimation
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).
Project setup
Initial requirements:
- Python 3.8+
- Tensorflow GPU software requirements for TF>=2.5.0
Through pip
pip install git+https://github.com/benjs/hourglass_networks.git
From source
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
Training
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.
Data setup
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'
Logging
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'
Config overwriting
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.
Unit tests
Run all unit tests with
python -m pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tf-hourglass-networks-0.0.2.dev4.tar.gz.
File metadata
- Download URL: tf-hourglass-networks-0.0.2.dev4.tar.gz
- Upload date:
- Size: 30.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a26c53cdd6df0eb21967eeabf5e31a6d1a19bcbe0379079ce41edb666aba8072
|
|
| MD5 |
7f72d9ae138cbca110c63690ae8d23ee
|
|
| BLAKE2b-256 |
6bb778979787c1209928cf143858cc654f8ab3bc4ba074f035c69a7daff9bbc6
|
File details
Details for the file tf_hourglass_networks-0.0.2.dev4-py3-none-any.whl.
File metadata
- Download URL: tf_hourglass_networks-0.0.2.dev4-py3-none-any.whl
- Upload date:
- Size: 27.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00cebace910e71a1e068dc70eeae3a385b0daf255b18691d8459e85e10f05afd
|
|
| MD5 |
4ce0ee0a8c8b9de4c9c047b4549c2207
|
|
| BLAKE2b-256 |
fe09a33d8ead9275455b0f6680fe4821ba143aad6783146be734b0a004fc9f1a
|