Artificial Intelligence Pipeline Measures 7,960 Microscopic Roundworms, And Improves Drug Screening Accuracy
A new deep learning tool resolves complex body postures in roundworms to improve drug screening accuracy.
Researchers led by Zihao John Li at Johns Hopkins University developed an artificial intelligence tool named NemaSize to measure the body dimensions of 7,960 microscopic roundworms across complex shapes. The new pipeline overcomes traditional software limits in analyzing curled or overlapping animals, improving the accuracy of high-throughput drug and genetic screens.
Artificial Intelligence Overcomes Complex Worm Postures
Measuring the physical dimensions of microscopic roundworms is essential for tracking growth rates and responses to chemical treatments in biological research. However, animals often adopt convoluted shapes, such as tight coils or overlapping clumps, which cause conventional image analysis software to fail. Zihao John Li and colleagues designed a dual-network workflow that uses a coarse identification model to locate individual nematodes in full-well images, followed by a high-resolution segmentation model to capture fine boundary details. The team trained the system on an annotated dataset containing 7,960 animals distributed across 16 distinct posture categories, ensuring reliable detection regardless of background debris or poor optical contrast.
To convert pixel masks into accurate size data, the software classifies the geometric topology of each worm into categories such as lines, circles, or intersecting loops before constructing a central skeleton. By evaluating alternative pathways at junction nodes and smoothing the resulting paths with mathematical splines, the pipeline extracts reliable length and width measurements. Validation against manual measurements, published in PLOS Computational Biology, showed a mean percentage error below 4 percent for both body length and width across all tested posture classes. This topology-aware approach successfully handles challenging geometries that previously forced researchers to discard distorted or overlapping specimens from their datasets.
Benchmarking Against Conventional Measurement Software
The research team compared the performance of NemaSize against the widely used WormToolbox of CellProfiler using a validation set of 45 full-well images containing 639 animals. Both programs measured straight and isolated specimens with high fidelity, but CellProfiler struggled significantly when encountering bent, curly, or overlapping postures. Specifically, CellProfiler underestimated body length with median errors reaching roughly 50 percent for curly and self-overlapping roundworms, whereas NemaSize maintained median errors close to 1 percent for the same categories. Furthermore, NemaSize exhibited lower measurement variability even among straight animals, reducing standard deviation to 3 percent compared to 10 percent for the older software.
![Fig 1: Overview of image dataset for training of YOLO26-WF and WS. (A) Workflow of image acquisition and data annotation. Images of nematodes on 96-well plates were acquired using a motorized 2 × objective lens in the ImageXpress Nano system (Molecular Devices, San Jose, CA). Contours for individual animals (green solid lines) were manually annotated using the Roboflow software [52] (see Curation of annotated image dataset). Scale bars represent 1 mm (middle) and 0.2 mm (right). (B) Representative ROI images in the dataset showing diverse body postures and image quality used for training YOLO26-WF and WS. Scale bars represent 100 µm.](https://www.bioscience.com.pk/images/9fc4c4449f.avif)
Computational speed tests demonstrated substantial efficiency gains when processing large experimental datasets containing thousands of individual organisms. Running on a standard central processing unit, the NemaSize pipeline analyzed 1,000 animals in about 14 minutes, which is roughly four times faster than the competing software. When accelerated with a graphics processing unit, the processing time dropped to about 2 minutes for 1,000 animals. The authors also released a companion workflow to run containerized instances in parallel on high-performance computing clusters, supporting large-scale pharmacological screens.
Quantifying Drug Responses in Larval Development Assays
To demonstrate practical utility, the investigators applied the pipeline to a high-throughput larval development assay examining six wild strains of the roundworm Caenorhabditis briggsae exposed to twelve different concentrations of the anthelmintic drug ivermectin. Arrested first-stage larvae were grown in 96-well plates for 48 hours before being paralyzed with sodium azide for imaging. In control wells, animals grew to the fourth larval stage but predominantly adopted curly postures that prevented conventional model-fitting software from estimating correct body lengths. The pipeline successfully resolved these complex shapes to reveal accurate length distributions across all tested wild strains.

The improved size quantification enabled precise modeling of dose-dependent developmental inhibition induced by the neuromuscular drug. While the older software failed to capture sharp developmental transitions at intermediate doses between 0.46 and 0.93 nanomoles per liter, NemaSize generated smooth dose-response curves for every strain. These curves allowed the team to calculate key pharmacological parameters, including the effective concentrations producing half-maximal effects, which could not be reliably estimated from previous measurements. Qualitative tests on external datasets further suggested that the segmentation models can be adapted to other imaging platforms with different optical setups.
Limitations and Broader Biological Applications
Despite strong performance across diverse tests, the current pipeline encounters specific challenges when mutually overlapping animals align in nearly collinear arrangements, occasionally producing ambiguous masks that require quality filters. Additionally, the software relies on two-dimensional projections rather than true three-dimensional structural reconstructions, meaning stacked coils can occasionally introduce minor geometric inaccuracies. The authors note that while the pretrained models generalize well to unseen datasets, custom imaging platforms with substantial optical variations may require transfer learning using the provided network weights as a starting point.
Beyond nematode biology, the multiscale learning and topological skeletonization strategy offers a general framework for analyzing other elongated biological structures. Similar computational challenges arise when quantifying branching dendritic arbors in neuronal networks, vascular blood vessel configurations, or complex plant root systems. By combining object detection with topology-aware skeleton extraction, the approach provides a scalable solution for researchers studying filamentous networks and elongated morphologies across diverse scientific disciplines.
The research was published in PLOS Computational Biology on November 30, 2026.
This article has been fact checked for accuracy, with information verified against reputable sources. Learn more about us and our editorial process.
Last reviewed on .
Article history
- Latest version
Reference(s)
- Li, Zihao John., et al. “Multiscale learning and topological analysis across complex postures enable robust nematode size quantification in pharmacological assays.” PLOS Computational Biology, vol. 22, no. 11, November 30, 2026, pp. e1014998 Public Library of Science (PLoS), doi: 10.1371/journal.pcbi.1014998. <https://doi.org/10.1371/journal.pcbi.1014998>.
Cite this page:
- Posted by Priya Sharma