Skip to main content

Train hourglass neural networks via tensorflow keras.

Project description

Tests PyPI package

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 tf-hourglass-networks

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.2.dev5.tar.gz (30.9 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.2.dev5-py3-none-any.whl (27.7 kB view details)

Uploaded Python 3

File details

Details for the file tf-hourglass-networks-0.0.2.dev5.tar.gz.

File metadata

  • Download URL: tf-hourglass-networks-0.0.2.dev5.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

Hashes for tf-hourglass-networks-0.0.2.dev5.tar.gz
Algorithm Hash digest
SHA256 9181e35b7f9572248c57b97512a53086aaae9161f5c9d812ab7cd9c376a3249e
MD5 65c5f4f2453a0a4b21b9f93b976d3a07
BLAKE2b-256 a0cd148a1426be062b86a077f24efc32b74758132f548c2d377568b3d3f9c516

See more details on using hashes here.

File details

Details for the file tf_hourglass_networks-0.0.2.dev5-py3-none-any.whl.

File metadata

  • Download URL: tf_hourglass_networks-0.0.2.dev5-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

Hashes for tf_hourglass_networks-0.0.2.dev5-py3-none-any.whl
Algorithm Hash digest
SHA256 661488c0f456ecfcdb7be5b7ff178478293f02776b44c6f5d902e60cf15a32f4
MD5 951aa756107710f70f48699272fef426
BLAKE2b-256 26d8d677cb42ca562d86a6263bdad38e98ecb164c0c797a016037596791dbfaf

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