The open‑source toolkit for
DeepOF is a python library for analyzing mouse tracking data. Reproducible behavior patterns are extracted and visualized from Deep Lab Cut and Social LEAP inputs.
DeepOF works with any arena shape and any number of mice, as long as you can keep track of all of them. Behaviors are detected based on user‑defined regions of interest—between pairs of mice or for individuals— and then aggregated accordingly.
Example setup
A large rectangular arena with two mice interacting with each other
Define a project, detect behaviors, and plot results within minutes.
Chain analysis steps, plots and more as executable blocks in notebook environments.
Clean, typed APIs with informative errors; best used in notebooks.
Analyze multi-day recordings, evaluate them by hours, minutes or seconds.
Preprocess your data, detect behavior, and extract it in clearly structured tables.
Compare behaviors between groups, over time, in relation to each other, and more.
DeepOF offers pipelines for the detection and annotation of 15 different supervised behaviors. Measure general activity, explorative behavior or social interaction.
Show examples
DeepOF offers three different unsupervised models to detect behavior-like patterns and an extensive array of functions to analyze detection results.
And yes, it may not appear that way, but the results to the right were actually achieved with 100% unsupervised models.
Show examples
DeepOF does not only tell you when, where and for how long a behavior occurs, it also allows you to export videos with extensive behavior annotations.
Show more examples
Install with pip, conda, or clone, then launch the CLI or import the API.
python -m venv ${HOME}/Path/to/directory/virtual_environment_name
.\virtual_environment_name\Scripts\activate
pip install deepof
conda create -n deepof python=3.10
conda activate deepof
pip install deepof
git clone https://github.com/mlfpm/deepof.git deepof
cd deepof
poetry install
python -m venv ~/Path/to/directory/virtual_environment_name
source ~/Path/to/directory/virtual_environment_name/bin/activate
pip install deepof
conda create -n deepof python=3.10
conda activate deepof
pip install deepof
git clone https://github.com/mlfpm/deepof.git deepof
cd deepof
poetry install
python -m venv ~/Path/to/directory/virtual_environment_name
source ~/Path/to/directory/virtual_environment_name/bin/activate
pip install deepof
conda create -n deepof python=3.10
conda activate deepof
pip install deepof
git clone https://github.com/mlfpm/deepof.git deepof
cd deepof
poetry install
How to set up DeepOF and start behavioral analysis.
Research papers featuring DeepOF:
Review papers featuring DeepOF:
Other works related to DeepOF:
If DeepOF helps your research, please cite:
@article{Miranda2023deepof,
title = {DeepOF: a Python package for supervised and unsupervised pattern recognition in mice motion tracking data},
author = {Lucas Miranda, Joeri Bordes, Benno PĂĽtz, Mathias V Schmidt, Bertram MĂĽller-Myhsok},
journal = {The Journal of Open Source Software},
year = {2023},
url = {https://joss.theoj.org/papers/10.21105/joss.05394}
}