An Explainable Attention-Gated CNN–Transformer Framework for Automated Microplastic Recognition in Freshwater Microscopy Images

Abstract Microplastic pollution requires rapid and reproducible monitoring methods that can complement labor-intensive visual and spectroscopic analyses. This study develops a morphology-aware artificial-intelligence framework for automated classification of field-collected microplastic particles and diatom algae in optical microscopy images. A public freshwater dataset containing 1,140 images from four classes (algae, filament, fragment, and pellet) was analyzed. After image-quality auditing, 1,137 unique images were retained for morphology–texture analysis, while deep-learning experiments used the original image collection under a fixed train/validation/test protocol. Handcrafted morphology and texture descriptors were evaluated with Random Forest, Extra Trees, radial-basis-function Support Vector Machine, and Histogram Gradient Boosting. Histogram Gradient Boosting achieved a cross-validation macro-F1 of 0.9341 ± 0.0255 and a held-out test accuracy of 0.9342. Deep-learning experiments compared ResNet50, Swin Transformer, and a CNN–Transformer fusion model combining ResNet50 and Swin representations. The fusion model achieved an accuracy of 0.9240, macro-F1 of 0.9222, and macro-AUC of 0.9954 on the 171-image test subset. Class-wise AUCs were 1.0000, 0.9950, 0.9886, and 0.9982 for algae, filament, fragment, and pellet, respectively. The results show that morphology-aware machine learning and complementary CNN–Transformer representations can support automated freshwater microplastic screening and provide a reproducible basis for environmental monitoring workflows.

Authors

Institutions

Publication Details

Journal
Research Square
Published
2026-11-16
DOI
https://doi.org/10.21203/rs.3.rs-11105292/v1
Primary Topic
Microplastics and Plastic Pollution
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

An Explainable Attention-Gated CNN–Transformer Framework for Automated Microplastic Recognition in Freshwater Microscopy Images

Majid Hajibarati
3 links
Research Square
Microplastics and Plastic Pollution
preprint

An Explainable Attention-Gated CNN–Transformer Framework for Automated Microplastic Recognition in Freshwater Microscopy Images

Majid Hajibarati
preprint en

Abstract

Abstract Microplastic pollution requires rapid and reproducible monitoring methods that can complement labor-intensive visual and spectroscopic analyses. This study develops a morphology-aware artificial-intelligence framework for automated classification of field-collected microplastic particles and diatom algae in optical microscopy images. A public freshwater dataset containing 1,140 images from four classes (algae, filament, fragment, and pellet) was analyzed. After image-quality auditing, 1,137 unique images were retained for morphology–texture analysis, while deep-learning experiments used the original image collection under a fixed train/validation/test protocol. Handcrafted morphology and texture descriptors were evaluated with Random Forest, Extra Trees, radial-basis-function Support Vector Machine, and Histogram Gradient Boosting. Histogram Gradient Boosting achieved a cross-validation macro-F1 of 0.9341 ± 0.0255 and a held-out test accuracy of 0.9342. Deep-learning experiments compared ResNet50, Swin Transformer, and a CNN–Transformer fusion model combining ResNet50 and Swin representations. The fusion model achieved an accuracy of 0.9240, macro-F1 of 0.9222, and macro-AUC of 0.9954 on the 171-image test subset. Class-wise AUCs were 1.0000, 0.9950, 0.9886, and 0.9982 for algae, filament, fragment, and pellet, respectively. The results show that morphology-aware machine learning and complementary CNN–Transformer representations can support automated freshwater microplastic screening and provide a reproducible basis for environmental monitoring workflows.

Research Square
Islamic Azad University, Tehran (IR)
Clean water and sanitation
Microplastics and Plastic Pollution
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon