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.1.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.1-py3-none-any.whl (27.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tf-hourglass-networks-0.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 e5a73682a2ae74e9783a13cb852de5a502f026001e3b4fe3a740118f75cb0216
MD5 c2f532cdb20b670ac67b2a2978450573
BLAKE2b-256 bc29a5ba95809b071635f2c2d913242c70b9117dc032093674b2a924eec30eeb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tf_hourglass_networks-0.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b3f7bfb3ea790b14a2a51fd5e93c16e01af18258d9d767d291c3dc17cbf99a88
MD5 ebe7222d497164fb73f21b7806c69d12
BLAKE2b-256 25574bc7e6cac69a172f358935bd1ac9e02ece04f91c14666dbaeec42c44fa6b

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