Introduction
Microplastics and microfibers represent a significant and pervasive environmental challenge, often migrating from urban wastewater treatment plants into aquatic ecosystems. Monitoring these pollutants is essential for understanding their ecological impact and identifying their sources. However, the current "gold standard" for identification—manual microscopy—is a labor-intensive process prone to human error and lacks the scalability required for large-scale environmental studies.
While deep learning models have been developed for microplastic fragments, they often struggle with the thin, elongated geometry of fibers. Furthermore, existing tools rarely provide the detailed metadata, such as precise length or color, necessary for tracing fibers back to specific textile sources. To address these bottlenecks, this paper introduces MicroFiberDetect, a deep learning-based desktop application designed to automate the identification and measurement of microfibers in wastewater sludge.
Methodology
The authors developed a multi-stage pipeline integrated into a user-friendly interface, allowing researchers to process high-resolution images with minimal manual intervention.
1. Fibre Detection and Segmentation
The system utilizes Mask R-CNN (implemented via the Detectron2 library), a state-of-the-art architecture for instance segmentation. This allows the model to perform pixel-level identification, distinguishing the exact boundaries of a fiber rather than simply placing a bounding box around it. This precision is critical for the subsequent analysis of fiber geometry.
2. Color Prediction
Once a fiber is isolated, the system converts the Region of Interest (ROI) from the standard RGB space to the HSL (Hue, Saturation, Lightness) color space. This choice better reflects human color perception and handles lighting variability more effectively. The system then applies k-means clustering to group pixels and identifies the centroid of the dominant cluster to predict the fiber's primary color, avoiding the inaccuracies of simple pixel averaging.
3. Length Extraction
Because microfibers are frequently curved, coiled, or tangled, simple geometric measurements are insufficient. The tool implements a skeletonization algorithm, which thins the segmented fiber mask down to a one-pixel-wide "spine." By counting these pixels and applying a conversion factor based on the microscope's magnification, the application calculates the actual physical length of the fiber.
4. Deployment and Accessibility
To bridge the gap between AI research and environmental fieldwork, the tool is built using Python with a PyQt6/PySide6 interface. It is packaged as a standalone 1GB Windows application, enabling researchers without computer science expertise to process images by simply selecting their filter type and scale.
Datasets
The study introduced two distinct labeled datasets captured using a Leica stereo microscope at magnifications ranging from 10x to 80x:
- Glass Dataset: 1,203 images (4000x3000 resolution) using glass fiber filters. These samples contain organic matter that can interfere with clarity, generally restricting detection to colored fibers.
- CA (Cellulose Acetate) Dataset: 1,287 images (3840x2160 resolution). This filter type removes organic matter, enabling the detection of transparent fibers.
Both datasets include an equal distribution of light and dark backgrounds to ensure the model remains robust under varying lighting conditions.
Key Results and Insights
- High Efficiency: The application processes images in approximately 4 seconds per image on a standard consumer-grade CPU (Intel i7-8750H). This represents a significant speedup over manual counting and eliminates the requirement for high-end industrial GPUs.
- Metadata as a Priority: By emphasizing color and length extraction, the tool treats these attributes as vital environmental data points rather than secondary features, facilitating better source attribution in environmental studies.
- Robustness: Through stratified five-fold cross-validation and training on multiple filter types, the model demonstrates a strong ability to handle the organic "noise" typically found in wastewater sludge samples.
Limitations and Future Work
Despite its advancements, detecting perfectly transparent fibers against certain backgrounds remains a difficult computer vision task. Additionally, while the tool provides the necessary measurements for source attribution, it does not yet include a module to automatically map these characteristics to specific textile types (e.g., polyester fleece). Future work will focus on expanding the dataset to include sludge types from different geographical regions to improve the model's generalizability and refining the detection of translucent particles.
Summary updated