A method and system for identifying the number and size of microplastic particles

By using a pixel-physical scale normalization conversion model and semi-supervised learning, combined with the YOLOv8x-seg model and OpenCV contour extraction, the problems of low efficiency and poor accuracy in microplastic detection are solved. This achieves automated and standardized identification of the number and particle size of microplastics, improving detection efficiency and consistency.

CN122392054APending Publication Date: 2026-07-14CHONGQING UNIVERSITY OF SCIENCE AND TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHONGQING UNIVERSITY OF SCIENCE AND TECHNOLOGY
Filing Date
2026-04-22
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing microplastic detection methods rely on human experience, resulting in low efficiency and poor accuracy. Furthermore, traditional machine vision methods have high barriers to entry and weak adaptability to different scenarios, making it impossible to achieve rapid and consistent identification of the number and size of microplastics.

Method used

A microplastic recognition model is constructed by combining a pixel-to-physical scale normalization conversion model with semi-supervised learning. Through YOLOv8x-seg model and OpenCV contour extraction, combined with dual quantization filtering rules, the automatic recognition and quantization of microplastics are realized.

Benefits of technology

It has achieved automation and standardization of microplastic detection, improved detection efficiency and result consistency, lowered the technical threshold, supported cross-scenario comparison and data traceability, and output unified physical quantitative statistical results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122392054A_ABST
    Figure CN122392054A_ABST
Patent Text Reader

Abstract

The application provides a micro-plastic particle quantity and particle size identification method and system, and the method comprises the following steps: collecting a micro-plastic standard image data set, calibrating pixels and physical scales, and establishing a conversion model. The physical size of a single image is inversely deduced based on the model and the groove specification of a glass slide, and the sampling quantity is determined. The image is preprocessed and features are extracted, and a feature database is constructed. An identification model is constructed by using semi-supervised learning, and a candidate area is output. The outer contour is extracted, and an effective plastic contour is obtained by double quantization filtering. The contour is converted into unified physical quantities based on the model, and quantitative statistical results are obtained. The application solves the problems of low efficiency, poor accuracy and incomparable data of traditional detection by standardization calibration and double quantization filtering. The pixel-physical conversion model ensures the unity of physical quantities, the semi-supervised learning reduces the labeling cost, the double quantization filtering improves the accuracy, and finally the standardized statistical results are output, so that the standardization, automation and reproducibility of detection are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image recognition technology, and in particular to a method and system for identifying the number and size of microplastic particles. Background Technology

[0002] The manual microscopic examination method requires professional inspectors to observe the pre-treated sample field by field using a microscope. During the inspection, the inspectors must rely on their experience to distinguish microplastics from impurities such as debris and fibrous impurities, while simultaneously counting the number and approximate area of ​​microplastics and making subjective judgments about their shape (e.g., round, fibrous). The main limitation of this method is its high dependence on human labor. Not only is the inspection efficiency low, making it difficult to meet the requirements for rapid inspection of large batches of samples, but the inspection results are also significantly affected by factors such as personnel experience, fatigue, and subjective judgment differences, resulting in poor repeatability and consistency. Furthermore, the accuracy of manually counted data such as area is insufficient, making precise quantification impossible.

[0003] Traditional machine vision methods were developed to compensate for the inefficiency of manual microscopic inspection, but they still suffer from core problems such as high application barriers, non-standardized quantification, and chaotic data management. This method utilizes open-source vision processing tools to achieve preliminary identification and counting of microplastics through basic image processing algorithms. Some advanced solutions introduce shallow deep learning models to improve recognition accuracy, but model application requires significant manpower for microplastic image annotation, strict division of training, validation, and test sets, and targeted fine-tuning for specific detection scenarios to barely meet basic recognition needs. This results in a high application barrier, weak scenario adaptability, and difficulty in rapid promotion and application. In the quantification stage, the calculation methods for key geometric features such as microplastic area and equivalent particle size lack unified standards, making it impossible to compare detection results from different scenarios and institutions. Furthermore, the storage of detection results lacks fixed rules, resulting in chaotic data formats and problems such as data aliasing and loss of key information, posing significant obstacles to the traceability, verification, and sharing of detection results, further reducing the practicality of this technology. Manual microscopic examination relies on the operator's experience, resulting in low recognition efficiency, high barriers to entry, and large subjective errors. Traditional deep learning solutions require extensive image annotation, dataset partitioning, and model training, demanding that operators master professional annotation tools and deep learning framework skills. This presents a high technical barrier, making it difficult for non-professionals to implement, and the training cycle is long, making it unsuitable for rapid detection needs.

[0004] Traditional machine vision relies solely on simple threshold segmentation and contour extraction, lacking targeted noise filtering mechanisms. This makes it prone to misclassifying image noise and impurities as microplastics, resulting in insufficient recognition accuracy and weak anti-interference capabilities, leading to significant deviations in count and area calculations. Furthermore, the lack of anomaly handling mechanisms such as division-by-zero protection makes the process susceptible to interruptions, impacting the stability of the detection process. Moreover, if existing deep learning solutions fail to meet recognition accuracy standards, samples must be re-labeled, model structure adjusted, and retrained, making the verification and optimization process cumbersome, costly, and poorly adaptable to various scenarios. The calculation formulas for geometric features such as equivalent particle size, roundness, and aspect ratio of microplastics are inconsistent, shape classification rules are vague, and the detection results for the same batch of samples vary significantly under different times and by different personnel, lacking practical physical meaning and making effective comparisons impossible across different laboratories and detection scenarios. Summary of the Invention

