An annotation and instance segmentation-based multi-object tracking and behavior analysis package.
58
stars
2,466
commits
Python
primary language
Sep 8, 2026
updated
Annotate, segment, track, and analyze animals or other research targets in video with one reproducible toolchain.
Annolid is a deep learning toolkit for behavior analysis and video annotation. It brings annotation, instance segmentation, tracking, keypoint workflows, behavior scoring, and downstream analysis into one GUI and CLI environment.
The common path is practical and iterative: label a representative frame, propagate or track instances, review difficult frames, repair identities, and export annotations or metrics for analysis. Annolid is designed for real lab data, including overlap, occlusion, variable lighting, long videos, and projects where saved annotations need to remain readable and reproducible.
Python support: Annolid runs on Python 3.10–3.14 for the default GUI/core workflow. The optional remote network video path uses
ffpyplayer; installannolid[remote_video]only when you need that feature, especially on Python 3.14 where native FFmpeg development libraries may be required.
annolid-run CLI commands for reproducible model training, prediction, evaluation, and automation.Annolid keeps heavier runtime features behind extras so a standard GUI install stays usable on common lab machines. See Installation for the maintained extras and installer profiles.
docs/ folder of this repository.The fastest maintained path is the one-line installer:
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
After installation:
annolid --help
annolid-run --help
annolid
If you prefer Anaconda:
conda create -n annolid-env python=3.11
conda activate annolid-env
conda install git ffmpeg
git clone --recurse-submodules https://github.com/healthonrails/annolid.git
cd annolid
pip install -e ".[gui]"
annolid # launches the GUI
For source development, use a repository-local .venv:
git clone --recurse-submodules https://github.com/healthonrails/annolid.git
cd annolid
uv venv .venv --python 3.11
source .venv/bin/activate
uv pip install -e ".[gui]"
annolid
Get Annolid running in minutes with the automated installer. It clones the repository, creates an isolated environment, bootstraps uv when needed, installs GUI dependencies, and validates the ONNX Runtime provider setup.
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
The script will:
For a full breakdown of one-line installer choices, including GPU vs CPU, interactive vs non-interactive, custom paths, Conda, and extras, see One-Line Installer Choices.
Common maintained workstation profile:
curl -sSL https://raw.githubusercontent.com/healthonrails/annolid/main/install.sh | bash -s -- --profile workstation
For advanced users, Docker, Conda, or manual Pip installation, please see the Detailed Installation Guide.
conda activate annolid-env
annolid
annolid --labels=/path/to/labels_custom.txt
0, and use stable instance names when cross-frame identity matters.annolid-run list-models, annolid-run help train, and annolid-run help predict for CLI model workflows.python -m annolid.behavior.time_budget exported_events.csv \
--schema project.annolid.json \
--bin-size 60 \
-o time_budget.csv
slap_in_face, run_away, and fight_initiation) and export a _bouts.csv sidecar:
python -m annolid.behavior.time_budget exported_events.csv \
--bout-profile aggression \
--bout-gap-seconds 2 \
-o time_budget.csv
ffmpeg -i input.mp4 -vcodec libx264 output_compressed.mp4
depth.ndjson outputs.
vole_1, mouse_2). Use descriptive behavior names (rearing, grooming) for polygons dedicated to behavioral events, and name body-part keypoints (nose, tail_base) consistently.s to mark the start, e to mark the end, f/b to step ±10 frames, and r to remove events directly from the video slider.--flags "digging,rearing,grooming" to open a multi-select list of behaviors. Save selections with Ctrl+S or the Save button; remove events by pressing R.~/.labelmerc (or C:\Users\<username>\.labelmerc on Windows). Edit this file to change defaults such as auto_save: true, or supply an alternative path via annolid --config /path/to/file.store_video_frame_data: true only when self-contained video-frame JSON files are required.annolid/annotation/labelme.md.docs/imgs/AP_across_labeled_frames.png shows how accuracy scales with annotation volume.docs/imgs/human_in_the_loop.png): train on initial annotations, auto-label, correct, and retrain until predictions align with human expectations.annolid-run dinov3-models --list


