Microplastic Identification Using AI-Driven Image Segmentation with Synthetic Ecological Context

Quality-controlled inpainting improves transfer to held-out ecological microscopy.

Alex Dils1, David Raymond2, Jack Spottiswood1, Samay Kodige1, Dylan Karmin3, Rikhil Kokal1, Win Cowger4,†, Christoph Sadée5,†
1 University of California, Berkeley 2 Dartmouth College 3 Massachusetts Institute of Technology 4 Moore Institute for Plastic Pollution Research 5 Division of Computational Medicine, Stanford University
 Co-corresponding and senior authors

Source microscopy, transformed masks, and synthetic ecological inpainting examples show how real labels are carried into more realistic training contexts.

Abstract

Conventional methods for microplastic identification in water samples are costly, slow, and dependent on specialized expertise. We present a deep learning segmentation framework for identifying microplastic foreground in microscopy images and evaluate whether synthetic ecological context can improve model performance when labeled real data are limited. We also contribute a curated image dataset with manually segmented microplastic masks, adding paired image-mask examples for supervised training and held-out ecological evaluation.

The workflow combines manually labeled laboratory microplastic images with generated inpainting examples selected for visible foreground change, non-empty masks, plausible object scale, and background diversity. In our results, adding verified synthetic examples improves segmentation across architectures by increasing exposure to diverse ecological scenarios while preserving pixel-level labels. The strongest synthetic-assisted model reaches Dice 0.817, IoU 0.704, and boundary F1 0.858 on the held-out ecological evaluation set, compared with Dice 0.743, IoU 0.619, and boundary F1 0.809 for the strongest real-only model.

Results

Verified synthetic examples improve held-out ecological segmentation

The strongest verified-inpainting checkpoint is U-Net++ at seed 37, with Dice 0.817, IoU 0.704, boundary F1 0.858, precision 0.802, and recall 0.846. The strongest real-only checkpoint reaches Dice 0.743, IoU 0.619, and boundary F1 0.809. The top synthetic-assisted run therefore improves Dice by 0.074 and IoU by 0.085 over the strongest real-only run.

The effect is not limited to one model family. All retained semantic segmentation architectures improve under verified inpainting, with U-Net++ showing the largest architecture-level Dice gain at +0.102.

Best checkpoint U-Net++ seed 37 with verified inpainting

Quality-controlled synthetic examples improve held-out ecological transfer over the strongest real-only checkpoint.

Dice
0.817
IoU
0.704
Boundary F1
0.858
IoU gain vs. real only
+0.085
Training condition Runs Dice IoU Boundary F1 Best validation Dice
Real only180.641 +/- 0.1610.519 +/- 0.1380.7030.758
Real + unfiltered inpainting180.586 +/- 0.1430.462 +/- 0.1320.6420.928
Real + verified inpainting180.735 +/- 0.0610.608 +/- 0.0580.7970.846
Half real + top inpainting pilot30.754 +/- 0.0280.627 +/- 0.0310.8140.812

Figures

Manuscript figures

Representative source masks, transformed masks, and inpainted ecological microplastic examples
Representative source microplastic examples, transformed masks, and inpainted ecological images.
Held-out ecological segmentation metrics by training condition
Held-out ecological segmentation metrics by training condition.
Architecture-level Dice change after verified inpainting
Architecture-level Dice gains after verified inpainting.
Strongest real-only checkpoint compared with strongest synthetic-assisted checkpoint
Strongest real-only checkpoint versus strongest synthetic-assisted checkpoint.
Synthetic ecological context generation and evaluation pipeline
End-to-end synthetic ecological context generation and evaluation pipeline.

Availability

Manuscript, code, and data