Riverway abnormal floating object detection method based on self-similarity enhancement and dense processing

By using self-similarity enhancement and dense processing methods, the receptive field is expanded and feature differences are enhanced, solving the problem of small-sized floating objects and strong background noise in the detection of abnormal floating objects in river channels, and achieving higher detection accuracy and precision.

CN118429813BActive Publication Date: 2025-11-04SHANDONG FENGSHI INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410682999.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-29
Publication Date
2025-11-04
Estimated Expiration
2044-05-29

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively distinguish between small floating objects and strong background noise in the detection of abnormal floating objects in rivers, resulting in poor detection accuracy. Furthermore, existing methods fail to fully utilize the potential relationship between floating objects and the background, leading to misjudgments and missed detections.

Method used

We employ a method that combines self-similarity enhancement and dense processing. The dense processing module expands the receptive field and corrects features, while the self-similarity module enhances feature differences. Spatial attention is used to highlight details of floating objects and suppress background interference. A hybrid loss function is used for supervised training.

Benefits of technology

It improves the detection accuracy for small floating objects and under strong background interference conditions, reduces false positives and false negatives, enhances the representation of floating object features, and improves detection performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118429813B_ABST
    Figure CN118429813B_ABST
Patent Text Reader

Abstract

The present application relates to a river abnormal floating object detection method based on self-similarity enhancement and dense processing, belonging to the technical field of image processing. The training sample is input into a feature extraction network to extract multi-layer features, the extracted multi-layer features are respectively input into a dense processing module to expand and correct the receptive field, and then input into a feature enhancement module for self-similarity feature enhancement. These features are up-sampled to the original image size and the channel is reduced to obtain a plurality of corresponding feature maps. The total loss is calculated by comparing the feature maps and the sample label, and the network is trained. The test sample is input into the trained network, the channel of the obtained several feature maps is spliced and reduced to obtain the output, and then the Sigmoid is taken to obtain the prediction map. The present application effectively overcomes the shortcomings that the model is prone to misjudgment and missed detection when detecting small size or strong background interference or strong reflection on the water surface.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to a riverway abnormal floating object detection method, in particular to a riverway abnormal floating object detection method based on self-similarity enhancement and dense processing, and belongs to the technical field of computer vision target detection and image processing. BACKGROUND

[0002] In the field of riverway abnormal floating object detection, strong background interference and strong reflection on the water surface pose significant challenges. The existence of these problems can cause missed detection. Therefore, the model is required to have strong ability to distinguish abnormal floating objects and river surface background features. A common method is to rely on high-level features for detection, but this often ignores key details in low-level features, resulting in poor detection performance. Another method is to fuse high-level and low-level features, but usually only through simple summation or multi-scale feature splicing, which greatly reduces the detection accuracy when facing small size and strong background noise of abnormal floating object samples, because the detailed information of the floating object is easily overwhelmed by various background information.

[0003] The above method does not implement additional mechanisms in the model to enhance the detailed information (such as contours, textures, etc.) of the abnormal floating object, resulting in unsatisfactory final detection results. Although the spatial attention mechanism can be used to enhance the representation of abnormal floating object features, it mainly focuses on the spatial dimension and does not fully utilize the potential relationship between the abnormal floating object and various backgrounds, which limits its effectiveness. In addition, during feature extraction, the receptive field of standard convolution or dilated convolution is fixed and regular, which is particularly insufficient when dealing with small size abnormal floating objects. As in patent CN 114782772 A, using feature pyramids and attention mechanisms cannot fully learn the features of small targets, because the feature pyramid has a small spatial range, which may cause the loss of detailed information in higher-level feature maps. Secondly, due to the small size and fewer pixels of small targets relative to the entire image, it is difficult to cause sufficient "attention" globally. This may cause the model to focus on larger and more prominent areas and ignore important information contained in small targets, thereby increasing the risk of detection failure. SUMMARY

[0004] The purpose of the present application is to overcome the above shortcomings and provide a riverway abnormal floating object detection method based on self-similarity enhancement and dense processing.

[0005] The technical scheme adopted by the present application is:

[0006] The riverway abnormal floating object detection method based on self-similarity enhancement and dense processing includes the following steps:

