Capture dog pose from video and transfer skeleton to Blender via DeepLabCut and OmniTrax
Run neural-network dog pose estimation and overlay a skeleton on video in Blender - using a ready-made model from Model Zoo, without manual animation
- 1.Install DeepLabCut. Open a terminal and run pip install --pre "deeplabcut[gui]". Python 3.10 or higher is required.
For GPU support, first install PyTorch: pip install torch torchvision. If OmniTrax requires a TensorFlow model, install the TF version: pip install "deeplabcut[gui,tf]". DeepLabCut developers plan to drop the TensorFlow engine in version 3.2.
DeepLabCut ↗ - 2.Create a DeepLabCut project for your dog. In a Python console, run the code below, replacing paths with your own.
After running this, a project folder with config.yaml and subfolders for videos and labels will appear in the specified directory.
DeepLabCut ↗Promptimport deeplabcut deeplabcut.create_new_project( "DogPose", "YourName", ["/full/path/to/dog_video.mp4"], working_directory="/full/path/to/working_dir", copy_videos=True, multianimal=False )What this prompt doesThis code creates a new DeepLabCut project. Replace DogPose with your project name, YourName with your name, the path in square brackets with the full path to your dog video, and working_directory with the folder where the project will be stored. - 3.Launch the DeepLabCut GUI and load a pretrained model from Model Zoo. In the start window select «Model Zoo», find a model for quadruped animals (quadruped). Apply it to the project - this skips manual labeling and training.
If no suitable pretrained model exists, you will need to manually label 20 - 50 frames (Extract frames -> Label frames) and train the network - this takes several hours on a GPU.
DeepLabCut GUI ↗ - 4.Export the model for real-time use. In Python, run the export code, specifying the path to your project's config.yaml.
The exported model will be placed in a subfolder of the project. Remember the path to this folder - you will need it in OmniTrax. The model must be compatible with deeplabcut-live.
DeepLabCut ↗Promptimport deeplabcut cfg_path = "/full/path/to/your/project/config.yaml" deeplabcut.export_model(cfg_path, iteration=None, shuffle=1, trainingsetindex=0, snapshotindex=None)
What this prompt doesThis code exports the trained DeepLabCut model into a format for running via deeplabcut-live. Replace cfg_path with the path to your project's config.yaml file - it is located in the project's root folder. - 5.Install the OmniTrax add-on in Blender. Download OmniTrax from GitHub, then in Blender: Edit -> Preferences -> Add-ons -> Install -> select the .zip file -> enable it with the checkbox.
It is recommended to keep the System Console window open (Window -> Toggle System Console) to monitor inference progress.
OmniTrax ↗ - 6.Load the dog video into Blender, open the OmniTrax panel -> Pose-Estimation (DLC). In the «DLC network path» field, enter the path to the exported model folder. For a single animal, keep the default settings and run inference.
Pose points and the skeleton will be overlaid on the video. To transfer the motion to a 3D rig, use Constraints in Blender Motion Tracking.
OmniTrax ↗
- freeDeepLabCutFully free open-source software under the GNU LGPL v3.0 license, with no usage restrictions.
- freeOmniTraxFree add-on for Blender, source code available on GitHub.
- freeBlenderFree open-source software, with no restrictions.
Why today
AI services change fast - interfaces and free limits may differ from what's described.