Preprint
Article

This version is not peer-reviewed.

PhytoNemaCount: An Automated Nematode Egg Counting System Based on Computer Vision and a Low-Cost 3D-Printed Microscope Adapter

Submitted:

18 June 2026

Posted:

22 June 2026

You are already at the latest version

Abstract
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.
Keywords: 
;  ;  ;  ;  ;  ;  ;  ;  

1. Introduction

The okra crop (Abelmoschus esculentus L.) is a strategic pillar for family farming and traditional communities in the Brazilian semiarid region, ensuring income and food security for thousands of small producers. However, its productivity is strongly threatened by root-knot nematodes (Meloidogyne spp.), obligate root parasites that induce the formation of galls in the root system, compromising water and nutrient uptake, reducing fruit quality, and potentially causing severe yield losses [9].
The conventional phytosanitary diagnosis of nematode infestation requires a laborious laboratory routine. The protocol involves the extraction of eggs from root galls following the method proposed by Bonetti and Ferraz [4], followed by successive sieving and washing steps. The population estimate is then obtained by direct counting under an optical microscope fitted with a Peters counting chamber, a procedure that demands sustained concentration from the analyst and is highly susceptible to inter-operator variability.
This manual workflow presents three critical limiting factors:
1.
Subjectivity: independent operators tend to produce divergent counts for the same sample—a limitation documented in large-scale nematode counting studies [2,11].
2.
Visual fatigue: prolonged microscopy sessions increase the error margin over the course of an analysis session.
3.
Operational unfeasibility: the process is extremely slow when large volumes of field samples must be processed rapidly, which is precisely the scenario required by modern phytosanitary management programs.
In parallel, the democratization of Agriculture 4.0 tools—particularly computer vision and deep learning—creates an opportunity to automate this diagnostic step at low cost [3,12]. Nevertheless, many teaching and research laboratories in Brazil and other developing countries lack microscopes with integrated high-resolution digital cameras. Manual smartphone positioning over the microscope eyepiece results in vibrations, angle variations, and inconsistent illumination, producing geometrically unstandardized images unsuitable for neural network training.
This work presents PhytoNemaCount, a system that addresses both bottlenecks simultaneously. On the hardware side, a low-cost, adjustable smartphone-to-microscope adapter was designed and fabricated via Fused Deposition Modeling (FDM) in Polylactic Acid (PLA), equipped with an M5 threaded-rod fine-adjustment mechanism for X/Y alignment. On the software side, a YOLOv8 Nano model was trained to automatically detect and count Meloidogyne spp. eggs, with results made available through two complementary interfaces: a Streamlit web application for batch image processing and an interactive Tkinter/DroidCam module for real-time analysis.
The remainder of this article is organized as follows: Section 2 discusses related works; Section 3 details the materials and methods; Section 4 presents the results and discussion; Section 5 presents the conclusions and future directions.

3. Materials and Methods

3.1. Study Location and Biological Material

The experiments were conducted at the Plant Breeding Laboratory (Laboratório de Melhoramento Vegetal—LMV) of the Instituto Federal de Alagoas (IFAL), Campus Piranhas, Brazil. As the laboratory did not possess a microscope with an integrated digital camera, the development of a standardized image acquisition solution was a prerequisite for the project.
For the initial validation of the system, guava (Psidium guajava) seedlings naturally infected with Meloidogyne spp. were collected in the municipality of São José da Tapera, Alagoas (Figure 2). This pre-existing biological material was used to obtain the first egg suspensions and to train the initial model version. In parallel, 128 okra (Abelmoschus esculentus cv. Santa Cruz 47) seedlings were inoculated in polypropylene trays (approximately 5 mL of egg suspension per cell) for the construction of a future, crop-specific dataset. The use of guava as a surrogate host is a recognized practice in Meloidogyne research, as the species produces egg suspensions morphologically indistinguishable from those extracted from the target crop under standard optical magnification [9].

3.2. Egg Extraction Protocol

Egg extraction followed the protocol of Bonetti and Ferraz [4]. Root segments of approximately 1 cm were cut and blended for 20 seconds in a sodium hypochlorite solution. The resulting material was passed through a 200-mesh sieve positioned over a 400-mesh sieve, yielding a relatively clean egg suspension with low background noise (Figure 1).

3.3. Design and Fabrication of the 3D-Printed Microscope Adapter

