Skip to content
developing-and-evaluating-automated-deep-learning-and-human-in-the-loop-vision–language-systems-for-microplastic-characterization-–-scientific-reports

Developing and evaluating automated deep learning and human-in-the-loop vision–language systems for microplastic characterization – Scientific Reports

Introduction

Microplastics (MPs), defined as plastic particles smaller than 5 mm in diameter, have become pervasive contaminants across marine, freshwater, terrestrial, and atmospheric environments1,2,3. Their persistence and capacity for ingestion by diverse organisms raise concerns regarding bioaccumulation, ecotoxicity, and ecosystem disruption4,5’6. Consequently, the accurate and efficient characterization of MPs—including morphological attributes such as shape, color, and surface texture—is critical for environmental risk assessment and pollution source tracking1,7.

Conventional MP characterization typically begins with visual inspection under optical microscopy to assess physical attributes and is confirmed by spectroscopic techniques such as Fourier-transform infrared (FTIR) or Raman spectroscopy for polymer-type identification8,9. It is important to note that the present study addresses only the morphological characterization stage (shape/type, color, surface texture) and does not attempt chemical polymer identification, which requires spectroscopic data beyond the scope of optical image analysis. Although microscopy-based morphological assessment is labor-intensive and operator-dependent, it remains the first and often highest-throughput step in MP analysis pipelines, creating a clear bottleneck in large-scale environmental monitoring1,10,11.

Recent advances in artificial intelligence (AI), particularly deep learning (DL), have significantly accelerated the automation of microscopy-based microplastic analysis. Convolutional neural network (CNN)-based frameworks, including U-Net, Faster R-CNN, and YOLO architectures, have demonstrated strong performance in MP detection and morphological classification tasks12,9,13,14. More recently, lightweight and attention-enhanced architectures have been developed to improve fine-grained visual discrimination while maintaining computational efficiency. For instance, Vision Transformer–MobileNet hybrids incorporating texture-aware attention mechanisms have shown effectiveness in resource-constrained classification settings15, while multi-scale attention and feature refinement strategies have further improved visual representation quality16. Collectively, these studies highlight the growing importance of efficient and interpretable AI systems for morphology-based environmental image analysis.

Despite these advancements, limited attention has been given to evaluating how specialized domain-trained deep learning models compare operationally with emerging Vision–Language Models (VLMs) in practical environmental microscopy workflows. In particular, the trade-offs among predictive accuracy, interpretability, computational accessibility, and expert-guided refinement remain insufficiently explored in microplastic characterization tasks. EfficientNet-B0 was therefore selected as the deep learning backbone due to its balanced performance, computational efficiency, implementation stability, and suitability for deployment in laboratory-scale and web-based inference environments. While more recent lightweight and attention-based architectures (e.g., ViT–MobileNet hybrids) may offer incremental texture-discrimination advantages, EfficientNet-B0 was prioritized for its robust transfer learning behavior on small datasets and wide framework reproducibility.

In this study, two artificial intelligence paradigms are systematically compared as a comparative exploratory benchmark for optical microscope-based microplastic morphological characterization using an identical laboratory image dataset of 700 annotated images. The first approach employs a domain-specific multi-task EfficientNet-B0 model trained to simultaneously classify MP shape/type, color, and surface texture. The second approach utilizes the Claude Vision API within a human-in-the-loop (HITL) workflow to enhance interpretability and refine predictions for visually ambiguous particles. Both systems are assessed under harmonised conditions using standard performance metrics (accuracy, precision, recall, and F1-score) as well as per-class analyses and confusion matrices, to evaluate predictive performance and operational applicability. The trained deep learning model is additionally deployed as a publicly accessible web-based application via Hugging Face Spaces, demonstrating its potential for real-world laboratory integration.

Materials and methods

Microplastic image dataset and curation

A dedicated dataset of optical microscope images of microplastic particles was assembled following standardized laboratory protocols. MP particles were extracted from surface seawater samples collected from coastal marine environments, physically isolated, and placed on gridded filter paper (pore size: 0.45 μm) for imaging. Images were captured using an optical microscope (Olympus BX-51) at 40× magnification under consistent, controlled transmitted-light illumination conditions to minimize intra-dataset imaging variability. Each image field contained a single isolated particle (one target particle per annotated image) to eliminate multi-particle segmentation ambiguity. Images were captured at a standardized resolution of 2048 × 1536 pixels.

Dataet size and composition

A total of 700 images were collected. Each image was manually annotated for three morphological attributes simultaneously (Table 1):

Shape/Type — five classes: fiber, fragment, film, pellet, foam. 11, 17.

Color — ten classes: black, blue, brown, green, orange, pink, red, transparent, white, yellow.

Surface Texture — two classes: smooth and rough.