[0005] This invention aims to at least solve the technical problems existing in the prior art, and in particular, it innovatively proposes a method and system for identifying the number and size of microplastic particles.

[0006] To achieve the above-mentioned objectives of this invention, this invention provides a method for identifying the number and size of microplastic particles, the method comprising: S1. Collect a standard image dataset of microplastics, and standardize the pixels and physical scale in the image dataset to establish a standardized conversion model of pixels and physical scale under a fixed magnification. S2. Based on the standardized conversion model and the actual physical specifications of the slide groove, the actual physical coverage size of a single image data is calculated, and the number of samples is obtained. S3. Based on the sampling quantity, preprocess and extract features from the image dataset to obtain a database of typical microplastic features; S4. Based on the database of typical microplastic features, construct a microplastic recognition model using semi-supervised learning and output microplastic candidate regions; S5. Extract the outer contour of the target based on the microplastic candidate region for subsequent characterization calculations; S6. Construct a dual quantization filtering rule to filter low-confidence microplastic identification results in the target outer contour and obtain an effective plastic contour. S7. Based on the standardized conversion model, the effective plastic profile is converted into a unified physical quantity to obtain the statistical results of plastic quantification.

[0007] In another aspect, the present invention also provides a system for identifying the number and size of microplastic particles, the system comprising: processor; Memory used to store processor-executable instructions; The processor is configured to implement the method for identifying the number and size of microplastic particles when executing the executable instructions.

[0008] The beneficial effects of this invention are as follows: This invention systematically solves the core pain points of low efficiency, poor accuracy, and incomparable data in traditional microplastic detection through standardized calibration and dual quantization filtering rules. Specifically, a pixel-physical scale conversion model constructed using the standard scale of a metallurgical microscope achieves accurate conversion between pixels and micrometers at a fixed magnification. Combined with the physical specifications of the slide grooves to deduce the coverage size of a single image, it ensures the uniformity of physical quantities in detection results across different laboratories and scenarios, solving the quantification problem of "pixel values ​​having no actual physical meaning" in traditional methods. The microplastic recognition model constructed using semi-supervised learning overcomes the limitations of traditional deep learning, which requires extensive annotation and long training cycles. It achieves efficient recognition with low annotation costs through a typical feature database. Combined with the division-by-zero protection mechanism built into the YOLOv8x-seg model, it avoids the risk of program interruption and improves the stability of the detection process. The dual quantization filtering rule effectively filters out false positives such as noise and fibrous impurities through dual verification of confidence level and geometric features. Combined with OpenCV contour extraction and unified classification rules for roundness / aspect ratio, it standardizes the shape determination of fibrous and granular microplastics, solving the problem of "subjective judgment differences" caused by human experience. The final output of plastic quantification statistics includes unified physical quantities such as quantity, equivalent particle size, and physical coverage area, supporting cross-scenario comparison and data traceability. It realizes an upgrade of the detection paradigm from "reliability to human experience" to "standardized, automated, and reproducible", significantly improving detection efficiency and result consistency, lowering the technical threshold, and promoting the practical and large-scale application of microplastic detection technology.

[0009] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0010] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which: Figure 1 This is a flowchart of a method for identifying the number and size of microplastic particles according to the present invention.

[0011] Figure 2 This is a schematic diagram of a microplastic identification model for a method of identifying the number and size of microplastic particles according to the present invention.

[0012] Figure 3 This is an iterative optimization flowchart of the microplastic identification model for a method of identifying the number and size of microplastic particles according to the present invention.

[0013] Figure 4 This is an experimental flowchart of a method for identifying the number and size of microplastic particles according to the present invention.

[0014] Figure 5 This is a flowchart illustrating the conversion between pixels and physical quantities (micrometers) for a method of identifying the number and size of microplastic particles according to the present invention. Detailed Implementation

[0015] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0016] Example 1 like Figures 1 to 5 As shown, a method for identifying the number and size of microplastic particles includes: S1. Collect a standard image dataset of microplastics, and standardize the pixels and physical scales in the image dataset to establish a standardized conversion model of pixels and physical scales at a fixed magnification. The standardized conversion model is constructed using the microscope scale that comes with the metallurgical microscope.

