DeepLabCut - hasselmonians/knowledge-base GitHub Wiki
DeepLabCut (DLC) is software written in Python that is designed to track animal movements from videos. It uses machine learning algorithms (using TensorFlow) to process the video and make high-definition predictions.
Quickstart
You can use a pre-installed DeepLabCut environment to get started right away.
1. Connect to the SCC
SCC-OnDemand.
Connecting to the SCC viaCreate an interactive desktop session with at least one GPU with compute 3.5 or greater.
To do this, go to Interactive Apps > Desktop
from the drop-down menu on the top bar.
Then, configure the options to look like the image below.
You can adjust the number of hours you need and the number of CPU cores and GPUs.
The final command, -l gpu_c=3.5
, indicates that you want a GPU of high enough quality to run DeepLabCut.
Connecting to the SCC via a terminal
Alternatively, you can connect to the SCC via the terminal using X-forwarding,
where USERNAME
is your BU/Kerberos login name.
On MacOS, use ssh -Y
instead.
ssh -X [email protected]
qrsh -l gpus=1 -l gpu_c=3.5
2. Load the correct modules
In the terminal inside the desktop session, type the following commands,
pressing Enter
after each command.
module load miniconda
conda env list
If you see an option labeled, DLC-GPU-DC
,
type
conda activate DLC-GPU-DC
and continue to Step 3. Otherwise, continue to First-time setup below.
First-time setup
Use existing environment (easy)
To use an existing conda
environment for DeepLabCut,
run the following command, then continue.
This environment is kept up-to-date with the newest version of DeepLabCut
and is best for users who don't need to edit DeepLabCut's code or add their own.
conda activate /projectnb/hasselmogrp/.conda/envs/DLC-GPU-DC
Create new environment (advanced)
To copy an environment for your own use, run the following command, then continue. Note that this will take a little while. Use this method if you want to tweak DeepLabCut's core code or add your own custom scripts and modules.
conda create -v --prefix /projectnb/hasselmogrp/[USERNAME]/.conda/envs/DLC-GPU --clone /projectnb/hasselmogrp/.conda/envs/DLC-GPU-DC
Here, [USERNAME]
is your BU username.
The environment will be copied to within a subdirectory
of that location.
You will then need to activate the environment.
conda activate /projectnb/hasselmogrp/[USERNAME]/.conda/envs/DLC-GPU-DC
3. Import deeplabcut
Begin a python
session:
python
In the Python prompt, type:
import deeplabcut as dlc
Then wait for the package to import.
4. Launch the GUI
When the prompt appears again, type:
dlc.launch_dlc()
Installing locally
Follow the instructions from the developers.