Table 1 Class-wise sample counts in the complete dataset (N = 700).

Full size table

The dataset was partitioned using stratified random sampling into a training set (70%, n = 490), a validation set (15%, n = 105), and an independent test set (15%, n = 105). Stratification was applied across shape class labels to preserve relative class proportions across all splits. The test set was fully withheld during model development and hyperparameter tuning to ensure unbiased evaluation.

Annotation workflow and quality assurance

All images were annotated by two trained domain experts in marine science, each with a minimum of three years of experience in microplastic characterization. Annotations were performed independently by each annotator following a standardized annotation protocol supported by visual exemplars defining each morphological class. In cases of disagreement, labels were resolved through consensus discussion; when consensus could not be achieved, a third senior expert acted as an arbiter to determine the final label.

Inter-annotator agreement (IAA) was assessed using Cohen’s kappa (κ) for each morphological attribute. The obtained agreement values were κ = 0.88 for shape/type, κ = 0.84 for color, and κ = 0.76 for texture. According to Landis and Koch18, κ values above 0.80 indicate strong agreement, while values between 0.60 and 0.80 indicate substantial agreement. Accordingly, shape/type and color demonstrated strong agreement, whereas texture showed comparatively lower agreement, consistent with its more subjective and visually ambiguous nature. This variability highlights the inherent uncertainty associated with texture-based microplastic classification. The final ground-truth labels used for model training and evaluation were derived from the consensus decisions of the annotators.

Tool I: automated deep learning (DL) classifier

Image preprocessing and augmentation

All images were resized to 224 × 224 pixels to match the EfficientNet-B0 input specification. Pixel values were normalized to the range [0, 1] using per-channel min–max scaling. To counteract the limited dataset size and reduce overfitting risk, an online data augmentation pipeline was implemented within the TensorFlow ImageDataGenerator framework. Augmentation was applied exclusively during training and not during validation or testing. The following transformations were applied:

  • Random rotations (uniform distribution, range: ±45°).

  • Random horizontal and vertical flips (probability: 0.5 each).

  • Random zoom (range: ±20%).

  • Random brightness variation (range: ±10% of maximum pixel value).

  • Random contrast variation (range: ±10%).

Augmented images were generated on-the-fly per mini-batch, meaning each training epoch presented statistically distinct augmented variants. No test-time augmentation was applied, ensuring that reported metrics reflect single-inference performance.

Model architecture and training

A multi-output convolutional neural network (CNN) was developed to simultaneously classify shape/type, color, and surface texture from a single image input. The selected backbone was EfficientNet-B0, chosen for its favourable accuracy-to-parameter ratio (~ 5.3 M parameters), suitability for training on relatively small domain-specific datasets, and robust transfer learning performance19. This choice is supported by its compound scaling strategy that uniformly scales network depth, width, and input resolution20. While more recent lightweight architectures, such as Vision Transformer–MobileNet hybrids with texture-aware attention13,14, may offer incremental gains in texture discrimination, EfficientNet-B0 was prioritized for reproducibility, wide framework support, and deployability in resource-constrained laboratory environments.

The EfficientNet-B0 backbone was initialized with ImageNet-1 K pre-trained weights and trained in a two-phase transfer learning strategy. In Phase 1 (feature adaptation), all backbone layers were frozen and only the three classification heads were trained for 10 warm-up epochs (learning rate: 1 × 10⁻³). In Phase 2 (fine-tuning), the top 20 layers of the backbone were unfrozen and jointly trained with the classification heads at a reduced learning rate (1 × 10⁻⁴). Three parallel classification heads were attached to the global average pooling layer (Table 2):

  • Shape/Type Head: GlobalAveragePooling2D → Dense(256, ReLU) → Dropout(0.4) → Dense(5, softmax).

  • Color Head: GlobalAveragePooling2D → Dense(128, ReLU) → Dropout(0.4) → Dense(10, softmax).

  • Texture Head: GlobalAveragePooling2D → Dense(128, ReLU) → Dropout(0.4) → Dense(2, softmax).

The overall objective function was the unweighted (equally weighted) sum of three categorical cross-entropy losses, one per output head. Equal loss weighting was adopted as a baseline. To mitigate class imbalance effects, inverse-frequency class weights were computed from the training set and applied during optimization. The combined loss is thus:

L_total = L_shape + L_color + L_texture (equal weighting, λ = 1.0 per task)

Table 2 Summary of deep learning model training hyperparameters and hardware.

Full size table

All implementation code, trained model weights, and evaluation scripts are publicly available at the corresponding repository [Mahmoudsami/Microplastic_Identification_Tool at main].

Deployment as a web application

