Water surface floating object recognition method based on bilateral feature extraction and multi-level feature fusion

By employing a method for identifying floating objects on the water surface through bilateral feature extraction and multi-level feature fusion, the problems of resource consumption and inaccurate detection in traditional methods have been solved, achieving automated, fast, and accurate detection of floating objects on the water surface.

CN117058544BActive Publication Date: 2026-01-02ANHUI UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311026196.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-15
Publication Date
2026-01-02
Estimated Expiration
2043-08-15

AI Technical Summary

Technical Problem

Traditional methods for monitoring floating objects on the water surface rely on manual observation, which consumes a lot of manpower and resources. Furthermore, traditional target detection algorithms have difficulty accurately delineating floating object areas in complex water environments and are prone to misidentifying non-water surface garbage as floating objects.

Method used

A method for identifying floating objects on the water surface based on bilateral feature extraction and multi-level feature fusion is adopted. Through the bilateral feature extraction module and the multi-level feature fusion network, accurate segmentation of the water surface area and detection of floating objects are achieved. The method is further improved by combining a semantic segmentation network and a backbone network for multiple rounds of training.

Benefits of technology

It achieves automated detection of floating objects on the water surface, improves detection accuracy and efficiency, reduces labor costs, avoids interference from non-water surface areas, and has the advantages of lightweight design and rapid operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117058544B_ABST
    Figure CN117058544B_ABST
Patent Text Reader

Abstract

The application discloses a water surface floating object recognition method based on bilateral feature extraction and multi-level feature fusion, comprising the following steps: 1, obtaining the water surface floating object picture shot by a monitoring camera; 2, constructing a semantic segmentation network based on bilateral feature extraction, and performing inference on the water surface floating object image to obtain the water surface area of the image; 3, constructing a water surface floating object disease detection network based on multi-level feature fusion, and performing inference on the water surface floating object image to obtain the floating object area of the image; 4, the application can segment the water surface area from the water surface floating object image and detect the floating object area. The application can avoid the interference of non-water surface areas, so that the floating object detection is more accurate, the detection model structure is designed to be lightweight, the running speed is fast, and the calculation resource occupation is small.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image processing technology for floating objects on the water surface, specifically a method for recognizing floating objects on the water surface based on bilateral feature extraction and multi-level feature fusion. Background Technology

[0002] With rapid economic and social development, numerous pollutants have appeared on the surfaces of drinking water sources, urban rivers, surrounding lakes, and reservoirs. These pollution sources include industrial wastewater, agricultural sewage, and domestic waste. Because floating debris generally cannot be dissolved or naturally diluted, and its distribution is uneven, its impact on water bodies is more severe. Therefore, floating debris detection technology plays a crucial role in water quality management and the prevention and control of floating debris pollution.

[0003] Traditional monitoring of floating debris on water surfaces relies primarily on manual viewing of surveillance footage by designated personnel. While simple, this method is extremely resource-intensive. To address this issue, researchers have proposed deep learning-based detection methods that utilize deep neural networks for floating debris detection. However, due to the complexity of the aquatic environment, traditional object detection algorithms suffer from several limitations, such as the inability to accurately delineate floating debris areas and the tendency to mistake non-water surface debris for floating debris. Summary of the Invention

[0004] The present invention addresses the shortcomings of the existing technology by proposing a method for identifying floating objects on the water surface based on bilateral feature extraction and multi-level feature fusion. This method aims to avoid interference from non-water surface areas and achieve more accurate floating object detection, thereby improving the accuracy and speed of floating object identification.

[0005] To achieve the above-mentioned objectives, the present invention adopts the following technical solution:

[0006] The present invention provides a method for identifying floating objects on the water surface based on bilateral feature extraction and multi-level feature fusion, characterized by the following steps:

[0007] Step 1: Preprocessing of floating debris data:

[0008] Step 1.1: Obtain the image set of floating objects on the water surface, denoted as I = {I1, I2, ..., I...} t ,…,I T}; where I t Let represent the t-th image of floating objects on the water surface; T is the total number of images of floating objects on the water surface. The water surface regions in the image set I are labeled to obtain the water surface region images, denoted as a = {a1, a2, ..., a...}. t ,…,a T}; where a tan i-th water surface floating object image in the set of water surface floating object images t a labeled water surface region image

