Fast and robust animal pose estimation, in a few lines of Python.
DeepPoseKit is a high-level toolkit for 2D pose estimation of user-defined keypoints using deep learning. It bundles efficient multi-scale models, GPU peak detection, an annotation tool, and a Keras-friendly training API.
# Install the stable release
pip install --update deepposekit
# Or the bleeding-edge build
pip install --update \
git+https://github.com/jgraving/deepposekit.gitBuilt for behavioural science workflows.
DeepPoseKit pairs a novel multi-scale model with a GPU peak-detection algorithm, addressing the speed and robustness limitations of prior animal pose-estimation tools — all behind a small, ergonomic Python API.
A new multi-scale architecture that delivers >2× faster inference than prior tools with no loss in keypoint accuracy.
GPU-accelerated peak detection extracts keypoint locations with subpixel precision directly from the confidence maps.
Annotate user-defined keypoints on images or video frames with the built-in interactive annotation tool.
A flexible augmentation pipeline using imgaug, designed to mirror the variability you'll see at inference time.
Initialise, train, evaluate, save and load models with the same idioms you already use in TensorFlow / Keras.
Validated on multiple challenging animal datasets — including interacting groups of individuals in the wild.
Train and run a model in a handful of lines.
Point a DataGenerator at your annotation HDF5 file, wrap it with TrainingGenerator, pick a backbone, and call model.fit(). The full workflow lives in the docs.
from deepposekit.io import DataGenerator, TrainingGenerator
from deepposekit.models import StackedDenseNet
data_generator = DataGenerator('/path/to/annotation_data.h5')
train_generator = TrainingGenerator(data_generator)
model = StackedDenseNet(train_generator)
model.fit(batch_size=16, n_workers=8)
model.save('/path/to/saved_model.h5')from deepposekit.models import load_model
from deepposekit.io import VideoReader
model = load_model('/path/to/saved_model.h5')
reader = VideoReader('/path/to/video.mp4')
predictions = model.predict(reader)Backed by a peer-reviewed paper in eLife.
DeepPoseKit, a software toolkit for fast and robust animal pose estimation using deep learning — Graving, Chae, Naik, Li, Koger, Costelloe & Couzin. eLife 8:e47994 (2019).
@article{graving2019deepposekit,
title={DeepPoseKit, a software toolkit for fast and robust animal pose estimation using deep learning},
author={Graving, Jacob M and Chae, Daniel and Naik, Hemal and Li, Liang and Koger, Benjamin and Costelloe, Blair R and Couzin, Iain D},
journal={eLife},
volume={8},
pages={e47994},
year={2019},
publisher={eLife Sciences Publications Limited},
url={https://doi.org/10.7554/eLife.47994}
}One project, four sites.
Each sibling site is dedicated to a different audience. Pick the one closest to what you’re doing right now.