To maximize accessibility and reproducibility, the trained DL classifier was deployed as an interactive web application using the Gradio library, hosted on Hugging Face Spaces (Hugging Face, 2024). The model is saved in HDF5 format. Researchers may upload microplastic microscope images and obtain rapid quantitative predictions of particle shape/type, color, and surface texture, along with associated softmax confidence scores, without requiring specialised hardware or programming expertise. This open-access deployment aligns with recommendations for transparent and reproducible AI tools in environmental research11. The application is publicly accessible at: https://huggingface.co/spaces/Mahmoudsami/Microplastic_Identifier.

Tool II: vision-language model (VLM) with human-in-the-Loop (HITL)

VLM configuration and system development

A separate and independent AI framework was developed using the Claude Vision API (Anthropic; model version: claude-3-opus-20240229) through the Claude AI Artifacts environment. Unlike the DL classifier described in Sect.  2.2, this framework involved no local model training, parameter optimization, transfer learning, or domain-specific fine-tuning. Instead, the system utilized the native zero-shot multimodal reasoning capability of the VLM to analyze uploaded optical microscope images. No hidden training, online learning, or reinforcement learning from human feedback was applied at any stage of the HITL workflow; the VLM weights remained fixed throughout the study.

The rationale for a zero-shot configuration was to evaluate the practical feasibility of deploying a general-purpose multimodal AI system within environmental microscopy workflows without computationally intensive dataset preparation or model training. This reflects a realistic operational scenario in which environmental laboratories lacking specialized AI infrastructure may utilise immediately deployable foundation models for preliminary morphological assessment. To ensure methodological consistency, the VLM was configured to classify particles according to the same predefined categories as Tool I. The system is publicly accessible at https://claude.ai/public/artifacts/e8124351-a60c-448d-a297-a21a31b1da93.

Automated prompt engineering and structured output design

All VLM analyses were conducted using a standardized internally generated prompt engineering strategy that constrained model outputs to predefined microplastic classification categories. The prompt template was executed automatically whenever the user uploaded an image and selected the ‘AI Analysis’ option. No manual prompt writing or technical AI expertise was required from the end user. The representative internal prompt structure is provided in full below:

System-Level Instruction:

“You are an environmental microplastic analysis assistant specialized in optical microscope image interpretation. Analyze the uploaded microscope image and classify the visible particle according to the following predefined categories:

Shape/type: fiber | fragment | film | foam | pellet.

Color: black | blue | brown | green | orange | pink | red | transparent | white | yellow.

Surface texture: smooth | rough.

Provide (1) your classification for each attribute using only the listed labels, and (2) concise scientific reasoning (1–2 sentences per attribute) describing the visual features supporting each prediction.”

Automated User Query:

“Analyze the uploaded microscope image of the suspected microplastic particle.”

VLM outputs were mapped to predefined classification labels using rule-based label extraction (exact string matching against the allowed label set, case-insensitive). Responses that could not be reliably assigned to one of the predefined classes were recorded as unclassified and excluded from quantitative metric calculations.

Expert-guided human-in-the-loop (HITL) refinement workflow

To improve analytical reliability for ambiguous classifications, the VLM framework incorporated a structured expert-guided HITL refinement workflow. This mechanism did not involve online learning, reinforcement learning, parameter updating, or any form of automated retraining of the underlying VLM. The VLM operated as a fixed inference engine throughout; no model improvement or gradient updates occurred. The HITL system functioned exclusively as an expert-assisted prompt augmentation strategy. The HITL workflow consisted of the following sequential stages:

  1. 1.

    Initial automated inference: The uploaded image was analyzed automatically using the standardized zero-shot inference configuration described in Sect.  2.3.2.

  2. 2.

    Expert review: Two domain experts (the same annotators described in Sect.  2.1.2, each with ≥ 3 years of microplastic characterization experience) reviewed the generated classifications together with the AI-generated visual reasoning outputs. Experts did not have access to ground-truth labels during this review.

  3. 3.

    Intervention trigger: Expert intervention was permitted for visually ambiguous, morphologically complex, or low-confidence particles (i.e., cases where the VLM’s reasoning output indicated uncertainty or misidentified diagnostic morphological features).

  4. 4.

    Guidance refinement: Supplementary morphology-based contextual guidance was provided via the interface using predefined descriptive observations (e.g., ‘elongated fiber-like morphology’, ‘irregular fragmented edges’, ‘smooth reflective surface’, ‘porous foam-like appearance’). Expert input was restricted exclusively to perceptual morphological observations and did not include disclosure of the ground-truth label or direct answer correction.

  5. 5.

    Refined inference: The VLM re-analyzed the image using the augmented contextual guidance.

  6. 6.

    Final prediction recording: The refined output was recorded as the final HITL-assisted classification result.

