Scientific ReportsAnimal Behavior & CognitionPeer-reviewed journal article
RpiBeh: a multi-purpose open-source solution for real-time tracking and behavior-driven closed-loop interventions in rodent neuroethology
Abstract
High-precision behavior tracking and closed-loop intervention are essential for studying the neural basis of cognition and behavior. Existing commercial systems are costly and inflexible for customization, while current open-source tools are often lack of real-time functionality and suffer from steep learning curve. To address these issues, we developed RpiBeh, an open-source, cost-effective, and versatile software tailored for rodent neuroethological research. The software features an intuitive interface with extensive customization options. RpiBeh leverages a Raspberry Pi and camera for video streaming, enabling behavior-driven closed-loop control. Additionally, it provides frame-by-frame video timestamp output for precise synchronization with external devices. For real-time tracking and locomotion pattern analysis, RpiBeh utilizes several novel algorithms and integrated newly developed deep-learning method. Specifically, we introduced two algorithms: a Background Subtraction Method (BSM) for real-time position tracking and a Frame Difference (FD) algorithm for freezing behavior detection. RpiBeh was validated in single animal real-time tracking and locomotion pattern detection, demonstrating flexibility and effectiveness in configurating behavior-triggered closed-loop reinforcement experiments including passive place avoidance task and social fear conditioning tasks. It achieved the same level of performance in tracking and locomotion pattern detection comparing to benchmark software including ANY-maze and DeepLabCut, with superior customization and expandability. Consequently, RpiBeh offers an efficient, affordable, and open-source solution for video tracking and behavior-driven closed-loop experiments.
- organism: mouse
- assay: imaging
- research focus: cell type annotation
- research focus: clustering
- research focus: trajectory inference
- approach: deep learning
- Citations
- 3
- FWCI
- 1.45
- Field percentile
- top 19%
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- Robean: A Standalone Freeware for Automated Rodent Neurobehavioural Analysis with Integrated Tracking, Visualization, and Reporting
Vikas Mishra, Rajkumar Verma, … Ravinder Kumar Kaundal·bioRxiv·Jul 17, 2026
- PyRodentTracks: flexible computer vision and RFID based system for multiple rodent tracking and behavioral assessment.
Tony Fong, Braeden Jury, … Timothy H. Murphy·bioRxiv·Jan 23, 2022
- TracktorLive: an integrated real-time object tracking and response system
Pranav Minasandra, Vivek H. Sridhar, … Isaac Planas‐Sitjà·bioRxiv·May 26, 2026
- Deep learning-based system for real-time behavior recognition and closed-loop control of behavioral mazes using depth sensing
A. F. Geros, R. Cruz, … P. Aguiar·bioRxiv·Feb 22, 2022
- An inexpensive remotely-operated video recording system for continuous behavioral observations
W. D. Weber, H. S. Fisher·bioRxiv·May 9, 2019
- EthoPy: Reproducible Behavioral Neuroscience Made Simple
Alexandros Evangelou, Maria Diamantaki, … Emmanouil Froudarakis·bioRxiv·Sep 8, 2025