{"id":24270690,"url":"https://github.com/jgraving/deepposekit","last_synced_at":"2025-10-24T10:34:04.435Z","repository":{"id":35138011,"uuid":"185012179","full_name":"jgraving/DeepPoseKit","owner":"jgraving","description":"a toolkit for pose estimation using deep learning","archived":false,"fork":false,"pushed_at":"2022-07-07T08:44:41.000Z","size":3255,"stargazers_count":394,"open_issues_count":22,"forks_count":89,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-04-04T01:58:27.376Z","etag":null,"topics":["animal","animal-pose-estimation","behavior-analysis","deep-learning","deepposekit","estimation","keras","machine-learning","neural-networks","pose","pose-estimation","python","tensorflow"],"latest_commit_sha":null,"homepage":"http://deepposekit.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jgraving.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-05T09:48:51.000Z","updated_at":"2025-03-04T03:32:01.000Z","dependencies_parsed_at":"2022-07-08T13:31:21.553Z","dependency_job_id":null,"html_url":"https://github.com/jgraving/DeepPoseKit","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgraving%2FDeepPoseKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgraving%2FDeepPoseKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgraving%2FDeepPoseKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgraving%2FDeepPoseKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jgraving","download_url":"https://codeload.github.com/jgraving/DeepPoseKit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248642433,"owners_count":21138351,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["animal","animal-pose-estimation","behavior-analysis","deep-learning","deepposekit","estimation","keras","machine-learning","neural-networks","pose","pose-estimation","python","tensorflow"],"created_at":"2025-01-15T16:54:32.150Z","updated_at":"2025-10-24T10:33:59.386Z","avatar_url":"https://github.com/jgraving.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/jgraving/DeepPoseKit/blob/master/assets/deepposekit_logo.png\" height=\"320px\"\u003e\n\u003c/p\u003e\n\n# You have just found DeepPoseKit.\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/jgraving/jgraving.github.io/blob/master/files/images/Figure1video1.gif\" height=\"128px\"\u003e\n\u003c/p\u003e\n\nDeepPoseKit is a software toolkit with a high-level API for 2D pose estimation of user-defined keypoints using deep learning—written in Python and built using [Tensorflow](https://github.com/tensorflow/tensorflow) and [Keras](https://www.tensorflow.org/guide/keras). Use DeepPoseKit if you need:\n\n- tools for annotating images or video frames with user-defined keypoints\n- a straightforward but flexible data augmentation pipeline using the [imgaug package](https://github.com/aleju/imgaug)\n- a Keras-based interface for initializing, training, and evaluating pose estimation models\n- easy-to-use methods for saving and loading models and making predictions on new data\n\nDeepPoseKit is designed with a focus on *usability* and *extensibility*, as being able to go from idea to result with the least possible delay is key to doing good research.\n\nDeepPoseKit is currently limited to *individual pose estimation*. If individuals can be easily distinguished visually (i.e., they have differently colored bodies or are marked in some way), then multiple individuals can simply be labeled with separate keypoints (head1, tail1, head2, tail2, etc.). Otherwise DeepPoseKit can be extended to multiple individuals by first localizing, tracking, and cropping individuals with additional software such as [idtracker.ai](https://idtracker.ai/), [pinpoint](https://github.com/jgraving/pinpoint), or [Tracktor](https://github.com/vivekhsridhar/tracktor).\n\nLocalization (without tracking) can also be achieved with deep learning software like [keras-retinanet](https://github.com/fizyr/keras-retinanet), the [Tensorflow Object Detection API](https://github.com/tensorflow/models/tree/master/research/object_detection), or [MatterPort's Mask R-CNN](https://github.com/matterport/Mask_RCNN).\n\n[Check out our paper](https://doi.org/10.7554/eLife.47994) to find out more.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/jgraving/jgraving.github.io/blob/master/files/images/zebra.gif\" height=\"256px\"\u003e\n\u003cimg src=\"https://github.com/jgraving/jgraving.github.io/blob/master/files/images/locust.gif\" height=\"256px\"\u003e\n\u003c/p\u003e\n\n# How to use DeepPoseKit\n\nDeepPoseKit is designed for easy use. For example, training and saving a model requires only a few lines of code:\n```python\nfrom deepposekit.io import DataGenerator, TrainingGenerator\nfrom deepposekit.models import StackedDenseNet\n\ndata_generator = DataGenerator('/path/to/annotation_data.h5')\ntrain_generator = TrainingGenerator(data_generator)\nmodel = StackedDenseNet(train_generator)\nmodel.fit(batch_size=16, n_workers=8)\nmodel.save('/path/to/saved_model.h5')\n```\nLoading a trained model and running predictions on new data is also straightforward. For example, running predictions on a new video:\n```python\nfrom deepposekit.models import load_model\nfrom deepposekit.io import VideoReader\n\nmodel = load_model('/path/to/saved_model.h5')\nreader = VideoReader('/path/to/video.mp4')\npredictions = model.predict(reader)\n```\n\n## Using DeepPoseKit is a 4-step process:\n\n- **1.** [Create an annotation set](https://github.com/jgraving/DeepPoseKit/blob/master/examples/step1_create_annotation_set.ipynb) \u003ca href=\"https://colab.research.google.com/github/jgraving/deepposekit/blob/master/examples/step1_create_annotation_set.ipynb\" target=\"_parent\"\u003e\u003cimg src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/\u003e\u003c/a\u003e\n- **2.** [Annotate your data](https://github.com/jgraving/DeepPoseKit/blob/master/examples/step2_annotate_data.ipynb) with our built-in GUI (no Colab support)\n- **3.** [Select and train](https://github.com/jgraving/DeepPoseKit/blob/master/examples/step3_train_model.ipynb) one our [pose estimation models](http://jakegraving.com/DeepPoseKit/html/deepposekit/models/index.html) including [`StackedDenseNet`](http://jakegraving.com/DeepPoseKit/html/deepposekit/models/StackedDenseNet.html), [`StackedHourglass`](http://jakegraving.com/DeepPoseKit/html/deepposekit/models/StackedHourglass.html), [`DeepLabCut`](http://jakegraving.com/DeepPoseKit/html/deepposekit/models/DeepLabCut.html), and [`LEAP`](http://jakegraving.com/DeepPoseKit/html/deepposekit/models/LEAP.html). \u003ca href=\"https://colab.research.google.com/github/jgraving/deepposekit/blob/master/examples/step3_train_model.ipynb\" target=\"_parent\"\u003e\u003cimg src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/\u003e\u003c/a\u003e\n- **4.** Use the trained model to:\n\t- a) [Initialize keypoints for unannotated data](https://github.com/jgraving/DeepPoseKit/blob/master/examples/step4a_initialize_annotations.ipynb) for faster annotations with *active learning*. \u003ca href=\"https://colab.research.google.com/github/jgraving/deepposekit/blob/master/examples/step4a_initialize_annotations.ipynb\" target=\"_parent\"\u003e\u003cimg src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/\u003e\u003c/a\u003e\n\t- b) [Predict on new data and refine the training set](https://github.com/jgraving/DeepPoseKit/blob/master/examples/step4b_predict_new_data.ipynb) to improve performance. \u003ca href=\"https://colab.research.google.com/github/jgraving/deepposekit/blob/master/examples/step4b_predict_new_data.ipynb\" target=\"_parent\"\u003e\u003cimg src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/\u003e\u003c/a\u003e\n\n## For more details:\n\n- See [our example notebooks](https://github.com/jgraving/deepposekit/blob/master/examples/)\n- Check the [documentation](http://docs.deepposekit.org)\n- Read [our paper](https://doi.org/10.7554/eLife.47994)\n\n## \"I already have annotated data\"\n\nDeepPoseKit is designed to be extensible, so loading data in other formats is possible.\n\nIf you have annotated data from DeepLabCut (http://deeplabcut.org), try [our (experimental) example notebook ](https://github.com/jgraving/DeepPoseKit/blob/master/examples/deeplabcut_data_example.ipynb) for loading data in this format. \u003ca href=\"https://colab.research.google.com/github/jgraving/deepposekit/blob/master/examples/deeplabcut_data_example.ipynb\" target=\"_parent\"\u003e\u003cimg src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/\u003e\u003c/a\u003e\n\nHave data in another format? You can write your own custom generator to load it.\nCheck out the [example for writing custom data generators](https://github.com/jgraving/DeepPoseKit/blob/master/examples/custom_data_generator.ipynb). \u003ca href=\"https://colab.research.google.com/github/jgraving/deepposekit/blob/master/examples/custom_data_generator.ipynb\" target=\"_parent\"\u003e\u003cimg src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/\u003e\u003c/a\u003e\n\n# Installation\n\nDeepPoseKit requires [Tensorflow](https://github.com/tensorflow/tensorflow) for training and using pose estimation models. [Tensorflow](https://github.com/tensorflow/tensorflow) should be manually installed, along with dependencies such as CUDA and cuDNN, before installing DeepPoseKit:\n\n- [Tensorflow Installation Instructions](https://www.tensorflow.org/install)\n- Any Tensorflow version \u003e=1.13.0 should be compatible (including 2.0).\n\nDeepPoseKit has only been tested on Ubuntu 18.04, which is the recommended system for using the toolkit. \n\nInstall the latest stable release with pip:\n```bash\npip install --update deepposekit\n```\n\nInstall the latest development version with pip:\n```bash\npip install --update git+https://www.github.com/jgraving/deepposekit.git\n```\n\nYou can download example datasets from our [DeepPoseKit Data](https://github.com/jgraving/deepposekit-data) repository:\n```bash\ngit clone https://www.github.com/jgraving/deepposekit-data\n```\n\n## Installing with Anaconda on Windows\n\nTo install DeepPoseKit on Windows, you must first manually install `Shapely`, one of the dependencies for the [imgaug package](https://github.com/aleju/imgaug):\n```bash\nconda install -c conda-forge shapely\n```\nWe also recommend installing DeepPoseKit from within Python rather than using the command line, either from within Jupyter or another IDE, to ensure it is installed in the correct working environment:\n```python\nimport sys\n!{sys.executable} -m pip install --update deepposekit\n```\n# Contributors and Development  \n   \nDeepPoseKit was developed by [Jake Graving](https://github.com/jgraving) and [Daniel Chae](https://github.com/dchaebae), and is still being actively developed. .\n\nWe welcome community involvement and public contributions to the toolkit. If you wish to contribute, please [fork the repository](https://help.github.com/en/articles/fork-a-repo) to make your modifications and [submit a pull request](https://help.github.com/en/articles/creating-a-pull-request-from-a-fork).\n\nIf you'd like to get involved with developing DeepPoseKit, get in touch (jgraving@gmail.com) and check out [our development roadmap](https://github.com/jgraving/DeepPoseKit/blob/master/DEVELOPMENT.md) to see future plans for the package.  \n\n# Issues  \n \nPlease submit bugs or feature requests to the [GitHub issue tracker](https://github.com/jgraving/deepposekit/issues/new). Please limit reported issues to the DeepPoseKit codebase and provide as much detail as you can with a minimal working example if possible.\n\nIf you experience problems with [Tensorflow](https://github.com/tensorflow/tensorflow), such as installing CUDA or cuDNN dependencies, then please direct issues to those development teams.\n\n# License\n\nReleased under a Apache 2.0 License. See [LICENSE](https://github.com/jgraving/deepposekit/blob/master/LICENSE) for details.\n\n# References\n\nIf you use DeepPoseKit for your research please cite [our open-access paper](http://paper.deepposekit.org):\n\n    @article{graving2019deepposekit,\n             title={DeepPoseKit, a software toolkit for fast and robust animal pose estimation using deep learning},\n             author={Graving, Jacob M and Chae, Daniel and Naik, Hemal and Li, Liang and Koger, Benjamin and Costelloe, Blair R and Couzin, Iain D},\n             journal={eLife},\n             volume={8},\n             pages={e47994},\n             year={2019},\n             publisher={eLife Sciences Publications Limited}\n             url={https://doi.org/10.7554/eLife.47994},\n             }\n\nYou can also read [our open-access preprint](http://preprint.deepposekit.org).\n\nIf you use the [imgaug package](https://github.com/aleju/imgaug) for data augmentation, please also consider [citing it](https://github.com/aleju/imgaug/blob/master/README.md#citation).\n\nIf you [use data](https://github.com/jgraving/DeepPoseKit#i-already-have-annotated-data) that was annotated with the DeepLabCut package (http://deeplabcut.org) for your research, be sure to [cite it](https://github.com/AlexEMG/DeepLabCut/blob/master/README.md#references).\n\nPlease also consider citing the relevant references for the pose estimation model(s) used in your research, which can be found in the documentation (i.e., [`StackedDenseNet`](http://jakegraving.com/DeepPoseKit/html/deepposekit/models/StackedDenseNet.html#references), [`StackedHourglass`](http://jakegraving.com/DeepPoseKit/html/deepposekit/models/StackedHourglass.html#references), [`DeepLabCut`](http://jakegraving.com/DeepPoseKit/html/deepposekit/models/DeepLabCut.html#references), [`LEAP`](http://jakegraving.com/DeepPoseKit/html/deepposekit/models/LEAP.html#references)).\n\n# News\n- **October 2019:** Our paper describing DeepPoseKit is published at eLife! (http://paper.deepposekit.org)\n- **September 2019**: \n    - Nature News covers DeepPoseKit: [Deep learning powers a motion-tracking revolution](http://doi.org/10.1038/d41586-019-02942-5)\n    - v0.3.0 is released. See [the release notes](https://github.com/jgraving/DeepPoseKit/releases/tag/v0.3.0).\n- **April 2019:** The DeepPoseKit preprint is on biorxiv (http://preprint.deepposekit.org)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgraving%2Fdeepposekit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjgraving%2Fdeepposekit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgraving%2Fdeepposekit/lists"}