Water surface pollutant identification method based on improved DINO

By improving the attention encoder and feature fusion technology of the DINO model, the problems of low accuracy and recall in water surface pollutant identification were solved, achieving efficient identification of floating objects on the water surface, reducing computational complexity, and promoting the improvement of the ecological environment.

CN119296015APending Publication Date: 2025-01-10SHENYANG INST OF COMPUTING TECH CO LTD THE CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310836736.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-10
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

Existing technologies have low accuracy and low recall rates in identifying pollutants on the water surface, and require a large amount of computation. Manual inspections are inefficient, and remote sensing is costly, making it difficult to effectively identify small-volume pollutants floating on the water surface.

Method used

An improved attention encoder for the DINO model is used to obtain multi-scale feature maps through a ResNet50 backbone network. It combines cross-scale attention fusion and an improved feedforward neural network for object detection and classification. Feature fusion is performed using a cross-scale attention fusion module and an improved feedforward neural network module. The output target query box is then used for training and prediction via the DINO detection head.

Benefits of technology

It improved the accuracy and recall rate of surface pollutant identification, reduced computational load, increased processing speed, and promoted the improvement of the ecological environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119296015A_ABST
    Figure CN119296015A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of computer vision target detection, establishes a target detection model on the basis of identifying positions and categories of water surface pollutants, improves a traditional DINO target detection model, and particularly relates to a water surface pollutant identification method based on improved DINO. According to the method, multi-scale features are considered, a ResNet50 model is used for extracting multi-scale feature maps, a multi-head attention mechanism is used for fusing the multi-scale feature maps and enhancing the features, more useful information is obtained in the Attention mechanism, and then a fixed number of target query boxes are output through a decoder. And training the model according to the difference between the target query frame and the real target frame, and finally using DINO post-processing to output a prediction frame with the probability greater than a threshold value. The accuracy and recall rate of the improved model are improved, the video memory occupancy is greatly reduced, the model pays more attention to small target detection, and an algorithm model for water surface pollutant recognition can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of computer vision target detection, establishes a target detection model based on identifying the location and category of water surface pollutants, improves the traditional DINO target detection model, and specifically is a water surface pollutant identification method based on improved DINO. Background Art

[0003] Among water environment pollution, water surface pollution is sensory and easy to observe. For example, plastic waste floating on the water surface, eutrophic algae pollution, etc. Pollutants cover the water surface, reduce the dissolved oxygen in the water, and easily lead to suffocation and death of aquatic organisms. In addition, floating pollutants affect the water surface landscape, reduce the beauty of the water body, and affect tourism viewing. Timely detection and treatment of water surface pollution has become a task. In the past, water surface pollution was observed and removed through manual and remote sensing. The method of regular manual inspections of the water surface to discover and remove water surface pollution is time-consuming, labor-intensive and inefficient, while remote sensing has poor observation effects on small-volume pollutants floating on the water surface and is costly. Summary of the invention

[0004] In order to improve the accuracy and recall rate of water surface pollutant identification and reduce the amount of calculation, the present invention proposes a water surface pollutant identification method that improves DINO. The model data set is a water surface floating object detection data set from the perspective of an unmanned ship, which contains 2000 images and 5271 marked targets. After image preprocessing, the multi-scale feature map is output through the backbone network, and then the multi-scale feature map is fused through cross-scale attention and improved feedforward neural network. The feature map after attention fusion is input into the DINO model for prediction, and finally the positioning and classification of the prediction frame are obtained, which can better identify water surface pollutants.

[0005] In order to solve the problem of identifying water surface pollutants, the present invention uses deep learning technology to propose a water surface pollutant identification method that improves DINO, improves the attention encoder of the DINO model, reduces the video memory occupancy and computational complexity, and significantly improves the accuracy and recall rate, which can effectively improve the algorithm model for water surface pollutant identification.

[0006] The technical solution adopted by the present invention to achieve the above-mentioned purpose is: to improve the DINO water surface pollutant identification method, including the following steps:

[0007] Obtain water surface pollutant image data and mark pollutant categories and location labels;

[0008] Preprocess the image data;

[0009] Input the image data into the ResNet50 backbone network to obtain a multi-scale feature map;

[0010] Input the multi-scale feature map into the cross-attention mechanism for feature fusion;

[0011] The fusion result is input into the decoder to output the target query box;

