Skip to main content

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:

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tf-hourglass-networks-0.0.0.tar.gz (30.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tf_hourglass_networks-0.0.0-py3-none-any.whl (27.6 kB view details)

Uploaded Python 3

File details

Details for the file tf-hourglass-networks-0.0.0.tar.gz.

File metadata

  • Download URL: tf-hourglass-networks-0.0.0.tar.gz
  • Upload date:
  • Size: 30.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for tf-hourglass-networks-0.0.0.tar.gz
Algorithm Hash digest
SHA256 9ba67e34169d5cbf14dd7d4adefe50655a627d9766664010f5ff8405243b0657
MD5 ac02baebf1d090c005ebf0d497e9ea04
BLAKE2b-256 46db074189879407fca4e7020998c7808a331b6ce5b201934e2c60ec3fad0bea

See more details on using hashes here.

File details

Details for the file tf_hourglass_networks-0.0.0-py3-none-any.whl.

File metadata

  • Download URL: tf_hourglass_networks-0.0.0-py3-none-any.whl
  • Upload date:
  • Size: 27.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for tf_hourglass_networks-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 254e32ff8c804b78bbf53a37383170157070de39f676cb97aff769eef9c64ad2
MD5 e8bdaa5266dfe9d8ce3a4a986632e5f9
BLAKE2b-256 9014383c6a53f9ca5f60c685730d069b52d9448e597c2df88501a34addc2be98

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page