[0007] S1. Preprocess the image sample and divide the data set;

[0008] S2. In the training phase, the training samples are input into the feature extraction network to extract multi-layer features. The extracted multi-layer features are then input into the Dense Processing Module (DPM) to expand and correct the receptive field, resulting in corresponding corrected features. The corrected features are then input into the feature enhancement module for self-similarity feature enhancement, generating features that are significantly different from the abnormal floating objects and the river background. These features are then upsampled to the original image size and the number of channels is reduced to obtain multiple feature maps. These feature maps and the feature maps stitched together in each channel are compared with the sample labels to calculate the BCE loss and IoU loss. All losses are summed to calculate the total loss and train the network.

[0009] S3. In the testing phase, the trained network first inputs the test samples into the feature extraction network to extract multi-layer features. The extracted multi-layer features are then input into the Dense Processing Module (DPM) to expand and correct the receptive field, resulting in corresponding corrected features. The corrected features are then input into the feature enhancement module for self-similarity feature enhancement, generating features that are significantly different from the abnormal floating objects and the river background. These features are then upsampled to the original image size and the number of channels is reduced to obtain multiple corresponding feature maps. These feature maps are then concatenated in multiple channels to reduce the number of channels and obtain the output. The Sigmoid function is then applied to the output to obtain the prediction map.

[0010] In the above method, the dense processing module DPM mentioned in step S2 includes two branches. The first branch processes the input features in the spatial dimension. F i Global average pooling (GAP), 1×1 convolution, and bilinear interpolation are performed to obtain global context features. F i-global The second branch will F i The input is fed into multiple cascaded receptive field correction units (RFCUs) to extract dense contextual information. Dense skip connections are used between the cascaded RFCUs. Each RFCU adds the output features of the preceding RFCUs and the input features of the dense processing module (DPM) as its input. Finally, the outputs of the two branches are summed to obtain the final result of the DPM. F DPM-i .

[0011] In the aforementioned Receptive Field Correction Unit (RFCU), features are processed sequentially in three paths using standard convolution, dilated convolution with different dilation rates, and deformable convolution with different kernel sizes to expand and correct the receptive field. The results from the three different paths are then concatenated along the channel dimension and processed using a 1×1 convolution to obtain the final output. X RFCUThe convolution kernel size of the standard convolution is 3*3, the convolution kernel size of the dilated convolution is 3*3, the dilation rate r is 1, 2 and 4 respectively, and the convolution kernel size of the deformable convolution is 3*3, 5*5 and 7*7 respectively.

[0012] The feature enhancement module in step S2 includes two parallel enhancement paths, one is a self-similarity module based on global context, which uses self-similarity based on global context to measure the relationship between abnormal floating objects, between abnormal floating objects and river surface background, and between river surface backgrounds, and further enhances the features of abnormal floating objects according to the degree of similarity and suppresses the influence of river surface background; the other is a spatial attention module, which uses spatial attention to highlight the abnormal floating object detail information in the input features in the spatial dimension, and the outputs of the two paths are added to obtain the module output.

[0013] The spatial attention module first compresses the input features through global average pooling and global maximum pooling operations to obtain average pool features and maximum pool features respectively, then adjusts the input features to , C , where m represents the number of channels of the input features, W , H respectively represent the width and height of the feature map, the adjusted features are respectively multiplied with the average pool features and the maximum pool features through matrix dot product operation, and then the dot product results are normalized to generate average pooling spatial weight map and maximum pooling spatial weight map, the size of the two spatial weight maps is adjusted to ; then the input features are pixel-wise multiplied with the two weight maps to generate two features respectively, the two features are spliced in the channel dimension, and fused through a 3*3 convolution layer to generate enhanced features.

[0014] The self-similarity module based on global context first adjusts the input features to , and transposes to obtain , then performs matrix dot product operation on and , and then performs normalization operation to obtain self-similarity matrix SSM ; finally, matrix dot product is performed on and SSM , and the obtained result is adjusted to obtain .

[0015] The BCE loss and IoU loss calculation in step S2 is to calculate the BCE loss and IoU loss between the feature maps and the corresponding labels pixel by pixel, and the formula definition of the BCE loss of one sample is as follows:

