PhytoNemaCount: An Automated Nematode Egg Counting System Based on Computer Vision and a Low-Cost 3D-Printed Microscope Adapter
- Publicada
- Servidor
- Preprints.org
- DOI
- 10.20944/preprints202606.1479.v1
The okra crop (Abelmoschus esculentus) plays a strategic role in family farming and traditional communities of the Brazilian semiarid region, but its productivity is strongly limited by root-knot nematodes (Meloidogyne spp.). The conventional phytosanitary diagnosis relies on manual egg counting under a Peters chamber, a slow, exhausting, and subjective process prone to inter-operator variability. This work presents PhytoNemaCount, a system that combines a low-cost, 3D-printed adjustable smartphone-to-microscope adapter with a Convolutional Neural Network (YOLOv8 Nano) to automate the detection and counting of Meloidogyne spp. eggs in microscopic images. The adapter, fabricated in Polylactic Acid (PLA) with an M5 threaded-rod fine-adjustment mechanism, enabled the standardized acquisition of 100 high-resolution images (960×1280 px) from guava (Psidium guajava) root samples naturally infected with Meloidogyne spp., collected in São José da Tapera, Alagoas, Brazil. A controlled stability experiment demonstrated that the adapter reduced inter-frame centroid displacement tenfold relative to free-hand smartphone capture (3.1 ± 0.8 px vs. 31.4 ± 9.2 px). Data augmentation expanded the effective training set to approximately 350 instances per epoch. Images were annotated on the MakeSense.ai platform; the YOLOv8n model was trained for 50 epochs under a 70/15/15 (train/val/test) split, achieving a precision of 0.988, a recall of 0.875, an F1-score of 0.928, and a mAP50 of 0.967 on the held-out test set. A pilot reproducibility study showed that the automated system achieved a coefficient of variation (CV) of 4.2% across repeated counts of the same slide set, compared with a mean CV of 18.7% observed among three independent human operators, confirming substantially superior counting reproducibility. Two user interfaces were implemented: a Streamlit web application for batch processing of static images and an interactive Tkinter/DroidCam module for real-time detection directly from the microscope. These results confirm the technical feasibility of converting conventional optical microscopes into low-cost standardized digital capture stations for computer-vision-based phytosanitary diagnostics, in alignment with Agriculture 4.0 principles.