[0012] The target query box is input into the DINO detection head, and the target query box and the true target box are trained using the DINO loss;

[0013] The target query box is input into the DINO detection head, and the target query box is post-processed by DINO to obtain the probability of the predicted box;

[0014] The prediction box with probability greater than the threshold is output as the prediction result.

[0015] The method of marking the pollutant category and location label comprises the following steps:

[0016] Use the COCO format to mark the category and location labels of the data, save the annotation file in JSON format, save the object category identifier to the category_id field, and save the upper left corner coordinates and width and height information of the object bounding box to the bbox field.

[0017] The preprocessing of the image data comprises the following steps:

[0018] Divide the image data into training set and test set;

[0019] Decode the image data in the training set and convert it into Numpy format;

[0020] Flip the image data in Numpy format with a fixed probability to perform data amplification;

[0021] Crop the flipped image data to ensure that the image data size input to the ResNet50 backbone network is uniform;

[0022] The cropped image data is toned and separated so that the ResNet50 backbone network can recognize the image based on the contours;

[0023] Normalize the image data after tone separation and convert the input image into data with fixed mean and variance;

[0024] Convert the channels of data with fixed mean and variance to the format of [C, W, H].

[0025] The step of inputting the multi-scale feature map into the cross attention mechanism for feature fusion includes the following steps:

[0026] 1) Perform channel transformation on the multi-scale feature map output by the ResNet50 backbone network [2, 3, 4] stage, pass the feature map through the convolution layer and the group normalization layer, and the obtained multi-scale feature map is used as the input of the cross-scale attention fusion module;

[0027] 2) The input of the cross-scale attention fusion module is two feature maps of different scales, namely the feature map X of the i+1th layer i+1 The output feature map after cross-scale attention fusion with the i-th layer feature map After cross-attention fusion, the cross-scale attention fusion module outputs the i+1th layer feature map. The output feature map after cross-scale attention fusion

[0028] 3) The multi-scale feature map sequence is iterated from bottom to top through the cross-scale fusion module to obtain a new multi-scale feature map sequence.

[0029] The cross-scale attention fusion module performs cross-attention fusion, including the following steps:

[0030] The input feature map is block-embedded: the feature map is first flattened through the convolution layer and then passed through the layer normalization layer, and the number of output channels is halved; The feature map size is halved through a convolutional layer with a stride of 2; i+1 After passing through a fully connected layer, the input query Q of the multi-head attention layer is obtained, and Q is connected to the output of the multi-head attention layer as a residual connection;

[0031] X i+1 and After the block is embedded, it is merged along the channel direction and input into the three convolution branches respectively;

[0032] The first convolution branch passes through a depth-wise separable convolution with a kernel size of R×R; the second convolution branch first passes through a depth-wise separable convolution with a kernel size of 1×R, and then passes through a depth-wise separable convolution with a kernel size of R×1; the third convolution branch first passes through an average pool with a reduction ratio of R, and then passes through a depth-wise separable convolution of 3×3; R represents the resolution reduction ratio;

[0033] Finally, the three branches are merged along the channel direction and passed through the group normalization layer, and then through the activation function to obtain the input key K and value V of the multi-head attention layer;

[0034] The query Q, key K and value V are input into the multi-head attention layer, and the weight distribution is obtained by calculating the similarity between Q and K, and then weighted averaged with V; the multi-head attention layer calculates multiple self-attentions and concatenates them to obtain the output of the residual connection containing the query Q, which is normalized and input into the improved feedforward neural network;

[0035] The improved feedforward neural network uses a 1×1 convolution kernel to change the number of channels, maps the data to a high-dimensional space, then passes through a GELU activation function and a 5×5 convolution layer, then passes through a GELU activation function, and finally uses a 1×1 convolution to make the number of output channels the same as the number of input channels;

[0036] The output of the improved feedforward neural network includes a residual connection from input to output, and the output of the cross-scale fusion module is obtained after normalization.

[0037] Improvements to DINO’s water surface pollutant identification system, including:

[0038] A data acquisition module, used for acquiring water surface pollutant image data;

[0039] A data labeling module, which is used to label the pollutant category and location labels on image data;

[0040] ResNet50 module, used to output feature maps of image data through the ResNet50 backbone network;

[0041] The cross-scale attention fusion module is used to input the feature maps of different sizes output by the ResNet50 backbone network into the multi-head attention layer and perform feature fusion using cross attention;