To maintain methodological consistency and reproducibility, a maximum of one refinement iteration was permitted for each sample. Expert guidance was restricted exclusively to perceptual morphological observations and did not include disclosure of the ground-truth labels or direct answer correction. The HITL experts consisted of researchers experienced in optical microplastic microscopy and environmental particle characterization. Because the same laboratory research team participated in both annotation and HITL refinement, the potential for observer-related bias is acknowledged and discussed within the study limitations section.

Statistical analysis

Classification performance for both frameworks was evaluated using accuracy, precision, recall, and F1-score for each of the three morphological tasks. To address dataset imbalance, both macro-averaged and weighted-averaged metrics were calculated where appropriate. Per-class performance analysis and normalized confusion matrices were generated to examine class-specific prediction behavior and misclassification patterns. For the VLM-HITL framework, metrics were computed for both initial zero-shot predictions and final post-refinement outputs to quantify the impact of expert-guided intervention. All analyses were performed in Python 3.10 using scikit-learn. The study employed a single stratified train–validation–test split; accordingly, reported metrics should be interpreted as exploratory benchmark results rather than statistically generalizable performance estimates.

Results

Performance of the deep learning classifier (Tool I)

The multi-task EfficientNet-B0 classifier was evaluated on an independent test set comprising 105 microscope images. All metrics are reported as macro-averaged values across classes within each classification task (Table 3). The model achieved the highest performance for shape/type classification (F1-score = 91.2%), followed by color classification (88.5%) and surface texture classification (85.1%).

Table 3 Macro-averaged performance metrics of the multi-task deep learning classifier on the independent test set (n = 105). Values are reported as mean ± standard deviation (SD), with approximate 95% confidence intervals in brackets.

Full size table

Per-class performance (shape)

The classifier demonstrated consistently strong performance across all morphological categories, with the highest F1-score observed for pellet particles, while film and foam particles exhibited comparatively lower recall values due to morphological similarity with fragmented particles under optical microscopy (Table 4).

Table 4 Per-class performance metrics for shape/type classification on the independent test set (n = 105). Values are reported as mean ± standard deviation (SD), with approximate 95% confidence intervals in brackets.

Full size table

Failure case analysis

Analysis of the confusion matrix identified several recurrent misclassification patterns within the shape/type classification task (Fig. 1). The most common error involved film particles being predicted as fragments, particularly for thin or irregularly shaped films. Misclassification between foam and fragment particles was also observed in samples with poorly defined porous structures.

In the color classification task, confusion occurred primarily between transparent and white particles under low-contrast illumination conditions. For surface texture classification, several rough particles were predicted as smooth, particularly in images with limited surface detail visibility.

Overall, the majority of classification errors were associated with visually ambiguous particles exhibiting overlapping morphological or optical characteristics.

Fig. 1

Normalized confusion matrices for microplastic particle classification showing the performance of the deep learning model in (A) shape/type classification, (B) color classification, and (C) surface texture classification.

Performance of the VLM-HITL system (tool II)

The Claude Vision API was evaluated on the same independent test set under two conditions: (i) zero-shot inference (raw VLM output) and (ii) expert-guided Human-in-the-Loop (HITL) refinement. Table 5 reports the classification performance of both configurations alongside the deep learning (DL) classifier for comparison.

Table 5 Harmonized classification performance of the DL, VLM, and VLM-HITL systems.

Full size table

The raw zero-shot VLM demonstrated lower classification performance than the DL classifier across all evaluated tasks. Following human-in-the-loop (HITL) refinement, VLM performance improved consistently across all tasks, with F1-score increases of 14.2, 13.8, and 12.5% points for shape/type, color, and surface texture classification, respectively. The VLM-HITL system consequently approached the performance of the DL classifier, particularly for shape/type classification, where the F1-score increased from 72.8% for the raw VLM to 87.0% following HITL refinement, compared with 91.2% for the DL classifier.

Ablation analysis: contribution of expert-guided HITL refinement

To assess the contribution of the expert-guided human-in-the-loop (HITL) mechanism, the raw zero-shot VLM was compared with the VLM-HITL configuration using the same independent test set of 105 images. This comparison quantified the performance gain associated with adding expert-guided refinement to the zero-shot VLM workflow. As shown in Table 6, HITL refinement consistently improved classification accuracy across all three evaluated tasks. Accuracy increased from 74.0% to 87.0% for shape/type classification, from 71.2% to 83.9% for color classification, and from 67.8% to 79.8% for surface-texture classification, corresponding to absolute gains of 13.0, 12.7, and 12.0% points, respectively.

