Biowulf High Performance Computing at the NIH
B-SOiD: going from position to behaviors

B-SOiD (Behavioral Segmentation in Deeplabcut) is an unsupervised learning algorithm that serves to discover and classify behaviors that are not pre-defined by users. It segregates statistically different, sub-second rodent behaviors with a single bottom-up perspective video cameraR by performing a novel expectation maximization fitting of Gaussian mixture models on t-Distributed Stochastic Neighbor Embedding (t-SNE).

References:

Documentation
Important Notes

Interactive job
Interactive jobs should be used for debugging, graphics, or applications that cannot be run as batch jobs.

Allocate an interactive session and run the program. Sample session:

[user@biowulf]$ sinteractive --gres=gpu:v100:1,lscratch:10 --mem=20g -c14
[user@cn4469 ~]$ module load b-soid 
[+] Loading gcc 4.8.5  ...
[+] Loading boost libraries v 5.9.4  ...
[+] Loading CUDA Toolkit  10.0.130  ...
[+] Loading cuDNN/7.5/CUDA-10.0 libraries...
[+] Loading DeepLabCut  2.1.8.2
[+] Loading b-soid  1.3
Create and enter the project folder:
[user@cn4469 user]$ mkdir /data/$USER/B-SOiD && cd /data/$USER/B-SOiD 
Copy the B-SOID/1.3 source code to your current directory
[user@cn4469 user]$ cp -r $BSOID_SRC/* .
Customoze the configuration file bsoid_umap/config/LOCAL_CONFIG.py by editing properly the lines containing the string "user".

Put a (number of) training *.csv data file(s) into the subfolder(s) Train1 and/or Train2.

Now build your behaviaoral model:
[user@cn4469 ~]$ ipython 
In [1]: from bsoid_umap.config import *

In [2]: import bsoid_umap.main

In [3]: f_10fps, f_10fps_sc, umap_embeddings, hdb_assignments, soft_assignments, soft_clusters, nn_classifier, scores, nn_assignments = bsoid_umap.main.build(TRAIN_FOLDERS)

...

In [4]: data_new, fs_labels = bsoid_umap.main.run(PREDICT_FOLDERS)
The output results will be stored automatically in the subfolder Output.
quit
[user@cn4469 ~]$ exit
salloc.exe: Relinquishing job allocation 46116226