[0017] In step S1, it is necessary to explain in detail that the microscope scale is placed in the center of the metallurgical microscope stage, and the microscope is adjusted to a fixed optical magnification of 10x to ensure that the scale scale is clearly imaged without distortion. Then, the high-definition CCD camera that comes with the microscope is used to acquire the scale image, and the image resolution is set to 3840×2160 pixels to ensure accurate capture of scale details. Next, the acquired scale image is processed by professional image analysis software to match the known micron-level scale (such as 10μm, 20μm, etc.) on the scale with the number of pixels in the corresponding area. This calibration process is repeated at least 5 times, and the average value of each calibration result is taken as the final conversion factor to obtain the calibration result that 1 pixel corresponds to 4.92 microns. Thus, a two-way conversion rule is established: the calculation formula for converting micron-level physical size to pixel size is pixel value = physical size × 4.92, and the calculation formula for converting pixel size to micron-level physical size is physical size = pixel value × 0.20305, to ensure the consistency and comparability of conversion results in different batches and different scenarios. Simultaneously, based on the completion of scale calibration, a database of typical microplastic features was constructed: microplastic samples of common materials such as polyethylene, polypropylene, and polystyrene were collected and prepared into standard samples with different particle sizes (1-500μm) and different shapes (round, fibrous, irregular). Microscopic images of these samples were collected and the physical size, shape type, material information, and other features of the particles were labeled to form a microplastic image dataset covering multi-dimensional features, providing basic data support for the training and optimization of subsequent intelligent recognition models.

[0018] S2. Based on the standardized conversion model and the actual physical specifications of the slide groove, the actual physical coverage size of a single image data is calculated, and the number of samples is obtained. In step S2, it is necessary to explain in detail that, based on the pixel-micron standardized conversion model established in step S1, for a 3840×2160 pixel acquired image, the actual physical coverage size in the horizontal and vertical directions is calculated respectively: horizontal physical size = 3840 pixels × 0.20305 microns / pixel ≈ 780.49 microns, vertical physical size = 2160 pixels × 0.20305 microns / pixel ≈ 439.02 microns. Finally, the actual physical coverage area of ​​a single image is determined to be approximately 781 microns × 439 microns (rounded to the nearest integer).

[0019] The actual physical dimensions of the slide groove are a square area of ​​7000 μm × 7000 μm. To achieve non-overlapping, full coverage acquisition of the sample liquid within the groove, the number of field-of-view segments in the horizontal and vertical directions needs to be calculated: Required number of segments in the horizontal direction = 7000 μm ÷ 781 μm ≈ 8.97, rounded up to 9 segments; Required number of segments in the vertical direction = 7000 μm ÷ 439 μm ≈ 15.94, rounded up to 16 segments. Therefore, a total of 9 rows × 16 columns = 144 images need to be acquired.

[0020] During actual data acquisition, a field of view setting with uniform row and column arrangement was adopted to ensure that adjacent fields of view do not overlap and cover the effective area of ​​the groove. At the same time, incomplete fields of view caused by optical distortion and uneven sample distribution on both sides and the top and bottom edges of the groove were discarded, and only the complete field of view of the middle 9 rows and 16 columns was retained for acquisition to ensure the validity and representativeness of the sampled data.

[0021] S3. Based on the number of samples, preprocess and extract features from the image dataset to obtain a database of typical features of microplastics; In step S3, it is necessary to explain in detail the batch preprocessing of the 144 complete field-of-view images: First, a Gaussian filtering algorithm (kernel size set to 3×3) is used to remove random noise in the images, reducing the interference of noise on subsequent feature recognition; then, histogram equalization technology is used to adjust the gray-scale distribution of the images, improve the contrast between microplastic particles and the background, and enhance the clarity of particle boundaries; then, each image is precisely cropped according to the effective area range of the slide groove, and invalid areas caused by optical distortion or uneven sample distribution are removed to ensure that the image retains only the complete field-of-view content. After preprocessing, microplastic feature extraction is performed: the outer contour of microplastic particles in the image is extracted using the Canny edge detection operator, and basic parameters such as pixel area, perimeter, minimum bounding rectangle width and height of the particles are calculated through contour analysis; at the same time, texture features of the particles are extracted, including contrast, energy, entropy and local binary mode (LBP) features in the gray-level co-occurrence matrix (GLCM), to enrich the feature dimensions; finally, all pixel-level features are converted into micron-level physical features through the pixel-micron normalization conversion model established in step S1, and associated with the shape type (circular, fibrous, irregular) and material information (polyethylene, polypropylene, etc.) of the particles. These multi-dimensional feature data are added to the typical feature database of microplastics, providing comprehensive and accurate feature support for the subsequent training of intelligent recognition models.

[0022] S4. Based on a database of typical microplastic features, a microplastic recognition model is constructed using semi-supervised learning, and candidate regions for microplastics are output. The microplastic recognition model includes a division-by-zero protection mechanism. The microplastic recognition model is built based on YOLOv8x-seg.

[0023] In step S4, it is necessary to explain in detail that, firstly, based on the YOLOv8x-seg pre-trained model as the basic framework, its pre-trained weights for general image segmentation tasks are loaded, and the model's feature extraction network and segmentation head parameters are initialized; then, about 100 auxiliary samples labeled in the microplastic typical feature database are used as weakly supervised signals input to the model, and a pseudo-label strategy in semi-supervised learning is adopted to make preliminary predictions on a large number of unlabeled microplastic images in the database, generating high-confidence pseudo-labels. The pseudo-label samples are mixed with the labeled samples to form a training set, and the segmentation accuracy and generalization ability of the model are optimized through multiple rounds of iterative training.

