A method and system for real environment microplastic evaluation based on chemical verification

By constructing a high-quality training dataset guided by chemical truth and a dynamic threshold mechanism for local texture entropy, combined with a hierarchical intelligent verification strategy, the problems of low efficiency of manual screening and insufficient model generalization ability in microplastic detection are solved, and efficient and accurate automated detection of microplastics and quantitative evaluation of the entire process effectiveness are achieved.

CN122391701APending Publication Date: 2026-07-14SOUTHERN UNIVERSITY OF SCIENCE AND TECHNOLOGY

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies for microplastic detection suffer from low efficiency of manual screening, high subjectivity of results, insufficient generalization ability of deep learning models, inability to adapt to complex real-world environments, lack of effective means of quantifying detection sensitivity, and difficulty in achieving high-throughput monitoring and accurate monitoring across the entire size range.

Method used

We construct a high-quality training dataset guided by chemical truth values, and adopt a microplastic detection model with shallow feature fusion branch and spatial-channel dual attention mechanism. We combine a local texture entropy dynamic threshold mechanism and a hierarchical intelligent target verification strategy, and optimize the model through chemical verification to achieve adaptive background processing and reduce detection costs.

Benefits of technology

It significantly improves the accuracy and efficiency of microplastic detection, reduces the amount of chemical validation samples, shortens processing time, and the model can continuously adapt to new environments and morphologies, providing full-process efficacy quantitative evaluation and replacing manual detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122391701A_ABST
    Figure CN122391701A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of environmental monitoring and discloses a real environment microplastic evaluation method and system based on chemical verification. First, a microscopic image of a filter membrane sample to be measured is acquired and divided into sub-image blocks, and the microplastic detection model is input to output an original detection result. Local texture entropy values are calculated for each sub-image block, a judgment threshold is dynamically generated according to the entropy values, and screening is performed to obtain a preliminary detection result. The preliminary detection results of all the sub-image blocks are combined and deduplicated to obtain a comprehensive detection result. According to the initial confidence of the target in the comprehensive detection result, a hierarchical level is divided, a differentiated verification strategy is adopted, suspicious targets are screened, a spectrometer is automatically controlled to collect a spectrum, a chemical component true value is acquired, and the comprehensive detection result is updated. Through dynamic threshold screening, hierarchical intelligent verification and a model self-evolution mechanism, the application realizes accurate and automatic detection of microplastics, greatly reduces the chemical verification cost, and provides a full-chain solution for microplastic pollution monitoring.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the intersection of environmental monitoring technology and artificial intelligence image processing, and in particular to a real-world environmental microplastics assessment method based on chemical verification, as well as a computing device. Background Technology

[0002] Microplastics (MPs) are plastic particles with a diameter of less than 5 millimeters. Due to their widespread distribution in water, soil, and organisms and their potential ecological risks, they have become a global environmental concern. Accurate and efficient monitoring of the distribution, quantity, and type of microplastics in the environment is fundamental to assessing their ecological risks and developing control strategies. Currently, mainstream microplastic analysis methods include sample pretreatment, vacuum filtration, visual screening under an optical microscope, and polymer identification using micro-Fourier transform infrared spectroscopy (μ-FTIR) or Raman spectroscopy. However, this method has the following significant drawbacks:

[0003] First, manual screening is inefficient and highly subjective. Each filter membrane requires 10-20 minutes to screen manually, and the results heavily rely on the operator's experience, leading to poor consistency among different personnel. With the surge in environmental survey sample sizes, this purely manual approach can no longer meet the demands of large-scale, high-throughput monitoring. Second, existing deep learning technologies suffer from a disconnect between training data and real-world environments. Some studies have attempted to introduce deep learning models (such as YOLO and Faster R-CNN) for automated identification, but these studies are mostly based on laboratory-prepared microplastic samples with uniform backgrounds and standard morphologies for model training. However, real-world microplastics vary in color and shape due to aging, biofouling, and other factors, and the filter membrane background often contains complex interfering substances such as mineral particles and organic debris. When these models trained on laboratory data are applied to real samples, their recognition performance significantly decreases, and their generalization ability is severely insufficient. Furthermore, current technologies lack publicly available microplastic image datasets based on real-world sample collection and chemically validated by μ-FTIR. Meanwhile, there is a lack of a systematic evaluation framework to quantify the robustness and generalization ability of models under different environmental samples, making it difficult to make cross-sectional comparisons between different research methods and to reliably predict the performance of models in actual field monitoring. Existing evaluations mostly focus on macro-level indicators such as overall precision and recall, failing to deeply analyze the correlation between model performance and key physical properties of microplastics (especially particle size). For small-sized microplastics (<500μm), which are crucial for environmental monitoring, existing technologies lack effective means to quantify detection sensitivity, making it impossible to determine the effective detection limit of the model and limiting its ability to accurately monitor microplastics across the entire size range.

[0004] Therefore, there is an urgent need for a smart detection method and system for microplastics that can deeply integrate deep learning with chemical analysis, has adaptive capabilities, and can achieve full-process efficiency quantification. Summary of the Invention

[0005] (a) Technical problems to be solved

[0006] In view of the above-mentioned shortcomings and deficiencies of the prior art, this application provides a chemically validated real-world environment microplastics evaluation method and system, aiming to solve the following technical problems:

[0007] How to construct a high-quality training dataset so that the model can adapt to the complex morphology and background interference of microplastics in real environment; how to adaptively handle the differences in background complexity of different regions of filter membrane image during detection process, and balance the false detection rate and false negative rate; how to significantly reduce the cost and time of chemical verification while ensuring the credibility of detection results; and how to achieve continuous evolution of the model so that it can adapt to new environments and new morphologies.

[0008] (II) Technical Solution

[0009] To achieve the above objectives, the main technical solutions adopted in this application include:

[0010] In a first aspect, embodiments of this application provide a real-world microplastics evaluation method based on chemical verification, the specific steps of which include:

[0011] S1. Obtain a microscopic image of the filter membrane sample to be tested, and divide the microscopic image into multiple sub-image blocks with a preset overlap rate; input each sub-image block into a pre-trained microplastic detection model, and output the original detection result corresponding to each sub-image block; the original detection result includes the bounding box coordinates, category label, and initial confidence of each detected microplastic candidate target in the sub-image block;

[0012] The microplastic detection model includes a shallow feature fusion branch and a spatial-channel dual attention mechanism.

[0013] S2. Calculate the local texture entropy value of each sub-image block. Based on the local texture entropy value, dynamically generate the corresponding judgment threshold according to the preset positive correlation mapping rule. Filter the original detection results according to the judgment threshold to obtain preliminary detection results.