[0016] ,

[0017] whereinW , H respectively represent the width and height of the picture, GT ( x , y ) and P ( x , y ) represent the label value at the image x , y ) coordinates and the predicted value of the model, the label value is 0 or 1, 0 represents normal, and 1 represents abnormal floating object, and the predicted value is between 0 and 1.

[0018] The formula definition of the IoU loss of one sample is as follows:

[0019] ,

[0020] wherein, represents the number of pixel points predicted as river abnormal floating object and the label value represents abnormal floating object, represents the number of pixel points predicted as abnormal floating object or the label value represents abnormal floating object. Therefore, the final total loss L total is defined as follows:

[0021] ,

[0022] wherein, 5 represents the number of feature maps finally participating in prediction.

[0023] Another object of the present application is to provide a river abnormal floating object detection system based on self-similarity enhancement and dense processing, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to realize the river abnormal floating object detection method based on self-similarity enhancement and dense processing as described above.

[0024] The present application has the following advantages:

[0025] The present application uses different convolutions for dense processing, expands and corrects the receptive field, so that it can accurately cover various sizes of abnormal floating object detection. At the same time, the self-similarity feature enhancement module is used to expand the difference between the abnormal floating object and the river surface background, enhance the feature representation of the abnormal floating object, and suppress the influence of the river surface background, thereby improving the performance of the final detection. The present application effectively overcomes the shortcomings that the model is prone to misjudgment and missed detection when detecting small size or strong background interference or strong reflection on the river surface. BRIEF DESCRIPTION OF DRAWINGS

[0026] Figure 1 is a flow chart of the training stage of the present application method;

[0027] Figure 2 Flow chart for testing phase of the method of the present application;

[0028] Figure 3 Network structure schematic diagram for the model of the method of the present application;

[0029] Figure 4 Structure schematic diagram for the dense processing module of the present application;

[0030] Figure 5 Schematic diagram for the feature enhancement module of the present application;

[0031] Figure 6 Schematic diagram for the self-similarity feature enhancement module of the present application;

[0032] Figure 7 Schematic diagram for the spatial attention module of the present application; DETAILED DESCRIPTION

[0033] The present application will be further described below in conjunction with specific embodiments.

[0034] The river abnormal floating object detection method based on self-similarity enhancement and dense processing of Embodiment 1 comprises the following steps:

[0035] S1. Image sample pre-processing and data set division: the size of all samples is adjusted to 256x256, and read in RGB form. At the same time, the corresponding label is read in grayscale form, so as to form a sample size of 3x256x256 and a GT size of 1x256x256.

[0036] S2. Training phase, (see Figure 1 , Figure 3 ) input the training sample into the feature extraction network to extract multi-layer features, input the extracted multi-layer features into the dense processing module DPM for expansion and receptive field correction to obtain the corresponding corrected features, input the corrected features into the feature enhancement module for self-similarity feature enhancement, generate features with large differences between abnormal floating objects and river surface background, up-sample these features to the original image size and reduce the channel to obtain corresponding multiple feature maps, compare the feature maps and the sample label to calculate the BCE loss and the IoU loss, and add all the losses to calculate the total loss to train the network:

[0037] (1) Extracting features at different levels

[0038] In view of the real-time problem of river abnormal floating object detection, the structure in a lightweight pre-trained ResNet18 is used as a feature extraction network. The features are extracted using conv1, bn1, relu, maxpooling, layer1, layer2, layer3, and layer4 in the structure, and the network structure is shown in Table 1.

[0039] Table 1 Feature extraction network structure

[0040] .

[0041] By inputting a batch of training samples into the feature extraction network, four-layer features are output, denoted as F i , i is 1, 2, 3, and 4. The feature size is shown in Table 2, where N is the batch size.

[0042] Table 2 Feature size

[0043] .

[0044] (2) Expand the receptive field and correct