The analysis also provides a comparative assessment of domain-specific supervised learning relative to zero-shot VLM inference. Compared with the raw VLM, the domain-trained DL classifier achieved accuracy gains of 17.2, 17.3, and 17.2% points for shape/type, color, and surface-texture classification, respectively. Following HITL refinement, the remaining accuracy gap between the VLM-HITL system and the DL classifier was reduced to 4.2, 4.6, and 5.2% points for shape/type, color, and surface texture, respectively.

Overall, the ablation analysis showed a consistent improvement following HITL refinement across all three classification tasks. The accuracy gap between the raw VLM and the DL classifier was reduced from 17.2 to 17.3% points to 4.2–5.2% points after HITL refinement.

Table 6 Ablation analysis of the contribution of expert-guided HITL refinement and domain-specific supervised learning.

Full size table

Discussion

Interpretation of quantitative findings

The comparative results provide a clear empirical delineation of the operational strengths and limitations of the two AI paradigms evaluated. The domain-trained EfficientNet-B0 classifier consistently outperformed the zero-shot VLM across all morphological classification tasks, achieving F1-scores between 85% and 91% (Table 3). This outcome supports the hypothesis that task-specific deep learning models outperform generalist AI systems in fine-grained scientific image classification, corroborating a growing body of evidence1,6,15,21.

The performance gap is mechanistically attributable to the CNN’s direct optimization on the target domain, enabling it to learn decision boundaries specific to microplastic (MP) optical micrograph features — such as surface texture micropatterns, spectral characteristics of transparent particles, and the aspect-ratio signatures of fibers. This level of quantitative performance is critical for applications requiring high-throughput screening and the generation of large, statistically robust datasets, such as regulatory compliance monitoring or large-scale ecological studies22.

Furthermore, the trained CNN’s deterministic output is a critical operational advantage: identical inputs produce identical outputs, ensuring that data generated from time-separated laboratory sessions are strictly comparable — a prerequisite for longitudinal monitoring data quality assurance and scientific reproducibility23. This property is absent in VLMs, whose outputs may vary across API calls, API versions, and model updates, representing a substantial reproducibility concern for regulatory-quality datasets.

Role of HITL guidance and the nature of the VLM-HITL system

The expert-guided HITL mechanism produced consistent and practically significant performance improvements (+ 12 to + 13% points) across all VLM classification tasks (Table 5). It is essential to understand what the HITL mechanism achieves and does not achieve: it is an expert-assisted prompt engineering workflow, not an autonomous learning system. The VLM’s weights do not change; no gradient update occurs; no example is ‘learned.’ Rather, the expert’s perceptual observation is injected as additional textual context (a simple hint), enabling the VLM to apply its general visual reasoning capability more precisely to the specific particle in question. This collaborative approach aligns with emerging trends in other complex scientific fields, where VLMs assist human experts in interpreting data from genomics to remote sensing 24,25.

This distinction has important practical implications. First, the HITL benefit depends entirely on the quality and specificity of expert input — it is a structured expert consultation tool, not an AI that improves through use. Second, the resource cost is non-trivial: each HITL intervention requires a trained expert’s attention and a second API call, making it unsuitable for high-throughput screening. Third, the approach is inherently limited by the VLM’s underlying capability — it cannot recover from cases where the VLM lacks sufficient domain knowledge to interpret the hint correctly. Nevertheless, for ambiguous or novel particle types not well-represented in training data, the VLM-HITL system provides a transparent, auditable reasoning trail for each decision, building user trust and aiding scientific documentation26,27.

Comparison with prior architectural approaches

The present results are contextualized relative to the broader deep learning for microplastics landscape. Rermborirak et al.,13 achieved > 99% precision using YOLOv8 for fluorescence-stained MP detection — a result achieved under a different imaging modality (Nile Red staining) and narrower classification scope, making direct comparison inappropriate but illustrating the ceiling performance achievable with modality-specific optimization. Royer et al.,11 and Yao et al.,17 demonstrated segmentation-level multi-class MP identification, which addresses the detection (localization) problem rather than the classification problem addressed here.

Regarding architectural alternatives: Riaz et al.,15 demonstrated that lightweight Vision Transformer–MobileNet hybrids with texture-aware attention (TriViT-Lite) achieve state-of-the-art real-time performance on fine-grained classification tasks characterized by texture discrimination — a challenge directly analogous to the rough/smooth discrimination problem in MP texture classification. Similarly, Riaz et al.,16 demonstrated multi-scale attention with feature refinement for fine-grained classification under resource constraints. These findings suggest that attention mechanisms sensitive to local texture patterns may yield performance gains over global-average-pooling CNN architectures like EfficientNet-B0 for the texture classification sub-task, where the present model showed the lowest performance (F1 = 85.1%). Future work should evaluate whether texture-aware attention mechanisms improve MP texture classification specifically.

Practical deployment trade-offs and hybrid workflow