[0014] S3. Map the preliminary detection results of all sub-image blocks to the global coordinate system of the entire microscopic image and merge them. Then, perform deduplication on the merged results to obtain the comprehensive detection result. The comprehensive detection result includes the global bounding box coordinates, category labels, and initial confidence scores of all retained targets.

[0015] S4. Based on the initial confidence level of the retained targets in the comprehensive detection results, screen out the suspicious targets to be verified, and control the spectral analysis equipment to automatically move to the location of each suspicious target to collect spectra. Obtain the true value of the chemical composition of each suspicious target by comparing with the standard spectral library, and update the comprehensive detection results.

[0016] The comprehensive detection results include the bounding box coordinates, category labels, initial confidence levels, chemical spectral matching degrees, and chemically verified true values ​​of all ultimately retained targets.

[0017] Optionally, in some embodiments of this application, a training step for the microplastic detection model is included before S1, which includes:

[0018] S01. Construct a training dataset, which includes images and annotation information of positive microplastic samples and negative non-microplastic samples;

[0019] The training dataset is used to perform preliminary inference using the basic detection model, and samples whose output confidence level is within a preset critical range are selected as samples to be verified. The chemical truth labels of the samples to be verified are obtained after external chemical composition verification. The samples with chemical truth labels are included in the training set.

[0020] For samples that are chemically verified as microplastics, they are added as enhanced positive samples; for samples that are chemically verified as non-microplastics but whose model outputs high confidence, they are added as hard negative samples, thus constructing an optimized training dataset guided by chemical truth.

[0021] S02. Use the optimized training dataset to iteratively train the microplastic detection model, update the model parameters, until the model converges, and obtain the trained microplastic detection model.

[0022] The microplastic detection model includes a shallow feature fusion branch and a spatial-channel dual attention mechanism.

[0023] Optionally, in some embodiments of this application, calculating the local texture entropy value of each sub-image patch in step S2 includes:

[0024] Convert each of the sub-image blocks into a grayscale image;

[0025] Calculate the probability p(i) of each gray level i appearing in the grayscale image, where the value of i is an integer ranging from 0 to 255;

[0026] The local texture entropy value of each sub-image patch is calculated according to the following Shannon entropy formula:

[0027] ;

[0028] Among them, E local This represents the local texture entropy value of the current sub-image patch.

[0029] Optionally, in some embodiments of this application, step S2 involves dynamically generating a corresponding judgment threshold based on the local texture entropy value according to a preset positive correlation mapping rule, including:

[0030] Calculate the local texture entropy E of the current sub-image patch. local The normalization coefficient α:

[0031] ;

[0032] Among them, E min and E max These are the minimum and maximum values ​​of the local texture entropy of all sub-image blocks in the entire filter membrane micrograph, respectively;

[0033] The determination threshold is calculated according to the following formula:

[0034]

[0035] in, This is the preset minimum judgment threshold; This is the preset maximum judgment threshold.

[0036] Optionally, in some embodiments of this application, S4 includes:

[0037] Based on the initial confidence level, the retained targets are divided into multiple confidence levels, and different verification strategies are applied to different levels to filter out a set of suspicious targets to be verified.

[0038] Based on the global coordinates of each target in the set of suspected targets, the optimal inspection path of the spectrometer's motorized stage is generated using the traveling salesman problem approximation algorithm.

[0039] The electric stage is controlled to move automatically along the optimal inspection path, and the spectra of each suspicious target are collected in sequence and compared with the standard spectral library to obtain the chemical spectrum matching degree and the true value of chemical composition of each suspicious target, and the comprehensive detection results are updated.

[0040] Optionally, in some embodiments of this application, the step of dividing the retention target into multiple confidence levels based on the initial confidence level and performing differentiated verification strategies for different levels includes:

[0041] Targets with an initial confidence level lower than the first preset threshold are classified as low confidence level and discarded directly, and are not included in the verification queue;

[0042] Targets with initial confidence levels between the first and second preset thresholds are classified as critical confidence levels and all are included in the verification queue.

[0043] Targets with an initial confidence level higher than the second preset threshold are classified as high confidence level, and a portion of the targets are selected and included in the verification queue according to the dynamic sampling ratio.

[0044] The dynamic sampling ratio is adjusted in real time based on the accuracy of recent verification results; when the accuracy of N consecutive sampling inspections is higher than the first accuracy threshold, the sampling ratio is reduced; when the accuracy of M consecutive sampling inspections is lower than the second accuracy threshold, the sampling ratio is increased.

[0045] Optionally, in some embodiments of this application, the implementation of differentiated verification strategies for different levels further includes an optimization step based on particle size classification:

[0046] The equivalent diameter of each retained target is estimated from the comprehensive detection results, and the particle size is divided into at least two levels;

[0047] The verification strategy is determined by combining the confidence level and the particle size level, wherein the target of the first particle size level receives a higher verification priority or verification ratio than the target of the second particle size level at the same confidence level, and the first particle size level is smaller than the second particle size level.

[0048] Optionally, in some embodiments of this application, a self-evolutionary step of the microplastic detection model is included after S4:

[0049] An incremental sample library is established to associate and store the true values ​​of the chemical components with the corresponding image samples and spectral features;

[0050] If chemical verification confirms that the sample is microplastic, then the sample is marked as a positive sample; if chemical verification confirms that the sample is not microplastic and the initial confidence level of the model output is higher than the preset false detection threshold, then the sample is marked as a hard negative sample.

[0051] When the number of newly added hard negative samples in the incremental sample library reaches the preset trigger condition, lightweight fine-tuning training is started.

[0052] The backbone network parameters of the microplastic detection model are frozen, and only the parameters of the detection head module and the attention mechanism module are updated. A predetermined proportion of representative old samples are randomly selected from the historical sample library and mixed with the new samples to construct a replay training set. Iterative training is performed at a learning rate lower than that in the initial training stage. After training is completed, the updated model parameters are loaded using a hot-swap method.

[0053] Optionally, in some embodiments of this application, a spatial distribution analysis and feedback step is included after S4:

[0054] The true values ​​of the chemical components and their corresponding global coordinate information are mapped onto the two-dimensional coordinate system of the filter membrane sample to be tested, generating a material distribution heat map and an interference distribution heat map.

[0055] By analyzing the spatial aggregation characteristics of the material distribution heatmap and the interference distribution heatmap, if a high density of a certain interference or microplastic of a certain material is found in a preset area, the judgment threshold or verification strategy for the corresponding type in the subsequent detection of other areas of the filter membrane sample to be tested will be dynamically adjusted.

[0056] Secondly, embodiments of this application provide a computing device, including: a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program stored in the memory, specifically performing the method described in the above embodiments.

[0057] (III) Beneficial Effects