[0042] Improve the feedforward neural network module to map the output of the multi-head attention layer to a higher dimensional space and learn the contour information of the feature map;

[0043] DINO decoder module, which is used to output the target query after cross-attention calculation;

[0044] The DINO detection head module is used to train the target query box and the true target box through DINO loss, and output the prediction result through post-processing.

[0045] The improved DINO water surface pollutant identification device comprises a memory and a processor; the memory is used to store a computer program; the processor is used to implement the improved DINO water surface pollutant identification method when executing the computer program.

[0046] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the improved DINO method for identifying water surface pollutants is implemented.

[0047] The present invention has the following beneficial effects and advantages:

[0048] 1. The present invention helps to improve the accuracy of identifying small pollutants floating on the water surface;

[0049] 2. The present invention is conducive to improving the processing speed of the pollutant identification model;

[0050] 3. Accurate identification of pollutants helps improve the ecological environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 is a flow chart of the present invention;

[0052] Figure 2 This is a cross-scale attention fusion structure diagram of the present invention;

[0053] Figure 3 The improved feedforward neural network structure diagram of the present invention;

[0054] Figure 4 It is a training effect diagram of the present invention;

[0055] Figure 5 A schematic diagram of a new feature graph sequence is obtained after iterating the feature graph sequence from bottom to top multiple times. DETAILED DESCRIPTION

[0056] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0057] In view of the current problems in water surface pollutant identification, the main steps of target detection of the improved DINO (DETR with Improved DeNoising Anchor Boxes) water surface pollutant identification model proposed in this paper are as follows:

[0058] Step 1: Obtain water surface pollutant image data and label the pollutant category and location box using the COCO format;

[0059] Step 2: Preprocess the image data;

[0060] Step 3: Input the image data into the ResNet50 backbone network to obtain a multi-scale feature map;

[0061] Step 4: Input the multi-scale feature map into the cross-scale attention fusion module and the improved feedforward neural network module for feature fusion;

[0062] Step 5: Input the fusion result into the Decoder to output the target query box;

[0063] Step 6: Input the target query box into the DINO detection head, and train the target query box and the true target box through the DINO loss;

[0064] Step 7: Input the target query box into the DINO detection head, and post-process the target query box through DINO to obtain the probability of the predicted box.

[0065] Step 8: Output the prediction box with probability greater than the threshold as the prediction result.

[0066] The water surface pollutant detection dataset contains 2,000 images and 5,271 labeled targets, of which more than half are small targets. It contains images of different scenes, lighting, and water wave conditions, and collects floating objects on the water surface from different perspectives. The total number of samples in the dataset is 2,000, which are divided into 1,600 training sets and 400 test sets. Then, the dataset is preprocessed, and the steps required include:

[0067] 1) Decode the image and convert it into Numpy format which is easy to handle.

[0068] 2) Flip the image with a fixed probability to perform data augmentation.

[0069] 3) Crop the image to ensure that the image data size input to the model is uniform.

[0070] 4) Perform tone separation so that the model can better recognize images based on contours.

[0071] 5) Normalize the input image to convert it into data with a fixed mean and variance. This is done to make the process of finding the optimal solution smoother and make the training easier to converge.

[0072] 6) Convert the channels of the image data into the format of [C, W, H].

[0073] In neural networks, deep network feature maps are small in size, have large receptive fields, and have strong semantic representation capabilities, but lack geometric information. Shallow network feature maps are large in size, have small receptive fields, have weak semantic representation capabilities, and contain more geometric information. Therefore, using only a single-layer feature map cannot meet the requirements of classification and positioning at the same time. The DETR model only uses the last layer of feature maps for target detection, resulting in information loss of small target objects in the deep network, so the model has poor ability to detect small targets. In order to fuse feature maps of multiple scales and merge deep and shallow features to meet the requirements of classification and positioning at the same time, the SenseTime team proposed deformable DETR. Deformable DETR uses feature maps of multiple scales, combining the sparse sampling capability of deformable convolution and the global modeling capability of Transformer to aggregate multi-scale features. However, since the encoder of deformable DETR calculates self-attention and enhances features on multi-scale feature maps, the calculation is time-consuming and the number of parameters is large. In addition, the feature pyramid network FPN proposed by Lin et al. is also a way to merge feature maps of different scales. FPN efficiently integrates feature maps of different scales through top-down and lateral connections, which improves detection accuracy without significantly increasing detection time. Different from the FPN network, this module uses a bottom-up, lateral connection approach to integrate feature maps of different scales and enhance features. To prove the feasibility of the model, this model is compared with the other two models, and the model achieves better results.

