Water surface floating object identification method based on improved YOLO and water surface sewage disposal robot
By improving the YOLO network model, combining spatial feature reorganization, cross-path aggregation and background noise suppression modules, the problem of water surface cleaning robots identifying floating objects in complex environments is solved, and the detection accuracy and efficiency are significantly improved.
Patent Information
- Application Number
- CN202411888420.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-11
AI Technical Summary
In the face of complex and changeable water surface environments and various types of floating objects, existing water surface cleaning robots are difficult to effectively identify and deal with floating objects, especially in the case of reflection and occlusion, resulting in low detection accuracy and insufficient efficiency.
Using the water surface floating object recognition method based on improved YOLO, the improved YOLO network model is constructed, including spatial feature reorganization module, cross-path aggregation module and background noise suppression module, the different scale features of the image are extracted, the foreground features are enhanced, the background noise interference is reduced, and the detection accuracy is improved.
It significantly improves the accuracy and efficiency of floating object detection, can better adapt to the water surface environment with noise interference, enhances the ability to identify obscured or complex structures, and achieves the accuracy of detection of small floating object targets on the basis of ensuring image processing speed.
Smart Images

Figure CN119810416A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of floating object recognition, and in particular to a method for recognizing floating objects on a water surface based on an improved YOLO and a water surface pollution cleaning robot. Background Art
[0002] Water surface garbage is an important cause of this phenomenon. It not only causes serious damage to the ecosystem, but also brings many inconveniences to human production and life. The long-term presence of common water surface garbage, such as plastic, foam, glass and other non-degradable floating objects, will affect the photosynthesis of aquatic plants and destroy the balance and diversity of the aquatic ecosystem. If not cleaned up in time, a large amount of surface garbage accumulation may further block rivers and lakes. The continuous pollution of water bodies has brought immeasurable harm to fisheries and agriculture, which are heavily dependent on water resources. Polluted water bodies often need to go through a complex treatment process to meet the standards for drinking or agricultural irrigation, which increases economic costs.
[0003] Manual cleaning is still the most common method of cleaning up water surface garbage, and is suitable for small-scale garbage cleaning tasks. It has a high degree of freedom and can handle different types of garbage, but it is labor-intensive, inefficient, and has poor real-time performance, making it difficult to deal with large-scale or long-term accumulated garbage problems. In addition, manual operations pose certain safety risks, especially in complex or heavily polluted waters. In addition, there is also the method of cleaning up garbage using salvage ships, which is very efficient for cleaning up large areas of garbage, but this type of equipment is often large in size and lacks adaptability to complex water environments, which may cause secondary disturbances to aquatic ecosystems.
[0004] With the rapid development of deep learning and robotics, applying target detection algorithms to garbage cleaning robots has become a feasible solution. Using a path planning strategy, the surface robot conducts inspections, detects and classifies floating objects in the area, and collects and cleans them using different methods such as robotic arms based on the detection results. Compared with traditional floating object cleaning methods, the surface robot can determine the location and type of floating objects in real time, and then adopt targeted cleaning measures based on the characteristics, which greatly improves cleaning efficiency and resource utilization, while reducing economic costs and providing higher safety guarantees, and has high practical value.
[0005] However, the application of surface pollution-cleaning robots currently faces two problems: the complex and changeable surface environment and the various types of floating objects. Reflection and refraction are common phenomena on the water surface. When the pollution-cleaning robot is working, the strong reflection will affect the input image state, producing light spots and white areas, which not only make the floating objects more similar to the background environment, but also may create "false targets" to attract the robot to approach, causing additional energy consumption and time loss. In addition, under the influence of water waves, floating objects often get stuck in certain positions, such as the roots of some aquatic plants, and it is difficult for the pollution-cleaning robot to find these obscured targets. There are many types of floating objects on the water surface, among which there are a large number of small targets. In the images collected by the inspection, the pixels of small target floating objects account for a very small proportion. Coupled with the influence of the complex water surface environment, it is difficult for the pollution-cleaning robot to extract enough feature information.
[0006] Therefore, it is urgent to design an excellent method for identifying floating objects on the water surface to solve the above technical problems. Summary of the invention
[0007] The technical problem to be solved by the present invention is to overcome the defects of the prior art and provide a method for identifying floating objects on the water surface based on improved YOLO, which can significantly improve the detection accuracy of floating objects and is more suitable for the detection scenario of floating objects on the water surface with noise interference.
[0008] In order to solve the above technical problems, the technical solution of the present invention is: a method for identifying floating objects on the water surface based on improved YOLO, comprising:
[0009] Construct a dataset of floating objects on the water surface and build an improved YOLO network model. The improved YOLO network model extracts different scale features of the image through the spatial feature reorganization module in the backbone network and the neck network. In the neck network, the cross-path aggregation module is used to perform multi-path interactive fusion of different feature layers, and the background noise suppression module is used to enhance the floating object features in the image foreground. Finally, the detection head classifies the target according to the output of the neck network.
[0010] Use the water surface floating object dataset to train and improve the YOLO network model to obtain a trained network model;
[0011] The trained network model is used to identify the water area image to obtain the recognition result.
[0012] Furthermore, the working process of the spatial feature reconstruction module is:
[0013] For the input feature map X∈R B×(H×W)×CDown-sampling is performed to form four components A1, A2, A3, and A4; wherein the four components A1, A2, A3, and A4 are pixel samples of even rows and even columns, odd rows and even columns, even rows and odd columns, and odd rows and odd columns of the input feature map, respectively;
[0014] The four components A1, A2, A3, A4 are concatenated along the channel dimension. The formula is:
[0015]
[0016] In the formula, Concat(·) means concatenating and aggregating components along the channel dimension;
[0017] Use 1×1 convolution to keep the feature map spatial size unchanged and reduce the number of channels. The formula is:
[0018] A out =ReLU(BN(Conv 1×1 (A cat )))
[0019] In the formula, Conv 1×1 (·) represents 1×1 convolution; BN is BatchNormalization, ReLU (·) represents ReLU activation operation, and the number of output channels is C.
[0020] Further, the working process of the cross-path aggregation module is as follows:
[0021] First aggregate from the top down, the formula is:
[0022] P3=SConv(C5)
[0023] P2=SConv(Concat(SRM(C3),C4,Bi(SConv(P3))))
[0024] P1=SConv(Concat(SRM(C2),C3,Bi(SConv(P2))))
[0025] Where SConv means Conv+BN+Relu, Bi(·) means Bilinear Interpolate, which uses bilinear interpolation for upsampling, C2, C3, C4 and C5 respectively represent the feature maps from shallow to deep layers after the input image is downsampled; SRM(·) means downsampling through spatial feature reorganization module; Concat(·) means concatenation and aggregation operation along the channel dimension;
[0026] Then perform cross-path aggregation output from bottom to top, the formula is:
[0027] F1=BNSM(BEPC3(Concat·(P1,DeConv(P2)))
[0028] F2=BNSM(BEPC3(Concat(MP(P1),MP(F1),P2,DeConv(P3))))
[0029] F3=BNSM(BEPC3(Concat(MP(P2),MP(F2),P3)))
[0030] Where DeConv represents transposed convolution upsampling, MP(·) represents Max Pooling downsampling, BEPC3(·) represents Bidirectional Enhancement Path Cross-connection, and BNSM(·) represents background suppression through background noise suppression module.
[0031] Furthermore, the working process of the background noise suppression module is:
[0032] First, expand the input features into a two-dimensional form. The specific formula is:
[0033] P flat =Reshape(P,(B,C,H·W)) T ∈R B×(H×W)×C
[0034] Where P∈R B×C×H×W is the input feature, B is the batch size, C is the number of channels, H and W are the height and width of the feature map respectively; Reshape(·) means expanding into a two-dimensional form; P flat is the two-dimensional form feature of the output;
[0035] Then, the spatial weight feature map of the foreground and background areas is generated by linear mapping. The specific formula is:
[0036] W fg =Softmax(L1(P flat ))∈R B×(H·W)×1
[0037] W bg =Softmax(L2(P flat ))∈R B×(H·W)×1
[0038] Where L1 and L2 represent the linear layers of the foreground and background respectively; Softmax(·) represents the Softmax activation operation; W fg Represents the spatial weight feature map of the foreground area; W bgA spatial weight feature map representing the background area;
[0039] Then the spatial weight feature maps of the foreground and background regions are respectively combined with the two-dimensional form feature P flat Multiply element by element and enhance features through efficient channel attention mechanism. The specific formula is:
[0040]
[0041] In the formula, ECA(·) is an efficient channel attention mechanism, F fg and F bg They are the enhanced foreground features and background features respectively;
[0042] Finally, the enhanced foreground feature F fg Add to the two-dimensional form feature P flat The enhanced background feature F is subtracted from the bg , the specific formula is:
[0043] F updated =P flat +σ·ReLU(F fg )-β·ReLU(F bg )
[0044] Where σ, β are adjustable hyperparameters used to control the step size; ReLU(·) represents the ReLU activation operation; F updated Represents the output of the background noise suppression module.
[0045] The present invention also relates to a water surface pollution cleaning robot, which uses a water surface floating object recognition method based on improved YOLO to identify floating objects.
[0046] The present invention also relates to a device comprising:
[0047] Memory for storing computer programs;
[0048] A processor is used to execute the computer program, and when the computer program is executed by the processor, the steps of the method for identifying floating objects on the water surface based on the improved YOLO are implemented as described in any one of claims 1 to 4.
[0049] The present invention also relates to a readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of a method for identifying floating objects on a water surface based on an improved YOLO are implemented.
[0050] After adopting the above technical solution, the present invention has the following beneficial effects:
[0051] 1. The present invention replaces the traditional CNN downsampling in the backbone and neck with the spatial feature reconstruction module SRM, effectively retaining important detail feature information;
[0052] 2. The background noise suppression module of the present invention learns the background features and foreground features respectively through two linear layers, and suppresses the background noise and strengthens the features of floating objects on the water surface through weighted feature fusion, thereby reducing the impact of natural environment such as reflection and refraction;
[0053] 3. The present invention constructs a cross-path aggregation module CPAM, which further breaks the restrictions between levels on the basis of the top-down and bottom-up fusion of PANet, allows multi-path interaction between different feature layers, and improves the freedom and diversity of feature flow, so as to improve the recognition ability of occluded or complex-structured targets;
[0054] In summary, the present invention improves the detection accuracy of small floating objects on the water surface while ensuring the image processing speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 It is a flow chart of the method for identifying floating objects on the water surface based on improved YOLO of the present invention;
[0056] Figure 2 It is a framework diagram of the improved YOLO network model of the present invention;
[0057] Figure 3 It is a working schematic diagram of the spatial feature reorganization module of the method for identifying floating objects on the water surface based on improved YOLO of the present invention;
[0058] Figure 4 It is a working schematic diagram of the cross-path aggregation module of the method for identifying floating objects on the water surface based on improved YOLO of the present invention;
[0059] Figure 5 It is a working schematic diagram of the background noise suppression module of the method for identifying floating objects on the water surface based on improved YOLO of the present invention. DETAILED DESCRIPTION
[0060] In order to make the content of the present invention more clearly understood, the present invention is further described in detail below based on specific embodiments in conjunction with the accompanying drawings.
[0061] Embodiment 1
[0062] like Figures 1 to 5 As shown, a method for identifying floating objects on the water surface based on improved YOLO includes:
[0063] Step S1, constructing a water surface floating object dataset, which includes multiple images of water surface floating objects, cropped to a size of 640×640, and divided into a training set, a validation set, and a test set in a ratio of 6:2:2;
[0064] Step S2, building an improved YOL0 network model, the improved YOL0 network model includes a backbone network, a neck network and a detection head, constructing a backbone-neck-detection head detection network for background noise and small targets, which are responsible for feature extraction, multi-scale feature fusion and feature detection functions respectively;
[0065] Step S3, in order to solve the problem of various background noise interference in the image of floating objects on the water surface, a background noise suppression module is designed to suppress various types of noise and enhance the features of floating objects on the water surface through weighted fusion; in order to solve the problem of serious loss of local detail information in the traditional CNN downsampling process, a spatial feature reconstruction module is designed; finally, in the pyramid feature fusion part of the neck, a cross-path aggregation module is designed to allow multi-path interaction between different feature layers;
[0066] Step S4, input the training set and validation set images into the improved YOLO network model for training and validation, and save the best result model;
[0067] Step S5, input the test set image into the saved model to obtain the target detection result of the floating object image.
[0068] In one embodiment, Figure 2 and Figure 3 As shown, the working process of the spatial feature reconstruction module (SRM) is:
[0069] For the input feature map X∈R B×(H×W)×C Down-sampling is performed to form four components A1, A2, A3, and A4; wherein the four components A1, A2, A3, and A4 are pixel samples of even rows and even columns, odd rows and even columns, even rows and odd columns, and odd rows and odd columns of the input feature map, respectively;
[0070] The four components A1, A2, A3, A4 are concatenated along the channel dimension. The formula is:
[0071]
[0072] In the formula, Concat(·) means concatenating and aggregating components along the channel dimension;
[0073] Use 1×1 convolution to keep the feature map spatial size unchanged and reduce the number of channels. The formula is:
[0074] A out =ReLU(BN(Conv1×1 (A cat )))
[0075] In the formula, Conv 1×1 (·) represents 1×1 convolution; BN is BatchNormalization, ReLU (·) represents ReLU activation operation, and the number of output channels is C.
[0076] Specifically, the traditional CNN downsampling can reduce the spatial resolution of the feature map and retain important features, but a lot of spatial information is lost in the process, resulting in poor performance when processing low-resolution images and small objects. In order to reduce the information loss in the downsampling process, a spatial feature reconstruction module is designed to replace the traditional CNN downsampling. The module performs spatial feature reconstruction on the input feature map X∈R B×(H×W)×C Downsampling is performed to form four components. These areas have no overlap and no skipping. They are spliced along the channel dimension. The pixel information still exists, but is organized into different channels. Therefore, the number of channels increases but the information is not lost. Finally, feature information is learned from the four components, and 1×1 convolution is used to keep the spatial size of the feature map unchanged and reduce the number of channels.
[0077] In one embodiment, Figure 2 and Figure 4 As shown, the working process of the cross path aggregation module (CPAM) is:
[0078] First aggregate from the top down, the formula is:
[0079] P3=SConv(C5)
[0080] P2=SConv(Concat(SRM(C3),C4,Bi(SConv(P3))))
[0081] P1=SConv(Concat(SRM(C2),C3,Bi(SConv(P2))))
[0082] Where SConv means Conv+BN+Relu, Bi(·) means Bilinear Interpolate, which uses bilinear interpolation for upsampling, C2, C3, C4 and C5 respectively represent the feature maps from shallow to deep layers after the input image is downsampled; SRM(·) means downsampling through spatial feature reorganization module; Concat(·) means concatenation and aggregation operation along the channel dimension;
[0083] Then perform cross-path aggregation output from bottom to top, the formula is:
[0084] F1=BNSM(BEPC3(Concat·(P1,DeConv(P2)))
[0085] F2=BNSM(BEPC3(Concat(MP(P1),MP(F1),P2,DeConv(P3))))
[0086] F3=BNSM(BEPC3(Concat(MP(P2),MP(F2),P3)))
[0087] Where DeConv represents transposed convolution upsampling, MP(·) represents Max Pooling downsampling, BEPC3(·) represents Bidirectional Enhancement Path Cross-connection, and BNSM(·) represents background suppression through background noise suppression module.
[0088] Specifically, based on the top-down and bottom-up fusion of PANet, the restrictions between layers are further broken, allowing multi-path interactions between different feature layers, and improving the freedom and diversity of feature flow.
[0089] In one embodiment, Figure 2 and Figure 5 As shown, the working process of the background noise suppression module (BNSM) is:
[0090] First, expand the input features into a two-dimensional form. The specific formula is:
[0091] P flat =Reshape(P,(B,C,H·W)) T ∈R B×(H×W)×C
[0092] Where P∈R B×C×H×W is the input feature, B is the batch size, C is the number of channels, H and W are the height and width of the feature map respectively; Reshape(·) means expanding into a two-dimensional form; P flat is the two-dimensional form feature of the output;
[0093] Then, the spatial weight feature map of the foreground and background areas is generated by linear mapping. The specific formula is:
[0094] W fg =Softmax(L1(P flat ))∈R B×(H·W)×1
[0095] W bg =Softmax(L2(P flat))∈R B×(H·W)×1
[0096] Where L1 and L2 represent the linear layers of the foreground and background respectively; Softmax(·) represents the Softmax activation operation; W fg Represents the spatial weight feature map of the foreground area; W bg A spatial weight feature map representing the background area;
[0097] Then the spatial weight feature maps of the foreground and background regions are respectively combined with the two-dimensional form feature P flat Multiply element by element and enhance features through efficient channel attention mechanism. The specific formula is:
[0098]
[0099] In the formula, ECA(·) is an efficient channel attention mechanism, F fg and F bg They are the enhanced foreground features and background features respectively;
[0100] Finally, the enhanced foreground feature F fg Add to the two-dimensional form feature P flat The enhanced background feature F is subtracted from the bg , the specific formula is:
[0101] F updated =P flat +σ·ReLU(F fg )-β·ReLU(F bg )
[0102] Where σ, β are adjustable hyperparameters used to control the step size; ReLU(·) represents the ReLU activation operation; F updated Represents the output of the background noise suppression module.
[0103] Specifically, in the image of floating objects on the water surface, the background area often occupies a large part, such as the water surface, the shore, etc., which contains various noises, which seriously affect the detection of floating objects in the image. Therefore, a weighted mechanism is designed to learn the background noise features and foreground features separately.
[0104] In one embodiment, a water surface pollution cleaning robot uses the water surface floating object recognition method based on improved YOLO in any of the above embodiments to identify floating objects.
[0105] Specifically, through the background noise suppression module, the surface pollution cleaning robot will suppress noise and enhance foreground features of the input image to reduce the impact of natural environment such as reflection and refraction; through the cross-path aggregation module, the information from different paths and scales can be integrated to enhance the pollution cleaning robot's ability to recognize obscured or complex targets; through the spatial feature reconstruction module, the feature component splitting and splicing method is adopted to retain spatial detail information as much as possible.
[0106] The improved YOLO network model is applied to the surface cleaning robot, and the propulsion device, fishing device and other hardware equipment of the cleaning robot are driven and controlled by the single-chip microcomputer. The robot cruises in the cleaning area, collects water surface images in real time through a high-definition camera and inputs them into the deep learning processor. The improved YOLO network model is used to mark the location and type of floating objects in the water area, and the path is planned based on the location of the floating objects. After arriving at the location, the floating objects are recovered into the storage box by using appropriate collection methods such as robotic arms, adsorption devices, and fishing nets according to the type of floating objects. Check the current area to ensure that there are no omissions. Then, the path is updated and the cruise route is replanned according to the detected area to avoid repeated detection and improve efficiency. After the task is completed, return to the docking point to clean the storage box and charge to prepare for the next round of work.
[0107] In one embodiment, a device includes:
[0108] Memory for storing computer programs;
[0109] A processor is used to execute the computer program, and when the computer program is executed by the processor, the steps of the method for identifying floating objects on the water surface based on the improved YOLO are implemented in any of the above embodiments.
[0110] In one embodiment, a readable storage medium stores a computer program thereon, and when the computer program is executed by a processor, the steps of the method for identifying floating objects on the water surface based on the improved YOLO as described in any of the above embodiments are implemented.
[0111] To evaluate the improved model ( Figure 2 The effectiveness of the model in the detection of floating objects on the water surface is tested based on Python 3.8 and Pytorch 1.9.0. The experiment is conducted on a self-made floating object dataset, and the mean average precision (mAP), latency, and frame rate (FPS) are used as model evaluation indicators. mAP is calculated by the area under the precision-recall curve (PR curve) of each category, and then the average is obtained. Table 1 mAP 0.5-0.95 Represents the average mAP and mAP of IoU threshold from 0.5 to 0.95 50 、mAP 75They represent mAP when IoU is 0.5 and 0.75 respectively. Latency represents the processing time of each image, and FPS represents the number of images that can be processed per second.
[0112] Table 1. Water surface floating object dataset experiment
[0113]
[0114] Table 1 shows that in the experiment on the floating object dataset, the mAP of the improved YOLO network model is 0.5-0.95 It reached 56.1%, which is 4.2% higher than Faster-RCNN and 1.6% higher than YOLOv8, and the recognition accuracy has been improved. In terms of reasoning speed, the image processing delay of the improved YOLO model is 6.8ms, which is 0.4ms lower than the YOLOv8 model with fewer parameters and calculations. Compared with the YOLOX and Faster-RCNN models, the reasoning speed has been significantly improved. Combined with experimental data, the improved YOLO model has achieved a better balance between detection accuracy and speed, and can better meet the accuracy and real-time requirements of water surface cleaning work.
[0115] Based on the above ideal embodiments of the present invention, the relevant staff can make various changes and modifications without departing from the technical concept of the present invention through the above description. The technical scope of the present invention is not limited to the contents of the specification, and its technical scope must be determined according to the scope of the claims.
Claims
1. A method for identifying floating objects on the water surface based on improved YOLO, characterized in that: include: Construct a dataset of floating objects on the water surface and build an improved YOLO network model. The improved YOLO network model extracts different scale features of the image through the spatial feature reorganization module in the backbone network and the neck network. In the neck network, the cross-path aggregation module is used to perform multi-path interactive fusion of different feature layers, and the background noise suppression module is used to enhance the floating object features in the image foreground. Finally, the detection head classifies the target according to the output of the neck network. Use the water surface floating object dataset to train and improve the YOLO network model to obtain a trained network model; The trained network model is used to identify the water area image to obtain the recognition result.
2. The method for identifying floating objects on the water surface based on improved YOLO according to claim 1, characterized in that: The working process of the spatial feature reconstruction module is: For the input feature map X∈R B×(H×W)×C Down-sampling is performed to form four components A1, A2, A3, and A4; wherein the four components A1, A2, A3, and A4 are pixel samples of even rows and even columns, odd rows and even columns, even rows and odd columns, and odd rows and odd columns of the input feature map, respectively; The four components A1, A2, A3, A4 are concatenated along the channel dimension. The formula is: In the formula, Concat(·) means concatenating and aggregating components along the channel dimension; Use 1×1 convolution to keep the feature map spatial size unchanged and reduce the number of channels. The formula is: A out =ReLU(BN(Conv 1×1 (A cat ))) In the formula, Conv 1×1 (·) represents 1×1 convolution; BN is Batch Normalization, ReLU (·) represents ReLU activation operation, and the number of output channels is C.
3. The method for identifying floating objects on the water surface based on improved YOLO according to claim 1, characterized in that: The working process of the cross-path aggregation module is: First aggregate from the top down, the formula is: P3=SConv(C5) P2=SConv(Concat(SRM(C3),C4,Bi(SConv(P3)))) P1=SConv(Concat(SRM(C2),C3,Bi(SConv(P2)))) Where SConv means Conv+BN+Relu, Bi(·) means Bilinear Interpolate, which uses bilinear interpolation for upsampling, C2, C3, C4 and C5 respectively represent the feature maps from shallow to deep layers after the input image is downsampled; SRM(·) means downsampling through spatial feature reorganization module; Concat(·) means concatenation and aggregation operation along the channel dimension; Then perform cross-path aggregation output from bottom to top, the formula is: F1=BNSM(BEPC3(Concat·(P1,DeConv(P2))) F2=BNSM(BEPC3(Concat(MP(P1),MP(F1),P2,DeConv(P3)))) F3=BNSM(BEPC3(Concat(MP(P2),MP(F2),P3))) Where DeConv represents transposed convolution upsampling, MP(·) represents Max Pooling downsampling, BEPC3(·) represents Bidirectional Enhancement Path Cross-connection, and BNSM(·) represents background suppression through background noise suppression module.
4. The method for identifying floating objects on the water surface based on improved YOLO according to claim 1, characterized in that: The working process of the background noise suppression module is: First, expand the input features into a two-dimensional form. The specific formula is: P flat =Reshape(P,(B,C,H·W)) T ∈R B×(H×W)×C Where P∈R B×C×H×W is the input feature, B is the batch size, C is the number of channels, H and W are the height and width of the feature map respectively; Reshape(·) means expanding into a two-dimensional form; P flat is the two-dimensional form feature of the output; Then, the spatial weight feature map of the foreground and background areas is generated by linear mapping. The specific formula is: W fg =Softmax(L1(P flat ))∈R B×(H·W)×1 <h2 style=";text-align:left;direction:ltr">W<h2 style=";text-align:left;direction:ltr"> bg <h2 style=";text-align:left;direction:ltr"> =Softmax(L2(P<h2 style=";text-align:left;direction:ltr"> flat <h2 style=";text-align:left;direction:ltr"> ))∈R<h2 style=";text-align:left;direction:ltr"> B×(H·W)×1 Where L1 and L2 represent the linear layers of the foreground and background respectively; Softmax(·) represents the Softmax activation operation; W fg Represents the spatial weight feature map of the foreground area; W bg A spatial weight feature map representing the background area; Then the spatial weight feature maps of the foreground and background regions are respectively combined with the two-dimensional form feature P flat Multiply element by element and enhance features through efficient channel attention mechanism. The specific formula is: In the formula, ECA(·) is an efficient channel attention mechanism, F fg and F bg They are the enhanced foreground features and background features respectively; Finally, the enhanced foreground feature F fg Add to the two-dimensional form feature P flat The enhanced background feature F is subtracted from the bg , the specific formula is: F updated =P flat +σ·ReLU(F fg )-β·ReLU(F bg ) Where σ, β are adjustable hyperparameters used to control the step size; ReLU(·) represents the ReLU activation operation; F updated Represents the output of the background noise suppression module.
5. A water surface cleaning robot, characterized in that: Floating objects are identified by using the method for identifying floating objects on the water surface based on the improved YOLO as described in any one of claims 1 to 4.
6. A device, characterized in that: include: Memory for storing computer programs; A processor is used to execute the computer program, and when the computer program is executed by the processor, the steps of the method for identifying floating objects on the water surface based on the improved YOLO are implemented as described in any one of claims 1 to 4.
7. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for identifying floating objects on the water surface based on the improved YOLO are implemented as described in any one of claims 1 to 4.