[0058] This application addresses the problem of poor generalization ability in traditional models caused by the disconnect between training data and real-world environments by constructing a high-quality training dataset guided by chemical truth values. Through a dynamic threshold mechanism based on local texture entropy, it achieves adaptive processing of background complexity in different regions of filter membrane images, effectively suppressing false detections in complex background areas and improving recall for small-particle microplastics in simple background areas. A hierarchical intelligent targeted verification strategy reduces the number of chemical verification samples by more than 60%, significantly shortening the processing time per filter membrane. A model self-evolution mechanism driven by verification results enables the model to continuously adapt to new environments and forms, with performance continuously improving as data accumulates. Through a full-process efficiency quantitative evaluation, it intuitively demonstrates that the system can replace manual labor in both efficiency and accuracy, providing a complete chain solution for microplastic pollution monitoring, from data construction and intelligent detection to targeted verification and efficiency evaluation. Attached Figure Description

[0059] Figure 1 This is a flowchart of a chemically validated real-world microplastics assessment method according to this application.

[0060] Figure 2 A microscopic image of a microplastic filter membrane obtained after filtering an environmental water sample according to an embodiment of this application;

[0061] Figure 3 This is a detection result diagram of a sub-image block of a filter membrane image using a microplastic detection model according to an embodiment of this application;

[0062] Figure 4 This is a diagram showing the detection results of a microplastic detection model for the entire filter membrane image according to an embodiment of this application;

[0063] Figure 5The diagram shows the training convergence curve and typical detection results of the microplastic detection model in this embodiment. (a) is a graph showing the change of loss function and evaluation index with the number of iterations, (b) is a graph of difficult samples under complex backgrounds, and (c) is a graph showing the model's recognition effect on microplastic targets.

[0064] Figure 6 This is a comparison image of a sample before and after infrared identification verified by spectral analysis according to an embodiment of this application;

[0065] Figure 7 The image shown is a standard infrared spectrum of a common microplastic, as described in one embodiment of this application. Detailed Implementation

[0066] To better explain and facilitate understanding of this application, the following detailed description of the application is provided in conjunction with the accompanying drawings and specific embodiments.

[0067] In existing technologies, automated detection and analysis methods for microplastics can be mainly categorized into the following two types:

[0068] The first category is the traditional method based on manual visual screening and chemical analysis. This method first pre-treats the collected environmental samples through digestion, density separation, and vacuum filtration to trap particulate matter on the filter membrane. Then, it involves manual observation and counting under an optical microscope, and each suspicious particle is verified by micro-Fourier transform infrared spectroscopy (μ-FTIR) or Raman spectroscopy to confirm its polymer type. The drawbacks of this method are: manual screening is extremely inefficient, requiring 10-20 minutes per filter membrane, and the results are heavily reliant on operator experience, making them highly subjective; while the chemical verification step is accurate, it is time-consuming and labor-intensive, failing to meet the high-throughput requirements of large-scale environmental surveys; furthermore, the purely manual approach is difficult to standardize, resulting in poor comparability of test results between different laboratories.

[0069] The second category is deep learning-based object detection methods. These methods attempt to introduce object detection models such as YOLO and Faster R-CNN, training them on microplastic images to achieve automated recognition. However, existing technologies have the following significant drawbacks: current research mostly uses laboratory-prepared microplastic samples with uniform backgrounds and standard morphologies for model training, which cannot reflect the color variations and irregular shapes of microplastics caused by aging and biofouling in the real environment, as well as the complex interference from mineral particles and organic debris in the filter membrane background. When the model is applied to real samples, its recognition performance drops significantly, and its generalization ability is severely insufficient. Existing technologies lack publicly available microplastic image datasets based on real-world sample collection and validated by μ-FTIR chemistry, making it difficult to compare different research methods and reliably predict the model's performance in actual monitoring. Existing evaluations mostly focus on macro-level indicators such as overall accuracy and recall, failing to deeply analyze the correlation between model performance and microplastic particle size. The sensitivity to detection of small-sized microplastics (<500μm) lacks effective quantitative evaluation, making it impossible to determine the effective detection limit of the model. Existing technologies typically only report the model's performance on the test set, without verifying the particle-level correlation between the model's recognition results and chemical analysis results, and lack quantitative comparison of the overall processing efficiency, failing to prove its feasibility and reliability in replacing manual work in practical applications. Only a globally fixed threshold is used to screen the model's detection results, without considering the significant differences in background complexity in different regions of the filter membrane micrograph.

[0070] Analysis of 100 real filter membrane images revealed that the texture entropy values ​​at the filter membrane edges, due to mineral particle aggregation, reached as high as 5.2–7.8, while those in the central region were only 1.5–3.6. Using a global threshold of 0.5, the false detection rate in high-entropy regions reached 32%, and the false negative rate in low-entropy regions reached 21%. This finding reveals a technical blind spot in existing technologies that ignores the influence of local image background features on the detection threshold. Furthermore, existing detection models are fixed after training and cannot be iteratively optimized using new samples accumulated in actual detection. As the environment changes and the morphology of microplastics evolves, the model performance gradually degrades, making it difficult to maintain stable and reliable detection results in the long term.

[0071] To address this issue, this application provides a real-world microplastic assessment method based on chemical verification. By constructing a high-quality training dataset guided by chemical truth values, it solves the problem of training data being disconnected from the real-world environment. Through a local texture entropy dynamic threshold mechanism, it achieves adaptive processing of background complexity in different regions of the filter membrane image, effectively suppressing false detections in complex background areas and improving the recall rate for small-particle microplastics in simple background areas. Through a hierarchical intelligent targeted verification strategy, it reduces the chemical verification sample size by more than 60%, shortening the processing time for a single filter membrane from 20 minutes manually to less than 3 minutes, significantly improving detection efficiency while ensuring the reliability of the results. Through a verification result-driven model self-evolution mechanism, the model can continuously adapt to new environments and morphologies, with performance continuously improving as data accumulates. Through a full-process efficiency quantification evaluation, it intuitively demonstrates that the system can replace manual labor in both efficiency and accuracy, effectively overcoming the shortcomings of existing technologies such as poor data quality, rigid thresholds, high verification costs, inability to evolve, and unquantifiable efficiency.

[0072] To better explain and facilitate understanding of this application, a detailed description of its embodiments is provided below in conjunction with the accompanying drawings. While exemplary embodiments of this application are shown in the drawings, it should be understood that this application can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a clearer and more thorough understanding of this application and to fully convey the scope of this application to those skilled in the art.

[0073] Example 1

[0074] Figure 1 According to this application, a chemically validated real-world environmental microplastics assessment method is proposed, such as... Figure 1 As shown, this chemically validated real-world microplastics assessment method includes:

[0075] S1. Obtain a microscopic image of the filter membrane sample to be tested, and divide the microscopic image into multiple sub-image blocks with a preset overlap rate using a sliding window; input each sub-image block into a pre-trained microplastic detection model, and output the original detection result corresponding to each sub-image block; the original detection result includes the bounding box coordinates, category label, and initial confidence of each detected microplastic candidate target in the sub-image block;

[0076] The microplastic detection model includes a shallow feature fusion branch and a spatial-channel dual attention mechanism.

[0077] S2. Calculate the local texture entropy value of each sub-image block. Based on the local texture entropy value, dynamically generate the corresponding judgment threshold according to the preset positive correlation mapping rule. Filter the original detection results according to the judgment threshold to obtain preliminary detection results.

[0078] S3. Map the preliminary detection results of all sub-image blocks to the global coordinate system of the entire microscopic image, and use the non-maximum suppression algorithm to remove duplicate detection targets caused by sliding window overlap to obtain the comprehensive detection result; the comprehensive detection result includes the global bounding box coordinates, class labels and initial confidence of all retained targets;

[0079] S4. Based on the initial confidence level of the retained targets in the comprehensive detection results, screen out the suspicious targets to be verified, and control the spectrometer to automatically move to the location of each suspicious target to collect spectra. Obtain the true value of the chemical composition of each suspicious target by comparing with the standard spectral library, and update the comprehensive detection results.

[0080] The comprehensive detection results include the bounding box coordinates, category labels, initial confidence levels, chemical spectral matching degrees, and chemically verified true values ​​of all ultimately retained targets.

[0081] This embodiment achieves adaptive processing of background complexity in different regions of the filter membrane image by calculating the local texture entropy value of sub-image blocks and dynamically generating a judgment threshold. The threshold is increased in complex background regions to reduce false detections, while the threshold is decreased in simple background regions to improve the recall rate of small-diameter microplastics, significantly improving overall detection accuracy. Based on initial confidence, suspicious targets are intelligently screened, and only targets with uncertain microplastic detection models are subjected to spectral verification, greatly reducing unnecessary chemical analysis workload. This significantly improves detection efficiency and reduces costs while ensuring the reliability of the results. From image acquisition, model recognition, threshold screening, merging and deduplication to spectral verification and report generation, the entire process is automatically executed by computer without manual intervention, reducing the processing time for a single filter membrane from 20 minutes using traditional manual methods to within a few minutes.

[0082] Example 2

[0083] Figure 1 This is a flowchart illustrating a chemically validated real-world microplastics assessment method according to this application. Figure 1 As shown, the microplastics evaluation method includes:

[0084] First, water or sediment samples are collected from the target ecosystem (such as rivers, mangroves, and sewage treatment plants). The samples are then subjected to oxidation digestion to remove organic matter, density flotation separation, and vacuum filtration. The separated particulate matter is retained on the filter membrane to prepare the filter membrane sample to be tested.

[0085] S1. Obtain a microscopic image of the filter membrane sample to be tested, and divide the microscopic image into multiple sub-image blocks with a preset overlap rate using a sliding window; input each sub-image block into a pre-trained microplastic detection model, and output the original detection result corresponding to each sub-image block; the original detection result includes the bounding box coordinates, category label, and initial confidence of each detected microplastic candidate target in the sub-image block; wherein, the microplastic detection model includes a shallow feature fusion branch and a spatial-channel dual attention mechanism;

[0086] S101, the control system drives the electric stage to move the filter membrane under test, and uses an ultra-depth-of-field microscope to perform high-resolution scanning of the entire filter membrane sample, acquiring a microscopic image of the filter sample with a resolution of up to 20,000 × 20,000 pixels, such as... Figure 2 As shown, the microscopic image of the microplastic filter membrane (scale bar 1000μm) demonstrates the scene of microplastics coexisting with complex backgrounds such as silt and biological debris in a real environment.

[0087] S102. The system uses sliding window technology to divide the microscopic image into multiple sub-image blocks of fixed size with a preset overlap rate, so as to adapt to the model input size and avoid particles being cut off by the window boundary.

[0088] In actual detection, due to their small size, microplastic particles may be located precisely at the cutting boundary between two sub-image blocks. If non-overlapping cutting (step size = 1024) is used, particles located at the boundary will be cut in half, causing the model to be unable to extract complete morphological features, thus resulting in missed detections.

[0089] Furthermore, overlapping regions provide multi-view redundancy. The same target may exhibit different confidence levels in different sub-blocks due to slight differences in illumination angle or background occlusion. The subsequent NMS step not only removes duplicates but also utilizes this redundancy to select the detection result from the best observation view (i.e., the bounding box with the highest confidence), further improving localization accuracy.

[0090] Therefore, this embodiment sets the overlap rate to 20%, i.e., the cutting step size is set to 820 pixels (1024×0.8). This means that there will be a 204-pixel wide overlap area between two adjacent sub-image blocks. After setting the overlap rate, even if a particle is exactly on the cutting line, it will definitely appear in its complete form in at least one sub-image block, ensuring that the model can capture the complete particle features.

[0091] S103. Input each sub-image block into the pre-trained microplastic detection model in sequence.

[0092] Among them, the microplastic-specific detection model is a neural network model trained on a dataset guided by chemical truth. It includes a shallow feature fusion branch for enhancing the extraction of features of small targets, and a spatial-channel dual attention mechanism for suppressing background noise of the filter membrane.

[0093] Specifically, this model is not a general object detection network, but has been deeply modified for the characteristics of microplastics:

[0094] Shallow Feature Fusion Branch: Microplastics (especially tiny particles <50μm) are prone to losing detail in deep networks. This model preserves and fuses high-resolution feature maps from the shallow layers of the network, ensuring that the edge textures of tiny particles can be fully extracted.

[0095] Spatial-channel dual attention mechanism: The filter membrane itself has a regular grid texture, which is easily misidentified as particles. This mechanism can automatically suppress the feature channel response corresponding to the grid texture, while enhancing the spatial region response of microplastics with typical high reflectivity and irregular edges, thereby accurately locking onto the target in complex backgrounds. The spatial attention module generates a heatmap to clearly indicate where microplastics are located (suppressing the filter membrane grid background); the channel attention module recalibrates which features are important (enhancing the high reflectivity and specific texture channels unique to plastics, and suppressing the fluorescence channels of organic matter).

[0096] The model outputs the raw detection results for each sub-image patch, including the results for each detected candidate target:

[0097] The bounding box coordinates (x, y, w, h) mark the location of the target in the image;

[0098] Category labels (such as fiber, fragment, film) are used by the model to classify the target morphology;