[0045] Because the abnormal floating objects vary greatly in size, the extracted features need to cover different ranges of receptive fields to capture dense and large-scale context information. Therefore, the invention uses dilated convolution to increase the receptive field. However, whether it is standard convolution or dilated convolution, the receptive field contained in the processed features is regular, but this is not accurate enough for the detection of particularly small abnormal floating objects, because the information of small abnormal floating objects may be covered by a large amount of river surface background features in the features extracted layer by layer, especially in high-level features. Therefore, the invention introduces deformable convolution to correct the receptive field, so that the irregular receptive field learned can correctly cover various abnormal floating objects.

[0046] The features F i are input into the dense processing module DPM, which is operated in two steps, as shown in Figure 4 The first step is to perform global average pooling (GAP) operation, 1x1 convolution operation and bilinear interpolation operation on F i in the spatial dimension to obtain global context features F i-global The second step is to input the features F iThe input is input into three cascaded receptive field correction units RFCU to extract dense context information. In the RFCU, the features are processed by sequentially using standard convolution, dilated convolution with different dilation rates, and deformable convolution with different kernel sizes in three branches, so as to expand and correct the receptive field. Among them, the kernel size of the standard convolution is 3*3, the kernel size of the dilated convolution is 3*3, and the dilation rates r are 1, 2 and 4 respectively. The kernel sizes of the deformable convolution are 3*3, 5*5 and 7*7 respectively. The results of the three different branches are spliced in the channel dimension, and a 1*1 convolution is used to obtain the final result X RFCU The general formula of the above receptive field correction unit is as follows:

[0047] ,

[0048] ,

[0049] Wherein X is the input vector of the RFCU, X d-k is the result processed by different branches, DefC onv represents deformable convolution, represents dilated convolution with dilation rates r of 1, 2 and 4 respectively, Conv represents standard convolution, X RFCU is the output result of the receptive field correction unit, CAT represents splicing operation.

[0050] The present application adopts dense skip connection between the three cascaded receptive field correction units RFCU, so as to bring fast information flow and dense information exchange, expand and correct the receptive field, and provide more flexible context modeling capability for local context information, which lays a foundation for accurate detection. Each receptive field correction unit RFCU adds the output features of the previous receptive field correction units RFCU and the input features of the dense processing module DPM as input, and finally sums up the outputs of the two branches to obtain the final result of the dense processing module DPM F DPM-i (The second branch in the figure explains that the input of the first RFCU is F i , the output of the first RFCU is F RFCU-1 , the input of the second RFCU is F i + F RFCU-1 , the output of the second RFCU is F RFCU-2 , and the input of the third RFCU isF i + F RFCU-1 + F RFCU-2 , the output of the third RFCU is F RFCU-3 , the final result is F i + F RFCU-1 + F RFCU-2 + F RFCU-3 + F i-global . The curved arrow points to , which means the input of the next RFCU is the sum of the output of the previous module and the input of the previous RFCU, for example, the input of the second RFCU is the sum of the input and the output of the first RFCU, that is F i + F RFCU-1 ). Compared with the previous RFCU, the next RFCU can obtain features with larger, denser, and more accurate receptive fields. The formulas involved in the dense processing module DPM are as follows:

[0051] ,

[0052] ,

[0053] ,

[0054] where Up represents bilinear interpolation up-sampling, GAP represents global average pooling, F RFCU-j represents the output of the jth RFCU, and Ω represents the RFCU. F DPM-i represents the output result of the dense processing module.

[0055] Each layer extracts features F i After the dense processing module, the final result is obtained , the size of the feature map remains unchanged, but the receptive field contained therein has been expanded and corrected.

[0056] (3) Self-similarity feature enhancement

[0057] Although the features obtained after the dense processing module F DPM-iAll of them contain a large receptive field and can accurately cover various sizes of river channel abnormal floating objects, but the difference between the river surface background features and the abnormal floating object features in them may not be obvious, which leads to poor detection effect of abnormal floating objects with strong background interference. Therefore, feature enhancement is needed to expand the difference between the abnormal floating object features and the background.

[0058] We will F DPM-i Input into the feature enhancement module FAM, and perform feature enhancement in two ways (see Figure 5 ).