The two systems evaluated here are not mutually exclusive but rather serve complementary roles in a modern environmental laboratory. For environmental monitoring laboratories, the choice between a trained CNN and a VLM-HITL system is not merely architectural but operational:

  • The trained CNN is appropriate when: (a) a labelled training dataset is available; (b) high throughput is required (hundreds of particles per day); (c) reproducibility and determinism are critical for data quality assurance; and (d) fixed classification categories are acceptable.

  • The VLM-HITL approach is appropriate when: (a) no training data is available; (b) interpretability and natural-language reasoning are required (e.g., for report generation, teaching, or quality-control flagging); (c) small numbers of ambiguous particles require expert-assisted analysis; and (d) flexibility in classification vocabulary is needed.

The hybrid deployment recommended by this study — CNN for bulk screening of hundreds or thousands of particles, VLM-HITL selectively employed to investigate outliers, ambiguous specimens, or novel particle types flagged by the CNN — represents a practically achievable operational workflow that optimizes for both speed and accuracy, leveraging the best of both AI paradigms.

Accessibility and open science

The deployment of the DL model on Hugging Face Spaces represents a crucial step in democratizing access to advanced analytical technology. By removing barriers related to cost, computational resources, and technical expertise, such open-access platforms empower a wider range of researchers, including those in low-resource settings, to adopt state-of-the-art methods11. This aligns with a broader movement towards open science and reproducible research, ensuring that advancements in AI have a tangible and widespread impact on environmental protection efforts28.

Study limitations

While the present study demonstrates the feasibility of AI-assisted microplastic morphological characterization, several limitations should be considered. First, the dataset comprised 700 annotated images, with an independent test set of 105 images and relatively small per-class sample sizes (n = 17–28 for shape/type classes), which may limit the precision and generalizability of class-specific performance estimates. Although class weighting was applied during DL training and macro-averaged metrics were used for evaluation, residual effects of class imbalance cannot be completely excluded. Second, the evaluation was conducted using laboratory-derived images acquired under standardized microscopy conditions, and external validation using independent datasets from different laboratories, imaging conditions, geographic locations, and environmental matrices was not performed. Third, the VLM results may be sensitive to prompt formulation because a single predefined prompting framework was evaluated; systematic prompt-robustness testing remains an important direction for future work. Fourth, the VLM-HITL workflow depends on an externally hosted API, introducing practical considerations related to network connectivity, service availability, model-version changes, and potential usage costs, whereas the trained DL classifier can be deployed locally. Finally, the DL and zero-shot VLM approaches have inherently different methodological characteristics: the DL classifier benefits from dataset-specific supervised training, whereas the VLM was evaluated in a zero-shot setting without dataset-specific fine-tuning, with performance subsequently refined through expert-guided HITL feedback. Therefore, direct comparisons should be interpreted in the context of these methodological differences. Future work should focus on larger and more diverse datasets, independent field-based validation, prompt-robustness assessment, locally deployable VLM solutions, and more balanced DL–VLM evaluation frameworks.

Conclusion

This study presents a comparative evaluation of a domain-trained EfficientNet-B0 classifier and a zero-shot Vision–Language Model (VLM) with expert-guided refinement for morphology-based microplastic characterization from optical microscope images. The results demonstrate that the supervised CNN framework achieved consistently higher performance across shape/type, color, and surface texture classification tasks, while expert-guided refinement substantially improved the performance and interpretability of the zero-shot VLM system. The findings highlight complementary operational advantages between both approaches: the CNN model provides robust and reproducible high-throughput classification, whereas the VLM framework offers flexible, explainable analysis suitable for expert-assisted workflows. Collectively, this work provides practical insight into the trade-offs between trained deep learning pipelines and foundation-model-based approaches for environmental microscopy applications, while establishing a reproducible comparative framework for future research in AI-assisted microplastic analysis.

Data availability

The datasets used and/or analyzed during the current study available from the corresponding author on reasonable request.

Code availability

The training, evaluation, and inference code is publicly available at: [Mahmoudsami/Microplastic_Identification_Tool at main]

The repository includes the full training pipeline (train_model.py), deployed application (app.py), trained EfficientNet-B0 model, class labels, and all required dependencies necessary to reproduce the prediction workflow and evaluate the proposed framework.