[0099] The initial confidence level (a value between 0 and 1, for example, 0.75 represents a 75% probability) is the level of certainty the model has about the target being microplastics.

[0100] The local detection results of the microplastic detection model on the filter membrane image are as follows: Figure 3 As shown, blue boxes label fibers and fragments, displaying confidence scores to demonstrate the model's accurate identification capability in local regions. The individual sub-image patches are then stitched together to form the global detection result. Figure 4 As shown.

[0101] Furthermore, prior to S1, a training step for the microplastic detection model is included:

[0102] S01. Construct a training dataset, which includes images and annotation information of positive microplastic samples and negative non-microplastic samples;

[0103] The training dataset is used to perform preliminary inference using a basic detection model, and samples whose output confidence level is within a preset critical range are selected as samples to be verified. The chemical truth labels of these samples are obtained after external chemical composition verification. Samples with chemical truth labels are then included in the training set.

[0104] For samples that are chemically verified as microplastics, they are added as enhanced positive samples; for samples that are chemically verified as non-microplastics but whose model outputs high confidence, they are added as hard negative samples, thus constructing an optimized training dataset guided by chemical truth.

[0105] S02. Use the optimized training dataset to iteratively train the microplastic detection model, update the model parameters, until the model converges, and obtain the trained microplastic detection model.

[0106] The microplastic detection model includes a shallow feature fusion branch and a spatial-channel dual attention mechanism.

[0107] Figure 5 This diagram illustrates the training convergence curve and typical detection results of the microplastic detection model in this embodiment. (a) shows the decreasing curve of the loss function and the increasing curve of the evaluation metrics (Precision, Recall, mAP) during model training, demonstrating stable model convergence and superior performance. Figure 5 As shown in (a), with the increase of the number of iterations, the model's localization loss (box_loss), target confidence loss (obj_loss), and classification loss (cls_loss) all decrease rapidly and tend to stabilize, while the precision and mean average accuracy (mAP) on the validation set significantly improve and remain stable at a high level (mAP_0.5: 0.95>0.65). This demonstrates that the improved model structure (shallow fusion + dual attention) has excellent convergence and generalization capabilities.

[0108] (b) This section presents challenging samples from real-world environments containing numerous similar impurities (such as algae and minerals). The red boxes indicate candidate targets (including some false positives) during the initial model screening, illustrating the complexity of the detection environment. Figure 5As shown in (b), the figure illustrates a typical 'difficult region' in a real filter membrane sample. It can be seen that the background is filled with a large number of irregularly shaped algal debris, mineral particles, and organic impurities (shown in red boxes in the figure). These non-plastic impurities are visually highly similar to microplastics, easily leading to a large number of false positives in traditional models. This is the core motivation for introducing 'local texture entropy dynamic screening' (S2) and 'chemical truth verification' (S4) in this scheme. Visual models alone cannot completely distinguish these impurities; texture analysis and chemical composition verification are required.

[0109] (c) This shows the final accurate identification result after processing with this method, demonstrating the model's high-confidence localization of fibers and fragments in complex backgrounds. Figure 5 As shown in (c), after the entire process of this solution, the model can accurately locate the real microplastic targets in complex backgrounds. The pink boxes in the figure accurately label the fibers and fragments, and give extremely high confidence scores (such as 0.9, 1.0), and effectively filter out similar interference objects shown in Figure (b).

[0110] S2. Calculate the local texture entropy value of each sub-image block. Based on the local texture entropy value, dynamically generate the corresponding judgment threshold according to the preset positive correlation mapping rule. Filter the original detection results according to the judgment threshold to obtain preliminary detection results.

[0111] Filter membrane images for microplastic detection are characterized by uneven backgrounds, numerous impurities, and mesh interference, making them entirely different from conventional application scenarios such as natural and medical images. It is necessary to remove obvious noise and false positives based on the complexity of the background. Texture entropy is a classic metric for measuring image complexity in image processing. In the microplastic detection scenario, texture entropy can quantify the degree of interference in the filter membrane background; areas with mineral particle aggregation have high entropy values, while clean areas have low entropy values. The background complexity varies greatly across different regions of the filter membrane image; edge areas often have aggregates of mineral particles and organic debris, resulting in chaotic textures, while the central areas are relatively clean. Traditional fixed threshold methods cannot adapt to this difference, leading to high false positive rates in complex background areas and high false negative rates in simple background areas. Local texture entropy provides an objective measure of background complexity for each sub-image patch, serving as a basis for subsequent threshold adjustments.

[0112] S201. For each sub-image block, convert it into a grayscale image, and calculate the probability p(i) of each grayscale level i appearing in the grayscale image, where the value of i is an integer from 0 to 255.

[0113] The local texture entropy value of each sub-image patch is calculated according to the following Shannon entropy formula:

[0114] ;

[0115] Among them, E local This represents the local texture entropy value of the current sub-image patch.

[0116] S202. Based on the local texture entropy value, dynamically generate the corresponding judgment threshold according to a preset positive correlation mapping rule, including:

[0117] Calculate the local texture entropy E of the current sub-image patch. local The normalization coefficient α:

[0118] ;

[0119] Among them, E min and E max These are the minimum and maximum values ​​of the local texture entropy of all sub-image blocks in the entire filter membrane micrograph, respectively;

[0120] Low entropy values ​​indicate that the background of the image region is clean and uniform (e.g., filter membrane edges or blank areas) with little noise; high entropy values ​​indicate that the background of the image region is cluttered and has rich texture (e.g., areas with dense algae, mineral deposits, or dense filter membrane mesh) with a lot of noise.

[0121] The determination threshold is calculated according to the following formula:

[0122] ;

[0123] in, This is the preset minimum judgment threshold; This is the preset maximum judgment threshold.

[0124] This linear interpolation formula guarantees that the threshold is within [T]. min ,T max The range changes smoothly and continuously with the background complexity, avoiding detection instability caused by abrupt changes.

[0125] The decision threshold is used to screen the confidence of the model's original detection results, and to achieve adaptive adjustment so that the decision threshold is higher as the background becomes more complex.

[0126] A single filter membrane may contain tens of thousands of particles, the vast majority of which are non-plastic impurities such as mineral particles and organic debris. Through dynamic threshold screening in this step, more than 90% of obvious impurities can be removed, significantly reducing the number of samples that need to be verified by expensive spectrometers, significantly reducing the workload of chemical testing, saving instrument operating costs, and extending the service life of precision equipment such as spectrometers.

[0127] When there are many interfering objects in a complex background area, the model is prone to false detection. Therefore, it is necessary to increase the threshold to strictly control the detection and reduce false positives. When there are few interfering objects in a simple background area, the characteristics of small-diameter microplastics are weak and the confidence of the model is low. Therefore, it is necessary to lower the threshold to allow more detection and reduce missed detections.