[0009] Step 1.2, labeling water surface floating objects in the set of water surface floating object images I and obtaining a label image b = {b1, b2, …, bT} ; wherein bT represents an i-th water surface floating object image in the set of water surface floating object images I t ,…,b T} ; wherein bT represents an i-th water surface floating object image in the set of water surface floating object images I t t

[0010] Step 2, building a semantic segmentation network based on bilateral feature extraction, which sequentially includes a bilateral feature extraction module and a bilateral aggregation module:

[0011] Step 2.1, the bilateral feature extraction module processes the i-th water surface floating object image I t to obtain a semantic feature map S t ;

[0012] Step 2.2, the bilateral aggregation module processes the semantic feature map S t to obtain a multi-scale fusion feature map Q t ;

[0013] Step 2.3, constructing a segmentation loss function L using the cross-entropy loss shown in formula (1)

[0014]

[0015] In formula (1), q t,i represents an i-th pixel point in the multi-scale fusion feature Q t , x t,i represents an i-th pixel point in the water surface region image a t ; n represents the total number of pixel points.

[0016] Step 3, building a water surface floating object disease detection network based on multi-level feature fusion, which sequentially includes a backbone network, a pyramid module and a self-calibration module.

[0017] Step 3.1, the backbone network is based on a ResNet101 network and sequentially includes a first convolutional block, a second convolutional block, a third convolutional block, a fourth convolutional block and a fifth convolutional block.

[0018] After multiplying the multi-scale fusion feature Q t and the i-th water surface floating object image I t , an image X t containing only the water surface region is obtained.​The data is then input into the backbone network, where it undergoes processing through five convolutional blocks. The features output from the third, fourth, and fifth convolutional blocks are then fused to obtain the floating object convolutional feature map O output by the backbone network. t ;

[0019] Step 3.2: The pyramid module consists of J convolutional pyramids of different scales, and the convolutional feature map O of the floating object is processed. t Perform J different pooling operations to obtain J different pyramid feature maps of different sizes. in, A feature map representing the j-th size of the pyramid;

[0020] Will The data is input into the self-calibration module and sequentially undergoes two-dimensional convolution, normalization, and upsampling operations to recover the floating object convolutional feature map O. t The dimensions were determined, and feature maps of floating objects at J scales were obtained. in, A feature map representing the floating object at the j-th scale;

[0021] The self-calibration module analyzes the feature maps of floating objects at J scales. The features of the floating objects are superimposed to obtain the floating object feature map U. t ;

[0022] Step 3.3: Construct a classification loss function using the feature loss based on single-class classification shown in equation (2).

[0023]

[0024] In equation (2), u t,i Indicates floating object characteristics U t The i-th pixel in the image, y t,i Indicates floating object b on the water surface t The i-th pixel in the array;

[0025] Step 4: Based on the image sample dataset of floating objects on the water surface, I = {I1, I2, ..., I...} t ,…,I T The water surface segmentation network and the floating object detection network were trained multiple times, and the loss function was calculated. and The network parameters are updated until the loss function converges, resulting in a trained water surface segmentation network and a water surface floating object detection network. The water surface segmentation model is used to segment the water surface floating object image to obtain the water surface region of the water surface floating object image; the anomaly detection model performs anomaly detection on the water surface region of the water surface floating object image to obtain the floating object region.

[0026] The water surface floating object recognition method based on bilateral feature extraction and multi-level feature fusion has the following characteristics: the bilateral feature extraction module in step 2.1 is composed of two parallel branches, namely a detail branch and a semantic branch.

[0027] The detail branch includes n layers of detail units, each of which is composed of a two-dimensional convolution layer, a normalization layer, and an activation function layer ReLU in sequence.

[0028] The tth water surface floating object image I t is input into the detail branch and processed by n layers of detail units in sequence to obtain the detail feature map P t of I t .

[0029] The semantic branch includes m layers of semantic units, a context embedding block, and a two-dimensional convolution Conv2D layer, wherein each layer of semantic units includes a convolution downsampling layer with a step size s1 and a pooling downsampling layer with a step size s1 in sequence.

[0030] The context embedding block includes a global average pooling layer, a two-dimensional convolution layer, a normalization layer, and an activation function layer ReLU in sequence.