References

  1. Arju, M. Z. B. Z. et al. Deep-learning enabled rapid and low-cost detection of microplastics in consumer products following on-site extraction and image processing. RSC Adv. 15 (14), 10473–10483. https://doi.org/10.1039/D4RA07991D (2025).

    Article  Google Scholar 

  2. Sami, M. Microplastics in Fish: A Comprehensive Review. Egypt. J. Aquat. Biology Fisheries. 29 (4), 2987–3007. https://doi.org/10.21608/ejabf.2025.449308 (2025).

    Article  Google Scholar 

  3. Sarker, M. A. B., Imtiaz, M. H., Holsen, T. M. & Baki, A. B. Real-time detection of microplastics using an ai camera. Sensors 24 (13), 4394. https://doi.org/10.3390/s24134394 (2024).

    Article  ADS  PubMed  PubMed Central  Google Scholar 

  4. Cole, M. et al. Microplastic ingestion by zooplankton. Environ. Sci. Technol. 47 (12), 6646–6655 (2013).

    Article  ADS  PubMed  Google Scholar 

  5. Isaac Sajan, R., Manchu, M., Felsy, C. & Joselin Kavitha, M. Microplastic predictive modelling with the integration of Artificial Neural Networks and Hidden Markov Models (ANN-HMM). J. Environ. Health Sci. Eng. 22 (2), 579. https://doi.org/10.1007/s40201-024-00920-2 (2024).

    Article  Google Scholar 

  6. Sami, M. A Systematic Review of Microplastic Remediation: Adsorbent Efficacy, Ecotoxicity, and Coastal Applications. Egypt. J. Aquat. Biology Fisheries. 30 (1), 3029–3038. https://doi.org/10.21608/ejabf.2026.455773.7286 (2026).

    Article  Google Scholar 

  7. Zhao, B., Richardson, R. E. & You, F. Advancing microplastic analysis in the era of artificial intelligence: From current applications to the promise of generative AI. Nexus 1 (4). https://doi.org/10.1016/j.ynexs.2024.100043 (2024).

  8. Martín-Gómez, B., Elmore, J. S., Valverde, S., Ares, A. M. & Bernal, J. Recent applications of chromatography for determining microplastics and related compounds (bisphenols and phthalate esters) in food. Microchem. J. 197, 109903. https://doi.org/10.1016/j.microc.2024.109903 (2024).

    Article  Google Scholar 

  9. Thammasanya, T., Patiam, S., Rodcharoen, E. & Chotikarn, P. A new approach to classifying polymer type of microplastics based on Faster-RCNN-FPN and spectroscopic imagery under ultraviolet light. Sci. Rep. 14 (1), 3529. https://doi.org/10.1038/s41598-024-53251-5 (2024).

    Article  ADS  PubMed  PubMed Central  Google Scholar 

  10. Prata, J. C., Costa, D., Lopes, J. P., Duarte, I., Rocha-Santos, T. & A. C., & Environmental exposure to microplastics: An overview on possible human health effects. Sci. Total Environ. 702, 134455. https://doi.org/10.1016/j.scitotenv.2019.134455 (2020).

    Article  PubMed  Google Scholar 

  11. Royer, S. J., Wolter, H., Delorme, A. E., Lebreton, L. & Poirion, O. B. Computer vision segmentation model—deep learning for categorizing microplastic debris. Front. Environ. Sci. 12, 1386292. https://doi.org/10.3389/fenvs.2024.1386292 (2024).

    Article  Google Scholar 

  12. Sami, M. & Ahmed, F. Automated seaweed species classification using deep learning and large language models. Sci. Rep. 16 (1), 23091. https://doi.org/10.1038/s41598-026-63136-4 (2026).

    Article  PubMed  PubMed Central  Google Scholar 

  13. Lorenzo-Navarro, J. et al. Deep learning approach for automatic microplastics counting and classification. Sci. Total Environ. 765, 142728. https://doi.org/10.1016/j.scitotenv.2020.142728 (2021).

    Article  PubMed  Google Scholar 

  14. Rermborirak, K., Nanuan, P., Komonpan, P. & Sukpancharoen, S. Low-cost portable microplastic detection system integrating nile red fluorescence staining with YOLOv8-based deep learning. J. Hazard. Mater. Adv. 19, 100787. https://doi.org/10.1016/j.hazadv.2025.100787 (2025).

    Article  Google Scholar 

  15. Riaz, W., Ji, J. C. & Ullah, A. TriViT-Lite: A Compact Vision Transformer–MobileNet Model with Texture-Aware Attention for Real-Time Facial Emotion Recognition in Healthcare. Electronics 14 (16), 3256. https://doi.org/10.3390/electronics14163256 (2025a).

    Article  Google Scholar 

  16. Riaz, W., Ullah, A. & Ji, J. C. Multi-Scale Attention Networks with Feature Refinement for Medical Item Classification in Intelligent Healthcare Systems. Sensors 25 (17), 5305. https://doi.org/10.3390/s25175305 (2025b).

    Article  ADS  PubMed  PubMed Central  Google Scholar 

  17. Yao, Y., Xu, W. & Fan, H. A deep learning approach for microplastic segmentation in microscopic images. Toxics 13 (12), 1018. https://doi.org/10.3390/toxics13121018 (2025).

    Article  PubMed  PubMed Central  Google Scholar 

  18. Landis, J. R. & Koch, G. G. The measurement of observer agreement for categorical data. Biometrics 33 (1), 159–174. https://doi.org/10.2307/2529310 (1977).

    Article  PubMed  Google Scholar 

  19. Papoutsis, I., Bountos, N. I., Zavras, A., Michail, D. & Tryfonopoulos, C. Benchmarking and scaling of deep learning models for land cover image classification. ISPRS J. Photogrammetry Remote Sens. 195, 250–268. https://doi.org/10.1016/j.isprsjprs.2022.11.012 (2023).

    Article  ADS  Google Scholar 

  20. Tan, M. & Le, Q. V. EfficientNet: Rethinking model scaling for convolutional neural networks. Proc. 36th Int. Conf. Mach. Learn. (ICML). PMLR 97, 6105–6114 (2019).

    Google Scholar 

  21. Akkajit, P., Sukkuea, A. & Thongnonghin, B. Comparative analysis of five convolutional neural networks and transfer learning classification approach for microplastics in wastewater treatment plants. Ecol. Inf. 78, 102328. https://doi.org/10.1016/j.ecoinf.2023.102328 (2023).

    Article  Google Scholar 

  22. Periyasamy, A. P. & Perumalsamy, R. Machine Learning for Microplastic Quantification: Techniques, Challenges, and Future Directions. Clean. Water. 100158. https://doi.org/10.1016/j.clwat.2025.100158 (2025).

  23. Moassefi, M. et al. Checklist for reproducibility of deep learning in medical imaging. J. Imaging Inf. Med. 37 (4), 1664–1673. https://doi.org/10.1007/s10278-024-01295-4 (2024).

    Article  Google Scholar 

  24. Anthropic. How scientists are using Claude to accelerate research and discovery. Anthropic News. (2026). Retrieved from https://www.anthropic.com/news/accelerating-scientific-research

  25. Tao, L. et al. Advancements in vision–language models for remote sensing: Datasets, capabilities, and enhancement techniques. Remote Sens. 17 (1), 162. https://doi.org/10.3390/rs17010162 (2025).

    Article  ADS  Google Scholar 

  26. Hanif, A. M., Beqiri, S., Keane, P. A. & Campbell, J. P. Applications of interpretability in deep learning models for ophthalmology. Curr. Opin. Ophthalmol. 32 (5), 452–458. https://doi.org/10.1097/ICU.0000000000000780 (2021).

    Article  PubMed  PubMed Central  Google Scholar 

  27. Jiang, S. et al. How interpretable machine learning can benefit process understanding in the geosciences. Earth’s Future. 12 (7), e2024EF004540. https://doi.org/10.1029/2024EF004540 (2024).

    Article  ADS  Google Scholar 

  28. Prism. AI-Driven Microplastic Monitoring Networks. Sustainability Directory. Retrieved from https://prism.sustainability-directory.com/scenario/ai-driven-microplastic-monitoring-networks/ (2024).