[0128] The threshold changes linearly within the range. When α=0 (simplest background), the preset lowest judgment threshold is used; when α=1 (most complex background), the preset highest judgment threshold is used.

[0129] The threshold mapping rule is determined as follows: the training set sub-image blocks are divided into 10 intervals according to texture entropy, the optimal threshold of each interval is calculated, and a linear mapping relationship is obtained by fitting.

[0130] S203, Utilizing the generated dynamic threshold T final The original detection results for the same sub-image patch are filtered, retaining only those with an initial confidence level ≥ T. final Candidate targets are identified, and preliminary detection results for the sub-image patch are obtained.

[0131] The model output removes obviously unreliable targets (with confidence levels lower than the current regional standard), reducing the burden of subsequent processing; the dynamic threshold ensures that the filtering standard matches the complexity of the regional background, which is more scientific than a globally fixed threshold.

[0132] Specifically, for scenario A (clean background area, low entropy value), since the background is very clean and there is little interference, even if the confidence level given by the model is not high (e.g., 0.4), the target is very likely to be a real microplastic. In this case, recall should be prioritized to prevent small targets from being missed; therefore, the strategy is to reduce the decision threshold (e.g., from 0.5 to 0.35).

[0133] For scenario B (a complex background with high entropy), the background is very cluttered, and the model can easily misclassify impurities as plastic. In this case, strict control is required, and only targets that the model is very confident about (confidence > 0.7) should be retained to prioritize accuracy and significantly reduce the false detection rate; in this case, the decision threshold should be increased (e.g., from 0.5 to 0.70).

[0134] The system iterates through all the original prediction results, compares their initial confidence scores with the dynamic threshold corresponding to the current subgraph, and retains only those prediction boxes whose initial confidence scores are higher than the dynamic threshold to form preliminary detection results.

[0135] S3. Map the preliminary detection results of all sub-image blocks to the global coordinate system of the entire microscopic image, and use the non-maximum suppression algorithm to remove duplicate detection targets caused by sliding window overlap to obtain the comprehensive detection result; the comprehensive detection result includes the global bounding box coordinates, class labels and initial confidence of all retained targets;

[0136] S301. Merge the preliminary detection results of all sub-image patches into the coordinate system of the entire filter membrane to obtain a candidate target set, such as... Figure 4 As shown.

[0137] Because the previously selected sliding windows overlap, the same particle may be detected by multiple adjacent sub-image blocks, resulting in duplication.

[0138] S302. Using the non-maximum suppression (NMS) algorithm, calculate the intersection-over-union (IoU) of different detection boxes. When the IoU exceeds a preset threshold (e.g., 0.5), retain the box with the highest confidence and delete other duplicate boxes.

[0139] The final result is a comprehensive detection result of the entire microscopic image, including the bounding box coordinates, class labels, and initial confidence scores of all preserved targets.

[0140] S4. Based on the initial confidence level of the retained targets in the comprehensive detection results, screen out the suspected targets to be verified, and control the spectrometer to automatically move to the location of each suspected target for spectral acquisition. Obtain the true chemical composition of each suspected target by comparing it with the standard spectral library, and update the comprehensive detection results. Specifically, this includes the following sub-steps:

[0141] S401. Divide the targets in the comprehensive detection results into three levels according to the initial confidence level:

[0142] Low confidence levels, with confidence levels below the first preset threshold (e.g., 0.3), are considered as background noise with extremely uncertain model, and are directly discarded by the system without proceeding to the subsequent spectral verification process.

[0143] Implementation Basis: Laboratory-grade chemical testing instruments (lasers, gratings, and detection units) are high-value precision assets, and their core components are easily consumable. Through pre-screening, this solution reduces the number of targets entering the spectrometer's field of view to 5%-10% of the original number, significantly reducing the instrument's ineffective operating load, avoiding the economic cost increase and accelerated equipment aging caused by frequent scanning of known impurities, and increasing the effective detection throughput of a single device per unit time by several times.

[0144] Critical confidence level: The confidence level is between the first preset threshold and the second preset threshold (e.g., 0.3~0.7). Such targets are uncertain objects in the model. The system includes them all in the verification queue, and their properties need to be confirmed through chemical verification.

[0145] High confidence level, with a confidence level higher than the second preset threshold (e.g., 0.7), these targets are highly confident in by the model. The system selects a portion of these targets according to a dynamic sampling ratio and includes them in the verification queue to monitor model performance drift.

[0146] S402. For targets with high confidence levels, execute the following dynamic sampling logic;

[0147] (1) Set the initial sampling ratio to 5%;

[0148] (2) Calculate the accuracy of recent (e.g., the most recent 100) sampled samples;

[0149] (3) If the accuracy rate of consecutive N sampling inspections is >98%, the sampling ratio is reduced to 2%;

[0150] If the accuracy rate of consecutive M sampling inspections is less than 95%, the sampling ratio will be increased to 15%.

[0151] S403. For the global coordinates of each target in the set of suspicious targets, generate a verification instruction list containing the coordinate information of all targets to be verified; use the Traveling Salesman Problem (TSP) approximation algorithm to calculate the optimal inspection path for the spectrometer's motorized stage to traverse all target coordinates; send the instructions to the spectrometer (such as a micro Raman spectrometer or a micro infrared spectrometer) to control the motorized stage to move automatically along the optimal path, automatically focus, and collect spectral data sequentially;

[0152] Compare the collected spectra with standard spectral libraries (such as...) Figure 7 As shown, the standard infrared spectra of common microplastics such as PE, PP, PET, and PA, as well as interfering substances such as quartz and mica, are compared to obtain the true values ​​of chemical composition (such as "PE fiber", "quartz particles", etc.).

[0153] Example of results: Figure 6 As shown, the left image is the initial detection result of the deep learning model (5 suspected targets were identified); the middle image is the infrared spectrum of the corresponding targets, of which 1 target (marked as "None") has a spectrum that does not match the standard library and is judged to be non-microplastic; the right image is the final result after spectral verification and confirmation, successfully eliminating 1 false positive target and retaining 4 real microplastics.

[0154] S404. During the spectral verification process, the system has the capability for real-time anomaly monitoring:

[0155] If, after the spectrometer moves to the designated coordinates, it fails to acquire a valid spectrum (signal-to-noise ratio SNR < 10) due to sample evaporation, stage micro-vibration, or focal plane shift, the system will not force an erroneous result; instead, it will mark the target as "spectral verification failed," automatically record its coordinates, and jump to the next target.