[0024] Secondly, the core parameters of the model were adapted and adjusted according to the hardware configuration of the acquisition device (such as CPU / GPU performance and memory capacity) and the input image size (3840×2160 pixels): a reasonable batch size (such as 8 or 16 depending on the GPU memory size), a learning rate (the initial learning rate was set to 1e-4 and dynamically adjusted using a cosine annealing strategy), and a preprocessing method for the input image (sliced ​​into 640×640 pixels and preprocessed to ensure that the model can run stably and achieve the required segmentation accuracy in different hardware environments.

[0025] Furthermore, the built-in division-to-zero protection mechanism of the model is specifically implemented as follows: In the contour parameter calculation stage after instance segmentation, outlier detection logic is added. When it is detected that the contour perimeter of a candidate region is zero, the pixel area is zero, or the contour coordinates are abnormal, the region is automatically marked as invalid and the subsequent parameter conversion and feature calculation steps are skipped. At the same time, before calculating indicators that rely on division operations, such as roundness and aspect ratio, the denominator (such as the square of the perimeter, width / height value) is checked for non-zero values. If the denominator is zero, the preset outlier is directly output to avoid the program crashing due to division by zero and to ensure the robustness of the model operation.

[0026] Finally, the microplastic candidate regions output by the model include the bounding rectangle coordinates of each particle, pixel-level contour information, and preliminary confidence scores, providing basic input for subsequent contour filtering, parameter conversion, and feature calculation. The output format of the candidate regions adopts standard JSON and TXT structures, which facilitates data interaction with subsequent processing modules and improves the overall collaborative efficiency.

[0027] S5. Extract the outer contour of the target based on the candidate region of microplastics; the outer contour of the target is extracted using the cv2.findContours function of OpenCV.

[0028] In step S5, it is important to explain in detail that when calling the OpenCV function `cv2.findContours`, the contour retrieval mode is set to `cv2.RETR_EXTERNAL` to ensure that only the outermost contour of the microplastic particles is extracted, effectively avoiding interference from the inner contours in subsequent parameter calculations. Simultaneously, the `cv2.CHAIN_APPROX_SIMPLE` approximation method is used to compress the contour points, reducing the storage and processing of redundant data. Next, all extracted contours are traversed, and preliminary screening is performed using the pixel thresholds set in step S3 (area not less than 50 pixels, perimeter not less than 20 pixels). Contours that do not meet the area or perimeter requirements are directly removed, reducing invalid calculations. For the selected valid contours, the cv2.minAreaRect function is used to calculate their contours, then the perimeter, area, and the contour and central axis of the extracted target segmentation mask are calculated. The contours are then unfolded along the central axis into a one-dimensional continuous shape. The ratio of the total length to the average width of the unfolded microplastic section is calculated to obtain the aspect ratio, enabling quantitative analysis of the dimensions of the curved microplastic morphology and providing a foundation for subsequent conversion of pixel parameters to physical parameters. Furthermore, for possible anomalies during contour extraction (such as no contour return or abnormal contour point coordinates), pre-defined anomaly handling logic is implemented: if the number of contours is zero, the current image is marked as having no valid microplastic particles; if the contour point coordinates exceed the image range, they are automatically cropped to the valid area. Finally, the selected valid contour information (including contour point sets and bounding rectangle parameters) is stored in a structured data format and associated with the original image ID.

[0029] S6. Construct a dual quantization filtering rule to filter low-confidence microplastic identification results in the outer contour of the target and obtain an effective plastic contour. In step S6, it is necessary to explain in detail that the dual quantization filtering rule is divided into two levels: confidence filtering and physical feature filtering. Each level filters the data to ensure the accuracy of the effective contour. The first level is confidence filtering: For the microplastic candidate regions output in step S4, the confidence score of each region is extracted, and a confidence threshold of 0.8 is set (which can be customized according to the needs of the detection scenario). Candidate regions with confidence scores lower than this threshold are automatically filtered out, initially eliminating low-reliability results predicted by the model. The second level is physical feature filtering: For contours that pass the confidence level filtering, the pixel-micron standardized conversion model established in step S1 is used to convert the pixel area, perimeter, minimum bounding rectangle width and height of the contour into micron-level physical features. Then, a second screening is performed based on the preset physical feature thresholds: ① Particle size range screening: The equivalent diameter of the particles is calculated (diameter for round particles, length for fibrous particles, and ratio of the total length of the microplastic after unfolding to the average width of the cross section for irregular shapes), and contours with equivalent diameters in the range of 1-500μm are retained; ② Shape feature rationality screening: The roundness (roundness = 4π × area / perimeter²) is verified to meet the criteria for round microplastics (≥0.7), and the aspect ratio is verified to meet the criteria for fibrous particles (≥2), or it is confirmed to be irregular (not meeting the irregular shape criteria of the previous two), and contours with abnormal shape features are excluded; ③ Outlier exclusion: Contours with zero area, zero perimeter or parameter overflow that occur during the physical feature calculation process are directly marked as invalid and filtered. After completing the dual quantization filtering, the retained contours are the valid plastic contours. At the same time, the system automatically records the reason for each filtered contour (such as insufficient confidence, particle size exceeding the limit, abnormal shape, etc.) and associates it with the corresponding image ID to ensure the traceability of the filtering process.

[0030] S7. Based on a standardized conversion model, the effective plastic profile is converted into a unified physical quantity to obtain the quantitative statistical results of plastics. The microplastic shape classification adopts a unified judgment rule based on the quantitative statistical results of plastics, classifying microplastics with a roundness of not less than m as circular microplastics, and classifying microplastics with an aspect ratio of not less than n as fibrous microplastics.

[0031] In step S7, it is necessary to explain in detail that m is 0.7 and n is 2, which is consistent with the shape feature rationality screening conditions in step S6, ensuring the uniformity of the judgment rules. First, the pixel area, perimeter, minimum bounding rectangle width and height of the effective plastic outline are converted into micrometer-level physical quantities through the pixel-micrometer standardized conversion model established in step S1: physical area = pixel area × (0.20305 micrometers / pixel)², physical perimeter = pixel perimeter × 0.20305 micrometers / pixel, physical width = pixel width × 0.20305 micrometers / pixel, physical height = pixel height × 0.20305 micrometers / pixel; for the equivalent diameter, the physical diameter is directly taken for circular particles (2 × √(physical area / π)), the physical length (total length after microplastic unfolding) is taken for fibrous particles, and the diagonal length of the maximum bounding rectangle (√(physical width² + physical height²)) is taken for irregular particles.

[0032] Next, each valid contour is classified by shape: if the roundness is ≥0.7, it is determined to be a circular microplastic; if the aspect ratio (physical length / physical width) is ≥2 and the roundness is <0.7, it is determined to be a fibrous microplastic; the rest are determined to be irregular microplastics.

[0033] Based on the classification results and physical parameters, quantitative statistical results are generated, including: ① the total number of microplastics and the number and proportion of each shape category (round, fibrous, irregular); ② particle size distribution statistics, including the number and proportion of particles in each of the four intervals: 1-50μm, 51-100μm, 101-200μm, and 201-500μm; ③ statistics of key physical parameters, such as average particle size, maximum particle size, minimum particle size, average roundness, and average aspect ratio.

[0034] The statistical results are output in structured tables, generating visual charts such as particle size distribution histograms and shape percentage pie charts. Simultaneously, all statistical results are stored in association with key parameters such as the corresponding image ID, detection scene, magnification, and filtering threshold, ensuring the traceability and reproducibility of the statistical data. Finally, the system automatically integrates the quantitative statistical results into the detection report, supporting export to Excel or PDF formats for further analysis and application by users.

[0035] As an optional embodiment of the present invention, the method may also include iterative optimization of the microplastic identification model.

[0036] Figure 3The process involves iterative optimization and quantitative statistical application based on the basic model for automatic microplastic identification. When the model training results reach sufficient confidence, the microplastic image to be processed is acquired and input into the automatic identification model to obtain the identification result. Simultaneously, randomly selected identification results are used for verification analysis to eliminate the influence of uncertain factors, improve the accuracy of the automatic microplastic identification results, verify the reliability of the model, and complete the iterative optimization of the model. Based on the basic automatic identification model and key algorithms, standardized geometric feature calculations and quantitative statistics are performed. A standardized result storage and data traceability module is developed, using timestamp naming rules to create folders for storing detection results in the format YYYYMMDD_HHMMSS_Microplastic Identification Results. Each folder stores the original image, segmentation result image, contour extraction and filtering result image, and a quantitative statistical Excel spreadsheet. It also records key parameters such as the detection scene, magnification, filtering threshold, and proportion coefficient, fundamentally avoiding the mixing of results from multiple detections and facilitating subsequent data retrieval, traceability, and reproduction.

[0037] This invention focuses on the fields of environmental monitoring, machine vision inspection, and microplastic quantification analysis. It innovatively proposes a method for intelligent identification and quantification of microplastics based on the YOLOv8x-seg model and machine vision. This method can accurately quantify the shape, area, and number of microplastics without large-scale image annotation and model training, and achieve standardized management. The specific solution is as follows: First, a standard image dataset of microplastics was constructed. Common everyday items such as polyethylene plastic bottles and polypropylene packaging bags were selected as raw materials because they are widely present in the environment and are major potential sources of microplastics, making the samples prepared from these materials more representative. After pretreatment, controlled mechanical polishing, ultrasonic dispersion, and standardized slide packaging, the samples to be observed were prepared. The slide samples were placed under a metallurgical microscope, and microplastic images were acquired using a matching high-definition CCD camera. At least 50 non-overlapping fields of view were selected using a random sampling method to ensure coverage of different areas within the grooves of the slide. The acquired images were then subjected to denoising, enhancement, and other preprocessing operations. Finally, a database of typical microplastic features covering both the original and preprocessed images was constructed, providing solid data support for subsequent model construction.

[0038] Secondly, by introducing integrated machine vision and learning algorithms, a microplastic intelligent recognition model based on YOLOv8x-seg and semi-supervised learning is constructed to perform instance segmentation on images in the database. First, relying on the YOLOv8x-seg model weights pre-trained on a large-scale general image dataset, these weights have learned rich general image features and can quickly and accurately extract microplastic candidate regions automatically. Only a small number of auxiliary labeled samples are needed to complete the weak supervision signal construction for semi-supervised learning. The entire process eliminates the need for large-scale image annotation, complex dataset partitioning, and full-process model fine-tuning training. This approach not only compensates for the accuracy loss with a small number of labeled samples, reducing model training workload, but also significantly lowers the operational threshold. For the microplastic candidate regions output by YOLOv8x-seg segmentation, the OpenCV cv2.findContours function is called to extract the target's outer contour, focusing on outer contour extraction to avoid interference from the inner contour. A dual quantization filtering rule is constructed to filter low-confidence microplastic recognition results, and the extracted contours are screened to accurately remove false contours formed by image noise and sample impurities. A division-by-zero protection mechanism is added to avoid program errors such as division by zero and data overflow in extreme scenarios. The parameters of the basic model are set according to the device configuration and image size, ultimately forming an automatic recognition basic model that can accurately identify images in the database of typical microplastic features.

[0039] like Figure 2 As shown, from left to right, image data is first input into the YOLOv8x-seg model. After steps such as feature extraction and candidate region generation, and combined with a semi-supervised learning module, the final output is the microplastic identification result. The various modules in the model collaborate to complete the intelligent microplastic identification task. Based on the calibration results, a bidirectional conversion rule is established, clarifying that at 10x optical magnification, the formula for converting micrometer-level physical dimensions to pixel dimensions is: pixel value = physical size × 4.92, and the formula for converting pixel dimensions to micrometer-level physical dimensions is: physical size = pixel value × 0.20305.

[0040] Microplastic characterization calculations in pixel- and physical-scale normalized conversion models: Equivalent particle size: D= (Unit: μm); Circularity: C=4πS / L2 (S is the pixel area, L is the pixel perimeter, the closer the value is to 1, the rounder the particle). Aspect Ratio: AR = max(w / h, h / w) (w is the outline width, h is the outline height) Horizontal true field of view width: Vertical true field of view height: Effective field of view area of ​​a single image: The required number of field of view frames in the horizontal direction: 7000 ÷ 780.49 ≈ 8.97, rounded up to 9 frames. The required number of field of view frames in the vertical direction: 7000 ÷ 439.02 ≈ 15.94, rounded up to 16 frames. Effective coverage factor for fully covering the groove: 9 × 16 = 144 parts Solution dilution factor calculation: 10 mg of microplastics was uniformly dispersed in 3 ml of anhydrous ethanol solution. After thorough vortex sonication, 20 μl of the suspension was extracted and dropped into the groove of a glass slide. The sample volume accounted for 20 μl ÷ 3000 μl = 1 / 150 of the total system, and the corresponding dilution factor was 150.

[0041] Conversion of total microplastic quantity: Based on the assumption that microplastics are uniformly dispersed in the solution after thorough vortex ultrasonic treatment, an average quantity extrapolation method is adopted. This assumption has a certain degree of rationality in relevant research and practical experience. To determine the average number of microplastics per image in the effective field of view, the total number of microplastics per 10 mg is: This gives us the number of microplastics in an image multiplied by 21600, which is the number of microplastics weighing 10mg.

[0042] Finally, efficient verification, optimization, and scenario adaptation were performed. A manual verification method using metallurgical microscopy point spacing was employed. A random sample of 10% of the quantitative statistical results was reviewed, comparing the manually measured microplastic area and particle size with the calculated results of this method. For cases where errors exceeded the tolerance, complex model iteration or re-annotation training was unnecessary; simply adjusting the contour filtering threshold optimized the recognition accuracy. For example, when detecting small-diameter microplastics, the threshold could be appropriately lowered to improve the detection rate of small targets; when detecting samples with high impurities, the threshold could be appropriately increased to enhance anti-interference capabilities. Through simple threshold adjustments, the method can quickly adapt to the microplastic detection needs of different scenarios, significantly improving its generalization ability and practicality.

[0043] A microplastic intelligent recognition and quantification method based on YOLOv8x-seg and semi-supervised learning, including microplastic sample preparation and metallographic microscopic image acquisition steps, and also including the following steps: Based on the optical parameters of the metallographic microscopic system, carry out the standardization calibration of the physical scales of pixels and micrometers, establish a pixel and micrometer standard conversion model under a fixed magnification, and simultaneously complete the construction of a microplastic typical feature database; Based on the YOLOv8x-seg pre-trained model, combine the semi-supervised learning strategy to construct a microplastic intelligent recognition model, only construct weak supervision signals through a small number of auxiliary annotation samples, without carrying out large-scale image annotation, complex dataset division and full-process fine-tuning of the model; Based on the pixel-micrometer standard conversion model, reverse-infer the actual physical coverage size of a single captured image, and combine the actual physical specifications of the slide groove to determine the field-of-view arrangement rule and effective sampling quantity of image acquisition, and complete the full-coverage image acquisition of the sample to be detected; Input the captured microplastic image to be detected into the recognition model to perform instance segmentation, extract the target outer contour in the segmentation result, and filter out the effective microplastic contour through a standard filtering rule that combines pixel threshold and physical particle size threshold; Based on the pixel and micrometer standard conversion model, convert the pixel-level parameters of the effective microplastic contour into micrometer-level physical quantities, complete the standard calculation of multi-dimensional geometric features, and output the microplastic quantification statistical result with unified physical specifications; Adopt a preset unified storage rule to synchronously classify and file the calibration parameters, conversion model, detection original data and quantification results, and realize the traceable management of the entire detection process.

[0044] The standardization calibration of the physical scales of pixels and micrometers is completed using the standard scale supporting the metallographic microscope. Under a fixed optical magnification of 10 times, the standard scale image is captured by a high-definition CCD camera, the scale graduations are matched with the corresponding pixel quantities, and the average value is taken after multiple repeated calibrations to eliminate the accidental error of single calibration. Finally, the calibration result that 1 pixel corresponds to 4.92 micrometers is determined, providing a unified and accurate reference basis for the full-process conversion.

[0045] Figure 5 It is the pixel and micrometer standard conversion model. Based on the calibration result, a two-way conversion rule is established. It is clear that under an optical magnification of 10 times, the calculation formula for converting the micrometer-level physical size to the pixel size is pixel value = physical size × 4.92, and the calculation formula for converting the pixel size to the micrometer-level physical size is physical size = pixel value × 0.20305. All conversion processes strictly follow this fixed model to ensure the consistency and comparability of the conversion results under different batches and different scenarios.

[0046] The actual physical coverage size of a single acquired image is inversely calculated based on the pixel resolution and conversion model of the acquired image. For an acquired image of 3840×2160 pixels, the actual physical size in the length and width directions is calculated separately through the conversion model. Finally, the actual coverage area of ​​a single image is determined to be 781 micrometers × 439 micrometers, thus clarifying the actual physical area corresponding to a single image.

[0047] The field-of-view layout rules and effective sampling number for image acquisition were determined based on the actual physical specifications of the slide groove and the coverage size of a single image. The slide groove is a square area of ​​7000 μm × 7000 μm. Combined with the coverage size of a single image of 781 μm × 439 μm, it was calculated that the groove can accommodate 9 complete images in the length direction and 16 complete images in the width direction. Finally, it was determined that 144 images, totaling 9 rows and 16 columns in the middle, would be acquired. Incomplete fields of view that were disturbed on the sides and top and bottom edges were discarded to achieve non-overlapping full coverage acquisition of the sample liquid area.

[0048] The standardized filtering rules simultaneously set dual constraints of pixel threshold and physical particle size threshold. The pixel threshold is set to an area of ​​not less than 50 pixels and a perimeter of not less than 20 pixels, and the corresponding physical particle size constraint of not less than 1 micrometer is simultaneously set based on the conversion model. Through simultaneous filtering with dual thresholds, false contours formed by image noise and sample impurities are eliminated, while ensuring that the selected effective contours correspond to microplastic particles that meet the detection particle size requirements, thereby reducing the interference of invalid data on subsequent quantitative statistics.

[0049] The conversion from pixel-level parameters to micrometer-level physical quantities involves transforming the core pixel parameters of an effective microplastic profile—pixel area, pixel perimeter, profile width, and profile height—one by one using a pixel-to-micrometer standardized conversion model. This yields the corresponding micrometer-level actual area, perimeter, width, and height physical parameters, providing fundamental data with clear physical meaning for subsequent geometric feature calculations.

[0050] The standardized calculation of multi-dimensional geometric features, based on the converted micron-level physical parameters, uses a unified and standardized calculation formula to calculate the core indicators of equivalent particle size, roundness, and aspect ratio. The formula for roundness is 4π multiplied by the actual area and then divided by the square of the actual perimeter. The closer the value is to 1, the closer the particle is to a standard circle. The formula for aspect ratio is the maximum value of the ratio of actual width to actual height and the ratio of actual height to actual width. All calculation processes are based on physical quantities, eliminating calculation deviations caused by pixel size differences.

[0051] Microplastic shape classification adopts a unified judgment rule based on the calculation results of physical quantities. Microplastics with a roundness of not less than 0.7 are classified as circular microplastics, and microplastics with an aspect ratio of not less than 2 are classified as fibrous microplastics. By quantifying physical thresholds, the shape classification is automated and standardized, eliminating subjective errors caused by manual classification and ensuring the reproducibility of classification results.

[0052] The total microplastic count was performed based on uniform distribution characteristics and multi-dimensional conversion coefficients. First, microplastic identification and counting were performed on each of the 144 valid images. After removing outliers whose counts deviated from the overall average by more than 5%, the average of the valid data was taken as the number of microplastics in a single field-of-view image. Then, the total number of microplastics in a 20μL sample solution was calculated using the field-of-view conversion coefficient of 144. Combined with the volume ratio coefficient of 1 / 150 of 20μL sample solution to 3mL mother liquor, the total number of microplastics in a single field-of-view image was finally determined by multiplying the number of microplastics in a single field-of-view image by 21600, which directly yielded the total number of microplastics in a 10mg sample.

[0053] In the process of building the microplastic intelligent recognition model, the candidate regions for microplastics are automatically extracted by relying on the YOLOv8x-seg pre-trained weights. Only a little over one hundred auxiliary labeled samples are used to complete the construction of weak supervision signals for semi-supervised learning. At the same time, the core parameters of the model are adapted according to the hardware configuration of the acquisition device and the size specifications of the input image to ensure the segmentation accuracy and running stability of the model in different application scenarios.

[0054] The extraction of the target outer contour is accomplished using the OpenCV cv2.findContours function. By focusing on the extraction of the outer contour, the interference of the inner contour on subsequent parameter conversion and feature calculation is avoided. A division-by-zero protection mechanism is added during the contour screening process. For extreme scenarios such as no valid contour, abnormal contour pixel values, and contour perimeter of zero, abnormal data identification and correction logic is preset to actively avoid division by zero and data overflow problems that may occur during program operation, and ensure the stability of the entire process of parameter conversion and feature calculation.

[0055] The unified storage rules use a timestamp naming mechanism to create folders for storing detection results. The naming format is a fixed structure combining the year, month, day, hour, minute, and second with the microplastic identification results. Each folder stores four types of core data: original images, segmentation result images, contour extraction and filtering result images, and quantitative statistics. At the same time, it synchronously records key information such as calibration parameters, conversion models, detection scenarios, magnification, and filtering thresholds to avoid the mixing of multiple batches of detection results and ensure the traceability and reproducibility of the entire detection process. The thresholds and magnification parameters of the standardized filtering rules and conversion models can be customized and can be flexibly adapted according to the differences in optical magnification, microplastic particle size detection range, and image acquisition environment used in the detection, thereby improving the generalization ability and scenario adaptability of the method.

[0056] Example 2 A system for identifying the number and size of microplastic particles includes: a processor and a memory for storing processor-executable instructions; wherein the processor is configured to implement a method for identifying the number and size of microplastic particles when executing the executable instructions.

[0057] It should be noted that the computer device includes a processor and memory, and may also include one or more of the following: multimedia components, input / output (I / O) interfaces, and communication components. The processor controls the overall operation of the device and completes some or all of the steps in the method for identifying the number and size of microplastic particles. The memory stores various types of data supporting the device's operation and can be implemented using volatile or non-volatile storage devices and combinations thereof, such as SRAM and EEPROM. The multimedia components include a screen (such as a touchscreen) and audio components. The audio components are used for inputting and outputting audio signals and include a microphone and at least one speaker. The I / O interface provides an interface for the processor and other interface modules (such as a keyboard, mouse, virtual or physical buttons). The communication components are used for wired or wireless communication between devices. Wireless communication methods include Wi-Fi, Bluetooth, etc., and the communication components include Wi-Fi modules, etc. As a preferred embodiment, the computer device can be implemented using electronic components such as ASICs and DSPs to execute the aforementioned data fusion method.

[0058] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims

1. A method for identifying the number and size of microplastic particles, characterized in that, The method includes: Collect a standard image dataset of microplastics, and standardize the pixels and physical scale in the image dataset to establish a standardized conversion model of pixels and physical scale under a fixed magnification. Based on the standardized conversion model and the actual physical specifications of the slide groove, the actual physical coverage size of a single image data is calculated, and the number of samples is obtained. Based on the sampling quantity, the image dataset is preprocessed and features are extracted to obtain a database of typical microplastic features. Based on the database of typical microplastic features, a microplastic recognition model is constructed using semi-supervised learning, and microplastic candidate regions are output. Extract the outer contour of the target based on the microplastic candidate region; A dual quantization filtering rule is constructed to filter out low-confidence microplastic identification results in the target outer contour, thereby obtaining an effective plastic contour; Based on the standardized conversion model, the effective plastic profile is converted into a unified physical quantity to obtain the quantitative statistical results of plastics.

2. The method for identifying the number and size of microplastic particles as described in claim 1, characterized in that, The standardized conversion model was constructed using the standard scale that comes with a metallurgical microscope.

3. The method for identifying the number and size of microplastic particles as described in claim 1, characterized in that, The microplastic shape classification adopts a unified judgment rule based on the statistical results of plastic quantification. Microplastics with a roundness of not less than m are judged as round microplastics, and microplastics with an aspect ratio of not less than n are judged as fibrous microplastics.

4. The method for identifying the number and size of microplastic particles as described in claim 1, characterized in that, The outer contour of the target was extracted using the OpenCV function cv2.findContours.

5. The method for identifying the number and size of microplastic particles as described in claim 1, characterized in that, The method also includes iterative optimization of the microplastic identification model.

6. The method for identifying the number and size of microplastic particles as described in claim 1, characterized in that, The microplastic identification model has a division-to-zero protection mechanism.

7. The method for identifying the number and size of microplastic particles as described in claim 1, characterized in that, The microplastic identification model is built based on YOLOv8x-seg.

8. A system for identifying the number and size of microplastic particles, characterized in that, The system includes: processor; Memory used to store processor-executable instructions; The processor is configured to implement the method for identifying the number and size of microplastic particles according to any one of claims 1 to 7 when executing the executable instructions.