[0031] The tth water surface floating object image I t is input into the semantic branch and processed by m layers of semantic units in sequence to obtain the shallow semantic feature map P t of I

[0032] The shallow semantic feature map P is input into the context embedding block for processing to obtain the deep semantic feature map P

[0033] The deep semantic feature map P and the shallow semantic feature map P are superimposed and input into the two-dimensional convolution Conv2D layer for processing to obtain the final semantic feature map S t .

[0034] The bilateral aggregation module in step 2.2 includes a downsampling feature fusion module, an upsampling feature fusion module, and a feature aggregation module.

[0035] Step 2.2.1, the downsampling feature fusion module performs two-dimensional convolution operation with a step size s2, normalization operation, and average pooling downsampling operation on the detail feature map P t in sequence to obtain the small-scale detail feature map P

[0036] The down-sampling feature fusion module simultaneously processes the semantic feature map S t After sequentially performing a depth separable convolution operation, a normalization operation, a two-dimensional convolution operation, and a Sigmoid activation function processing, a small-scale semantic feature map S is obtained

[0037] The down-sampling feature fusion module multiplies the small-scale detail feature map P and the small-scale semantic feature map S to obtain a small-scale fusion feature map Q

[0038] Step 2.2.2, the up-sampling feature fusion module processes the semantic feature map St 依 After sequentially performing a two-dimensional convolution operation with a step s2, a normalization operation, and a bilinear interpolation up-sampling operation, a large-scale detail feature map P is obtained

[0039] The up-sampling feature fusion module simultaneously processes the detail feature map P t After sequentially performing a depth separable convolution operation, a normalization operation, a two-dimensional convolution operation, and a Sigmoid activation function processing, a large-scale detail feature map P is obtained

[0040] The up-sampling feature fusion module multiplies the large-scale detail feature map P and the large-scale detail feature map P to obtain a large-scale fusion feature map Q

[0041] Step 2.2.3, the feature aggregation module adds the small-scale fusion feature map Q and the large-scale fusion feature map Q After sequentially performing a two-dimensional convolution operation and a normalization operation, a multi-scale fusion feature map Q is obtained as the final output t .

[0042] The electronic device comprises a memory and a processor, and the memory is configured to store a program supporting the processor to execute the water surface floating object identification method, and the processor is configured to execute the program stored in the memory.

[0043] The computer readable storage medium stores a computer program, and the computer program is configured to execute the steps of the water surface floating object identification method when executed by a processor.

[0044] Compared with the prior art, the present application has the following advantages:

[0045] 1. This invention employs a bilateral feature extraction and segmentation network, which effectively extracts water surface features from images of floating objects, is unaffected by noise, and accurately segments the water surface region of the floating object image, thus improving detection accuracy. Unlike common detection algorithms that use bounding boxes to label detected objects, the multi-level feature fusion detection network accurately labels the floating object region by inferring from images containing only the water surface. It can accurately calculate the area of ​​the floating object region, thereby improving detection efficiency, increasing detection accuracy, reducing labor costs, and reducing equipment maintenance costs.

[0046] 2. This invention achieves automated detection of floating objects on the water surface. It first segments the water surface of the floating object image and then detects the floating objects on the water surface. The two networks are connected in series for inference. It is portable and fast, and avoids the situation where conventional algorithms identify garbage in non-water areas as floating objects. It greatly improves the applicability of the algorithm and has the advantages of lightweight design, fast running speed and low computing resource consumption. Attached Figure Description

[0047] Figure 1 This is a flowchart of the method of the present invention;

[0048] Figure 2 This is an application flowchart of the present invention. Detailed Implementation

[0049] In this embodiment, a method for identifying floating objects on the water surface based on bilateral feature extraction and multi-level feature fusion mainly involves first using a bilateral feature extraction segmentation network to obtain the water surface region in the floating object image, thereby eliminating the interference of non-water surface regions in the floating object image on the detection of floating objects. Then, a multi-level feature fusion detection network is used to detect the floating objects in the water surface region of the floating object image and mark the floating object region. Figure 1 As shown, the entire process can be divided into the following steps:

[0050] Step 1: Preprocessing of floating debris data:

