Accurate detection of swim bouts is essential for decoding motor behavior in larval zebrafish, yet conventional threshold-based methods rely on subjective cutoffs and per-experiment tuning. To address this limitation, we developed threshold-free deep learning models operating on tail-curvature time series: an offline model for post hoc analysis and an online model for real-time detection. Both improved precision over threshold-based methods, particularly for low-amplitude bouts.
Using the offline model, we show that a head-fixed, closed-loop preparation largely preserves naturalistic swimming kinematics. Repeated trials reduced bout frequency and increased interbout interval, whereas genetic background primarily affects bout duration and maximum amplitude; notably, casper larvae lacked the late-trial decline observed in wildtype and nacre. We further show that detector choice can alter inferred behavioral outcomes.
Together, these results establish a high-throughput framework for robust and reproducible analysis of zebrafish swimming behavior across experimental conditions. This manuscript was supported in part by the National Institutes of Health (NIH, EB034272; EB037653; AG072305; NS041435) and subject to the NIH Public Access Policy. NIH has been given the right to make this manuscript publicly available in PubMed.
We also acknowledge the Boons Pickens Endowment Fund and an unrestricted grant to the Wilmer Eye Institute from Research to Prevent Blindness. G.K. received support from the Johns Hopkins Cross-Disciplinary Graduate Program in Biomedical Sciences. J.S.M. received support from the Helen Larson and Charles Glenn Grover endowment funds.
The authors received no specific funding for this work. Department of Biomedical Engineering, Johns Hopkins University, Baltimore, MD, USA Department of Ophthalmology, Johns Hopkins University, Baltimore, MD, USA Department of Electrical and Computer Engineering, Johns Hopkins University, Baltimore, MD, USA The authors declare no competing interests. Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material.
Extract — continue reading at the source.