(C) PLOS One This story was originally published by PLOS One and is unaltered. . . . . . . . . . . Automated C. elegans behavior analysis via deep learning-based detection and tracking [1] ['Xiaoke Liu', 'School Of Basic Medical Sciences', 'Shandong Second Medical University', 'Weifang', 'Shandong', 'Weifang Key Laboratory Of Collaborative Innovation Of Intelligent Diagnosis', 'Treatment', 'Molecular Diseases', 'Jianming Liu', 'Wenjie Teng'] Date: 2025-11 As a well-established and extensively utilized model organism, Caenorhabditis elegans (C. elegans) serves as a crucial platform for investigating behavioral regulation mechanisms and their biological significance. However, manually tracking the locomotor behavior of large numbers of C. elegans is both cumbersome and inefficient. To address the above challenges, we innovatively propose an automated approach for analyzing C. elegans behavior through deep learning-based detection and tracking. Building upon existing research, we developed an enhanced worm detection framework that integrates YOLOv8 with ByteTrack, enabling real-time, precise tracking of multiple worms. Based on the tracking results, we further established an automated high-throughput method for quantitative analysis of multiple movement parameters, including locomotion velocity, body bending angle, and roll frequency, thereby laying a robust foundation for high-precision, automated analysis of complex worm behaviors. including movement speed, body bending angle, and roll frequency, thereby laying a robust foundation for high-precision, automated analysis of complex worm behaviors. Comparative evaluations demonstrate that the proposed enhanced C. elegans detection framework outperforms existing methods, achieving a precision of 99.5%, recall of 98.7%, and mAP50 of 99.6%, with a processing speed of 153 frames per second (FPS). The established framework for worm detection, tracking, and automated behavioral analysis developed in this study delivers superior detection and tracking accuracy while enhancing tracking continuity and robustness. Unlike traditional labor-intensive measurement approaches, our framework supports simultaneous tracking of multiple worms while maintaining automated extraction of various behavioral parameters with high precision. Furthermore, our approach advances the standardization of C. elegans behavioral parameter analysis, which can analyze the behavioral data of multiple worms at the same time, significantly improving the experimental throughput and providing an efficient tool for drug screening, gene function research and other fields. Studying the behavior of the worm C. elegans is crucial for understanding genetics and neurobiology, but manually tracking its movements is slow and impractical for large experiments. To overcome this, we developed an automated, high-speed system that uses advanced deep learning to accurately detect and track worms in real-time, even when they temporarily hide or touch each other. Our approach enhances the YOLOv8 architecture by incorporating a Convolutional Block Attention Module, which enables the model to focus on the most relevant visual features of the worms while suppressing background interference. Additionally, we modified the loss function to better handle the detection of small and overlapping worms, significantly improving localization accuracy. These technical innovations allow our method to follow multiple worms and automatically measure key behaviors like movement speed, body bending, and roll frequency with exceptional precision. By providing a robust and standardized algorithm, making advanced behavioral studies accessible to more biologists. Funding: This work was supported by the Natural Science Foundation of Shandong Province, China (Grant No. ZR2024QF228 to X.L.; Grant No. ZR2024QA176 to X.H.). The funder’s website is http://kjt.shandong.gov.cn/ . The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript. Copyright: © 2025 Liu et al. This is an open access article distributed under the terms of the Creative Commons Attribution License , which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited. 1 Introduction The nematode C. elegans, characterized by their transparent bodies, offer an exceptional experimental model for biological research. This unique transparency facilitates direct observation of internal structures and cellular dynamics, enabling real-time microscopic examination of fundamental processes such as cell division and organismal development. As a premier model organism, worms combine several advantageous features: straightforward maintenance and handling protocols, coupled with versatile genetic manipulation capabilities through both forward and reverse genetics approaches [1]. These distinctive characteristics collectively establish worms as an invaluable system for diverse scientific investigations, particularly in developmental biology and cellular research. Behavioral analysis serves as a fundamental research paradigm in multiple scientific disciplines, particularly in neuroscience and genetics. The behavioral study of C. elegans worms has emerged as a significant research focus in contemporary biology. Systematic monitoring and quantification of C. elegans locomotor behavior have enabled substantial advancements in several research domains, including pharmacological screening [2], ecotoxicological assessment [3], anti-aging investigations [4], and human disease modeling [5]. These behavioral-based approaches have provided critical scientific insights and established robust experimental frameworks for understanding human health maintenance and longevity mechanisms [6–8]. The accurate identification and differentiation of individual worm trajectories are essential prerequisites for all aforementioned studies. Furthermore, the analysis of worm behavioral performance necessitates precise quantification of movement parameters, including movement speed, bending angle, and roll frequency. Consequently, the development of reliable worm detection and tracking methodologies has emerged as a critical component in behavioral research. As a predominant model organism in biological research, C. elegans has facilitated the extensive application of digital image processing techniques in various experimental studies. These applications encompass microscopic image segmentation, phenotypic quantification, three-dimensional atlas reconstruction, and automated behavioral tracking, significantly advancing worm-related research methodologies [9]. In early studies, investigators primarily utilized traditional image processing approaches for worm tracking studies. Swierczek et al. (2011) designed a real-time computer vision system, the Multi-Worm Tracker (MWT), capable of simultaneous quantitative behavioral analysis of multiple C. elegans worms individuals at video rate resolution [10]. Husson et al. (2013) developed a video processing tool for nematode tracking that quantifies motion parameters but requires extensive manual annotation [11]. Wang et al. (2013) introduced Track-A-Worm, a functionally rich, open-source system characterized by user-friendly operation [12]. Itskovits et al. (2017) presented a Multi-Animal Tracker (MAT), offering an end-to-end, user-friendly solution for simultaneous imaging, tracking, and analysis of complex multi-animal behaviors. The system’s core incorporates a machine learning algorithm that enables flexible imaging across diverse experimental conditions and model organisms [13]. Javer et al. (2018) established a comprehensive platform for C. elegans behavioral data, featuring a large public database on Zenodo, a versatile data interchange format (WCON), and open-source software for analysis [14]. This invaluable resource underscores the importance of reproducible workflows. Most notably, Javer et al. (2018) make a valuable contribution by developing a new set of interpretable, handcrafted features to compactly quantify C. elegans behavior and to bridge the gap between the high performance of machine learning and the need for biological interpretability [15]. However, traditional image processing algorithms exhibit substantial performance degradation under increasingly sophisticated experimental setups. Furthermore, as experimental datasets continue to expand exponentially [16], manual counting and labeling become progressively more challenging. Consequently, high-throughput automated methodologies have emerged as the predominant approach, effectively replacing conventional image processing techniques in contemporary research. Deep learning methodologies leverage the computational power of convolutional neural networks to autonomously extract object features while preserving spatial relationships, making these models particularly suitable for behavioral research applications. The integration of deep learning with computer vision techniques enables more efficient and precise processing and analysis of biological images [17,18], offering promising solutions to the aforementioned challenges. Andre et al. (2022) introduced NemaNet, conducting a comprehensive comparative analysis with thirteen established CNN architectures, while also releasing NemaDataset - a public repository containing 3,063 annotated microscopic images spanning five worm species [19]. Walter et al. (2021) established an efficient, user-friendly tracking system capable of simultaneous monitoring of multiple individuals, achieving real-time (60 Hz) tracking performance for populations of up to 256 organisms through advanced background-subtraction techniques [20]. Pereira et al. (2019) created LEAP (LEAP Estimates Animal Pose), an innovative deep learning framework for animal pose estimation, which integrates a graphical interface for body part annotation and network training [21]. Notably, Bates et al. (2022) successfully employed a Faster R-CNN framework to achieve robust identification and detection of C. elegans across various life stages in complex environments, showcasing its advantages in speed, accuracy, and generalizability [22]. Banerjee et al. (2023) designed Deep-Worm-Tracker, an end-to-end deep learning model demonstrating high accuracy and real-time inference capabilities. Thevenoux et al. implemented a hybrid approach combining custom computer vision algorithms with convolutional neural networks for species identification in quarantine worm imaging [23]. Weheliye et al. (2024) recently developed Deep Tangle Crawl, a deep learning model specifically designed to resolve worm identities and maintain continuous trajectories during collisions and coils, thereby enabling the study of social behaviors and complex morphologies [24]. The aforementioned research primarily employs object detection algorithms to initially identify worms and subsequently track their movements. Object detection, a fundamental task in computer vision, focuses on identifying all objects of interest within an image or video while determining their respective categories and spatial coordinates. Recent advancements have led to significant progress in end-to-end object detection algorithms, which unify feature extraction, region proposal, and classification-regression processes within a single neural network architecture, enabling seamless training and inference. Notable examples of these advanced algorithms include the YOLO series (YOLOv1 [25] through YOLOv8 [26]) and SSD [27] architectures. Similarly, object tracking represents a fundamental task in computer vision, focusing on the localization and continuous monitoring of specific objects within video sequences. Before the advent of deep learning, conventional object tracking methodologies predominantly relied on manually engineered features, typically employing Kalman filters or particle filters for state estimation. However, these approaches exhibited limited generalization capabilities. The emergence of deep learning techniques has driven substantial advancements in the field of object tracking. Banerjee et al. (2023) implemented an integrated approach combining YOLOv5 [28] with StrongSORT for real-time multi-worm detection and tracking [23]. However, the system demonstrates significant limitations in tracking performance during target occlusion or disappearance events. Furthermore, StrongSORT’s dependency on high-quality detection outputs and computationally intensive appearance feature extraction and matching processes results in substantial computational overhead, consequently affecting real-time processing efficiency. Addressing the aforementioned challenges, we have developed a modified worm detection and tracking framework that integrates YOLOv8 with ByteTrack [29]. YOLOv8 achieves superior detection accuracy through architectural optimizations, refined training strategies, and advanced data augmentation techniques, demonstrating exceptional performance in small target detection tasks such as worm identification. The architecture maintains high precision while optimizing inference speed, rendering it particularly suitable for real-time applications. To further improve detection accuracy, we have enhanced YOLOv8 by incorporating an attention mechanism module [30,31] and optimizing the loss function. ByteTrack implements a dual-stage matching strategy, initially associating high-confidence detection boxes followed by low-confidence ones, thereby effectively reducing worm mis-detection and false-positive rates while enhancing tracking continuity. Compared to StrongSORT, ByteTrack demonstrates superior performance in occlusion handling, data association, computational efficiency, and implementation simplicity. Moreover, most research efforts typically conclude after successfully establishing deep learning-based worm detection and tracking systems, without further exploration of behavioral analysis. In some studies, only body bending angle measurements are performed and require extensive manual labeling. Or only computation of individual nematodes can be achieved and validation of complex behaviors such as reversed states is lacking [32–34]. However, this study presents an automated method for quantitative analysis of worm behavioral parameters, providing a comprehensive analytical platform for investigating behavioral dynamics. The proposed method enables automatic and rapid extraction of multiple behavioral parameters, including bending angle, roll frequency, and turning behavior, without manual intervention. Compared to traditional manual calculation methods, the automated method significantly improves the speed and efficiency of data processing and reduces the time and cost required for manual calculations. This innovative system serves as an important tool for understanding C. elegans behavioral dynamics and offers a replicable methodological framework for model organism research as a whole. The main contributions of this paper can be summarized in the following three points: [END] --- [1] Url: https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1013707 Published and (C) by PLOS One Content appears here under this condition or license: Creative Commons - Attribution BY 4.0. via Magical.Fish Gopher News Feeds: gopher://magical.fish/1/feeds/news/plosone/