sgoldenlab/simba
SimBA (Simple Behavioral Analysis): a pipeline and GUI for developing supervised behavioral classifiers from any major pose-estimation tool
SimBA (Simple Behavioral Analysis)
What it does
SimBA is a Python‑based toolkit that lets researchers turn animal‑tracking data (pose‑estimation from DeepLabCut, SLEAP, etc.) into supervised machine‑learning classifiers of specific behaviours. It provides a graphical user interface so users with little or no programming experience can:
- Load pose‑estimation CSVs or other tracking formats.
- Define behaviours, label video frames, and train classifiers (random‑forest models by default).
- Evaluate models with precision/recall curves, learning‑curve plots and SHAP‑based explainability.
- Apply trained models to new videos and export per‑frame behaviour predictions.
- Generate a wide range of quantitative summaries (bout counts, durations, velocity, zone occupancy, social‑direction metrics, etc.) and visualisations that can be over‑laid on the original video.
Who it is for
- Neuroscientists, ethologists and behavioural biologists who record mice, rats or other small animals and need reproducible, high‑throughput analysis of complex social or non‑social actions.
- Labs that already use pose‑estimation tools (DeepLabCut, SLEAP, DeepPoseKit, etc.) and want a downstream pipeline without writing code.
- Users who prefer a point‑and‑click GUI but also have the option to script the workflow via the provided API.
Key features (as described in the README)
| Category | Highlights |
|---|---|
| Inputs | Supports pose‑estimation outputs from DeepLabCut (including multi‑animal DLC), SLEAP, DeepPoseKit, DANNCE (3‑D), MARS, FaceMap, APT, SuperAnimal‑TopView, YOLO, and generic blob tracking. User‑defined pose schemes are also accepted. |
| Outputs | Per‑frame behaviour predictions with standard evaluation metrics (precision, recall, learning curves) and SHAP‑based feature importance for explainability. |
| Behavioural analyses | Bout counts, durations, latencies, event frequencies, severity scoring; movement metrics (velocity, distance, trajectories); spatial metrics (time‑in‑zone, entries, zone‑specific behaviour); social/directional metrics; temporal structure analyses (FSTTC, Kleinberg smoothing); turn‑key assays (spontaneous alternation, pup retrieval, cue‑light, light/dark box, freezing, circling, etc.); unsupervised clustering and dimensionality reduction. |
| Visualisations | Static plots and video overlays: pose skeletons, bounding boxes, heatmaps, Gantt charts, probability curves, SHAP summary plots, ROI heatmaps, directionality arrows, assay‑specific visualisations. |
| Explainability | Integration of SHAP to show which pose‑derived features drive each classifier decision. |
| GUI | Tkinter‑based desktop application launched with simba after installing the simba-uw-tf-dev package. |
| Extensibility | API documentation, example notebooks, Docker images, and ability to run the pipeline programmatically. |
| Resources | Pre‑trained random‑forest models, datasets, pose models, and weights hosted on OSF; extensive tutorials, scenario‑based walkthroughs, and a community Gitter chat. |
| Platform support | Windows, macOS and Linux. |
How to get started
- Install the package (Python 3.6‑3.10) via
pip install simba-uw-tf-dev. - Run
simbato open the GUI. - Follow the Scenario 1 tutorial to import pose data, label behaviours, train a classifier, and run analysis on a test dataset.
- Use the provided pre‑trained classifiers or create your own for new behaviours.
Why it matters
Behavioural neuroscience increasingly relies on high‑resolution video and pose‑estimation to capture subtle actions. SimBA bridges the gap between raw tracking data and scientifically‑rigorous behavioural metrics, offering explainable machine‑learning models that can be reproduced across labs. Its low‑code approach lowers the barrier for labs without dedicated computational staff, while still providing advanced analytics (SHAP, temporal coupling, unsupervised clustering) for power users.
All information above is taken directly from the repository’s README.
Related
- Project
- Project
- Project
- Dispatch
- Project