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.
在众多领域中,对[未提及具体对象]进行定量表型分析至关重要,但数据提取仍然是一个重大的分析瓶颈。传统的分割方法通常依赖于像素强度阈值化,对成像条件的变化高度敏感,并且在存在噪声、重叠或光照不均匀的情况下经常失败。这些失败需要精心的实验设置、昂贵的硬件或大量的人工整理,这降低了通量并引入了偏差。在这里,我们引入了TWARDIS(线虫自动识别和动态成像系统工具),这是一个基于Python的模块化分析套件,它利用大型基础视觉模型,特别是分割一切模型(SAM和SAM2)以及一个微调的视觉Transformer分类器,来克服这些限制。我们展示了我们的人工智能复合系统在不同模态下的通用性和鲁棒性。对于静态形态分析,TWARDIS在没有人工干预的情况下成功地解决了噪声图像中重叠的线虫问题,与手动分割的相关性为0.999。在行为分析(游泳和爬行)中,该管道即使在低分辨率、宽视野记录中也能进行高清姿势分析,在线虫仅占据约0.25%视野的情况下,准确地解析复杂姿势而无需丢弃帧。最后,当应用于半受限动物的钙成像时,TWARDIS提供了神经隔室的精确逐帧分割,减少了传统基于感兴趣区域的方法中常见的人工信号扁平化,并能够提取生物学上准确的绝对头部位置。该系统的硬件可扩展架构和模块化设计确保了当前的可访问性和未来无需重组的改进。通过自动化图像分析中最耗时的方面,TWARDIS消除了[未提及具体对象]研究中的关键瓶颈和权衡,使研究人员能够专注于生物学问题而不是技术图像处理挑战。