An adjustable mechanical support for coupling smartphones to conventional optical microscope eyepieces was designed and fabricated via FDM. The device combines PLA polymeric parts with a metallic fine-adjustment system based on an M5 threaded rod and nut (Figure 3).
Geometric modeling was performed in Blender 3.6; slicing was configured in Ultimaker Cura 5.4; parts were fabricated on a Creality Ender 2 Pro printer at the IFMaker space of IFAL Campus Piranhas. Design files are available upon request from the corresponding author. Optimized additive manufacturing parameters are summarized in Table 1.
The X/Y alignment mechanism allows precise centring of the smartphone camera over the microscope optical axis. The smartphone autofocus is disabled, and focusing is performed exclusively through the microscope macrometric and micrometric controls, ensuring sharpness and a consistent viewing angle across all captures—a critical requirement for generating a standardized neural network training dataset.

3.4. Acquisition Stability Assessment

To quantify the mechanical stability advantage of the adapter over free-hand smartphone placement, a controlled experiment was conducted using ten consecutive captures of the same microscope field of view under two conditions: (i) smartphone coupled via the 3D-printed adapter, and (ii) smartphone held manually by the same operator. A fixed calibration slide with visible reference marks was used. The centroid of three reference marks was detected via template matching in OpenCV 4.9, and the mean inter-frame Euclidean displacement (pixels) was computed across the ten captures (Table 2).
The adapter reduced spatial drift by approximately a factor of 10 relative to the free-hand condition ( p < 0.001 , Mann–Whitney U test), confirming its effectiveness in providing the geometric standardization required for consistent neural network inference.

3.5. Image Acquisition and Dataset Construction

The validated adapter was coupled to the LMV optical microscope, enabling the stable acquisition of 100 high-resolution images via smartphone camera (960×1280 px; Figure 4). Images were acquired at ×100 magnification with the condenser aperture adjusted for Köhler-like illumination conditions.
Each of the 100 images was individually annotated on the MakeSense.ai platform, where every Meloidogyne spp. egg was delimited with a bounding box under the single class ovo_nematoide (Figure 5). The annotation was performed by a single trained operator to ensure intra-annotator consistency; a second expert reviewed 20% of the annotations for quality control, achieving an inter-annotator agreement (Cohen’s κ ) of 0.91. Annotations were exported in YOLO format.

3.5.1. Data Augmentation

To increase dataset diversity and reduce overfitting risk, a data augmentation pipeline was applied during training using built-in Ultralytics augmentation parameters [14]:
  • Horizontal and vertical flips (probability 0.5);
  • Random rotation up to ±15°;
  • HSV jitter (hue: ±0.015; saturation: ±0.7; value: ±0.4) to simulate variable microscope illumination conditions;
  • Mosaic augmentation (probability 0.5);
  • Scale jitter (±50% of image size).
These transformations expanded the effective training set to approximately 350 augmented instances per epoch, substantially broadening the variance in object appearance and background conditions seen by the model.

3.6. Model Architecture and Training Configuration

The detection model was based on the YOLOv8 Nano architecture (YOLOv8n) [14], selected for its favorable balance between accuracy and inference speed on resource-constrained hardware. YOLOv8n contains approximately 3.2 million parameters and achieves real-time inference on CPU-only devices—a critical advantage for laboratory adoption without GPU infrastructure.
The dataset was partitioned into training (70%), validation (15%), and test (15%) subsets using stratified random sampling to preserve egg-density distribution across splits (Table 3).
Training was performed locally on a computer equipped with an Intel Core i3 (12th generation) processor, without GPU acceleration, for 50 epochs with a batch size of 8 and an initial learning rate of 0.01 with cosine annealing decay. The Adam optimizer was used. Early stopping (patience = 15 epochs) was configured but not triggered, indicating stable convergence throughout training.

3.7. Comparison with Manual Counting (Pilot Study)

To assess the practical benefit of PhytoNemaCount over the conventional method, a pilot experiment was conducted using a hold-out set of 20 images not included in model training, validation, or testing. Three independent laboratory operators with prior experience in nematode counting performed manual on-screen egg counts. Their results were compared with the model’s detections and with a consensus ground-truth count established by two annotators working in agreement.
The coefficient of variation (CV = SD/mean × 100) was computed for each counting method across the 20-image set to quantify inter-method reproducibility.

3.8. Software Interfaces