[0059] The first way, as Figure 7 , uses spatial attention to highlight the abnormal floating object details in the spatial dimension F DPM-i to increase the model's attention to abnormal floating objects. First, compress the feature F DPM-i through global average pooling (GAP) and global maximum pooling (GMP) operations to obtain average pool features and maximum pool features , respectively, where C represents the number of channels of the feature F DPM-i . Then adjust the size of F DPM-i , and the result is . W , H represent the width and height of the feature map, respectively, and use f t-i f a-i and f m-i to perform matrix dot product operations, respectively, and then normalize the dot product results to generate average pooling spatial weight maps and maximum pooling spatial weight maps. The former retains most of the river surface background information, and the latter retains abnormal floating object information. Then, adjust the size of the two spatial weight maps, and the adjusted size is , F DPM-i Pixel-level multiplication is performed with the two weight maps to generate two features and . Finally, the two features are concatenated in the channel dimension and fused through a 3x3 convolution layer to generate the final enhanced feature . The formula definition of the above operation is as follows:

[0060] ,

[0061] ,​

[0062] ,

[0063] where x denotes pixel-wise multiplication, ∇ denotes the adjustment size operation, ε denotes the normalization operation, and • denotes the matrix dot product. Conv denotes the standard convolution, CAT denotes the splicing operation.

[0064] Secondly, the self-similarity based on the global context is used to measure the relationship between the abnormal floating objects, between the abnormal floating objects and the river surface background, and between the river surface backgrounds, and the abnormal floating object features are further enhanced according to the degree of similarity, and the influence of the river surface background is suppressed, as shown in Figure 6 Firstly, the F DPM-i is adjusted to , and the transpose is obtained . Then, the and matrix dot product operation is performed, and the normalization operation is performed to obtain the self-similarity matrix SSM In SSM , the feature similarity of the same class (between the abnormal floating objects or between the river surface backgrounds) is high, while the feature similarity of different classes (between the abnormal floating objects and the river surface background) is low. Finally, the f t-i and SSM matrix dot product operation is performed, and the obtained result is adjusted to obtain . The formula definition of the above operation is as follows:

[0065] ,

[0066] ,

[0067] Finally, the feature F sam-i is summed up with F ssm-i to obtain the final enhanced feature F’ i . After the above operation, the abnormal floating object area in each layer feature F’ i is further enhanced, and the river surface background information is suppressed, and the difference between the two is significantly amplified, providing a basis for accurate river abnormal floating object detection.

[0068] (4) Hybrid loss calculation

[0069] In the above operation, due to the use of various convolutions, especially the variability convolution, the parameter amount is obviously increased, which may bring additional optimization difficulty to the model, therefore, the present application adopts the form of multi-level prediction to supervise the features of different levels, improve the training stability, accelerate the optimization of the network model, and improve its generalization ability. At the same time, in order to obtain a high-quality prediction map with clear boundaries of abnormal floating objects, the present application uses a hybrid loss containing binary cross entropy (BCE) loss and IoU loss to train the entire model.

[0070] We will upsample each feature F’ i to the original image size, and use a 1x1 convolution to reduce the channel number to 1. Finally, we get four feature maps with a channel number of 1 and a size of 256x256. In order to summarize the information, we concatenate the four feature maps in the channel dimension and use a 1x1 convolution to reduce the channel to get a feature map with a channel number of 1 and a size of 256x256.

[0071] In summary, there are five feature maps, and the BCE loss and IoU loss between these feature maps and the corresponding labels are calculated pixel by pixel. The formula definition of the BCE loss of a sample is as follows:

[0072] ,

[0073] where W , H represent the width and height of the picture, GT ( x , y ) and P ( x , y ) represent the label value and the prediction value of the model at the coordinates of the image x , y , the label value is 0 or 1, 0 represents normal, and 1 represents abnormal floating object, and the prediction value is between 0 and 1.

[0074] The formula definition of the IoU loss of a sample is as follows:

[0075] ,

[0076] where represents the number of pixel points predicted as river abnormal floating object and the label value represents abnormal floating object, represents the number of pixel points predicted as abnormal floating object or the label value represents abnormal floating object. Therefore, the final total loss L total is defined as follows:

[0077] ,

[0078] wherein 5 represents the number of feature maps last participating in prediction.

[0079] (5) updating the network and saving the last parameters