[0051] Step 1.1: Obtain the image set of floating objects on the water surface, denoted as I = {I1, I2, ..., I...} t ,…,I T}; where I t Let represent the t-th image of floating objects on the water surface; T is the total number of images of floating objects on the water surface. The water surface regions in the image set I are labeled to obtain the water surface region images, denoted as a = {a1, a2, ..., a...}. t ,…,a T}; where a t Represents the t-th image of floating objects on the water surface. t The image shows the marked water surface area;

[0052] Step 1.2, label the water surface floating objects in the water surface floating object image set I, and obtain the label image b = {b1, b2, …, b t ,…,b T}; wherein b t represents the labeled water surface floating object of the t-th water surface floating object image I t .

[0053] Step 2, build a semantic segmentation network based on bilateral feature extraction, which includes a bilateral feature extraction module and a bilateral aggregation module in turn:

[0054] Step 2.1, the bilateral feature extraction module is composed of two parallel branches, namely a detail branch and a semantic branch;

[0055] The detail branch contains n layers of detail units, each of which is composed of a two-dimensional convolution layer, a normalization layer and an activation function layer ReLU in turn;

[0056] The t-th water surface floating object image I t is input into the detail branch and processed by n layers of detail units in turn to obtain the detail feature map P t of I t .

[0057] The semantic branch contains m layers of semantic units, a context embedding block and a two-dimensional convolution Conv2D layer, wherein each layer of semantic unit includes a convolution downsampling layer with a step size s1 and a pooling downsampling layer with a step size s1 in turn;

[0058] The context embedding block includes a global average pooling layer, a two-dimensional convolution layer, a normalization layer and an activation function layer ReLU in turn;

[0059] The t-th water surface floating object image I t is input into the semantic branch and processed by m layers of semantic units in turn to obtain the shallow semantic feature map t of I t .

[0060] The shallow semantic feature map is input into the context embedding block for processing to obtain the deep semantic feature map

[0061] The deep semantic feature map and the shallow semantic feature map are superimposed and input into the two-dimensional convolution Conv2D layer for processing, and the final semantic feature map S t is obtained; in this embodiment, n is 3, m is 4, and the step size s1 is 2.

[0062] The step 2.2, the bilateral aggregation module comprises: a down-sampling feature fusion module, an up-sampling feature fusion module and a feature aggregation module;

[0063] The step 2.2.1, the down-sampling feature fusion module fuses the detail feature maps P t After sequentially performing the two-dimensional convolution operation with the step s2, the normalization operation, the average pooling down-sampling operation, the small-scale detail feature map P

[0064] The down-sampling feature fusion module fuses the semantic feature maps S t After sequentially performing the depth separable convolution operation, the normalization operation, the two-dimensional convolution operation and the Sigmoid activation function processing, the small-scale semantic feature map S

[0065] The down-sampling feature fusion module fuses the small-scale detail feature map P and the small-scale semantic feature map S After multiplication, the small-scale fusion feature map Q

[0066] In the embodiment, the small-scale fusion feature map has a size of one quarter of the size of the input detail feature map, and the step s2 is 1.

[0067] The step 2.2.2, the up-sampling feature fusion module fuses the semantic feature maps S t After sequentially performing the two-dimensional convolution operation with the step s2, the normalization operation, the bilinear interpolation up-sampling operation, the large-scale detail feature map P

[0068] The up-sampling feature fusion module fuses the detail feature maps P t After sequentially performing the depth separable convolution operation, the normalization operation, the two-dimensional convolution operation and the Sigmoid activation function processing, the large-scale detail feature map P

[0069] The up-sampling feature fusion module fuses the large-scale detail feature map P and the large-scale detail feature map P After multiplication, the large-scale fusion feature map Q

[0070] In the embodiment, the large-scale fusion feature map has a size of four times the size of the input semantic feature map, and the step s2 is 1.

[0071] The step 2.2.3, the feature aggregation module adds the small-scale fusion feature map and the large-scale fusion feature map, and then sequentially performs the two-dimensional convolution operation and the normalization operation to obtain the finally output multi-scale fusion feature map Q t ;

[0072] Step 2.3, constructing a segmentation loss function by using a cross-entropy loss shown in formula (1)

[0073]

[0074] In formula (1), q t,i represents the i-th pixel point in the multi-scale fusion feature map Q t , x t,i represents the i-th pixel point in the water surface area image a t ; n represents the total number of pixel points.