[0074] Example

[0075] Step 1: The water surface pollutant detection dataset contains 2,000 images and 5,271 labeled targets, of which more than half are small targets. It includes images of different scenes, lighting, and water wave conditions, and collects floating objects on the water surface from different perspectives. The category and location labels of the data are labeled in COCO format. COCO uses JSON format to save annotation files, saves the object category identifier to the category_id field, and saves the upper left corner coordinates and width and height information of the object bounding box to the bbox field. The total number of samples in the dataset is 2,000, which are divided into 1,600 training sets and 400 test sets.

[0076] Step 2: Preprocess the data set. The steps required include:

[0077] 1) Decode the image and convert it into Numpy format.

[0078] 2) Flip the image with a probability of 0.5 for data augmentation.

[0079] 3) Crop the image to a standard size, ensuring that the long side is no larger than 1333, so that the image size of the input model is standardized.

[0080] 4) Perform tone separation on the image.

[0081] 5) Normalize the input image to convert it into data with a mean of [0.485, 0.456, 0.406] and a standard deviation of [0.229, 0.224, 0.225].

[0082] 6) Convert the channels of the image data into the format of [C, W, H].

[0083] Step 3: Input the image data into the ResNet50 backbone network, set the number of ResNet50 stages to 4, set the normalization method to batch normalization, set lr_mult_list to [0.0, 0.1, 0.1, 0.1], and return the multi-scale feature map output by the [2, 3, 4] stage.

[0084] Step 4: Input the multi-scale feature map into the cross-scale attention fusion module and the improved feedforward neural network module for feature fusion. The steps to be performed include:

[0085] 1) The multi-scale feature map output by the backbone network [2, 3, 4] stage is transformed into a channel map, and the feature map is passed through a 1x1 convolution layer and a group normalization layer to obtain a multi-scale feature map with 256 channels, which is used as the input of the cross-scale attention fusion module.

[0086] 2) The input of the cross-scale attention fusion module is two feature maps of different scales. They are the feature map X of the i+1th layer and i+1 The output feature map after cross-scale attention fusion with the i-th layer feature map After cross-attention fusion, the cross-scale attention fusion module outputs the i+1th layer feature map. The output feature map after cross-scale attention fusion As attached Figure 2 shown.

[0087] 3) Inside the module, the input feature map is block-embedded: the feature map is first passed through the convolution layer, flattened, and then passed through the layer normalization, and the number of output channels is halved. The feature map size needs to be halved through a convolutional layer with a stride of 2. i+1 After passing through a fully connected layer, the input query Q of the multi-head attention layer is obtained, and Q is connected to the output of the multi-head attention layer as a residual connection.

[0088] 4)X i+1 and After the block is embedded, it is merged along the channel direction and then input into three convolution branches. Since the computational complexity of the multi-head attention layer is quadratically related to the image size, to reduce the computational complexity, the resolution of the input image needs to be reduced. R represents the resolution reduction ratio. The first convolution branch of this module passes through a depthwise separable convolution with a kernel size of R×R. The second convolution branch first passes through a depthwise separable convolution with a kernel size of 1×R, and then passes through a depthwise separable convolution with a kernel size of R×1. This banded convolution kernel can take into account the characteristics of small objects more. The third convolution branch first passes through an average pool with a reduction ratio of R, and then passes through a depthwise separable convolution of 3×3. Finally, the three branches are merged along the channel direction and group normalized, and then the input key K and value V of the multi-head attention layer are obtained after the activation function. This structure can integrate rich contextual information without large computational complexity.

[0089] 5) Input the query Q, key K and value V into the multi-head attention layer to learn the relationship between the elements in the input sequence. The weight distribution is obtained by calculating the similarity between Q and K, and then weighted averaged with V. Multi-head self-attention takes into account the various correlations between sequence elements and calculates multiple self-attentions and concatenates them to obtain the final output, which can better capture its internal structure and semantic information. The number of heads in the multi-head attention layer is set to 8. The output of the multi-head attention layer adds a residual connection to the query Q, with the aim of reducing the complexity of the model to reduce overfitting and prevent gradient disappearance.