[0080] In the model training process, the SGD optimizer is used, the momentum coefficient is set to 0.9, the weight decay coefficient is set to 0.0003, and the initial learning rate is set to 0.0001. In order to better adapt to the learning speed of the model during training, the present application adopts a phased decay strategy to change the learning rate, and the learning rate is reduced to 0.1 of the original every 1000 iterations, so as to further accelerate the convergence of the model. The batch size is set to 16, that is, 16 training set pictures are read as an iteration each time, the total loss is calculated and gradient back propagation and model parameter updating are performed each time. A total of 6000 iterations are performed, and the model after iteration is taken as the final model and the parameters are saved.

[0081] S3. In the test phase, the trained network is used to input the test sample into the feature extraction network to extract multi-layer features, and the extracted multi-layer features are input into the dense processing module DPM for expansion and receptive field correction to obtain corresponding corrected features. The corrected features are input into the feature enhancement module for self-similarity enhancement to generate features with large differences between abnormal floating objects and river surface backgrounds. These features are upsampled to the original image size and reduced in channel to obtain corresponding multiple feature maps. The feature maps are concatenated in the channel to reduce the channel to obtain the output. The Sigmoid of the output result is taken as the prediction map:

[0082] In the test phase, the model parameters saved finally in the training phase are read. The test sample is input into the model to obtain four features F 1- F 4, through the feature extraction network. 4, each feature is input into the dense processing module DPM to perform dense processing to expand and correct the receptive field therein, so as to better focus on riverway abnormal floating objects of various sizes. Feature enhancement is performed on each feature after dense processing to finally generate four enhanced features F’ 1- F’ 4. Each enhanced feature is upsampled to the original image size by bilinear interpolation and reduced in channel by 1x1 convolution to obtain four feature maps of the same size with a channel of 1. Then, the four feature maps are concatenated in the channel dimension, and a 1x1 convolution is used to reduce the channel to obtain the output. The Sigmoid of the output result is taken as the final prediction map. The score at each position in the prediction map represents the probability that the corresponding pixel is an abnormal floating object. The larger the score, the greater the probability that the pixel is an abnormal floating object. The test phase process is as shown in Figure 2 .

[0083] Embodiment 2: A river abnormal floating object detection system based on self-similarity enhancement and dense processing, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the method for detecting abnormal floating objects in a river based on self-similarity enhancement and dense processing as described in Embodiment 1 when executing the program.

[0084] The above description is merely the preferred embodiments of the present application, and is not intended to limit the present application. Any modification, equivalent replacement or improvement made by any person skilled in the art based on the technical and principle disclosed in the present application shall be included in the protection scope of the present application.

Claims

1. A method for detecting anomalous floating objects in river channels based on self-similarity enhancement and dense processing, characterized by: The steps include the following: S1. Obtain image samples, preprocess them, and divide the dataset; S2. In the training phase, the training samples are input into the feature extraction network to extract multi-layer features. The extracted multi-layer features are then input into the Dense Processing Module (DPM) to expand and correct the receptive field, resulting in corresponding corrected features. The corrected features are then input into the feature enhancement module for self-similarity feature enhancement, generating features that are significantly different from the abnormal floating objects and the river background. These features are then upsampled to the original image size and the number of channels is reduced to obtain multiple feature maps. These feature maps and the feature maps stitched together in each channel are compared with the sample labels to calculate the BCE loss and IoU loss. All losses are summed to calculate the total loss and train the network. The Dense Processing Module (DPM) comprises two branches. The first branch processes the input features in the spatial dimension. F i Global average pooling, 1×1 convolution, and bilinear interpolation are performed to obtain global context features. F i-global The second branch will F i The input is fed into multiple cascaded receptive field correction units (RFCUs) to extract dense contextual information. Dense skip connections are used between the cascaded RFCUs. Each RFCU adds the output features of the preceding RFCUs and the input features of the dense processing module (DPM) as its input. Finally, the outputs of the two branches are summed to obtain the final result of the DPM. F DPM-i ; S3. In the testing phase, the trained network first inputs the test samples into the feature extraction network to extract multi-layer features. The extracted multi-layer features are then input into the Dense Processing Module (DPM) to expand and correct the receptive field, resulting in corresponding corrected features. The corrected features are then input into the feature enhancement module for self-similarity feature enhancement, generating features that are significantly different from the abnormal floating objects and the river background. These features are then upsampled to the original image size and the number of channels is reduced to obtain multiple corresponding feature maps. These feature maps are then concatenated in multiple channels to reduce the number of channels and obtain the output. The Sigmoid function is then applied to the output to obtain the prediction map.