Two complementary interfaces were developed for end-user interaction with the trained model:
  • Web Module (Streamlit) [13]: A lightweight, browser-based interface for batch image processing. The user uploads images captured from the same preparation slide; the system processes the entire batch and returns the total egg count, per-image detection results, a confidence-based automatic incidence report (laudo), exportable CSV/JSON files, and a visual gallery with predicted bounding boxes. Incidence thresholds (low, moderate, high) were defined based on egg density per field of view, following diagnostic criteria used in Brazilian phytosanitary practice [9].
  • Interactive Module (Tkinter + DroidCam): A desktop graphical interface implemented with the Python Tkinter library that streams the smartphone camera feed via the DroidCam application, enabling real-time egg detection directly from the microscope feed at approximately 10 fps on the test hardware.

4. Results and Discussion

4.1. Adapter Acquisition Stability

As reported in Table 2, the 3D-printed adapter reduced mean inter-frame centroid displacement from 31.4 ± 9.2 px (free-hand) to 3.1 ± 0.8 px (adapter), a tenfold reduction in spatial drift. All 100 dataset images were captured at a consistent resolution of 960×1280 px with no images rejected for blur or misalignment, confirming the technical viability of the adapter as a standardized digital capture station for neural network dataset construction.

4.2. Model Detection Performance

The YOLOv8n model, trained for 50 epochs on the augmented dataset, achieved the performance metrics on the held-out test set summarized in Table 4. The mAP50-95 metric, which measures mean average precision across IoU thresholds from 0.50 to 0.95, reached 0.714, indicating that the model produces well-centred, adequately sized bounding boxes for the majority of detected eggs.
The progressive, monotonic reduction of the loss functions (box_loss, cls_loss, and dfl_loss) on both the training and validation sets (Figure 6) indicates consistent convergence without significant overfitting: the gap between training and validation loss remained below 0.05 units throughout all 50 epochs. Precision and recall curves stabilized after epoch 35, while the mAP50 curve approaches 1.0 by epoch 50.
The high precision (0.988) indicates that the vast majority of predicted bounding boxes correspond to actual nematode eggs. The lower recall (0.875) reflects the model’s main failure mode: eggs partially obscured by debris fragments or air bubbles—whose elliptical contour partially mimics the egg silhouette—are occasionally missed. This behaviour is consistent with findings reported by Akintayo et al. [2] and Saikai et al. [11], who reported analogous recall limitations when organic debris dominated the background.

4.3. Comparison with Manual Counting

Table 5 summarizes the pilot reproducibility comparison between the automated system and three independent human operators across the 20-image hold-out set.
The automated system achieved the closest mean count to the expert consensus (38.4 vs. 39.2) and the lowest CV (4.2%), demonstrating superior reproducibility relative to all individual human operators. The remaining ≈2% undercount bias is attributable to the recall gap caused by partially occluded eggs. These results are consistent with analogous findings reported by Akintayo et al. [2] for soybean cyst nematode egg counting, where automated methods similarly outperformed manual approaches in reproducibility.

4.4. Application Prototypes

A functional prototype of the Streamlit web application was evaluated on a batch of 76 images obtained during the guava root extraction step but excluded from model training, validation, and testing (Figure 7). The dashboard reported a total of 121 detected eggs across the 76 images (average 1.6 eggs/image), a detection rate of 93.4% (71 out of 76 images with at least one detection), and a mean confidence of 72.4%. Based on the computed egg density, the system automatically classified the sample under the “low incidence” (baixa incidência) category, recommending monitoring rather than urgent phytosanitary intervention.
In parallel, the Tkinter/DroidCam interactive module was tested with the same egg suspension, enabling real-time detection visualization directly from the microscope feed (Figure 8). Frame rates of approximately 10 fps were achieved on the Intel i3 test hardware without GPU acceleration.

4.5. Discussion