[0156] All "validation failures" will be presented as a separate section in the final report, prompting operators to conduct thorough manual verification to ensure data accuracy and avoid systematic errors caused by equipment fluctuations.

[0157] S405. Using coordinates as identifiers, match the true values ​​of chemical components returned by the spectrometer back to the target at the corresponding coordinates in the comprehensive detection results;

[0158] For verified targets, their initial category labels and confidence levels are replaced or supplemented with material information and spectral matching obtained from chemical verification; for unverified high-confidence targets, their initial category labels are retained and marked as "model high confidence unverified" in the report.

[0159] All target information is compiled to generate a pollution assessment report. The report should include at least the total number of microplastics, the quantity of each category, particle size distribution statistics, and material information for each particle. The final comprehensive test results include the bounding box coordinates, category labels, initial confidence levels, chemical spectral matching degrees, and chemically verified true values ​​of chemical composition for all retained targets.

[0160] Optionally, in step S4, the verification strategy is further optimized by incorporating particle size information:

[0161] (1) In the comprehensive detection results, the equivalent circle diameter or equivalent ellipse length of each retained target is calculated based on the bounding box coordinates or the particle contour obtained by the image segmentation algorithm;

[0162] (2) Divide the particle size into at least two grades (e.g., <50μm is small particle size, ≥50μm is large particle size).

[0163] (3) Determine the verification priority based on the confidence level and particle size class. For targets with smaller particle size classes (such as 10 μm ultra-small particles), a higher verification priority or verification ratio is assigned even at the same confidence level.

[0164] Technical effects of particle size information optimization and verification strategy: Small-sized microplastics pose a high environmental risk and are easily missed in detection. This mechanism effectively improves the detection reliability of high-risk small-sized targets.

[0165] Optionally, after step S4 is completed, online self-evolution of the model is performed, specifically including:

[0166] (1) Associate and store the true values ​​of chemical components with the corresponding image samples and spectral features:

[0167] If chemical testing confirms the presence of microplastics, mark it as a positive sample.

[0168] If chemical verification confirms that the sample is not a microplastic, and the initial confidence level of the model output is higher than the preset false positive threshold, it is marked as a hard negative sample. These samples have visual features highly similar to microplastics and are typical examples of samples that the model is prone to misclassifying. Focusing on these samples can effectively reduce the subsequent false positive rate.

[0169] (2) When the number of newly added hard negative samples or positive samples of a specific category in the incremental sample library reaches the preset trigger condition (such as accumulating to 1000), start lightweight fine-tuning training.

[0170] (3) Freeze the backbone network parameters of the microplastic detection model and only update the parameters of the detection head module and the attention mechanism module.

[0171] Randomly select old samples from the historical sample library at a predetermined proportion (e.g., 10%-15%), covering various typical scenarios (clear water, high turbidity sewage, sediment, etc.), and mix them with new samples to construct a replay training set. This prevents catastrophic forgetting and ensures that the model remains sensitive to basic features while adapting to new interference.

[0172] Iterative training is performed at a learning rate lower than that used in the initial training phase.

[0173] (4) After training is completed, the updated model parameters are loaded using a hot-replacement method, without restarting the detection system, thus achieving a monotonically increasing model performance.

[0174] Optionally, after step S4, spatial distribution analysis can be performed to optimize subsequent detection:

[0175] (1) Map the true values ​​of chemical composition and their corresponding global coordinate information to the two-dimensional coordinate system of the filter membrane sample to be tested, and generate a material distribution heat map and an interference distribution heat map;

[0176] (2) Analyze the spatial aggregation characteristics in the heat map. If a high density of a certain interfering substance (such as densely packed mica particles) or microplastics of a certain material is found in a specific area;

[0177] (3) Dynamic feedback adjustment: In subsequent testing of other areas of the filter membrane sample to be tested (or retesting of the same sample), the judgment threshold or verification strategy of the corresponding type of the area is dynamically adjusted.

[0178] For example, if mica particles are densely distributed in a certain area, the judgment threshold for candidate targets in that area will be increased by 10% in subsequent detections, or they will be forcibly included in the verification queue.

[0179] Performing spatial distribution analysis to optimize the effectiveness of subsequent detection techniques: Transforming isolated particle verification results into spatial patterns not only optimizes the detection of the current sample, but also feeds back to the preprocessing stage, reducing interference from the source.

[0180] In summary, this embodiment effectively solves the problem of feature loss of <50μm microparticles in deep networks by introducing shallow feature fusion branches and a spatial-channel dual attention mechanism, thus improving the locking accuracy in complex backgrounds. It achieves adaptive screening by quantifying background interference through local texture entropy, where "the more complex the background, the higher the threshold," overcoming the rigidity of fixed thresholds. Through a hierarchical strategy of "low-confidence discard, critical full verification, and high-confidence sampling," it reduces the amount of chemical validation samples, shortening the processing time for a single filter membrane from 20 minutes manually to less than 3 minutes. By constructing a hard negative sample library using chemical validation results and introducing an experience replay mechanism, the model can continuously adapt to new environments and morphologies, resulting in a sustained decrease in the false detection rate over long-term operation. From image acquisition, inference, screening, path planning to automatic spectral inspection and report generation, the entire process requires no manual intervention, providing an efficient, reliable, and evolving automated tool for microplastic pollution monitoring.

[0181] Example 3

[0182] Finally, this application also proposes a computing device including a processor and a memory, the memory storing a computer program, and the processor executing instructions stored in the memory so that the computing device performs the chemically validated real-world microplastics evaluation method described in the above embodiments.

[0183] It should be noted that any reference numerals placed between parentheses in the claims should not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention can be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In claims that enumerate several means, several of these means may be embodied by the same hardware. The use of the terms first, second, third, etc., is merely for convenience of expression and does not indicate any order. These terms can be understood as part of the component names.

[0184] Furthermore, it should be noted that in the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0185] In this application, unless otherwise expressly specified and limited, "above" or "below" the second feature can mean that the first and second features are in direct contact, or that they are in indirect contact through an intermediate medium. Furthermore, "above," "on top of," and "over" the second feature can mean that the first feature is directly above or diagonally above the second feature, or simply that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature can mean that the first feature is directly below or diagonally below the second feature, or simply that the first feature is at a lower horizontal level than the second feature.

[0186] In the description of this specification, the terms "one embodiment," "some embodiments," "embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0187] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make modifications, alterations, substitutions and variations to the above embodiments within the scope of this application.

Claims

