Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Behavioral Analysis

Purpose

Workflow overview

  • DLC → extract frames → label body parts in napari → train DLC network → output estimated pose coordinates (.csv/.h5) and videos (.mp4)
    • Follow this tutorial walkthrough to create a DLC project
    • Annotating 100-200 frames from 10 videos would already give you a pretty good result
  • MARS/BENTO → manually label frames → output labeled behavioral bouts with start/end time stamps (.annot)
    • Have clear inclusion/exclusion criteria for each behavior
    • Label in an actor-agnostic way
  • SimBA → create project → import DLC pose estimation (.csv) and MARS behavior labels (.annot) train behavioral classifiers → analyze videos

Pre-requisites

  1. Install Python 3.x version
  2. Install Miniconda3
  3. Ideally work on a workstation with GPU

Install DLC

  1. Open Anaconda Prompt
  2. conda create --name deeplabcut python=3.12
  3. conda activate deeplabcut
  4. pip install torch torchvision --index-url https://download.pytorch.org/whl/cu128 # analysis workstation 1
  5. pip install deeplabcut[gui]
  6. python -c "import torch; print(torch.cuda.is_available())" # should print out "True"
  7. python -m deeplabcut # launch dlc

Install BENTO

  1. Download the zip file from my forked directory here
  2. Open Anaconda Prompt
  3. cd path_to_bento_folder
  4. conda env create -f bento.yml
  5. conda activate bento
  6. pip install colour-science==0.4.6 --no-deps
  7. pip install colour-demosaicing==0.2.6 --no-deps
  8. python src/bento.py # launch bento

Install SimBA

  1. Open Anaconda Prompt
  2. conda create --name simba python=3.6
  3. conda activate simba
  4. pip install simba-uw-tf-dev
  5. simba # launch simba

Citations

DeepLabCut
Mathis, Alexander, et al. "DeepLabCut: markerless pose estimation of user-defined body parts with deep learning." Nature neuroscience 21.9 (2018): 1281-1289.

MARS/BENTO
Segalin, Cristina, et al. "The Mouse Action Recognition System (MARS) software pipeline for automated analysis of social behaviors in mice." Elife 10 (2021): e63720.

SimBA
Goodwin, Nastacia L., et al. "Simple Behavioral Analysis (SimBA) as a platform for explainable machine learning in behavioral neuroscience." Nature neuroscience 27.7 (2024): 1411-1424.

About

DLC, MARS/BENTO, SimBA, and custom scripts

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors