Awesome
Why B-SOiD ("B-side")?
DeepLabCut <sup>1,2,3</sup>, SLEAP <sup>4</sup>, and OpenPose <sup>5</sup> have revolutionized the way behavioral scientists analyze data. These algorithm utilizes recent advances in computer vision and deep learning to automatically estimate 3D-poses. Interpreting the positions of an animal can be useful in studying behavior; however, it does not encompass the whole dynamic range of naturalistic behaviors.
B-SOiD identifies behaviors using a unique pipeline where unsupervised learning meets supervised classification. The unsupervised behavioral segmentation relies on non-linear dimensionality reduction <sup>6,7,9,10</sup>, whereas the supervised classification is standard scikit-learn <sup>8</sup>.
Behavioral segmentation of open field in DeepLabCut, or B-SOiD ("B-side"), as the name suggested, was first designed as a pipeline using pose estimation file from DeepLabCut as input. Now, it has extended to handle DeepLabCut (.h5, .csv), SLEAP (.h5), and OpenPose (.json) files.
Installation
Step 1: Install Anaconda/Python3
Step 2: Clone B-SOID repository with anaconda prompt
Git clone the web URL (example below) or download ZIP.
Change your current working directory to the location where you want the cloned directory to be made.
git clone https://github.com/YttriLab/B-SOID.git
Usage
Step 1: Setup, open an anaconda/python3 instance and install dependencies with the requirements file
cd /path/to/B-SOID/
For MacOS users
conda env create -n bsoid_v2 -f requirements.yaml (macOS)
or for Windows users
conda env create -n bsoid_v2 -f requirements_win.yaml (windows)
conda activate bsoid_v2
You should now see (bsoid_v2) $yourusername@yourmachine ~ %
Step 2: Run the app!
streamlit run bsoid_app.py
Resources
We have provided our 6 body part DeepLabCut model. We also included two example 5 minute clips (labeled_clip1, labeled_clip2) as proxy for how well we trained our model. The raw video (raw_clip1, raw_clip2) and the corresponding h5/pickle/csv files are included as well.
Archives
Contributing
Pull requests are welcome. For recommended changes that you would like to see, open an issue. Join our slack group for more instantaneous feedback.
There are many exciting avenues to explore based on this work. Please do not hesitate to contact us for collaborations.
License
This software package provided without warranty of any kind and is licensed under the GNU General Public License v3.0. If you use our algorithm and/or model/data, please cite us! Preprint/peer-review will be announced in the following section.
News
September 2019: First B-SOiD preprint on bioRxiv
March 2020: Updated version of our preprint on bioRxiv