2. The method for detecting abnormal floating objects in river channels based on self-similarity enhancement and dense processing according to claim 1, characterized in that, In the aforementioned Receptive Field Correction Unit (RFCU), features are processed sequentially in three paths using standard convolution, dilated convolution with different dilation rates, and deformable convolution with different kernel sizes to expand and correct the receptive field. The results from the three different paths are then concatenated along the channel dimension and processed using a 1×1 convolution to obtain the final output. X RFCU .

3. The method for detecting abnormal floating objects in river channels based on self-similarity enhancement and dense processing according to claim 1, characterized in that, The feature enhancement module described in step S2 includes two parallel enhancement paths. One path is a self-similarity module based on global context, which uses self-similarity based on global context to measure the relationship between abnormal floating objects, between abnormal floating objects and the river background, and between the river background. Based on the degree of similarity, the features of abnormal floating objects are further enhanced to suppress the influence of the river background. One path is the spatial attention module, which uses spatial attention to highlight the details of abnormal floating objects in the input features in the spatial dimension. The outputs of the two paths are added together to obtain the module output.

4. The method for detecting abnormal floating objects in river channels based on self-similarity enhancement and dense processing according to claim 3, characterized in that, The spatial attention module first compresses the input features using global average pooling and global max pooling operations to obtain average pooling features and max pooling features, respectively. Then, it adjusts the input features to... , C This represents the number of channels in the input feature. W , H Let represent the width and height of the feature map, respectively. The adjusted features are then subjected to matrix dot products with both the average pooling and max pooling features. The dot product results are then normalized to generate average pooling and max pooling spatial weight maps. The dimensions of both spatial weight maps are then adjusted to... Then, the input features are multiplied pixel-wise with the two weight maps to generate two features. These two features are then concatenated along the channel dimension and fused through a 3×3 convolutional layer to generate enhanced features.

5. The method for detecting abnormal floating objects in river channels based on self-similarity enhancement and dense processing according to claim 3, characterized in that, The aforementioned self-similarity module based on global context first adjusts the input features to... And transpose to obtain Then and The matrix dot product operation is performed, followed by normalization, to obtain the self-similarity matrix. SSM Finally, for and SSM Perform a matrix dot product and adjust the result to obtain... .

6. The method for detecting abnormal floating objects in river channels based on self-similarity enhancement and dense processing according to claim 1, characterized in that, The BCE loss and IoU loss calculation described in step S2 involves calculating the BCE loss and IoU loss between these feature maps and their corresponding labels pixel by pixel. The formula for the BCE loss of a sample is defined as follows: , in W , H These represent the width and height of the image, respectively. GT ( x , y )and P ( x , y ) indicates in the image ( x , y The label value at the coordinate and the model's predicted value. The label value is 0 or 1, where 0 indicates normal and 1 indicates abnormal floating objects. The predicted value is between 0 and 1. The formula for the IoU loss of a sample is defined as follows: , in This indicates that the object is predicted to be an anomalous floating object in the river channel, and the label value represents the number of pixels of the anomalous floating object. This indicates whether the object is predicted to be an anomalous floating object or whether the label value represents the number of pixels associated with the anomalous floating object.

7. The method for detecting abnormal floating objects in river channels based on self-similarity enhancement and dense processing according to claim 6, characterized in that, Final total loss L total The definition is as follows: , Where 5 represents the number of feature maps that were ultimately used in the prediction.

8. A river channel abnormal floating object detection system based on self-similarity enhancement and dense processing, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method for detecting abnormal floating objects in a river channel based on self-similarity enhancement and dense processing as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Scene text detection method, system and equipment based on deep convolutional neural network

    CN114724155A