Annolid
Annotate, segment, track, and analyze animals in research videos.
Annolid brings image and video annotation, instance segmentation, multi-animal tracking, keypoint tracking, and behavior analysis into a desktop application with companion command-line tools. Start with a representative labeled frame, track or propagate annotations, review difficult moments, and export results for analysis.
User guide · Getting started · Tutorials · Report an issue · YouTube
See it in action: Tracking four interacting mice with one labeled frame — a 10-minute experiment.
Table of Contents
- What You Can Do
- Quick Start
- Your First Tracking Session
- Installation Options
- Command-Line Workflows
- Annotation and Data
- Tutorials and Specialized Workflows
- Troubleshooting and Support
- Citing Annolid
- Publications
- Additional Resources
- Acknowledgements
- Contributing
- License
What You Can Do
| Goal | Annolid workflow |
|---|---|
| Annotate images and videos | Draw polygons, boxes, keypoints, and zones; save LabelMe-compatible annotations. |
| Track multiple animals | Use labeled seed frames with segmentation and tracking models, then review masks and identities. |
| Follow body parts | Propagate named keypoints with DINOv3, TAPNext ONNX, or CoWTracker workflows. |
| Score and analyze behavior | Record events with Timeline and Flags; export time budgets, bout counts, and zone metrics. |
| Run reproducible model jobs | Train, predict, and evaluate through model plugins with annolid-run. |
| Work with large images | Use optional tiled TIFF backends and atlas overlays. |
| Use an assistant in the GUI | Open Annolid Bot for multimodal assistance, model execution, and optional tool integrations. |
Model backends and integrations have different dependency and hardware requirements. Follow the linked workflow guides before installing optional features.
Quick Start
The one-line installer sets up a source checkout and an isolated environment. Its default gui profile includes the GUI, machine-learning runtime, and common tracking dependencies (ml,tracking,cutie).
macOS / Linux
curl -sSL https://raw.githubusercontent.com/healthonrails/annolid/main/install.sh | bash
Windows PowerShell
irm https://raw.githubusercontent.com/healthonrails/annolid/main/install.ps1 | iex
Launch and update
After a successful default venv installation, open the install folder printed by the installer:
| Platform | Launch Annolid | Update Annolid |
|---|---|---|
| macOS | Launch Annolid.command |
Update Annolid.command |
| Windows | Launch Annolid.cmd |
Update Annolid.cmd |
| Linux | Launch Annolid.desktop |
Update Annolid.desktop |
These shortcuts activate the environment for you. Linux may require marking the .desktop file as trusted; the adjacent .sh launcher also works from a terminal. For a manual launch, use the environment activation command printed by the installer, then run annolid.
Before updating, save your annotations and close Annolid. Update shortcuts reuse your install choices and follow the checkout's source branch. See launch and update details for update behavior and recovery guidance.
Your First Tracking Session
- Open a short video in Annolid. You can annotate video directly; extracting frames first is optional.
- Choose a clear seed frame and draw a polygon around each animal. Use stable instance names such as
mouse_1andmouse_2. - Save the annotations, then run tracking or propagation from that frame using your selected model workflow.
- Review a short segment, especially overlap, occlusion, and fast movement. Correct masks or identities where errors begin before processing a long recording.
- Save and export the annotations or analysis outputs you need. Add behavior events or zones when they are part of your experiment.
The Getting Started guide walks through a first session. See Core Workflows for tracking, correction, and export paths.
Installation Options
Annolid requires Python 3.10 or newer; the default GUI/core workflow supports Python 3.10–3.14. Python 3.11 or 3.12 is a practical starting point for shared lab environments. Optional model backends may have additional requirements.
Choose an installer profile
| Profile | Included extras beyond the GUI |
|---|---|
minimal |
Core annotation setup without optional model runtimes |
gui (default) |
ml,tracking,cutie |
workstation |
tracking,sam3,training |
full |
all |
For example, on macOS or Linux:
curl -sSL https://raw.githubusercontent.com/healthonrails/annolid/main/install.sh | bash -s -- --profile workstation
See One-Line Installer Choices for Windows profile selection, CPU/GPU options, custom paths, and non-interactive installation.
Install into an existing Python environment
Activate your environment first, then install the GUI:
python -m pip install "annolid[gui]"
annolid
The package extra [gui] installs the Qt binding; it is smaller than the one-line installer's default gui profile. To include the same model extras explicitly:
python -m pip install "annolid[gui,ml,tracking,cutie]"
The installer also handles ONNX Runtime provider selection. For manual GPU setup, Conda, and the full extras list, follow the Installation guide.
Develop from source
With Git and uv available:
git clone --recurse-submodules https://github.com/healthonrails/annolid.git
cd annolid
uv venv .venv --python 3.11
uv pip install --python .venv -e ".[gui]"
Activate the environment before launching Annolid or running checks:
# macOS / Linux
source .venv/bin/activate
annolid
# Windows PowerShell
.\.venv\Scripts\Activate.ps1
annolid
Add extras needed for your work, such as .[gui,ml,tracking,cutie]. See uv Setup and Contributing for more details.
Command-Line Workflows
Run these commands in the environment where Annolid is installed:
annolid --help
annolid-run --help
annolid-run list-models
annolid-run help train
annolid-run help predict
For model-specific options, use annolid-run help train <model> or annolid-run help predict <model>, replacing <model> with a plugin name from list-models. Supported training plugins can use the YAML run-config templates; explicit CLI flags override those settings.
For example, summarize exported behavior events in 60-second bins using your project schema:
python -m annolid.behavior.time_budget exported_events.csv \
--schema project.annolid.json \
--bin-size 60 \
-o time_budget.csv
See CLI Model Workflows and Annolid Agent and annolid-run for model execution and automation.
Annotation and Data
- Keep names consistent. Use stable animal identities and body-part names such as
noseandtail_base. Define behavior labels before scoring and use the same definitions across annotators. - Review tracking separately from training. A seed frame can initialize propagation; training a model across animals or recordings requires representative examples. Choose annotation volume based on reviewed results rather than a fixed frame count.
- Keep video-frame JSON and PNG files together. By default, video annotations store the image in a sidecar PNG instead of embedding it in every JSON. Set
store_video_frame_data: truewhen self-contained frame JSON is required. - Customize labels and flags. Use
annolid --labels /path/to/labels.txtorannolid --flags "digging,rearing,grooming". Save changes with the GUI's Save action. - Adjust label colors for review. Right-click a label in Labels or a shape in Label Instances, then select Change color. The preference is stored in app settings without changing LabelMe JSON files.
- Configure defaults. Annolid uses
~/.labelmerc(C:\Users\<username>\.labelmercon Windows). Supply a different configuration withannolid --config /path/to/config.yaml.
See the annotation guide, behavior labeling tutorial, and zone analysis guide for detailed controls and output formats.
Tutorials and Specialized Workflows
| Workflow | Guide |
|---|---|
| Behavior events, Timeline, and Flags | Behavior labeling |
| Zones and assay summaries | Zone Analysis |
| Sparse body-part tracking | DINOv3, TAPNext ONNX, CoWTracker |
| SAM3 segmentation and tracking | SAM3 |
| Large TIFFs and atlas overlays | Large Image Guide, Atlas Overlay Workflow |
| Video depth estimation | Video Depth Anything |
| Annolid Bot and external tools | Agent and Automation, MCP |
Browse the tutorial index for notebooks and additional examples, or watch the Annolid video playlist.
Troubleshooting and Support
| Symptom | First step |
|---|---|
annolid command is not found |
Use the launch shortcut or activate the environment printed by the installer. |
qtpy.QtBindingsNotFoundError |
In the active environment, run python -m pip install "annolid[gui]" (or python -m pip install -e ".[gui]" from a source checkout). |
| Video import/export or codec errors | Check FFmpeg availability and try a short sample video; see installation notes. |
| A model or integration is unavailable | Check its workflow guide for required extras and checkpoints; inspect CLI options with annolid-run help predict <model>. |
| ONNX Runtime GPU validation fails | Activate the installer-created environment and follow the repair command printed by the installer. |
| An update stops on local edits or Git history | Follow the update recovery guidance, then rerun the update shortcut. |
For help, join the Annolid Google Group. For bugs or feature requests, open an issue with your OS, Python and Annolid versions, installation method, reproduction steps, and the exact error or traceback.
Citing Annolid
If you use Annolid in your research, please cite:
- Preprint: Annolid: Annotation, Instance Segmentation, and Tracking Toolkit
- Zenodo: Find the latest release DOI via the badge at the top of this README.
@misc{yang2024annolid,
title={Annolid: Annotate, Segment, and Track Anything You Need},
author={Chen Yang and Thomas A. Cleland},
year={2024},
eprint={2403.18690},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
@article{yang2023automated,
title={Automated Behavioral Analysis Using Instance Segmentation},
author={Yang, Chen and Forest, Jeremy and Einhorn, Matthew and Cleland, Thomas A},
journal={arXiv preprint arXiv:2312.07723},
year={2023}
}
@misc{yang2020annolid,
author = {Chen Yang and Jeremy Forest and Matthew Einhorn and Thomas Cleland},
title = {Annolid: an instance segmentation-based multiple animal tracking and behavior analysis package},
howpublished = {\url{https://github.com/healthonrails/annolid}},
year = {2020}
}
Publications
- 2022 – Ultrasonic vocalization study. Pranic et al. relate mouse pup vocalizations to non-vocal behaviors (bioRxiv).
- 2022 – Digging and pain behavior. Pattison et al. link digging behaviors to wellbeing in mice (Pain, 2022).
- SfN Posters:
- 2021: Annolid — instance segmentation-based multiple-animal tracking
- 2023: PSTR512.01 Scoring rodent digging behavior with Annolid
- 2023: PSTR512.02 Annolid: Annotate, Segment, and Track Anything You Need
- For more applications and datasets, visit https://cplab.science/annolid.
Additional Resources
- Example dataset (COCO format): Download from Google Drive.
- Pretrained models: Available in the shared Google Drive folder.
- Feature requests & bug reports: Open an issue at github.com/healthonrails/annolid/issues.
- Additional videos: Visit the Annolid YouTube channel for demonstrations and talks.
Acknowledgements
Annolid's tracking module integrates Cutie for enhanced video object segmentation. If you use this feature, please cite Putting the Object Back into Video Object Segmentation (Cheng et al., 2023) and the Cutie repository.
The counting tool integrates CountGD; cite the original CountGD publication and repository when you rely on this module in your research.
Contributing
Contributions are welcome! Review the contribution guidelines and engineering standard, open an issue to discuss major changes, and run relevant tests before submitting a pull request.
License
Annolid is distributed under the Creative Commons Attribution-NonCommercial 4.0 International License.
Metadata
Release files for annolid 1.6.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| annolid-1.6.10.tar.gz | 8.6 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| annolid-1.6.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.6 MB
Release files / annolid-1.6.10.tar.gz
| Download URL | annolid-1.6.10.tar.gz |
|---|---|
| Size | 8.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
87c00bc7510eafd1a0b09f6426e5f1b96882f9f8f626994c5a33ffdb008ba9c7
|
|
BLAKE2b-256 checksum How to use checksums |
56c17f5d307aac31206fb74daab0640815f12420650e8bb508649fb0e7510d71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / annolid-1.6.10-py3-none-any.whl
| Download URL | annolid-1.6.10-py3-none-any.whl |
|---|---|
| Size | 9.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
06c9c1b099ad2f688ef685e13c92f7e1ea2c94c3d2d6046cbfc2057150427cf0
|
|
BLAKE2b-256 checksum How to use checksums |
507f5d827d353f21912f8dbc863da993ea69e2073c255d2ade2d2cfabcc013d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|