[0075] In this embodiment, q t,1 , q t,2 ,…, q t,n represent a pixel sample set of the multi-scale fusion feature Q t , wherein n represents the total number of pixels of the multi-scale fusion feature Q t , x t,1 , x t,2 ,…, x t,n represent the water surface area labels corresponding to each pixel, wherein x t,i = 0 indicates that the pixel does not belong to the water surface area, x t,i = 255 indicates that the pixel belongs to the water surface area, and 0 < i < n.

[0076] Step 3, building a water surface floating object disease detection network based on multi-level feature fusion, which sequentially includes a backbone network, a pyramid module, and a self-calibration module.

[0077] Step 3.1, the backbone network is based on a ResNet101 network and sequentially includes a first convolution block, a second convolution block, a third convolution block, a fourth convolution block, and a fifth convolution block.

[0078] After multiplying the multi-scale fusion feature Q t and the t-th water surface floating object image I t , an image X containing only the water surface area is obtained, and is input into the backbone network, so as to sequentially pass through the processing of the five convolution blocks, and then the features output by the third convolution block, the fourth convolution block, and the fifth convolution block are fused, and a floating object convolution feature map Q t output by the backbone network is obtained.

[0079] In this embodiment, the first convolutional block consists of a 7×7 convolutional layer, a normalization layer (BN), an activation function layer (ReLU), and a max pooling layer (MaxPool). The second convolutional block consists of three residual blocks, the third convolutional block consists of four residual blocks, the fourth convolutional block consists of twenty-three residual blocks, and the fifth convolutional block consists of three residual blocks. Each residual block contains two 1×1 convolutional layers and one 3×3 convolutional layer.

[0080] Step 3.2: The pyramid module consists of J convolutional pyramids of different scales, and the floating object convolutional feature map O is applied. t Perform J different pooling operations to obtain J different pyramid feature maps of different sizes. in, A feature map representing the j-th size of the pyramid;

[0081] Will The data is input into the self-calibration module and sequentially undergoes 2D convolution, normalization, and upsampling operations to recover the floating object convolutional feature map O. t The dimensions were determined, and feature maps of floating objects at J scales were obtained. in, A feature map representing the floating object at the j-th scale;

[0082] The self-calibration module analyzes the characteristic maps of floating objects at J scales. The features of the floating objects are superimposed to obtain the floating object feature map U. t ;

[0083] In this embodiment, j is 5, and the four different scales are 1×1, 2×2, 3×3, 6×6 and 9×9.

[0084] Step 3.3: Construct a classification loss function using the feature loss based on single-class classification shown in equation (2).

[0085]

[0086] In equation (2), u t,i Indicates floating object characteristics U t The i-th pixel in the image, y t,i Indicates floating object b on the water surface t The i-th pixel in the array;

[0087] In this embodiment, u t,1 ,u t,2 ,…,u t,n Indicates floating object characteristics U t The set of pixel samples, where n represents the floating object feature map U. t Total number of pixels, y t,1 ,yt,2 y t,n represents the floating object label corresponding to each pixel, wherein y t,i = 0 indicates that the pixel does not belong to the floating object, and y t,i = 1 indicates that the pixel belongs to the floating object, wherein 0 < i < n.

[0088] Step 4, based on the water surface floating object image sample data set I = {I1, I2, …, I t , …, I T}, the water surface segmentation network and the water surface floating object detection network are trained for multiple rounds, and the loss function and are calculated to update the network parameters until the loss function converges, and finally the trained water surface segmentation network and water surface floating object detection network are obtained, wherein the water surface segmentation model is used to segment the water surface floating object image to obtain the water surface area of the water surface floating object image; the anomaly detection model performs anomaly detection on the water surface area of the water surface floating object image to obtain the floating object area.

[0089] The identification process of the method is shown in Figure 2 , which includes:

[0090] First, the water surface floating object image is input into the bilateral feature extraction segmentation network, and the network calculates the score of the pixels of the input image. The pixel score threshold is 0.5, and the pixel points with a score greater than 0.5 belong to the water surface type. The scene segmentation image obtained by the segmentation model is a binary image. Among them, the binary image refers to setting the gray value of the pixel points on the image to 0 and 255, that is, changing the color image into a black and white image, and each pixel of the binary image has only two possible forms, i.e. pure black or pure white, which can make the contrast more obvious to a certain extent, and at the same time, the interference of the multiple pixels of the color image can be removed. Then, the input water surface floating object image is multiplied by the binary image obtained by network reasoning to obtain an image containing only the water surface, at this time the image removes the background part and only retains the water surface and the floating object in the water surface;

