Artificial Intelligence (AI) offers innovative solutions that enhance our ability to monitor, predict, and mitigate environmental issues. One significant contribution of AI in environmental monitoring is its ability to process vast amounts of data from diverse sources, such as satellite imagery, remote sensors, and weather stations. Machine learning (ML) algorithms can analyze these datasets to detect patterns and anomalies, providing insights into environmental changes with high accuracy.
Conventional methods to collect data on beaches about types and number of microplastics involve manual sampling and laboratory analysis, which can be time-consuming and laborious. Also, the participation of unskilled volunteers may lead to inconsistency and unreliable data. Therefore, we aim to integrate AI technology for more efficient and accurate microplastic identification and quantitation.
In our study, we develop automated methods for routine microplastic detection by comparing and evaluating the performances of YOLOv8 and Mask R-CNN machine learning models for single-class and mixed-class microplastics detection. The ultimate goal is to develop an effective deep learning microplastic detection model that can be integrated into an automated robotic car for detection and quantification of microplastic particles in coastal environments. The integration of AI systems in microplastic detection allows continuous monitoring of water bodies using sensor networks and analyzes the collected data to predict pollution levels, sources, and impacts that were previously unattainable.
Mask-RCNN is an object detection algorithm developed by Facebook. This algorithm expands on the concept of Faster-RCNN, which only creates bounding boxes around detected objects with a class label. With Mask-RCNN, a third branch outputs the object mask. YOLOv8, short for You Only Look Once version 8, developed by Ultralytics—the creators of YOLOv5—is a state-of-the-art computer vision model designed to advance the capabilities of object detection, classification, and segmentation tasks.
Our preliminary test included intact and irregular polystyrene (PS) of 5 mm and intact acrylic of 5 mm placed on a glass slide. Each slide was photographed using a mobile phone. A total of 1,060 images of microplastics were obtained, categorized into four classes: 346 images of polystyrene, 319 images of irregular polystyrene, 302 images of acrylic, and 92 mixed images of all types of plastics. The images were annotated using the Roboflow annotation tool, whereas the dataset was split into a 7:2:1 ratio for training, validation, and testing, respectively. We trained Mask-RCNN using 1,000 warm-up iterations, followed by a maximum of 1,500 iterations, with step decay adjustments at iterations 1,000 and 1,400 to manage the learning rate effectively. For YOLOv8, a total of 45 epochs with an image size of 800 pixels was used. It is also worth mentioning that the use of data augmentation is present.
Table 1. Performance metrics evaluated on Mask-RCNN and YOLOv8
Figure 1. Sample images from the test set detected with YOLOv8