| YouTube Channel | Annolid documentations |
|---|---|
![]() | ![]() |
| Instance segmentations | Behavior prediction |
|---|---|
![]() | ![]() |
OpenCV: FFMPEG: tag ... or missing codecs):
Install FFmpeg via your package manager or conda install -c conda-forge ffmpeg to extend codec support.Class QCocoaPageLayoutDelegate is implemented in both ...):
conda install qtpy resolves the conflict between OpenCV and PyQt.annolid --help for CLI usage.qtpy.QtBindingsNotFoundError, install GUI dependencies in the active environment: pip install -e ".[gui]" (source) or pip install "annolid[gui]" (PyPI).annolid-run list-models, annolid-run help train, annolid-run help predict, annolid-run help train <model>, and annolid-run help predict <model>. Older --help-model forms still work.Required inputs, Model and runtime, and Training controls before the full flag list.dino_kpseg, maskrcnn_detectron2, yolo, behavior_classifier): annolid-run train <model> --run-config annolid/configs/runs/<template>.yaml (CLI flags still override YAML fields).annolid-run predict yolo_labelme and in the GUI video inference workflow (see https://annolid.com/portal/workflows/).annolid-run dino-kpseg-embeddings --data /path/to/data.yaml [--weights /path/to/best.pt] and then tensorboard --logdir <run_dir>/tensorboard (some DINOv3 checkpoints require a Hugging Face token).Ensure Docker is installed, then run:
cd annolid/docker
docker build .
xhost +local:docker # Linux only; allows GUI forwarding
docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix/ -e DISPLAY=$DISPLAY <IMAGE_ID>
Replace <IMAGE_ID> with the identifier printed by docker build.
If you use Annolid in your research, please cite:
@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}
}
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.
Contributions are welcome! Review the guidelines in CONTRIBUTING.md, open an issue to discuss major changes, and run relevant tests before submitting a pull request.
Annolid is distributed under the Creative Commons Attribution-NonCommercial 4.0 International License.
Python
57.4%
Jupyter Notebook
38.1%
JavaScript
2.3%
HTML
1.4%
An annotation and instance segmentation-based multi-object tracking and behavior analysis package.
58
stars
2,466
commits
Python
primary language
Sep 8, 2026
updated
Annotate, segment, track, and analyze animals or other research targets in video with one reproducible toolchain.
Annolid is a deep learning toolkit for behavior analysis and video annotation. It brings annotation, instance segmentation, tracking, keypoint workflows, behavior scoring, and downstream analysis into one GUI and CLI environment.
The common path is practical and iterative: label a representative frame, propagate or track instances, review difficult frames, repair identities, and export annotations or metrics for analysis. Annolid is designed for real lab data, including overlap, occlusion, variable lighting, long videos, and projects where saved annotations need to remain readable and reproducible.
Python support: Annolid runs on Python 3.10–3.14 for the default GUI/core workflow. The optional remote network video path uses
ffpyplayer; installannolid[remote_video]only when you need that feature, especially on Python 3.14 where native FFmpeg development libraries may be required.
annolid-run CLI commands for reproducible model training, prediction, evaluation, and automation.Annolid keeps heavier runtime features behind extras so a standard GUI install stays usable on common lab machines. See Installation for the maintained extras and installer profiles.
docs/ folder of this repository.The fastest maintained path is the one-line installer:
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
After installation:
annolid --help
annolid-run --help
annolid
If you prefer Anaconda:
conda create -n annolid-env python=3.11
conda activate annolid-env
conda install git ffmpeg
git clone --recurse-submodules https://github.com/healthonrails/annolid.git
cd annolid
pip install -e ".[gui]"
annolid # launches the GUI
For source development, use a repository-local .venv:
git clone --recurse-submodules https://github.com/healthonrails/annolid.git
cd annolid
uv venv .venv --python 3.11
source .venv/bin/activate
uv pip install -e ".[gui]"
annolid
Get Annolid running in minutes with the automated installer. It clones the repository, creates an isolated environment, bootstraps uv when needed, installs GUI dependencies, and validates the ONNX Runtime provider setup.
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
The script will:
For a full breakdown of one-line installer choices, including GPU vs CPU, interactive vs non-interactive, custom paths, Conda, and extras, see One-Line Installer Choices.
Common maintained workstation profile:
curl -sSL https://raw.githubusercontent.com/healthonrails/annolid/main/install.sh | bash -s -- --profile workstation
For advanced users, Docker, Conda, or manual Pip installation, please see the Detailed Installation Guide.
conda activate annolid-env
annolid
annolid --labels=/path/to/labels_custom.txt
0, and use stable instance names when cross-frame identity matters.annolid-run list-models, annolid-run help train, and annolid-run help predict for CLI model workflows.python -m annolid.behavior.time_budget exported_events.csv \
--schema project.annolid.json \
--bin-size 60 \
-o time_budget.csv
slap_in_face, run_away, and fight_initiation) and export a _bouts.csv sidecar:
python -m annolid.behavior.time_budget exported_events.csv \
--bout-profile aggression \
--bout-gap-seconds 2 \
-o time_budget.csv
ffmpeg -i input.mp4 -vcodec libx264 output_compressed.mp4
depth.ndjson outputs.
vole_1, mouse_2). Use descriptive behavior names (rearing, grooming) for polygons dedicated to behavioral events, and name body-part keypoints (nose, tail_base) consistently.s to mark the start, e to mark the end, f/b to step ±10 frames, and r to remove events directly from the video slider.--flags "digging,rearing,grooming" to open a multi-select list of behaviors. Save selections with Ctrl+S or the Save button; remove events by pressing R.~/.labelmerc (or C:\Users\<username>\.labelmerc on Windows). Edit this file to change defaults such as auto_save: true, or supply an alternative path via annolid --config /path/to/file.store_video_frame_data: true only when self-contained video-frame JSON files are required.annolid/annotation/labelme.md.docs/imgs/AP_across_labeled_frames.png shows how accuracy scales with annotation volume.docs/imgs/human_in_the_loop.png): train on initial annotations, auto-label, correct, and retrain until predictions align with human expectations.annolid-run dinov3-models --list


