Skip to content

Pipeline for Automated Maternal Behavior during Early life in Rodents

Notifications You must be signed in to change notification settings

lapphe/AMBER-pipeline

Repository files navigation

Automated Maternal Behavior during Early life in Rodents pipeline

Rodent models are used extensively to understand how early social experiences, particularly maternal behavior, influence neurobiology across the lifespan. However, methods for measuring postnatal dam-pup interactions typically involve time-consuming manual scoring, vary widely between research groups, and produce low density data that limits downstream analytical applications. We developed the Automated Maternal Behavior during Early life in Rodents (AMBER) pipeline for quantifying home-cage maternal and mother-pup interactions using open-source machine learning tools from side-view recordings. We hope this pipeline will allow non-programmers access to advanced machine learning tools to improve standarization of maternal behavior measures.

Check out our bioxriv preprint.

AMBER pose estimation models are optimized for Long-Evans rats, but we are currently expanding this to several other mouse and rat strains to ensure AMBER can be used with all rodent animal models. Please get in touch if you have videos or frames you would like to contribute to this effort.

How does the pipeline work?

The AMBER pipeline uses side-view video recordings of dam and pups in the home cage. The first steps of the pipeline involve extracting key points (labeled body points) from dams and pups using provided DeepLabCut pose estimation models. Next, keypoint coordinate information produced by the pose estimation models from dam and pups is joined together and formatted. This data is then imported into SimBA and 218 features are calculated (e.g. the distance between the centroid point of the dam and the centroid point of the pups). The behavior predictions are generated using behavior classifiers trained to recognize seven different maternal behaviors from the features. The result is behavior annotations for every frame of the video.
Figure 1

Behavior definitions

See our annotations wiki page for an overview of how behaivors are operationalized. Our full AMBER ethogram guide provides detailed information on how behavior annotations were made to train each of the behavior classifiers in SimBA.
AMBER behavior classifiers for SimBA can be downloaded from OSF: https://osf.io/e3dyc/

Example useage

Check out the tutorial for step by step instructions for using the AMBER pipline on example videos or your own videos.
For the pose estimation steps, videos can be run in batch using the command line (python AMBER_pose_estimation.py /path/to/videos) or completed using the supplied Jupyter notebook. Behavioral classification is performed using the SimBA gui.

Installation and set up

See the installation wiki page for detailed information. We recommend installing deeplabcut and SimBA in different anaconda environments as these software programs have different dependency requirements. This workflow has been tested on Windows 11.

Deeplabcut

Our models were generated with DeepLabCut version 2.3.0, but should be compatible with newer versions. Please follow the instructions for installing DeepLabCut provided on their installation documentation page.

SimBA

Behavioral classifiers were generated using SimBA version 1.65.5. Please follow the SimBA installation guide.

Install the circle-fit package

The AMBER custom feature extraction script uses functions from the circle-fit package. This package is not automatically installed during SimBA installation, so it needs to be installed separately in the SimBA environment.

Download AMBER files

  1. The pose estimation models and scripts required for the AMBER pipeline can be found in this github repository. You should download all scripts as a zip file or by cloning the repository.
    git clone https://github.com/lapphe/AMBER-pipeline.git

  2. Update the AMBER SimBA project config file to reflect the specific location (path) of the project files on your computer. To do this, find the project_config.ini file located in AMBER-pipeline/SimBA_AMBER_project/project_folder/. Change the project_path (line 2) and model_dir (line 8) in the config file to reflect the current location.

  3. The behavioral classifiers are large files and cannot be stored on github. Please download them from our OSF repository. Move the behavior classification models to the “models” folder in AMBER-pipeline/SimBA_AMBER_project/models.
    OSF download small

References and resources

DeepLabCut
SimBA
AMBER bioxriv preprint

About

Pipeline for Automated Maternal Behavior during Early life in Rodents

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published