Repository navigation
Pre-trained Inference Models for Behavython (models-v2.0)
This release hosts the pre-trained DeepLabCut networks used by Behavython's automated analysis pipelines.
Models are not bundled with the Python package, to keep the installation small. Behavython's dependency manager downloads and extracts the archive it needs the first time an action requires it.
📦 Included Assets
1. C57 Pose Tracking Network
- File:
c57_network_2025_minified.zip - Purpose: Pose estimation of C57BL/6 mice in social recognition tasks, top view, white arena.
- Bodyparts:
Focinho(nose),OrelhaE(left ear),OrelhaD(right ear),Centro(center),Rabo(tail base). Behavython uses them to compute the animal's geometry, head direction and locomotion. - Backend: DeepLabCut TensorFlow, ResNet-50, snapshot 2300000.
- Note: Same weights as in
models-v1.0. Existing installs do not need to download it again.
2. CD1 Pose Tracking Network (new)
- File:
cd1_network_2026.zip - Purpose: Pose estimation of CD1 mice in social recognition tasks, top view.
- Bodyparts: the same five as the C57 network, so all Behavython metrics work unchanged.
- Backend: DeepLabCut 3 PyTorch, ResNet-50 started from the SuperAnimal-TopViewMouse backbone, snapshot 300.
3. Automated ROI Detection Network (new)
- File:
roi_network_2026.zip - Purpose: Automatic creation of the interaction zone around the wire cup in social recognition.
- Bodyparts:
top,right,bottom,lefton the rim of the cup. - Backend: DeepLabCut 3 PyTorch, ResNet-50 started from the SuperAnimal-TopViewMouse backbone, snapshot 175.
- How Behavython uses it: It runs the network on 5 frames per video, skipping the first 10% while the animal is placed. The median of each point gives the cup center (X, Y), Width (left-right) and Height (top-bottom). It writes
<video>_roi.csvin the same format as the ImageJ ROI files, plus a check image per video inroi_check/. It never overwrites existing ROI files, and it logs a warning when frames disagree or a video's cup size differs from the others. - Replaces:
roi_network.zipfrommodels-v1.0(TensorFlow). That network is no longer used.
Scope
These networks are trained on the C57 and CD1 social recognition setups of our lab. On other arenas, lighting or cameras, check the results before you rely on them. For other datasets, train your own DeepLabCut network. A custom ROI network must output the bodyparts top, right, bottom and left, and you select it by right-clicking CREATE ROIS or with behavython-cli --create-rois --roi-config <config.yaml>.
Archive contents
Each archive is a reduced DeepLabCut project:
config.yaml- the model configuration
- only the snapshot used for inference
- an empty
labeled-data/folder
Training videos, labeled frames and other snapshots are left out. DeepLabCut updates the project path in config.yaml the first time it reads the file.
🔧 Installation
Automated (recommended)
Do nothing. When an action needs a network that is not installed, Behavython asks to download it and extracts it to the right place.
Manual
-
Download the
.zipfiles you need. -
Extract each one into a folder with the same name inside Behavython's models directory, so that
config.yamlsits directly in that folder:- Windows:
C:\Users\<YourUsername>\.behavython\models\<network_name>\config.yaml - Linux/macOS:
~/.behavython/models/<network_name>/config.yaml
For example,
~/.behavython/models/roi_network_2026/config.yaml. - Windows:
Requirements
- The PyTorch networks (
cd1_network_2026,roi_network_2026) need DeepLabCut 3 with the PyTorch backend. - The TensorFlow network (
c57_network_2025_minified) needs DeepLabCut with TensorFlow installed. - A GPU is optional, but analysis on a CPU is much slower.
Upgrading from models-v1.0
You can delete ~/.behavython/models/roi_network (the old TensorFlow ROI network). Keep c57_network_2025_minified.