| YouTube Channel | Annolid documentations |
|---|---|
![]() | ![]() |
| Instance segmentations | Behavior prediction |
|---|---|
![]() | ![]() |
OpenCV: FFMPEG: tag ... or missing codecs):
Install FFmpeg via your package manager or conda install -c conda-forge ffmpeg to extend codec support.Class QCocoaPageLayoutDelegate is implemented in both ...):
conda install qtpy resolves the conflict between OpenCV and PyQt.annolid --help for CLI usage.qtpy.QtBindingsNotFoundError, install GUI dependencies in the active environment: pip install -e ".[gui]" (source) or pip install "annolid[gui]" (PyPI).annolid-run list-models, annolid-run help train, annolid-run help predict, annolid-run help train <model>, and annolid-run help predict <model>. Older --help-model forms still work.Required inputs, Model and runtime, and Training controls before the full flag list.dino_kpseg, maskrcnn_detectron2, yolo, behavior_classifier): annolid-run train <model> --run-config annolid/configs/runs/<template>.yaml (CLI flags still override YAML fields).annolid-run predict yolo_labelme and in the GUI video inference workflow (see https://annolid.com/portal/workflows/).annolid-run dino-kpseg-embeddings --data /path/to/data.yaml [--weights /path/to/best.pt] and then tensorboard --logdir <run_dir>/tensorboard (some DINOv3 checkpoints require a Hugging Face token).Ensure Docker is installed, then run:
cd annolid/docker
docker build .
xhost +local:docker # Linux only; allows GUI forwarding
docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix/ -e DISPLAY=$DISPLAY <IMAGE_ID>
Replace <IMAGE_ID> with the identifier printed by docker build.
If you use Annolid in your research, please cite:
@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}
}
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.
Contributions are welcome! Review the guidelines in CONTRIBUTING.md, open an issue to discuss major changes, and run relevant tests before submitting a pull request.
Annolid is distributed under the Creative Commons Attribution-NonCommercial 4.0 International License.
Python
57.4%
Jupyter Notebook
38.1%
JavaScript
2.3%
HTML
1.4%