Guisnet Aurélie, Hendricks Michael
Department of Biology, McGill University, Montreal, Quebec, Canada.
bioRxiv. 2025 Aug 19:2025.08.18.670800. doi: 10.1101/2025.08.18.670800.
Quantitative phenotyping of is essential across numerous fields, yet data extraction remains a significant analytical bottleneck. Traditional segmentation methods, typically reliant on pixel-intensity thresholding, are highly sensitive to variations in imaging conditions and often fail in the presence of noise, overlaps, or uneven illumination. These failures necessitate meticulous experimental setups, expensive hardware, or extensive manual curation, which reduces throughput and introduces bias. Here, we introduce TWARDIS (Tools for Worm Automated Recognition & Dynamic Imaging System), a modular, Python-based analysis suite that leverages large foundation vision models, specifically the Segment Anything Models (SAM and SAM2) and a fine-tuned vision transformer classifier, to overcome these limitations. We demonstrate the versatility and robustness of our AI compound system across diverse modalities. For static morphological analysis, TWARDIS successfully resolved overlapping worms in noisy images without human intervention, showing a 0.999 correlation with manual segmentation. In behavioral assays (swimming and crawling), the pipeline enabled high-definition postural analysis even in low-resolution, wide-field recordings where the worm occupied only ~0.25% of the field of view, accurately resolving complex postures without frame rejection. Finally, when applied to calcium imaging of semi-restricted animals, TWARDIS provided precise, frame-by-frame segmentation of neural compartments, reducing the artificial signal flattening common in traditional region-of-interest-based approaches and enabling the extraction of biologically accurate, absolute head positions. The system's hardware-scalable architecture and modular design ensure both current accessibility and future improvements without restructuring. By automating the most time-consuming aspects of image analysis, TWARDIS removes critical bottlenecks and tradeoffs in research, enabling researchers to focus on biological questions rather than technical image processing challenges.
Front Neurorobot. 2025-7-30
Cochrane Database Syst Rev. 2024-10-17
2025-1
Cochrane Database Syst Rev. 2025-3-25
2025-1
MicroPubl Biol. 2025-4-24
Geroscience. 2025-3-26
PeerJ Comput Sci. 2025-2-4
Nat Methods. 2025-3
Nat Commun. 2024-1-22
Commun Biol. 2023-7-19
PLoS Comput Biol. 2022-9