Underwater microplastic detection method, system, and storage medium
By collecting and processing the polarization hologram of microplastics and using neural networks for classification and identification, the efficiency, accuracy and economical problems of underwater microplastic detection in the existing technology are solved, and efficient, accurate and lossless microplastic detection is achieved, with both economic and ecological benefits.
Patent Information
- Application Number
- CN202411929911.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-12-26
AI Technical Summary
The existing underwater microplastic detection technology is difficult to achieve efficient, real-time and non-destructive detection in marine environments, and there is a contradiction between detection accuracy, applicability, real-time and economics.
By collecting the polarization hologram of microplastics, images with different polarization directions are separated and fusion processing is performed, and a neural network is combined to classify and identify microplastics. The system includes a polarization hologram acquisition device, a preprocessing module and a classification identification module. It uses network structures such as shallow inverted residuals and fast self-attention units and deep inverted residuals and self-coordinated Transformer units to extract and fuse characteristic information.
It realizes fast and accurate microplastic classification and identification, improves detection efficiency and accuracy, has non-destructive testing methods, ensures sample integrity and reduces the impact on the environment, and has both economic and ecological benefits.
Smart Images

Figure CN119354891B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of microplastic detection, and in particular relates to an underwater microplastic detection method, system, and storage medium. Background Art
[0002] As the global plastic pollution problem becomes increasingly serious, environmental pollution caused by microplastics has become a pressing issue worldwide. Microplastics refer to plastic particles or plastic fragments with a diameter of less than 5 mm. These tiny plastic particles are widely found in oceans, lakes, rivers and soil, posing a huge threat to ecosystems and biological health. In recent years, the monitoring and detection of underwater microplastics has become a research hotspot in the field of environmental protection. However, due to the dispersion, morphological diversity and complexity of microplastics in underwater environments, existing underwater microplastic detection technologies face many challenges.
[0003] At present, the detection technologies of underwater microplastics mainly include physical and chemical methods, optical sensing methods, acoustic methods and biological monitoring methods. Physical and chemical methods such as infrared spectroscopy (FTIR), Raman spectroscopy, thermogravimetric analysis (TGA), etc. can accurately identify and analyze the chemical composition and physical characteristics of microplastics, but these methods usually require sample processing, are costly and complex to operate. The optical sensor method detects microplastics through optical imaging or laser scattering technology. Although it has a high detection speed, it is difficult to accurately identify microplastics of different shapes and sizes, and is limited by the turbidity of the underwater environment and is easily interfered by impurities. The acoustic method uses the propagation characteristics of sound waves to detect microplastics, which has certain application prospects, but its accuracy is still not high and requires more complex equipment support. In addition, the biological monitoring method uses aquatic organisms to accumulate and evaluate microplastics. Although it has certain ecological relevance, it lacks real-time and accuracy, and the results are greatly affected by the species and habitat of the organisms.
[0004] Although some progress has been made in the existing technology, there are still some problems that cannot be ignored in the practical application of the existing underwater microplastic detection technology, especially in the efficient, real-time and non-destructive detection of microplastics in the marine environment. There is no method that can simultaneously solve the contradiction between detection accuracy, applicability, real-time and economy. Therefore, it is of great practical significance to develop a technology that can efficiently, real-time and accurately detect underwater microplastics. Summary of the invention
[0005] In order to solve the above technical problems, the present invention provides an underwater microplastic detection method, system, and storage medium, aiming to provide an efficient detection solution suitable for complex underwater environments by optimizing detection technology and equipment, and to provide technical support for the monitoring and control of underwater microplastic pollution.
[0006] The technical solution provided by the present invention is specifically as follows:
[0007] A method for detecting underwater microplastics, comprising the steps of:
[0008] Collecting polarization holograms of microplastic samples to be tested;
[0009] Separating polarization images of different polarization directions from the polarization hologram, and fusing the polarization images to obtain a fused image for classification and recognition;
[0010] The fused image is input into the neural network for classification and identification of microplastics.
[0011] Furthermore, a polarization hologram of the microplastic to be detected is obtained by a polarization hologram acquisition device, which includes a laser, a polarizer, a quarter-wave plate, a lens module, a microscope objective and a polarization camera; the laser light emitted by the laser is converted into linear polarized light by the polarizer, and the linear polarized light is converted into circular polarized light by the quarter-wave plate. The circular polarized light is irradiated on the microplastic sample in the imaging area after the beam expansion and collimation effect of the lens module, and finally the polarization hologram is acquired by the polarization camera through the microscope objective.
[0012] Furthermore, polarization images with polarization directions of 0°, 45°, 90° and 135° are separated from the polarization hologram. , , , And calculate , , , , ; Select , , The three-channel fused image is input into the neural network for classification and identification of microplastics;
[0013] ,
[0014] , ,
[0015] , ,
[0016] in, Characterizes the total strength, Represents the difference between the horizontal and vertical directions, Characterization 45° and 35° direction difference, and Characterize and Relative to size.
[0017] Furthermore, the neural network includes a shallow inverted residual and fast self-attention unit SIR-FSA, a deep inverted residual and self-coordinated Transformer unit DIR-SMT, a global average pooling layer GlobalPool and a classification layer Classifier;
[0018] The SIR-FSA is used to extract shallow features, including a shallow inverted residual module SIR. The shallow inverted residual module SIR first performs 1x1 convolution, 3x3 depth convolution and 1x1 convolution with SiLU activation function on the input feature map in sequence, and then fuses the result with the input feature map and outputs it; the SIR-FSA is optionally equipped with a fast self-attention module FSA after the shallow inverted residual module SIR;
[0019] The DIR-SMT is used to extract deep features, including a deep inverted residual module DIR. The deep inverted residual module DIR first performs 1x1 convolution, 3x3 depth convolution and 1x1 convolution with HardSwish activation function on the input feature map in sequence, and then fuses the result with the input feature map and outputs it; the DIR-SMT is connected with a self-coordinating Transformer module SMT after the deep inverted residual module DIR;
[0020] The global average pooling layer GlobalPool is used to integrate and compress the input features and output them to the classification layer Classifier. The classification layer Classifier is used to output the probability that the microplastic sample to be detected belongs to each category.
[0021] Furthermore, the fast self-attention module FSA first performs downsampling and 3x3 depth convolution on the input feature map in sequence, performs feature map variance operation on the input feature map in the spatial dimension, then adds the depth convolution result and the feature map variance operation result, and then performs 1x1 convolution and upsampling in sequence, and finally fuses the upsampling result with the input feature map and outputs it;
[0022] The feature map variance operation is expressed as:
[0023]
[0024] in, Represents the input feature map The spatial dimension variance of is the number of pixels in the feature map, For each pixel value, is the pixel mean of a single feature map;
[0025] The output F of the fast self-attention module FSA out It is expressed as:
[0026]
[0027]
[0028] in, represents element-wise product, represents the upsampling operation, SiLU is the activation function, Conv 1x1 Represents 1x1 convolution, DWConv 3x3 represents a 3x3 depth convolution, Represents a downsampling operation.
[0029] Furthermore, the downsampling is implemented using maximum pooling, and the upsampling is implemented using the nearest neighbor upsampling method; the nearest neighbor upsampling first determines the position of each pixel in the target image, then finds the pixel closest to the target pixel in the original image, and copies the pixel value to the corresponding position of the target image: Assume that the original image is of size , the size of the target image is , for each pixel in the target image , its corresponding nearest neighbor pixel The coordinates in the original image are:
[0030] ,
[0031] in, is the vertical scaling ratio; is the vertical scaling ratio; Indicates rounding.
[0032] Furthermore, the self-coordinating Transformer module SMT includes a Transformer branch, a shortcut branch and a local feature extraction branch;
[0033] The Transformer branch first performs 3x3 convolution and 1x1 convolution on the input feature map in sequence, and then expands the convolution feature map into multiple 2×2 pixel patches. Each patch X is separated into three high-dimensional matrices Q, K, and V: , is the trained weight matrix; then the multi-head attention mechanism is integrated for inter-layer modeling, and then the outputs of all attention heads are concatenated, and then transformed through a linear layer to restore the dimension of the input feature map, and finally restored to the number of channels of the input feature map through a 1×1 convolution;
[0034] The shortcut branch is used to splice the input feature map with the feature map output by the Transformer branch, and the spliced feature map is then subjected to 3x3 convolution to obtain a non-local feature map; the local feature extraction branch is used to perform 3x3 depth convolution and 1x1 convolution on the input feature map in sequence to obtain a local feature map; after fusing the non-local feature map with the local feature map, a 1×1 convolution is performed, and the result is used as the final output of the SMT.
[0035] Preferably, after SIR-FSA and DIR-SMT, a 1×1 convolution layer is used to increase the dimension of the feature map, and then the feature map is input into a global average pooling layer GlobalPool; the classification layer Classifier includes a Dropout layer for preventing overfitting of the model.
[0036] An underwater microplastic detection system based on the above method includes a polarization hologram acquisition device, a polarization hologram preprocessing module and a classification and recognition module; the polarization hologram acquisition device is used to obtain a polarization hologram of a microplastic sample to be detected; the polarization hologram preprocessing module is used to separate polarization images of different polarization directions from the polarization hologram, and fuse the polarization images to obtain a fused image for classification and recognition; the classification and recognition module is deployed with a trained microplastic classification and recognition neural network, which is used to classify and recognize the input fused image, and output the probability value of the microplastic sample corresponding to the fused image belonging to each category.
[0037] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the processor executes the steps of the underwater microplastic detection method as described above.
[0038] Compared with the prior art, the present invention has at least the following beneficial effects:
[0039] The present invention can quickly obtain polarization image information of microplastics, and by separating polarization images of different polarization directions from the polarization hologram and fusing them, more comprehensive microplastic feature information can be obtained; the present invention also provides a neural network for microplastic classification and identification, which can effectively improve the accuracy of underwater small target identification through innovative network structure design, and overcome the limitations of traditional methods in morphological diversity and dispersion. In short, the present invention not only realizes high-speed and accurate microplastic classification and identification, and greatly improves detection efficiency and accuracy, but also its non-destructive detection method ensures sample integrity and reduces the impact on the environment, and has both economic and ecological benefits. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.
[0041] Figure 1 It is a schematic diagram of the collection optical path of a polarization hologram collection device provided by an embodiment of the present invention;
[0042] Figure 2 is a schematic diagram of a preprocessing process of a polarization hologram provided by an embodiment of the present invention;
[0043] Figure 3 It is a schematic diagram of a framework of a classification recognition network provided by an embodiment of the present invention;
[0044] Figure 4 is a schematic diagram of a network structure of a SIR module provided by an embodiment of the present invention;
[0045] Figure 5 is a schematic diagram of the network structure of the FSA module provided by an embodiment of the present invention;
[0046] Figure 6 is a schematic diagram of the network structure of a DIR module provided by an embodiment of the present invention;
[0047] Figure 7 is a schematic diagram of the network structure of an SMT module provided by an embodiment of the present invention;
[0048] Figure 8 It is a schematic diagram of the network structure of the classification layer Classifier provided in one embodiment of the present invention. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, other embodiments obtained by ordinary technicians in this field without making creative work are all within the scope of protection of the present invention.
[0050] Embodiment 1
[0051] This embodiment provides a method for detecting underwater microplastics. The method is mainly based on polarization digital holography technology to obtain polarization image information of underwater objects, and uses the polarization optical properties of microplastics to achieve rapid identification of microplastics. In terms of microplastic identification algorithms, a microplastic classification and recognition network based on deep learning is developed.
[0052] 1. Collection of polarization holograms
[0053] Figure 1 This is a schematic diagram of the optical path of a polarization hologram acquisition device, which mainly includes a laser, a linear polarizer, a quarter wave plate, a lens group, and a polarization camera. The linear polarizer is an optical filter used to convert part of the polarized light emitted by the laser into linear polarized light, and the linear polarization vector vibrates in a specific reverse direction. The quarter wave plate introduces a phase difference to convert the linear polarization into circular polarization, and the circular polarization vector rotates in a circular trajectory in the propagation direction. The lens group includes a beam expander and a collimator to expand the beam diameter and maintain the collimation of the beam. The collimated circularly polarized light beam is irradiated on the object (microplastic), and the beam is scattered after passing through the object to form a wavefront carrying information such as the shape and structure of the object, and overlaps with the reference light on the same optical axis to produce interference. The polarization camera records the interference fringe pattern. Each pixel in the camera sensor has its own polarization filter, which faces 0°, 45°, 90°, and 135° and is arranged in repeated 2×2 pixel blocks to form a hologram that preserves the polarization characteristics. The images recorded in this way not only preserve the size and three-dimensional structure information of the microplastics, but also preserve the polarization characteristics of the microplastics in four directions.
[0054] The acquisition process of polarization hologram is as follows: after the laser emits the laser, the laser passes through the polarizer and turns the laser into linear polarized light. The polarizer can control the laser intensity while controlling the polarization direction of the laser. After that, the linear polarized light passes through the quarter-wave plate, and the polarization state of the laser turns into circular polarized light. After the circular polarized light is shaped by the beam expander and the collimating lens, it turns into circular polarized light with a larger diameter and uniform spot intensity. After the circular polarized light is irradiated to the microplastic samples in the imaging area, due to the different roughness of the edges of the microplastic samples and the different effects of their optical properties on the polarization state, after being imaged by the microscope objective, the image is formed on the polarization camera plane.
[0055] Since the microplastic holograms collected by the camera and the holographic grayscale components in the four polarization directions are affected by the optical properties and three-dimensional shape parameters of the microplastics themselves, the different effects of the microplastic samples on the collected polarization holograms can be used to distinguish the types of microplastics through a deep learning-based neural network model.
[0056] 2. Preprocessing of Polarization Hologram
[0057] Polarization holograms record the direction of light wave vibrations, not just the intensity or color of the light. This allows it to capture subtle differences in the surface material of an object. Holographic images not only record the two-dimensional information of an object, but also include the depth information of the object by recording the amplitude and phase of the light. To implement a reliable and efficient classification and recognition algorithm, it is necessary to consider the characteristics of polarization holograms and obtain images that can well reflect the characteristics of the object in the preprocessing stage.
[0058] In this example, a polarization hologram preprocessing method is designed. A polarization camera is used to collect a holographic polarization image containing polarization information in four directions (0°, 45°, 90°, and 135°), and polarization images in four directions are separated from the polarization hologram. , , , And calculate , , , , :
[0059] ,
[0060] , ,
[0061] , .
[0062] in Characterizes the total strength, Represents the difference between the horizontal and vertical directions, Characterization 45° and 35° difference. and Characterize and Relative to Size. Select , , Constructing a three-channel image I Input into the microplastic classification and identification network, the whole process is as follows Figure 2 shown.
[0063] 3. Microplastic Classification and Identification Network Based on Polarization Hologram
[0064] like Figure 3As shown, the classification recognition network provided in this embodiment mainly includes shallow inverted residual (SIR) and fast self-attention (FSA) units, deep inverted residual (DIR) and self-modulation transformer (SMT) units, global average pooling (GlobalPool) and classification layer (Classifier) and other parts. Overall, the shallow and deep inverted residual modules are used to deepen the feature map channel and extract high-dimensional image features; the FSA and SMT modules are used to model attention so that the model can achieve more accurate feature expression.
[0065] Three-channel input image I First, the input layer is subjected to a 3×3 convolution kernel and SiLU activation function to extract low-dimensional features. In the subsequent SIR-FSA unit, the SIR module uses depthwise convolution and SiLU function to achieve efficient feature extraction and smooth gradient performance. When the stride of the depthwise convolution is 1, the structure can effectively extract features, and when the stride is 2, feature downsampling is achieved. Figure 4 As shown, an optional FSA module is added at the end of the SIR module. The FSA module introduces feature map variance and implements an approximate self-attention mechanism with very low computational cost. In this embodiment, three shallow inverted residual modules are iterated to introduce the model into the deep layer, and the FSA module is placed in the second shallow inverted residual module.
[0066] The specific structure of the FSA module is as follows Figure 5 As shown in Figure 2, the FSA module is used to extract non-local features of feature maps at the shallow layer of the network to save the computational cost of low-dimensional and high-resolution feature maps, and ultimately achieve the goal of reducing the size of the network model and achieving lightweight. Assume that the input feature map of the FSA module is , the feature map variance operation in the spatial dimension can be expressed as:
[0067]
[0068] in, for The spatial dimension variance of , is the channel size; is the number of pixels of a single feature map, For each pixel value, is the average value of all pixels in a single feature map. The idea of the FSA module is equivalent to using variance to artificially add bias after downsampling the feature map. The operation can be expressed as:
[0069]
[0070]
[0071] in, Represents the feature map of the intermediate stage after the module is downsampled and the variance is added; Indicates size Depthwise Convolution; Represents the downsampling operation, which is implemented in the module using Max Pooling with a step size of 2; Represents the output of the module, represents element-wise product; Represents the upsampling operation, which is implemented in the module using Nearest Upsampling. Nearest neighbor upsampling first determines the position of each pixel in the target image, then finds the pixel closest to the target pixel in the original low-resolution image, and copies the pixel value to the corresponding position in the target image. Suppose the original image is of size , the size of the target image is For each pixel in the target image , its corresponding nearest neighbor pixel The coordinates in the original image are:
[0072] ,
[0073] in, is the vertical scaling ratio; is the vertical scaling ratio; Indicates rounding.
[0074] In the DIR-SMT unit, the DIR module is similar to the SIR module, such as Figure 6 As shown in the figure, the Hardswish activation function is used, which is a simplified version of the SiLU activation function to reduce computational complexity while maintaining similar performance, and performs well in the deep layers of the network. Each DIR module is followed by an SMT module. The SMT module combines a multi-head attention mechanism and a deep separable convolution to self-coordinately enhance the extraction of local and non-local information of the feature map. The three DIR modules are iterated with the SMT module to gradually enhance the feature expression capability.
[0075] The specific structure of the SMT module is as follows Figure 7As shown. For general visual Transformer networks, the model tends to learn low-frequency information in feature maps. But for polarized holographic image data, high-frequency information also needs to be mined by the network. Therefore, a self-coordinated Transformer (SMT) module is designed to explore non-local information in the form of a self-attention mechanism, while modeling local details and overall features. The core idea is not only to use shortcut connections to promote the flow of information within the Transformer module, but also to perform convolution modeling on the original input feature map that has not undergone multi-head attention operations before the final element addition, so that the model can extract local features. Therefore, the SMT module has three branches in general: the Transformer branch, the shortcut connection branch, and the local feature extraction branch.
[0076] The Transformer branch of the SMT module first performs local feature modeling through a 3×3 convolutional layer, then adjusts the number of channels to the required dimension through a 1×1 convolutional layer, and then expands the feature map into multiple 2×2 pixel patches and separates them into three high-dimensional matrices Q, K, and V, which can be expressed as:
[0077]
[0078] in, is a trainable weight matrix. Subsequently, the multi-head attention mechanism is integrated for inter-layer modeling, emphasizing important feature areas and suppressing unimportant areas, which can be expressed as:
[0079]
[0080] in, is the dimension of the Key vector, usually set to , which is used to improve numerical stability. Then, the outputs of all attention heads are concatenated and transformed through a linear layer to restore the original dimension. That is:
[0081]
[0082] in, is the weight matrix of the linear layer, which is used to map back to the original dimension. Finally, the original number of channels is restored through a 1×1 convolution layer. Then it is spliced with the original input feature map saved by the shortcut connection branch to enhance the overall feature expression ability. Finally, a 3×3 convolution layer is used to fuse the features and obtain the output of the Transform branch and its shortcut connection branch. The local feature extraction branch of the SMT module is connected to the 1×1 convolution, residual module, and HardSwish layer through a 3×3 deep convolution, and then a layer of 1×1 convolution is used to obtain the output. Finally, the outputs of the non-local feature extraction branch and the local feature extraction branch are added, and the feature map channel dimension is converted to the corresponding output channel dimension through a 1×1 convolution.
[0083] After passing through the SIR-FSA unit and the DIR-SMT unit, a 1×1 convolution layer is used to increase the dimension of the feature map in preparation for GlobalPool. In the final Classifier, Figure 8 As shown in the figure, since the number of microplastic types is much smaller than the feature dimension, two fully connected layers are used. The first fully connected layer performs channel transition, and then Dropout is used to prevent the model from overfitting. The final classification probability vector is output through the second fully connected layer.
[0084] The algorithm uses a multi-classification cross entropy loss function, defined as:
[0085]
[0086] Where: L is the loss value, C is the number of categories, is the one-hot encoding representation of the true label, where samples belonging to the i-th class are 1 and others are 0. is the probability of the i-th category predicted by the model. The cross entropy loss measures the distance between the true distribution and the predicted distribution. If the model's prediction is closer to the true probability distribution (that is, the class probability corresponding to the true label is close to 1), the loss will be smaller. Conversely, if the model's prediction is far from the probability of the true category, the loss will increase. The role of the cross entropy loss is to penalize wrong predictions and adjust the model's parameters through gradient descent so that the model's prediction results are closer to the true distribution.
[0087] In the model training of the classification recognition network, a large number of microplastic polarized holographic image samples are generated by introducing random scaling, rotation, and cropping to improve the robustness and generalization ability of the model. The tempering algorithm is used to periodically change the training learning rate within a predetermined range, so that the learning rate during training changes cyclically between high and low values. It helps the model to better explore the space of the loss function during training and avoid falling into the local minimum. In each cycle, the maximum value of the learning rate will decay exponentially, which is suitable for the situation where the model gradually stabilizes in the later stage of training. The cross entropy loss function is used to measure the difference between the model prediction and the true label to guide the model to update parameters.
[0088] Embodiment 2
[0089] According to an embodiment of the present invention, there is provided an underwater microplastic detection system, which mainly includes a polarization hologram acquisition device, a polarization hologram preprocessing module and a classification and identification module.
[0090] The polarization hologram acquisition device is used to obtain the polarization hologram of the microplastic sample to be detected; the polarization hologram preprocessing module is used to separate polarization images of different polarization directions from the polarization hologram, and fuse the polarization images to obtain a fused image for classification and identification.
[0091] The classification and recognition module is equipped with a trained microplastic classification and recognition neural network, which is used to classify and recognize the input fusion image and output the probability value of the microplastic sample corresponding to the fusion image belonging to each category. The classification and recognition module is configured with corresponding input and output and visualization modules to facilitate user interaction.
[0092] Embodiment 3
[0093] According to an embodiment of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the processor executes the steps of the underwater microplastic detection method described in Embodiment 1. The above-mentioned product can execute the underwater microplastic detection method described in Embodiment 1, and has the corresponding functional modules and beneficial effects of the method. For technical details not described in detail in this embodiment, please refer to the underwater microplastic detection method provided in Embodiment 1 of the present invention.
[0094] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution, in essence or in other words, the part that contributes to the relevant technology, can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiment.
[0095] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for detecting underwater microplastics, characterized in that: Includes steps: Collecting polarization holograms of microplastic samples to be tested; Polarization images with different polarization directions are separated from the polarization hologram, and the polarization images are fused to obtain a fused image for classification and identification: Polarization images with polarization directions of 0°, 45°, 90° and 135° are separated from the polarization hologram. , , , And calculate , , , , ; Select , , Construct a three-channel fused image; , , , , ,in, Characterizes the total strength, Represents the difference between the horizontal and vertical directions, Characterization 45° and 35° direction difference, and Characterize and Relative to size; The fused image is input into a neural network for classification and identification of microplastics; the neural network includes a shallow inverted residual and fast self-attention unit SIR-FSA, a deep inverted residual and self-coordinated Transformer unit DIR-SMT, a global average pooling layer GlobalPool and a classification layer Classifier; The SIR-FSA is used to extract shallow features, including a shallow inverted residual module SIR. The shallow inverted residual module SIR first performs 1x1 convolution, 3x3 depth convolution and 1x1 convolution with SiLU activation function on the input feature map in sequence, and then fuses the result with the input feature map and outputs it; the SIR-FSA is optionally equipped with a fast self-attention module FSA after the shallow inverted residual module SIR; The DIR-SMT is used to extract deep features, including a deep inverted residual module DIR. The deep inverted residual module DIR first performs 1x1 convolution, 3x3 depth convolution and 1x1 convolution with HardSwish activation function on the input feature map in sequence, and then fuses the result with the input feature map and outputs it; the DIR-SMT is connected with a self-coordinating Transformer module SMT after the deep inverted residual module DIR; The global average pooling layer GlobalPool is used to integrate and compress the input features and output them to the classification layer Classifier. The classification layer Classifier is used to output the probability that the microplastic sample to be detected belongs to each category.
2. The underwater microplastic detection method according to claim 1, characterized in that: A polarization hologram of the microplastic to be detected is obtained by a polarization hologram acquisition device, which includes a laser, a polarizer, a quarter-wave plate, a lens module, a microscope objective and a polarization camera; the laser light emitted by the laser is converted into linear polarized light by the polarizer, and the linear polarized light is converted into circular polarized light by the quarter-wave plate. The circular polarized light is irradiated on the microplastic sample in the imaging area after the beam expansion and collimation effect of the lens module, and finally the polarization hologram is acquired by the polarization camera through the microscope objective.
3. The underwater microplastic detection method according to claim 1, characterized in that: The fast self-attention module FSA first performs downsampling and 3x3 depth convolution on the input feature map in sequence, performs feature map variance operation on the input feature map in the spatial dimension, then adds the depth convolution result and the feature map variance operation result, and then performs 1x1 convolution and upsampling in sequence, and finally fuses the upsampling result with the input feature map and outputs it; The feature map variance operation is expressed as: in, Represents the input feature map The spatial dimension variance of is the number of pixels in the feature map, For each pixel value, is the pixel mean of a single feature map; The output F of the fast self-attention module FSA out It is expressed as: in, represents element-wise product, represents the upsampling operation, SiLU is the activation function, Conv 1x1 Represents 1x1 convolution, DWConv 3x3 represents a 3x3 depth convolution, Represents a downsampling operation.
4. The underwater microplastic detection method according to claim 3, characterized in that: The downsampling is implemented using maximum pooling, and the upsampling is implemented using the nearest neighbor upsampling method; the nearest neighbor upsampling first determines the position of each pixel in the target image, then finds the pixel closest to the target pixel in the original image and copies its pixel value to the corresponding position of the target image: Let the original image be of size , the size of the target image is , for each pixel in the target image , its corresponding nearest neighbor pixel The coordinates in the original image are: , in, is the vertical scaling ratio; is the vertical scaling ratio; Indicates rounding.
5. The underwater microplastic detection method according to claim 1, characterized in that: The self-coordinating Transformer module SMT includes a Transformer branch, a shortcut branch and a local feature extraction branch; The Transformer branch first performs 3x3 convolution and 1x1 convolution on the input feature map in sequence, and then expands the convolution feature map into multiple 2×2 pixel patches. Each patch X is separated into three high-dimensional matrices Q, K, and V: , is the trained weight matrix; then the multi-head attention mechanism is integrated for inter-layer modeling, and then the outputs of all attention heads are concatenated, and then transformed through a linear layer to restore the dimension of the input feature map, and finally restored to the number of channels of the input feature map through a 1×1 convolution; The shortcut branch is used to splice the input feature map with the feature map output by the Transformer branch, and the spliced feature map is then subjected to 3x3 convolution to obtain a non-local feature map; the local feature extraction branch is used to perform 3x3 depth convolution and 1x1 convolution on the input feature map in sequence to obtain a local feature map; after fusing the non-local feature map with the local feature map, a 1×1 convolution is performed, and the result is used as the final output of the SMT.
6. The underwater microplastic detection method according to claim 1, characterized in that: After SIR-FSA and DIR-SMT, a 1×1 convolution layer is used to increase the dimension of the feature map, and then the feature map is input into the global average pooling layer GlobalPool; the classification layer Classifier includes a Dropout layer for preventing the model from overfitting.
7. An underwater microplastic detection system based on the method according to any one of claims 1 to 6, characterized in that: It includes a polarization hologram acquisition device, a polarization hologram preprocessing module and a classification and recognition module; the polarization hologram acquisition device is used to obtain a polarization hologram of a microplastic sample to be detected; the polarization hologram preprocessing module is used to separate polarization images of different polarization directions from the polarization hologram, and fuse the polarization images to obtain a fused image for classification and recognition; the classification and recognition module is deployed with a trained microplastic classification and recognition neural network, which is used to classify and recognize the input fused image, and output the probability value of the microplastic sample corresponding to the fused image belonging to each category.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the processor executes the steps of the underwater microplastic detection method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method and device for identifying micro-plastics based on polarization digital holography
CN118730921A