Download references

Acknowledgements

The authors would like to thank Prof. Saad Zakaria for his support in completing the manuscript.

Funding

Open access funding provided by The Science, Technology & Innovation Funding Authority (STDF) in cooperation with The Egyptian Knowledge Bank (EKB). No funding was received for this study.

Author information

Authors and Affiliations

  1. Department of Marine Science, Faculty of Science, Suez Canal University, Ismailia, Egypt

    Mahmoud Sami & Marina S. Fawzy

  2. Egypt Healthcare Authority, Ismailia, Egypt

    Sara El-Kerkary

Authors

  1. Mahmoud Sami
  2. Sara El-Kerkary
  3. Marina S. Fawzy

Contributions

M.S. and S.E. jointly conceptualized the study. M.S. designed the study methodology, developed and implemented the artificial intelligence models, conducted the data analysis, and interpreted the results. S.E. contributed to the development and implementation of one of the AI tools. M.S.F. performed the laboratory imaging and contributed to the identification and classification of microplastic morphological types. M.S. wrote the manuscript. All authors critically reviewed and approved the final manuscript.

Corresponding author

Correspondence to Mahmoud Sami.

Ethics declarations

Competing interests

The authors declare no competing interests.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Sami, M., El-Kerkary, S. & Fawzy, M.S. Developing and evaluating automated deep learning and human-in-the-loop vision–language systems for microplastic characterization. Sci Rep 16, 26639 (2026). https://doi.org/10.1038/s41598-026-67536-4

Download citation

  • Received:

  • Accepted:

  • Published:

  • Version of record:

  • DOI: https://doi.org/10.1038/s41598-026-67536-4

Keywords

colind88

Back To Top