WormSwin: Instance segmentation of C. elegans using vision transformer
- PMID: 37419938
- PMCID: PMC10328995
- DOI: 10.1038/s41598-023-38213-7
WormSwin: Instance segmentation of C. elegans using vision transformer
Abstract
The possibility to extract motion of a single organism from video recordings at a large-scale provides means for the quantitative study of its behavior, both individual and collective. This task is particularly difficult for organisms that interact with one another, overlap, and occlude parts of their bodies in the recording. Here we propose WormSwin-an approach to extract single animal postures of Caenorhabditis elegans (C. elegans) from recordings of many organisms in a single microscope well. Based on transformer neural network architecture our method segments individual worms across a range of videos and images generated in different labs. Our solutions offers accuracy of 0.990 average precision ([Formula: see text]) and comparable results on the benchmark image dataset BBBC010. Finally, it allows to segment challenging overlapping postures of mating worms with an accuracy sufficient to track the organisms with a simple tracking heuristic. An accurate and efficient method for C. elegans segmentation opens up new opportunities for studying of its behaviors previously inaccessible due to the difficulty in the worm extraction from the video frames.
© 2023. The Author(s).
Conflict of interest statement
The authors declare no competing interests.
Figures





Similar articles
-
A high precision method of segmenting complex postures in Caenorhabditis elegans and deep phenotyping to analyze lifespan.Sci Rep. 2025 Mar 14;15(1):8870. doi: 10.1038/s41598-025-93533-0. Sci Rep. 2025. PMID: 40087519 Free PMC article.
-
SegElegans: Instance segmentation using dual convolutional recurrent neural network decoder in Caenorhabditis elegans microscopic images.Comput Biol Med. 2025 May;190:110012. doi: 10.1016/j.compbiomed.2025.110012. Epub 2025 Mar 21. Comput Biol Med. 2025. PMID: 40120179 Free PMC article.
-
Recording and Quantifying C. elegans Behavior.Methods Mol Biol. 2022;2468:357-373. doi: 10.1007/978-1-0716-2181-3_20. Methods Mol Biol. 2022. PMID: 35320576
-
Automated imaging of C. elegans behavior.Methods Mol Biol. 2006;351:241-51. doi: 10.1385/1-59745-151-7:241. Methods Mol Biol. 2006. PMID: 16988438 Review.
-
Computer vision for primate behavior analysis in the wild.Nat Methods. 2025 Jun;22(6):1154-1166. doi: 10.1038/s41592-025-02653-y. Epub 2025 Apr 10. Nat Methods. 2025. PMID: 40211003 Review.
Cited by
-
Track-A-Worm 2.0: A Software Suite for Quantifying Properties of C. elegans Locomotion, Bending, Sleep, and Action Potentials.bioRxiv [Preprint]. 2024 Sep 15:2024.09.12.612524. doi: 10.1101/2024.09.12.612524. bioRxiv. 2024. Update in: eNeuro. 2025 Aug 27;12(8):ENEURO.0224-25.2025. doi: 10.1523/ENEURO.0224-25.2025. PMID: 39314462 Free PMC article. Updated. Preprint.
-
vivoBodySeg: Machine learning-based analysis of C. elegans immobilized in vivoChip for automated developmental toxicity testing.Res Sq [Preprint]. 2024 Sep 4:rs.3.rs-4796642. doi: 10.21203/rs.3.rs-4796642/v1. Res Sq. 2024. Update in: Sci Rep. 2025 Jan 2;15(1):15. doi: 10.1038/s41598-024-84842-x. PMID: 39281859 Free PMC article. Updated. Preprint.
-
Improved particle filter algorithm combined with culture algorithm for collision Caenorhabditis elegans tracking.Sci Rep. 2025 Jan 25;15(1):3270. doi: 10.1038/s41598-025-87970-0. Sci Rep. 2025. PMID: 39863688 Free PMC article.
-
A neural network model enables worm tracking in challenging conditions and increases signal-to-noise ratio in phenotypic screens.PLoS Comput Biol. 2025 Aug 8;21(8):e1013345. doi: 10.1371/journal.pcbi.1013345. eCollection 2025 Aug. PLoS Comput Biol. 2025. PMID: 40779582 Free PMC article.
-
A high precision method of segmenting complex postures in Caenorhabditis elegans and deep phenotyping to analyze lifespan.Sci Rep. 2025 Mar 14;15(1):8870. doi: 10.1038/s41598-025-93533-0. Sci Rep. 2025. PMID: 40087519 Free PMC article.
References
Publication types
MeSH terms
LinkOut - more resources
Full Text Sources