RpiBeh offers a versatile open source solution for rodent behavior tracking and closed loop interventions

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.

Authors

Institutions

Publication Details

Journal
Scientific Reports
Published
2025-08-11
DOI
https://doi.org/10.1038/s41598-025-14693-7
Primary Topic
Zebrafish Biomedical Research Applications
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

RpiBeh offers a versatile open source solution for rodent behavior tracking and closed loop interventions

Jianguang Ni, Yiqi Sun, Jie Zhang, Qianyun Wang
Scientific Reports
Zebrafish Biomedical Research Applications
article

RpiBeh offers a versatile open source solution for rodent behavior tracking and closed loop interventions

Jianguang Ni, Yiqi Sun, Jie Zhang, Qianyun Wang
article en

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.

Scientific ReportsVol. 15(1)
Huashan Hospital (CN)
National Science Foundation, National Natural Science Foundation of China, Fudan University, National Key Research and Development Program of China
Openalex Percentile: Top 78%
Zebrafish Biomedical Research Applications
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.