The results obtained in this initial validation phase demonstrate the technical feasibility of PhytoNemaCount for automated Meloidogyne spp. egg detection using consumer-grade hardware. The trained YOLOv8n model achieved a precision of 0.988 and a mAP50 of 0.967, values consistent with the upper range reported for similar tasks in the literature [2,5]. The pilot reproducibility study confirmed that the system offers substantially lower counting variability (CV = 4.2%) compared with manual counting by trained operators (mean CV = 18.7%), directly addressing the subjectivity limitation described in the introduction.
A primary limitation of the current work is the single-host-species scope of the training data: all 100 images were obtained from guava root material used as a proxy for the target okra crop. While Meloidogyne spp. egg morphology is consistent across host species under standard optical magnification [9], domain shift effects may reduce recall when the model is deployed on okra root material. This motivates the ongoing dataset expansion with the 128 inoculated okra seedlings.
A second limitation is the single-class annotation scheme (ovo_nematoide). Debris fragments, air bubbles, and juvenile nematodes were not explicitly labelled as negative classes, leaving the model without a learned representation of common confounders. Introducing a debris class in future annotation cycles is expected to improve recall without compromising precision, following the approach suggested by Saikai et al. [11].
The cost structure of the system is a notable strength for deployment in under-resourced laboratories: PLA filament and M5 hardware together cost less than BRL 5.00 per adapter unit, and the YOLOv8n model performs inference on a standard laboratory PC without GPU. Total diagnostic throughput in Streamlit batch mode (76 images processed in under 90 seconds on the test hardware) represents a substantial acceleration over the manual method, which typically requires 2–4 minutes per image in the Peters chamber.

5. Conclusions

This work presented PhytoNemaCount, a system integrating a low-cost, 3D-printed and M5-adjustable smartphone-to-microscope adapter with a YOLOv8 Nano-based computer vision pipeline for the automated counting of Meloidogyne spp. eggs. The hardware solution reduced spatial acquisition drift tenfold relative to free-hand capture, enabling the construction of a standardized 100-image dataset at a hardware cost below BRL 5.00 per adapter. The trained YOLOv8n model achieved a precision of 98.8% and a mAP50 of 96.7% on the held-out test set, and demonstrated a 4.5-fold reduction in counting variability (CV = 4.2%) compared with the mean variability of three independent human operators (CV = 18.7%). Both developed interfaces—a Streamlit web application for batch processing and a Tkinter/DroidCam module for real-time analysis—constitute functional prototypes ready for laboratory support use.
Future work will focus on: (i) expanding the image dataset with okra (A. esculentus cv. Santa Cruz 47) root material from the 128 inoculated seedlings, targeting at least 400 annotated images from both host species; (ii) introducing a debris annotation class to explicitly model common confounders and improve recall; (iii) evaluating cloud-based training (Google Colab) for larger datasets and comparing YOLOv8n performance against YOLOv8s and YOLOv11n baselines; (iv) conducting a formal inter-operator reproducibility study with a larger human panel and a wider range of sample densities; and (v) pursuing intellectual property protection, including INPI software registration for the Streamlit and Tkinter modules and registration of the 3D-printed adapter as an Industrial Design or Utility Model.

Author Contributions

Conceptualization, L.F.N.N.; methodology, L.F.N.N., K.D.S.C. and R.F.M.S.; software, J.E.P.M.; validation, J.E.P.M. and L.F.N.N.; formal analysis, L.F.N.N.; investigation, J.E.P.M.; resources, K.D.S.C. and R.F.M.S.; data curation, J.E.P.M.; writing—original draft preparation, L.F.N.N.; writing—review and editing, K.D.S.C., R.F.M.S. and J.E.P.M.; visualization, J.E.P.M.; supervision, L.F.N.N.; project administration, L.F.N.N. All authors have read and agreed to the published version of the manuscript.

Funding

This research was conducted under the Institutional Program for Scientific Initiation and Technological Development Scholarships (PIBIC/PIBITI), with internal funding from IFAL Campus Piranhas. The APC was not funded; the authors request a discretionary waiver from the Applied Sciences editorial office based on the absence of external research funding.

Institutional Review Board Statement

Not applicable.

Data Availability Statement

The image dataset, annotation files (YOLO format), and model weights generated during this study are not publicly available at this stage due to ongoing data collection and intellectual property evaluation under INPI registration proceedings. Data may be made available by the corresponding author upon reasonable request.

Acknowledgments

The authors thank the Plant Breeding Laboratory (LMV) and the IFMaker space, both at IFAL Campus Piranhas, for providing infrastructure and technical support for the experimental activities.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
CNN Convolutional Neural Network
CV Coefficient of Variation
FDM Fused Deposition Modeling
mAP Mean Average Precision
PLA Polylactic Acid
RKN Root-Knot Nematode
YOLO You Only Look Once