[0091] Then, the image containing only the water surface is sent into the multi-level feature fusion water surface floating object disease detection network for reasoning, and the water surface floating object image processed by the bilateral feature extraction segmentation network is input. For the input image, the multi-level feature fusion detection network will calculate the anomaly score of the pixels of the image. The anomaly score threshold is set for the network, and if the anomaly score of the pixel is greater than the anomaly score threshold, it indicates that the pixel belongs to the water surface floating object. If there is a floating object on the water surface, the contour of the water surface floating object area is obtained according to all the pixels with an anomaly score greater than the anomaly score threshold, so as to obtain the water surface floating object area image.

[0092] In this embodiment, an electronic device includes a memory for storing a program supporting a processor to execute the above method, and the processor configured to execute the program stored in the memory.

[0093] In this embodiment, a computer readable storage medium has a computer program stored thereon, and the computer program is run by a processor to perform the steps of the above method.

Claims

1. A water surface floating object recognition method based on bilateral feature extraction and multi-level feature fusion, characterized in that, is carried out as follows: Step 1, preprocessing of water surface floating object data: Step 1.1: Obtain the image set of floating objects on the water surface, denoted as I = {I1, I2, ..., I...} t , ..., I T }; where I t Let represent the t-th image of floating objects on the water surface; T is the total number of images of floating objects on the water surface. The water surface regions in the image set I are labeled to obtain the water surface region images, denoted as a = {a1, a2, ..., a...}. t , ..., a T }; where a t Represents the t-th image of floating objects on the water surface. t The image shows the marked water surface area; Step 1.2: Label the floating objects in the water surface image set I and obtain the label image b = {b1, b2, ..., b}. t , ..., b T }; where b t Represents the t-th image of floating objects on the water surface. t The marked floating objects on the water surface; Step 2, build a semantic segmentation network based on bilateral feature extraction, which includes bilateral feature extraction module, bilateral aggregation module in turn: Step 2.1, the double-side feature extraction module extracts the semantic features of the t-th water surface floating object image I t and obtains a semantic feature map S t ​ Step 2.2, the double-edge aggregation module processes the semantic feature map S t to obtain a multi-scale fusion feature map Q t ; Step 2.

3. Constructing the segmentation loss function with the cross-entropy loss shown in formula (1) In formula (1), q t,i represents the i-th pixel point in the multi-scale fusion feature Q t , x t,i represents the i-th pixel point in the water surface region image a t ; n represents the total number of pixel points; Step 3, build a water surface floating object disease detection network based on multi-level feature fusion, which includes backbone network, pyramid module and self calibration module in turn; Step 3.1, the backbone network is based on ResNet101 network, and includes first convolution block, second convolution block, third convolution block, fourth convolution block and fifth convolution block in turn; The multi-scale fusion feature Q is obtained by multiplying the first feature Q1 and the second feature Q2 t and the tth water surface floating object image I t After multiplication, an image X containing only the water surface area is obtained t , and input into the backbone network, so that after being processed by the five convolution blocks in turn, the features output by the third convolution block, the fourth convolution block and the fifth convolution block are fused, and a floating object convolution feature map O output by the backbone network is obtained t ; Step 3.2, the pyramid module is composed of J convolution pyramid of different scales, and convolves the floating object feature map O t J different scales of pooling operations are performed to obtain J pyramid feature maps of different sizes wherein, denotes the pyramid feature map of the jth size; Will The data is input into the self-calibration module and sequentially undergoes two-dimensional convolution, normalization, and upsampling operations to recover the floating object convolutional feature map O. t The dimensions were determined, and feature maps of floating objects at J scales were obtained. in, A feature map representing the floating object at the j-th scale; The self-calibration module superimposes J scale of the feature map of the floating object to obtain the feature map U of the floating object t ; Step 3.3, constructing a classification loss function with a single-class classification based feature loss as shown in formula (2) In formula (2), u t,i represents the feature U of the floating object t , y t,i represents the i-th pixel point in the water surface floating object b t ; Step 4, based on the water surface floating object image sample data set I = {I1, I2, …, I t , …, I T}, the water surface segmentation network and the water surface floating object detection network are trained for multiple rounds, and the loss function and are calculated to update the network parameters until the loss function converges, and finally the trained water surface segmentation network and water surface floating object detection network are obtained, wherein the water surface segmentation model is used for segmenting the water surface floating object image to obtain the water surface area of the water surface floating object image; the anomaly detection model performs anomaly detection on the water surface area of the water surface floating object image to obtain the floating object area.