[0090] like Figure 3 As shown in the figure, after normalization, the data is input to the improved feedforward neural network. The improved feedforward neural network uses a 1×1 convolution kernel to change the number of channels, maps the data to a high-dimensional space, and then passes through the GELU activation function and the 5×5 convolution layer and then the GELU activation function. Finally, a 1×1 convolution is used to make the number of output channels the same as the number of input channels. The feedforward neural network also adds a residual connection from input to output. After normalization, the output of the cross-scale fusion module is obtained. The original feature map sequence is iterated from bottom to top for multiple times to obtain a new feature map sequence which is input into the DINO decoder. Figure 5 shown.

[0091] The original DINO encoding module converts the multi-scale feature map sequence [X0,X1,...,X n ] After multiple layers of deformable attention encoding, a new multi-scale feature map sequence is obtained The present invention replaces the multi-layer deformable attention encoding with a cross-scale attention fusion module. The multi-scale feature map sequence [X0, X1, ..., X n ] After the cross-scale attention fusion module, a new multi-scale feature map sequence is obtained The multi-scale feature map sequence [X0,X1,...,X n ] is a bottom-up iterative generation of new sequences Yes, such as Figure 5 As shown; in the iterative process Generated with X1 Generated with X2 Etc., iterate from bottom to top. Generated with X1 The process is through Figure 2 structure.

[0092] Step 5: Input the cross-scale attention fusion result into the DINO decoder to output the target query box. The number of target query boxes is set to 900, the number of decoder heads is set to 8, and the number of decoder layers is set to 6. If the model is in training mode, the DINO detection head is used to calculate the DINO loss using the Hungarian algorithm. If the model is in prediction mode, the probability of the predicted box is output.

[0093] Step 6: Output all predicted boxes with probabilities greater than 0.5.

[0094] Step 7: Verify the model output results on the test set. Check the results of model training through precision, recall and F1 value. The F1 value is a combination of precision and recall. The higher the value, the better the model training effect.

[0095] Combination Figure 1 The model flow chart summarizes the process as follows:

[0096] (1) Obtain a dataset of water surface pollutant images and label the pollutant categories and location boxes using the COCO format.

[0097] (2) Preprocess the image data.

[0098] (3) Input the image data into the ResNet50 backbone network to obtain a multi-scale feature map.

[0099] (4) The multi-scale feature map is input into the cross-scale attention fusion module and the improved feedforward neural network module to calculate the cross attention.

[0100] (5) The fusion result is input into the Decoder to output the target query box.

[0101] (6) The target query box is input into the DINO detection head, and the target query box and the true target box are trained using the DINO loss.

[0102] (7) The target query box is input into the DINO detection head, and the target query box is post-processed by DINO to obtain the probability of the predicted box.

[0103] (8) Output the prediction box with probability greater than the threshold as the prediction result.

[0104] The result value is a plurality of rectangular prediction boxes, and the predicted category is indicated.

[0105] The training effect that the model ultimately hopes to achieve is as follows Figure 4 As shown in the figure, for a given picture containing water surface pollutants, the type and location of the pollutant can be accurately found and marked with a rectangular frame. At present, due to the complexity of the water surface environment, it is difficult to detect small target pollutants on the water surface. Therefore, strengthening the identification of small target pollutants on the water surface will promote the protection of the water environment.

Claims

1. Improved DINO's water surface pollutant identification method, characterized in that: The following steps are involved: Obtain water surface pollutant image data and mark pollutant categories and location labels; Preprocess the image data; Input the image data into the ResNet50 backbone network to obtain a multi-scale feature map; Input the multi-scale feature map into the cross-attention mechanism for feature fusion; The fusion result is input into the decoder to output the target query box; The target query box is input into the DINO detection head, and the target query box and the true target box are trained using the DINO loss; The target query box is input into the DINO detection head, and the target query box is post-processed by DINO to obtain the probability of the predicted box; The prediction box with probability greater than the threshold is output as the prediction result.

2. The improved DINO water surface pollutant identification method according to claim 1 is characterized in that: The method of marking the pollutant category and location label comprises the following steps: Use the COCO format to mark the category and location labels of the data, save the annotation file in JSON format, save the object category identifier to the category_id field, and save the upper left corner coordinates and width and height information of the object bounding box to the bbox field.

