DIPLOMAT

Deep Learning-Based Identity Preserving Labeled-Object Multi-Animal Tracking

GitHub Logo DIPLOMAT

Installation Guide

This guide will walk you through the steps to set up DIPLOMAT on your system using mamba, which can be installed on Windows, Linux, or MacOS using the Miniforge installer.

1. Environment Setup

To create an environment using mamba, run one of these commands based on your requirements:

# Create the environment for using DIPLOMAT with DeepLabCut
# GPU:
mamba env create -f https://raw.githubusercontent.com/TravisWheelerLab/DIPLOMAT/main/conda-environments/DIPLOMAT-DEEPLABCUT.yaml
# CPU only:
mamba env create -f https://raw.githubusercontent.com/TravisWheelerLab/DIPLOMAT/main/conda-environments/DIPLOMAT-DEEPLABCUT-CPU.yaml

# OR Create an environment for using DIPLOMAT with SLEAP instead...
# GPU:
mamba env create -f https://raw.githubusercontent.com/TravisWheelerLab/DIPLOMAT/main/conda-environments/DIPLOMAT-SLEAP.yaml
# CPU only:
mamba env create -f https://raw.githubusercontent.com/TravisWheelerLab/DIPLOMAT/main/conda-environments/DIPLOMAT-SLEAP-CPU.yaml

2. Activating the Environment

After creating the environment, activate it using one of the following commands:

# Activate the DeepLabCut/DIPLOMAT environment...
mamba activate DIPLOMAT-DEEPLABCUT

# Activate the SLEAP/DIPLOMAT environment...
mamba activate DIPLOMAT-SLEAP

3. Documentation and Additional Help

For a more thorough explanation of the installation process and alternative installation methods, see the official documentation.

All DIPLOMAT commands are documented via help strings. To get more information about a DIPLOMAT subcommand or command, simply run it with the -h or --help flag. For example:

# Help for all of DIPLOMAT (lists subcommands of DIPLOMAT):
diplomat --help 

# Help for the track subcommand:
diplomat track --help

# Help for the predictors subcommand space:
diplomat predictors --help

4. Common Commands

Below are some common commands you might find useful once DIPLOMAT is installed:

# Run DIPLOMAT with no UI...
diplomat track -c path/to/config -v path/to/video

# Run DIPLOMAT with UI...
diplomat track_and_interact -c path/to/config -v path/to/video

# Annotate video with labels...
diplomat annotate -c path/to/config -v path/to/video

# Reopen the UI for further modifications...
diplomat interact -s path/to/ui_state.dipui

# Make minor modifications after tracking...
diplomat tweak -c path/to/config -v path/to/video