2. The water surface floating object recognition method based on bilateral feature extraction and multi-level feature fusion according to claim 1, characterized in that, The bilateral feature extraction module in step 2.1 is composed of two parallel branches, namely detail branch and semantic branch; The detail branch contains n layers of detail units, each of which is composed of two-dimensional convolution layer, normalization layer and activation function layer ReLU in turn; the tth water surface floating object image I t After inputting the details branch and sequentially passing through the processing of n layers of detail units, I t the detail feature map P t ; The semantic branch contains m layers of semantic units, context embedding block, two-dimensional convolution Conv2D layer, wherein each layer of semantic unit includes convolution down sampling layer with step s1 and pooling down sampling layer with step s1 in turn; The context embedding block includes global average pooling layer, two-dimensional convolution layer, normalization layer and activation function layer ReLU in turn; the tth water surface floating object image I t After inputting into the semantic branch and sequentially passing through the processing of m layers of semantic units, I t a shallow semantic feature map of I the shallow semantic feature map is input into the context embedding block for processing to obtain a deep semantic feature map the shallow semantic feature map is input into the context embedding block for processing to obtain a deep semantic feature map Deep semantic feature maps and shallow semantic feature maps The superimposed data are then input into the two-dimensional convolutional Conv2D layer for processing, resulting in the final semantic feature map S. t . 3.The water surface floating object recognition method based on bilateral feature extraction and multi-level feature fusion according to claim 2, characterized in that, The bilateral aggregation module in step 2.2 includes down sampling feature fusion module, up sampling feature fusion module and feature aggregation module; Step 2.2.1, the down-sampling feature fusion module fuses the detail feature maps P t After sequentially performing the step s2 two-dimensional convolution operation, the normalization operation, the average pooling down-sampling operation, the small-scale detail feature map P is obtained The downsampling feature fusion module simultaneously performs the semantic feature map S t After sequentially performing a depth separable convolution operation, a normalization operation, a two-dimensional convolution operation, and a Sigmoid activation function processing, a small-scale semantic feature map is obtained The down-sampling feature fusion module multiplies the small-scale detail feature map and the small-scale semantic feature map to obtain a small-scale fused feature map Step 2.2.2, the up-sampling feature fusion module fuses the semantic feature maps S t After sequentially performing the step s2 two-dimensional convolution operation, the normalization operation, and the bilinear interpolation up-sampling operation, the large-scale detail feature map is obtained The up-sampling feature fusion module simultaneously performs the depth separable convolution operation, the normalization operation, the two-dimensional convolution operation, and the Sigmoid activation function on the detail feature map P t After sequentially performing a depth separable convolution operation, a normalization operation, a two-dimensional convolution operation, and a Sigmoid activation function, a large-scale detail feature map P is obtained The up-sampling feature fusion module performs multiplication on the small-scale feature map and the large-scale detail feature map to obtain a large-scale fusion feature map and the large-scale detail feature map After multiplication, a large-scale fusion feature map is obtained Step 2.2.3, the feature aggregation module adds the small-scale fused feature map and the large-scale fused feature map and the large-scale fused feature map and then performs two-dimensional convolution operation and normalization operation in sequence to obtain the multi-scale fused feature map Q of final output t .

4. An electronic device comprising a memory and a processor, characterized in that The memory is used to store the program supporting the processor to execute the water surface floating object identification method of any one of claims 1-3, and the processor is configured to execute the program stored in the memory.

5. A computer-readable storage medium having stored thereon a computer program, characterized in that The computer program is run by the processor to execute the steps of the water surface floating object identification method of any one of claims 1-3.

Citation Information

Patent Citations

  • Potassium salt flotation froth image segmentation method based on multi-scale feature extraction and fusion

    CN115131561A

  • Water surface floating object identification method and system

    CN116264008A