1. A chemically validated method for evaluating microplastics in a real-world environment, characterized in that, include: S1. Obtain a microscopic image of the filter membrane sample to be tested, and divide the microscopic image into multiple sub-image blocks with a preset overlap rate; Each sub-image patch is input into a pre-trained microplastic detection model, and the original detection result corresponding to each sub-image patch is output. The original detection result includes the bounding box coordinates, class label, and initial confidence score of each detected microplastic candidate target in the sub-image patch. The microplastic detection model includes a shallow feature fusion branch and a spatial-channel dual attention mechanism. S2. Calculate the local texture entropy value of each sub-image block. Based on the local texture entropy value, dynamically generate the corresponding judgment threshold according to the preset positive correlation mapping rule. Filter the original detection results according to the judgment threshold to obtain preliminary detection results. S3. Map the preliminary detection results of all sub-image blocks to the global coordinate system of the entire microscopic image and merge them. Then, perform deduplication on the merged results to obtain the comprehensive detection result. The comprehensive detection result includes the global bounding box coordinates, category labels, and initial confidence scores of all retained targets. S4. Based on the initial confidence level of the retained targets in the comprehensive detection results, screen out the suspicious targets to be verified, and control the spectral analysis equipment to automatically move to the location of each suspicious target to collect spectra. Obtain the true value of the chemical composition of each suspicious target by comparing with the standard spectral library, and update the comprehensive detection results. The comprehensive detection results include the bounding box coordinates, category labels, initial confidence levels, chemical spectral matching degrees, and chemically verified true values ​​of all ultimately retained targets.

2. The method according to claim 1, characterized in that, Prior to S1, a training step for the microplastic detection model is included, which includes: S01. Construct a training dataset, which includes images and annotation information of positive microplastic samples and negative non-microplastic samples; The training dataset is used to perform preliminary inference using the basic detection model, and samples whose output confidence level is within a preset critical range are selected as samples to be verified. The chemical truth labels of the samples to be verified are obtained after external chemical composition verification. The samples with chemical truth labels are included in the training set. For samples that are chemically verified as microplastics, they are added as enhanced positive samples; for samples that are chemically verified as non-microplastics but whose model outputs high confidence, they are added as hard negative samples, thus constructing an optimized training dataset guided by chemical truth. S02. Use the optimized training dataset to iteratively train the microplastic detection model, update the model parameters, until the model converges, and obtain the trained microplastic detection model. The microplastic detection model includes a shallow feature fusion branch and a spatial-channel dual attention mechanism.

3. The method according to claim 1, characterized in that, The calculation of the local texture entropy value of each sub-image patch in S2 includes: Convert each of the sub-image blocks into a grayscale image; Calculate the probability p(i) of each gray level i appearing in the grayscale image, where the value of i is an integer ranging from 0 to 255; The local texture entropy value of each sub-image patch is calculated according to the following Shannon entropy formula: ; Among them, E local This represents the local texture entropy value of the current sub-image patch.

4. The method according to claim 1, characterized in that, In step S2, a corresponding judgment threshold is dynamically generated based on the local texture entropy value according to a preset positive correlation mapping rule, including: Calculate the local texture entropy E of the current sub-image patch. local The normalization coefficient α: ; Among them, E min and E max These are the minimum and maximum values ​​of the local texture entropy of all sub-image blocks in the entire filter membrane micrograph, respectively; The determination threshold is calculated according to the following formula: ; in, This is the preset minimum judgment threshold; This is the preset maximum judgment threshold.

5. The method according to claim 1, characterized in that, S4 includes: Based on the initial confidence level, the retained targets are divided into multiple confidence levels, and different verification strategies are applied to different levels to filter out a set of suspicious targets to be verified. Based on the global coordinates of each target in the set of suspected targets, the optimal inspection path of the electric stage of the spectral analysis equipment is generated using the traveling salesman problem approximation algorithm. The electric stage is controlled to move automatically along the optimal inspection path, and the spectra of each suspicious target are collected in sequence and compared with the standard spectral library to obtain the chemical spectrum matching degree and the true value of chemical composition of each suspicious target, and the comprehensive detection results are updated.

6. The method according to claim 5, characterized in that, The step of dividing the retained targets into multiple confidence levels based on the initial confidence level and implementing differentiated verification strategies for different levels includes: Targets with an initial confidence level lower than the first preset threshold are classified as low confidence level and discarded directly, and are not included in the verification queue; Targets with initial confidence levels between the first and second preset thresholds are classified as critical confidence levels and all are included in the verification queue. Targets with an initial confidence level higher than the second preset threshold are classified as high confidence level, and a portion of the targets are selected and included in the verification queue according to the dynamic sampling ratio. The dynamic sampling ratio is adjusted in real time based on the accuracy of recent verification results; when the accuracy of N consecutive sampling inspections is higher than the first accuracy threshold, the sampling ratio is reduced; when the accuracy of M consecutive sampling inspections is lower than the second accuracy threshold, the sampling ratio is increased.

7. The method according to claim 5, characterized in that, The differentiated verification strategy for different levels also includes an optimization step based on particle size classification: The equivalent diameter of each retained target is estimated from the comprehensive detection results, and the particle size is divided into at least two levels; The verification strategy is determined by combining the confidence level and the particle size level, wherein the target of the first particle size level receives a higher verification priority or verification ratio than the target of the second particle size level at the same confidence level, and the first particle size level is smaller than the second particle size level.

8. The method according to claim 1, characterized in that, The step S4 is followed by a self-evolutionary step for the microplastic detection model: An incremental sample library is established to associate and store the true values ​​of the chemical components with the corresponding image samples and spectral features; If chemical verification confirms that the sample is microplastic, then the sample is marked as a positive sample; if chemical verification confirms that the sample is not microplastic and the initial confidence level of the model output is higher than the preset false detection threshold, then the sample is marked as a hard negative sample. When the number of newly added hard negative samples in the incremental sample library reaches the preset trigger condition, lightweight fine-tuning training is started. The backbone network parameters of the microplastic detection model are frozen, and only the parameters of the detection head module and the attention mechanism module are updated. A predetermined proportion of representative old samples are randomly selected from the historical sample library and mixed with the new samples to construct a replay training set. Iterative training is carried out at a learning rate lower than that in the initial training stage. After training is complete, the updated model parameters are loaded using a hot-swap method.

9. The method according to claim 1, characterized in that, Following S4, spatial distribution analysis and feedback steps are also included: The true values ​​of the chemical components and their corresponding global coordinate information are mapped onto the two-dimensional coordinate system of the filter membrane sample to be tested, generating a material distribution heat map and an interference distribution heat map. By analyzing the spatial aggregation characteristics of the material distribution heatmap and the interference distribution heatmap, if a high density of a certain interference or microplastic of a certain material is found in a preset area, the judgment threshold or verification strategy for the corresponding type in the subsequent detection of other areas of the filter membrane sample to be tested will be dynamically adjusted.

10. A computing device comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 9.