3. The improved DINO water surface pollutant identification method according to claim 1 is characterized in that: The preprocessing of the image data comprises the following steps: Divide the image data into training set and test set; Decode the image data in the training set and convert it into Numpy format; Flip the image data in Numpy format with a fixed probability to perform data amplification; Crop the flipped image data to ensure that the image data size input to the ResNet50 backbone network is uniform; The cropped image data is toned and separated so that the ResNet50 backbone network can recognize the image based on the contours; Normalize the image data after tone separation and convert the input image into data with fixed mean and variance; Convert the channels of data with fixed mean and variance to the format of [C, W, H].

4. The improved DINO water surface pollutant identification method according to claim 1, characterized in that: The step of inputting the multi-scale feature map into the cross attention mechanism for feature fusion includes the following steps: 1) Perform channel transformation on the multi-scale feature map output by the ResNet50 backbone network [2, 3, 4] stage, pass the feature map through the convolution layer and the group normalization layer, and the obtained multi-scale feature map is used as the input of the cross-scale attention fusion module; 2) The input of the cross-scale attention fusion module is two feature maps of different scales, namely the feature map X of the i+1th layer i+1 The output feature map after cross-scale attention fusion with the i-th layer feature map After cross-attention fusion, the cross-scale attention fusion module outputs the i+1th layer feature map. The output feature map after cross-scale attention fusion 3) The multi-scale feature map sequence is iterated from bottom to top through the cross-scale fusion module to obtain a new multi-scale feature map sequence.

5. The improved DINO water surface pollutant identification method according to claim 4 is characterized in that: The cross-scale attention fusion module performs cross-attention fusion, including the following steps: The input feature map is block-embedded: the feature map is first flattened through the convolution layer and then passed through the layer normalization layer, and the number of output channels is halved; The feature map size is halved through a convolutional layer with a stride of 2; i+1 After passing through a fully connected layer, the input query Q of the multi-head attention layer is obtained, and Q is connected to the output of the multi-head attention layer as a residual connection; X i+1 and After the block is embedded, it is merged along the channel direction and input into the three convolution branches respectively; The first convolution branch passes through a depth-wise separable convolution with a kernel size of R×R; the second convolution branch first passes through a depth-wise separable convolution with a kernel size of 1×R, and then passes through a depth-wise separable convolution with a kernel size of R×1; the third convolution branch first passes through an average pool with a reduction ratio of R, and then passes through a depth-wise separable convolution of 3×3; R represents the resolution reduction ratio; Finally, the three branches are merged along the channel direction and passed through the group normalization layer, and then through the activation function to obtain the input key K and value V of the multi-head attention layer; The query Q, key K and value V are input into the multi-head attention layer, and the weight distribution is obtained by calculating the similarity between Q and K, and then weighted averaged with V; the multi-head attention layer calculates multiple self-attentions and concatenates them to obtain the output of the residual connection containing the query Q, which is normalized and input into the improved feedforward neural network; The improved feedforward neural network uses a 1×1 convolution kernel to change the number of channels, maps the data to a high-dimensional space, then passes through a GELU activation function and a 5×5 convolution layer, then passes through a GELU activation function, and finally uses a 1×1 convolution to make the number of output channels the same as the number of input channels; The output of the improved feedforward neural network includes a residual connection from input to output, and the output of the cross-scale fusion module is obtained after normalization.

6. Improved DINO's water surface pollutant identification system, characterized by: include: A data acquisition module, used for acquiring water surface pollutant image data; A data labeling module, which is used to label the pollutant category and location labels on image data; ResNet50 module, used to output feature maps of image data through the ResNet50 backbone network; The cross-scale attention fusion module is used to input the feature maps of different sizes output by the ResNet50 backbone network into the multi-head attention layer and perform feature fusion using cross attention; Improve the feedforward neural network module to map the output of the multi-head attention layer to a higher dimensional space and learn the contour information of the feature map; DINO decoder module, which is used to output the target query after cross-attention calculation; The DINO detection head module is used to train the target query box and the true target box through DINO loss, and output the prediction result through post-processing.

7. Improved DINO water surface pollutant identification device, characterized in that: It comprises a memory and a processor; the memory is used to store a computer program; the processor is used to implement the improved DINO water surface pollutant identification method as described in any one of claims 1-5 when executing the computer program.

8. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the improved DINO water surface pollutant identification method according to any one of claims 1 to 5 is implemented.