References

  1. Nematode Detection and Classification Using Machine Learning Techniques: A Review. Agronomy 2025, 15, 2481. [CrossRef]
  2. Akintayo, A.; Tylka, G.L.; Singh, A.K.; Ganapathysubramanian, B.; Singh, A.; Sarkar, S. A deep learning framework to discern and count microscopic nematode eggs. Sci. Rep. 2018, 8, 9145. [Google Scholar] [CrossRef] [PubMed]
  3. Barbedo, J.G.A. Digital image processing techniques for detecting, quantifying and classifying plant diseases. SpringerPlus 2013, 2, 660. [Google Scholar] [CrossRef] [PubMed]
  4. Bonetti, J.I.S.; Ferraz, S. Modificações do método de Hussey e Barker para extração de ovos de Meloidogyne exigua de raízes de cafeeiro. Fitopatol. Bras. 1981, 6, 553. [Google Scholar]
  5. Deep Learning-Based Decision Support Tool for Plant-Parasitic Nematode Management. J. Imaging 2023, 9, 240. [CrossRef] [PubMed]
  6. Fortunato, H.F.M.; et al. Artificial intelligence as an ally to assess and manage golden mussel (Limnoperna fortunei) bioinvasion. Aquat. Sci. 2025, 87, 53. [Google Scholar] [CrossRef]
  7. Isaias, P.H. Técnicas de visão computacional para contagem de ovos de nematoides-das-galhas (Meloidogyne spp.). Undergraduate thesis, Instituto Federal Goiano, Campus Morrinhos, Brazil, 2021. [Google Scholar]
  8. Lambert, J.C.; Moulin, M.M.; Souza, A.F. Método de detecção de nematoides das galhas em tomateiro; Ifes: Vitória, Brazil, 2023; Available online: https://repositorio.ifes.edu.br (accessed on 15 June 2026).
  9. Moens, M.; Perry, R.N.; Starr, J.L. Meloidogyne species: a diverse group of novel and important plant parasites. In Root-knot Nematodes; Perry, R.N., Moens, M., Starr, J.L., Eds.; CAB International: Wallingford, UK, 2009; pp. 1–17. [Google Scholar] [CrossRef]
  10. Pun, T.B.; Neupane, A.; Koech, R.; Owen, K.J. Detection and quantification of root-knot nematode (Meloidogyne spp.) eggs from tomato plants using image analysis. IEEE Access 2022, 10, 123190–123204. [Google Scholar] [CrossRef]
  11. Saikai, K.K.; Bresilla, T.; Kool, J.; de Ruijter, N.C.A.; van Schaik, C.; Teklu, M.G. Counting nematodes made easy: leveraging AI-powered automation for enhanced efficiency and precision. Front. Plant Sci. 2024, 15, 1349209. [Google Scholar] [CrossRef] [PubMed]
  12. Singh, N.; et al. Development of a deep learning-assisted mobile application for the identification of nematodes through microscopic images. Mod. Agric. 2024, 2, e70000. [Google Scholar] [CrossRef]
  13. Streamlit. Streamlit Documentation; Streamlit Inc.: San Francisco, CA, USA, 2025; Available online: https://docs.streamlit.io/ (accessed on 15 June 2026).
  14. Ultralytics. YOLOv8 Documentation; Ultralytics Inc.: Los Angeles, CA, USA, 2025; Available online: https://docs.ultralytics.com/ (accessed on 15 June 2026).
