https://github.com/bonsai-rx/deeplabcut
A Bonsai interface for real-time markerless pose estimation using DeepLabCut
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 3 committers (33.3%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.4%) to scientific vocabulary
Keywords
Repository
A Bonsai interface for real-time markerless pose estimation using DeepLabCut
Basic Info
- Host: GitHub
- Owner: bonsai-rx
- License: mit
- Language: C#
- Default Branch: main
- Homepage: http://bonsai-rx.org/deeplabcut/
- Size: 85 KB
Statistics
- Stars: 51
- Watchers: 10
- Forks: 10
- Open Issues: 10
- Releases: 4
Topics
Metadata Files
docs/README.md
Bonsai - DeepLabCut

Bonsai.DeepLabCut is a Bonsai interface for DeepLabCut allowing real-time markerless pose estimation using pretrained models stored in the Protocol Buffers (pb) format. Natively, DLC stores the result of training as checkpoints, but it is possible to export them to .pb files using the deeplabcut.export_model function within DLC (Read more here).
Bonsai.DeepLabCut loads these .pb files using TensorFlowSharp, a set of .NET bindings for TensorFlow allowing native inference using either the CPU or GPU. By using the .pb file and the pose configuration YAML (pose_cfg.yaml), the DetectPose operator from Bonsai.DeepLabCut automatically sets up an inference graph and feeds it with live image data coming from any other Bonsai image source. The output is a Pose class which you can access to extract specific body parts, filter out invalid positions using a confidence threshold, or record using CsvWriter.
The Bonsai.DeepLabCut project was kickstarted at the DeepLabCut Hackathon sponsored by the Chan Zuckerberg Initiative and held at Harvard University in March 2020. It has since been published in eLife (Kane et al, eLife 2020).
How to install
Bonsai.DeepLabCut can be downloaded through the Bonsai package manager. In order to get visualizer support, you should download both the Bonsai.DeepLabCut and Bonsai.DeepLabCut.Design packages. However, in order to use it for either CPU or GPU inference, you need to pair it with a compiled native TensorFlow binary. You can find precompiled binaries for Windows 64-bit at https://www.tensorflow.org/install/lang_c.
To use GPU TensorFlow (highly recommended for live inference), you also need to install the CUDA Toolkit 11.2 from the CUDA Toolkit Archive, and download cuDNN 8.1.0 for CUDA 11.2. Make sure you have a CUDA 11 compatible GPU with the latest NVIDIA drivers.
After downloading the native TensorFlow binary and cuDNN, you can follow these steps to get the required native files into the Extensions folder of your local Bonsai install:
- The easiest way to find your Bonsai install folder is to right-click on the Bonsai shortcut > Properties. The path to the folder will be shown in the "Start in" textbox;
- Copy
tensorflow.dllfile from either the CPU or GPU tensorflow release to theExtensionsfolder; - If you are using TensorFlow GPU, make sure to add the
cuda/binfolder of your cuDNN download to thePATHenvironment variable, or copy all DLL files to theExtensionsfolder.
How to use
The core operator of Bonsai.DeepLabCut is the DetectPose node. You can place it after any image source, like so:
You will also need to point the ModelFileName to the exported .pb file containing your pretrained DLC model, and the PoseConfigFileName to the pose_cfg.yaml file describing the joint labels of the pose skeleton.
If everything works out, you should see some indications in the Bonsai command line window about whether the GPU was successfully detected and enabled. The first frame will cold start the inference graph which may take a bit of time, but after that your poses should start streaming through!
Short DLC install guide
For all questions regarding installation of DeepLabCut, please check the official docs. However, we did find the following build steps to be reliable for a self-contained barebones install on Windows at the time of writing:
- Download WinPython 3.8.10 64bit only from GitHub.
- Extract to a folder and launch
WinPython Command Prompt.exe. pip install tensorflow==2.8.0orpip install tensorflow-gpu==2.8.0depending on whether you will be using CPU or GPU TensorFlow.pip install deeplabcut[gui]==2.2.0.6.- Launch the DLC gui:
python -m deeplabcut.
Owner
- Name: Bonsai
- Login: bonsai-rx
- Kind: organization
- Website: bonsai-rx.org
- Repositories: 13
- Profile: https://github.com/bonsai-rx
A visual language for reactive programming
GitHub Events
Total
- Issues event: 2
- Watch event: 3
- Delete event: 3
- Push event: 2
- Pull request review event: 1
- Pull request event: 2
- Fork event: 1
- Create event: 3
Last Year
- Issues event: 2
- Watch event: 3
- Delete event: 3
- Push event: 2
- Pull request review event: 1
- Pull request event: 2
- Fork event: 1
- Create event: 3
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| glopesdev | g****v | 42 |
| David Maas | d****t@n****g | 3 |
| Mackenzie Mathis | m****s@r****u | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 28
- Total pull requests: 2
- Average time to close issues: 4 months
- Average time to close pull requests: 7 days
- Total issue authors: 17
- Total pull request authors: 2
- Average comments per issue: 1.25
- Average comments per pull request: 0.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 1
- Average time to close issues: 2 months
- Average time to close pull requests: 14 days
- Issue authors: 1
- Pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- glopesdev (5)
- chiyu1203 (2)
- caniko (2)
- emilyjanedennis (1)
- banchan86 (1)
- JensBlack (1)
- GabrielBonassi77 (1)
- kvnlxm (1)
- DaBue93 (1)
- horsto (1)
- T0mOmine (1)
- rcbullins (1)
- mrizaarseven98 (1)
- MilanNedoma (1)
- tokioshima (1)
Pull Request Authors
- PathogenDavid (2)
- MMathisLab (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- nuget 8,553 total
-
Total dependent packages: 1
(may contain duplicates) -
Total dependent repositories: 0
(may contain duplicates) - Total versions: 8
- Total maintainers: 2
nuget.org: bonsai.deeplabcut
Bonsai Library for real-time markerless pose estimation using DeepLabCut. TensorFlow 2.8.0 or compatible is required.
- Homepage: https://bonsai-rx.org/deeplabcut
- License: mit
-
Latest release: 0.4.0
published 9 months ago
Rankings
nuget.org: bonsai.deeplabcut.design
Bonsai Library containing reactive visualizations for markerless pose estimation using DeepLabCut.
- Homepage: https://bonsai-rx.org/deeplabcut
- License: mit
-
Latest release: 0.4.0
published 9 months ago