{"id":150239,"date":"2026-08-25T05:36:13","date_gmt":"2026-08-25T05:36:13","guid":{"rendered":"https:\/\/www.europesays.com\/ai\/150239\/"},"modified":"2026-08-25T05:36:13","modified_gmt":"2026-08-25T05:36:13","slug":"developing-and-evaluating-automated-deep-learning-and-human-in-the-loop-vision-language-systems-for-microplastic-characterization","status":"publish","type":"post","link":"https:\/\/www.europesays.com\/ai\/150239\/","title":{"rendered":"Developing and evaluating automated deep learning and human-in-the-loop vision\u2013language systems for microplastic characterization"},"content":{"rendered":"<p>Microplastic image dataset and curation<\/p>\n<p>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\u00a0\u03bcm) for imaging. Images were captured using an optical microscope (Olympus BX-51) at 40\u00d7 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\u2009\u00d7\u20091536 pixels.<\/p>\n<p>Dataet size and composition<\/p>\n<p>A total of 700 images were collected. Each image was manually annotated for three morphological attributes simultaneously (Table\u00a0<a data-track=\"click\" data-track-label=\"link\" data-track-action=\"table anchor\" href=\"http:\/\/www.nature.com\/articles\/s41598-026-67536-4#Tab1\" rel=\"nofollow noopener\" target=\"_blank\">1<\/a>):<\/p>\n<p>Shape\/Type \u2014 five classes: fiber, fragment, film, pellet, foam. <a data-track=\"click\" data-track-action=\"reference anchor\" data-track-label=\"link\" data-test=\"citation-ref\" aria-label=\"Reference 11\" title=\"Royer, S. J., Wolter, H., Delorme, A. E., Lebreton, L. &amp; Poirion, O. B. Computer vision segmentation model&#x2014;deep learning for categorizing microplastic debris. Front. Environ. Sci. 12, 1386292. &#010;                  https:\/\/doi.org\/10.3389\/fenvs.2024.1386292&#010;                  &#010;                 (2024).\" href=\"http:\/\/www.nature.com\/articles\/s41598-026-67536-4#ref-CR11\" id=\"ref-link-section-d67364899e500\" rel=\"nofollow noopener\" target=\"_blank\">11<\/a>, <a data-track=\"click\" data-track-action=\"reference anchor\" data-track-label=\"link\" data-test=\"citation-ref\" aria-label=\"Reference 17\" title=\"Yao, Y., Xu, W. &amp; Fan, H. A deep learning approach for microplastic segmentation in microscopic images. Toxics 13 (12), 1018. &#010;                  https:\/\/doi.org\/10.3390\/toxics13121018&#010;                  &#010;                 (2025).\" href=\"http:\/\/www.nature.com\/articles\/s41598-026-67536-4#ref-CR17\" id=\"ref-link-section-d67364899e504\" rel=\"nofollow noopener\" target=\"_blank\">17<\/a>.<\/p>\n<p>Color \u2014 ten classes: black, blue, brown, green, orange, pink, red, transparent, white, yellow.<\/p>\n<p>Surface Texture \u2014 two classes: smooth and rough.<\/p>\n<p>Table 1 Class-wise sample counts in the complete dataset (N\u2009=\u2009700).<\/p>\n<p>The dataset was partitioned using stratified random sampling into a training set (70%, n\u2009=\u2009490), a validation set (15%, n\u2009=\u2009105), and an independent test set (15%, n\u2009=\u2009105). 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.<\/p>\n<p>Annotation workflow and quality assurance<\/p>\n<p>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.<\/p>\n<p>Inter-annotator agreement (IAA) was assessed using Cohen\u2019s kappa (\u03ba) for each morphological attribute. The obtained agreement values were \u03ba = 0.88 for shape\/type, \u03ba = 0.84 for color, and \u03ba = 0.76 for texture. According to Landis and Koch<a data-track=\"click\" data-track-action=\"reference anchor\" data-track-label=\"link\" data-test=\"citation-ref\" aria-label=\"Reference 18\" title=\"Landis, J. R. &amp; Koch, G. G. The measurement of observer agreement for categorical data. Biometrics 33 (1), 159&#x2013;174. &#010;                  https:\/\/doi.org\/10.2307\/2529310&#010;                  &#010;                 (1977).\" href=\"http:\/\/www.nature.com\/articles\/s41598-026-67536-4#ref-CR18\" id=\"ref-link-section-d67364899e827\" rel=\"nofollow noopener\" target=\"_blank\">18<\/a>, \u03ba 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.<\/p>\n<p>Tool I: automated deep learning (DL) classifierImage preprocessing and augmentation<\/p>\n<p>All images were resized to 224\u2009\u00d7\u2009224 pixels to match the EfficientNet-B0 input specification. Pixel values were normalized to the range [0, 1] using per-channel min\u2013max 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:<\/p>\n<p>Random rotations (uniform distribution, range: \u00b145\u00b0).<\/p>\n<p>Random horizontal and vertical flips (probability: 0.5 each).<\/p>\n<p>Random zoom (range: \u00b120%).<\/p>\n<p>Random brightness variation (range: \u00b110% of maximum pixel value).<\/p>\n<p>Random contrast variation (range: \u00b110%).<\/p>\n<p>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.<\/p>\n<p>Model architecture and training<\/p>\n<p>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 performance<a data-track=\"click\" data-track-action=\"reference anchor\" data-track-label=\"link\" data-test=\"citation-ref\" aria-label=\"Reference 19\" title=\"Papoutsis, I., Bountos, N. I., Zavras, A., Michail, D. &amp; Tryfonopoulos, C. Benchmarking and scaling of deep learning models for land cover image classification. ISPRS J. Photogrammetry Remote Sens. 195, 250&#x2013;268. &#010;                  https:\/\/doi.org\/10.1016\/j.isprsjprs.2022.11.012&#010;                  &#010;                 (2023).\" href=\"http:\/\/www.nature.com\/articles\/s41598-026-67536-4#ref-CR19\" id=\"ref-link-section-d67364899e889\" rel=\"nofollow noopener\" target=\"_blank\">19<\/a>. This choice is supported by its compound scaling strategy that uniformly scales network depth, width, and input resolution<a data-track=\"click\" data-track-action=\"reference anchor\" data-track-label=\"link\" data-test=\"citation-ref\" aria-label=\"Reference 20\" title=\"Tan, M. &amp; Le, Q. V. EfficientNet: Rethinking model scaling for convolutional neural networks. Proc. 36th Int. Conf. Mach. Learn. (ICML). PMLR 97, 6105&#x2013;6114 (2019).\" href=\"http:\/\/www.nature.com\/articles\/s41598-026-67536-4#ref-CR20\" id=\"ref-link-section-d67364899e893\" rel=\"nofollow noopener\" target=\"_blank\">20<\/a>. While more recent lightweight architectures, such as Vision Transformer\u2013MobileNet hybrids with texture-aware attention<a data-track=\"click\" data-track-action=\"reference anchor\" data-track-label=\"link\" data-test=\"citation-ref\" aria-label=\"Reference 13\" title=\"Lorenzo-Navarro, J. et al. Deep learning approach for automatic microplastics counting and classification. Sci. Total Environ. 765, 142728. &#010;                  https:\/\/doi.org\/10.1016\/j.scitotenv.2020.142728&#010;                  &#010;                 (2021).\" href=\"http:\/\/www.nature.com\/articles\/s41598-026-67536-4#ref-CR13\" id=\"ref-link-section-d67364899e897\" rel=\"nofollow noopener\" target=\"_blank\">13<\/a>,<a data-track=\"click\" data-track-action=\"reference anchor\" data-track-label=\"link\" data-test=\"citation-ref\" aria-label=\"Reference 14\" title=\"Rermborirak, K., Nanuan, P., Komonpan, P. &amp; Sukpancharoen, S. Low-cost portable microplastic detection system integrating nile red fluorescence staining with YOLOv8-based deep learning. J. Hazard. Mater. Adv. 19, 100787. &#010;                  https:\/\/doi.org\/10.1016\/j.hazadv.2025.100787&#010;                  &#010;                 (2025).\" href=\"http:\/\/www.nature.com\/articles\/s41598-026-67536-4#ref-CR14\" id=\"ref-link-section-d67364899e900\" rel=\"nofollow noopener\" target=\"_blank\">14<\/a>, may offer incremental gains in texture discrimination, EfficientNet-B0 was prioritized for reproducibility, wide framework support, and deployability in resource-constrained laboratory environments.<\/p>\n<p>The EfficientNet-B0 backbone was initialized with ImageNet-1\u00a0K 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\u2009\u00d7\u200910\u207b\u00b3). 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\u2009\u00d7\u200910\u207b\u2074). Three parallel classification heads were attached to the global average pooling layer (Table\u00a0<a data-track=\"click\" data-track-label=\"link\" data-track-action=\"table anchor\" href=\"http:\/\/www.nature.com\/articles\/s41598-026-67536-4#Tab2\" rel=\"nofollow noopener\" target=\"_blank\">2<\/a>):<\/p>\n<p>Shape\/Type Head: GlobalAveragePooling2D \u2192 Dense(256, ReLU) \u2192 Dropout(0.4) \u2192 Dense(5, softmax).<\/p>\n<p>Color Head: GlobalAveragePooling2D \u2192 Dense(128, ReLU) \u2192 Dropout(0.4) \u2192 Dense(10, softmax).<\/p>\n<p>Texture Head: GlobalAveragePooling2D \u2192 Dense(128, ReLU) \u2192 Dropout(0.4) \u2192 Dense(2, softmax).<\/p>\n<p>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:<\/p>\n<p>L_total\u2009=\u2009L_shape\u2009+\u2009L_color\u2009+\u2009L_texture (equal weighting, \u03bb\u2009=\u20091.0 per task)<\/p>\n<p>                  Table 2 Summary of deep learning model training hyperparameters and hardware.<\/p>\n<p>All implementation code, trained model weights, and evaluation scripts are publicly available at the corresponding repository [Mahmoudsami\/Microplastic_Identification_Tool at main].<\/p>\n<p>Deployment as a web application<\/p>\n<p>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 research<a data-track=\"click\" data-track-action=\"reference anchor\" data-track-label=\"link\" data-test=\"citation-ref\" aria-label=\"Reference 11\" title=\"Royer, S. J., Wolter, H., Delorme, A. E., Lebreton, L. &amp; Poirion, O. B. Computer vision segmentation model&#x2014;deep learning for categorizing microplastic debris. Front. Environ. Sci. 12, 1386292. &#010;                  https:\/\/doi.org\/10.3389\/fenvs.2024.1386292&#010;                  &#010;                 (2024).\" href=\"http:\/\/www.nature.com\/articles\/s41598-026-67536-4#ref-CR11\" id=\"ref-link-section-d67364899e1217\" rel=\"nofollow noopener\" target=\"_blank\">11<\/a>. The application is publicly accessible at: <a href=\"https:\/\/huggingface.co\/spaces\/Mahmoudsami\/Microplastic_Identifier\" rel=\"nofollow noopener\" target=\"_blank\">https:\/\/huggingface.co\/spaces\/Mahmoudsami\/Microplastic_Identifier<\/a>.<\/p>\n<p>Tool II: vision-language model (VLM) with human-in-the-Loop (HITL)VLM configuration and system development<\/p>\n<p>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.\u00a0 <a data-track=\"click\" data-track-label=\"link\" data-track-action=\"section anchor\" href=\"http:\/\/www.nature.com\/articles\/s41598-026-67536-4#Sec6\" rel=\"nofollow noopener\" target=\"_blank\">2.2<\/a>, 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.<\/p>\n<p>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.<\/p>\n<p>Automated prompt engineering and structured output design<\/p>\n<p>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 \u2018AI Analysis\u2019 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:<\/p>\n<p>System-Level Instruction:<\/p>\n<p>\u201cYou 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:<\/p>\n<p>Shape\/type: fiber | fragment | film | foam | pellet.<\/p>\n<p>Color: black | blue | brown | green | orange | pink | red | transparent | white | yellow.<\/p>\n<p>Surface texture: smooth | rough.<\/p>\n<p>Provide (1) your classification for each attribute using only the listed labels, and (2) concise scientific reasoning (1\u20132 sentences per attribute) describing the visual features supporting each prediction.\u201d<\/p>\n<p>Automated User Query:<\/p>\n<p>\u201cAnalyze the uploaded microscope image of the suspected microplastic particle.\u201d<\/p>\n<p>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.<\/p>\n<p>Expert-guided human-in-the-loop (HITL) refinement workflow<\/p>\n<p>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:<\/p>\n<p>                      1.<\/p>\n<p>Initial automated inference: The uploaded image was analyzed automatically using the standardized zero-shot inference configuration described in Sect.\u00a0 <a data-track=\"click\" data-track-label=\"link\" data-track-action=\"section anchor\" href=\"http:\/\/www.nature.com\/articles\/s41598-026-67536-4#Sec12\" rel=\"nofollow noopener\" target=\"_blank\">2.3.2<\/a>.<\/p>\n<p>                      2.<\/p>\n<p>Expert review: Two domain experts (the same annotators described in Sect.\u00a0 <a data-track=\"click\" data-track-label=\"link\" data-track-action=\"section anchor\" href=\"http:\/\/www.nature.com\/articles\/s41598-026-67536-4#Sec5\" rel=\"nofollow noopener\" target=\"_blank\">2.1.2<\/a>, each with \u2265\u20093 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.<\/p>\n<p>                      3.<\/p>\n<p>Intervention trigger: Expert intervention was permitted for visually ambiguous, morphologically complex, or low-confidence particles (i.e., cases where the VLM\u2019s reasoning output indicated uncertainty or misidentified diagnostic morphological features).<\/p>\n<p>                      4.<\/p>\n<p>Guidance refinement: Supplementary morphology-based contextual guidance was provided via the interface using predefined descriptive observations (e.g., \u2018elongated fiber-like morphology\u2019, \u2018irregular fragmented edges\u2019, \u2018smooth reflective surface\u2019, \u2018porous foam-like appearance\u2019). Expert input was restricted exclusively to perceptual morphological observations and did not include disclosure of the ground-truth label or direct answer correction.<\/p>\n<p>                      5.<\/p>\n<p>Refined inference: The VLM re-analyzed the image using the augmented contextual guidance.<\/p>\n<p>                      6.<\/p>\n<p>Final prediction recording: The refined output was recorded as the final HITL-assisted classification result.<\/p>\n<p>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.<\/p>\n<p>Statistical analysis<\/p>\n<p>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\u2013validation\u2013test split; accordingly, reported metrics should be interpreted as exploratory benchmark results rather than statistically generalizable performance estimates.<\/p>\n","protected":false},"excerpt":{"rendered":"Microplastic image dataset and curation A dedicated dataset of optical microscope images of microplastic particles was assembled following&hellip;\n","protected":false},"author":2,"featured_media":150240,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[24,25,17633,73475,2459,372,35626,35700,1743,73473,1737,73472,73474,1744,160,34702],"class_list":["post-150239","post","type-post","status-publish","format-standard","has-post-thumbnail","category-ai","tag-ai","tag-artificial-intelligence","tag-computational-biology-and-bioinformatics","tag-convolutional-neural-networks","tag-deep-learning","tag-engineering","tag-environmental-monitoring","tag-human-in-the-loop-ai","tag-humanities-and-social-sciences","tag-laboratory-microscopy","tag-mathematics-and-computing","tag-microplastics","tag-multi-task-classification","tag-multidisciplinary","tag-science","tag-vision-language-models"],"_links":{"self":[{"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/posts\/150239","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/comments?post=150239"}],"version-history":[{"count":0,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/posts\/150239\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/media\/150240"}],"wp:attachment":[{"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/media?parent=150239"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/categories?post=150239"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/tags?post=150239"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}