Figure 1. Egg extraction and isolation procedure following the Bonetti and Ferraz [4] method: root maceration, successive sieving, and collection of the egg suspension.
Figure 1. Egg extraction and isolation procedure following the Bonetti and Ferraz [4] method: root maceration, successive sieving, and collection of the egg suspension.
Preprints 219223 g001
Figure 2. Guava seedlings (Psidium guajava) naturally infected with Meloidogyne spp., collected in São José da Tapera, Alagoas, and used as the biological source material for the initial dataset.
Figure 2. Guava seedlings (Psidium guajava) naturally infected with Meloidogyne spp., collected in São José da Tapera, Alagoas, and used as the biological source material for the initial dataset.
Preprints 219223 g002
Figure 3. 3D-printed smartphone-microscope adapter: (a) geometric modeling in Blender; (b) slicing in Ultimaker Cura; (c) fabrication on the Creality Ender 2 Pro; (d) assembled device mounted on the microscope eyepiece.
Figure 3. 3D-printed smartphone-microscope adapter: (a) geometric modeling in Blender; (b) slicing in Ultimaker Cura; (c) fabrication on the Creality Ender 2 Pro; (d) assembled device mounted on the microscope eyepiece.
Preprints 219223 g003
Figure 4. Standardized image acquisition setup: smartphone coupled to the optical microscope via the 3D-printed adapter.
Figure 4. Standardized image acquisition setup: smartphone coupled to the optical microscope via the 3D-printed adapter.
Preprints 219223 g004
Figure 5. Manual annotation of Meloidogyne spp. egg instances on the MakeSense.ai platform, with bounding boxes of class ovo_nematoide.
Figure 5. Manual annotation of Meloidogyne spp. egg instances on the MakeSense.ai platform, with bounding boxes of class ovo_nematoide.
Preprints 219223 g005
Figure 6. Training and validation loss curves (box_loss, cls_loss, dfl_loss) and detection metrics (precision, recall, mAP50, mAP50-95) over 50 epochs for the YOLOv8n model.
Figure 6. Training and validation loss curves (box_loss, cls_loss, dfl_loss) and detection metrics (precision, recall, mAP50, mAP50-95) over 50 epochs for the YOLOv8n model.
Preprints 219223 g006
Figure 7. PhytoNemaCount Streamlit prototype: (a) main screen; (b) batch image upload; (c) batch dashboard with aggregated metrics and automatic incidence report; (d) individual image detail view with predicted bounding boxes.
Figure 7. PhytoNemaCount Streamlit prototype: (a) main screen; (b) batch image upload; (c) batch dashboard with aggregated metrics and automatic incidence report; (d) individual image detail view with predicted bounding boxes.
Preprints 219223 g007
Figure 8. Interactive Tkinter/DroidCam module in operation: detections are overlaid in real time on the smartphone microscope feed displayed on the connected laptop.
Figure 8. Interactive Tkinter/DroidCam module in operation: detections are overlaid in real time on the smartphone microscope feed displayed on the connected laptop.
Preprints 219223 g008
Table 1. Additive manufacturing parameters for the smartphone-microscope adapter.
Table 1. Additive manufacturing parameters for the smartphone-microscope adapter.
Manufacturing Parameter Technical Specification
Material (Filament) Polylactic Acid (PLA)
Nozzle Temperature 200 °C
Bed Temperature 50 °C
Layer Height 0.2 mm
Wall/Top/Bottom Thickness 0.8 mm
Infill Density 20%
Infill Pattern Triangular grid
Print Speed 50 mm/s
Support Structures Tree-type, overhangs >45°
Estimated Print Time 11 h 30 min
Estimated Filament Cost <BRL 5.00
Adjustment Hardware M5 threaded rod and nut
Table 2. Inter-frame centroid displacement (mean ± SD over ten consecutive captures of the same field of view).
Table 2. Inter-frame centroid displacement (mean ± SD over ten consecutive captures of the same field of view).
Acquisition Mode Mean Displacement (px) SD (px)
3D-printed adapter 3.1 0.8
Free-hand (manual) 31.4 9.2
Table 3. Dataset split and annotated instance counts per subset.
Table 3. Dataset split and annotated instance counts per subset.
Subset Images Annotated Eggs % of Total
Training 70 782 70%
Validation 15 163 15%
Test 15 175 15%
Total 100 1120 100%
Table 4. Detection performance of the YOLOv8n model on the held-out test set (15 images, 175 annotated eggs).
Table 4. Detection performance of the YOLOv8n model on the held-out test set (15 images, 175 annotated eggs).
Metric Value
Precision (P) 0.988
Recall (R) 0.875
F1-Score 0.928
mAP50 0.967
mAP50-95 0.714
Table 5. Reproducibility comparison between PhytoNemaCount and manual counting by three independent operators. Ground-truth established by consensus of two expert annotators (20-image hold-out set).
Table 5. Reproducibility comparison between PhytoNemaCount and manual counting by three independent operators. Ground-truth established by consensus of two expert annotators (20-image hold-out set).
Method Mean Count SD CV (%)
PhytoNemaCount (YOLOv8n) 38.4 1.6 4.2
Human Operator 1 35.1 5.0 14.3
Human Operator 2 40.7 8.2 20.1
Human Operator 3 41.9 9.1 21.7
Ground-truth (consensus) 39.2
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

© 2026 MDPI (Basel, Switzerland) unless otherwise stated

Accessibility

Disclaimer

Terms of Use

Privacy Policy

Privacy Settings