Lightweight and high-precision underwater target detection method
By introducing RFAConv module, C2f_Dual structure and MultiSEAM in underwater target detection, the problems of insufficient detection accuracy and high computational complexity in underwater target detection are solved, and lightweight and high-precision underwater target detection are achieved, suitable for complex Background and resource-constrained environment.
Patent Information
- Application Number
- CN202411452668.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2024-12-27
AI Technical Summary
The existing underwater target detection methods are insufficient in dealing with complex backgrounds and small targets, and have high computational complexity, making it difficult to meet real-time requirements, especially in underwater environments, resource constraints and data set quality problems are prominent.
Using the RFAConv module, an optimized C2f_Dual structure and multi-scale spatial enhanced attention mechanism (MultiSEAM), the improved YOLO-RDM model performs feature extraction and object detection to achieve lightweight and high precision of the model.
It significantly improves the feature extraction capability and detection accuracy of the model in complex contexts, realizes the lightweight model, can meet real-time requirements in resource-constrained equipment, and is suitable for fields such as marine biological monitoring and underwater safety.
Smart Images

Figure CN119206466A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision and deep learning technology, and more specifically to a lightweight and high-precision underwater target detection method. Background Art
[0002] Due to the poor visibility, low contrast, light absorption and scattering of the underwater environment, the underwater image quality is poor, which brings significant challenges to target detection. Accurate and efficient underwater target detection has important application value in the fields of marine biology, underwater monitoring, resource exploration, etc. Existing underwater target detection methods, such as the one-stage detection model based on convolutional neural network (CNN), have advantages in detection speed, but the detection accuracy is often insufficient when dealing with complex backgrounds and small targets. At the same time, although the traditional two-stage detection model has high accuracy, it has high computational complexity and is difficult to meet real-time requirements.
[0003] In recent years, researchers have proposed a variety of lightweight network structures to improve detection efficiency and reduce model complexity. However, these methods still face significant challenges in underwater target detection, such as computational resource limitations, real-time requirements, complex environmental impacts, and dataset quality issues. Noise and blur issues in underwater images, changes in target appearance, and occlusion between small targets and dense targets are still difficult problems that need to be solved in the field of underwater target detection.
[0004] Therefore, it is an urgent problem for those skilled in the art to propose a lightweight and high-precision underwater target detection method to solve the difficulties existing in the prior art. Summary of the invention
[0005] In view of this, the present invention provides a lightweight and high-precision underwater target detection method. By introducing the RFAConv module, the optimized C2f_Dual structure, and the multi-scale spatial enhanced attention mechanism (MultiSEAM), the feature extraction capability and detection accuracy of the model in complex backgrounds are significantly improved, while the model is lightweight and suitable for resource-constrained underwater environments.
[0006] In order to achieve the above object, the present invention provides the following technical solutions:
[0007] A lightweight and high-precision underwater target detection method comprises the following steps:
[0008] S1, data acquisition, collecting underwater images;
[0009] S2, preprocessing the collected underwater images;
[0010] S3. Input the preprocessed image into the improved YOLO-RDM model, and the backbone network of the model uses the RFAConv module for feature extraction;
[0011] S4. Introduce a multi-scale spatial enhanced attention mechanism in the feature extraction process to adaptively assign appropriate weights to objects of different scales;
[0012] The multi-layer feature maps extracted from the S5 and Backbone networks are further processed and fused by the Neck layer. The Head layer locates and classifies the fused features and outputs the bounding box and category information of the target.
[0013] S6, introduce C2f_Dual structural optimization model for lightweight processing;
[0014] S7, model training and optimization;
[0015] S8. The trained and optimized model performs real-time target detection, processes and outputs the detection results.
[0016] The above method may optionally include: S2, preprocessing the collected underwater images, including image denoising, contrast enhancement, and color correction.
[0017] The above method, optionally, in S3, the improved YOLO-RDM model includes: Backbone layer, Neck layer, and Head layer;
[0018] The Backbone layer consists of multiple Conv, Deconvolution and C2f layers for feature extraction;
[0019] The Neck layer consists of multiple upsampling layers, concatenation layers, convolution layers, and feature extraction modules, which are used to fuse feature maps from different stages of the Backbone layer;
[0020] The Head layer is responsible for the final object detection task.
[0021] In the above method, optionally, in S3, the RFAConv module is used for feature extraction, and the convolution part in the backbone network Backbone in the YOLO-RDM model is replaced with RFAConv. The implementation steps of RFAConv are as follows:
[0022] First, obtain the feature map X from the upper convolutional layer and get the batch size and number of channels of the input tensor. Suppose the input feature map is:
[0023] X∈R B×C×H×W ,
[0024] Where B represents the batch size, C represents the number of channels, H and W represent the height and width of the feature map respectively;
[0025] Then, Global Average Pooling is used to convert the feature map X into global information, and then a 1×1 layer-by-layer convolution Depthwise Convolution is used to generate the weight A;
[0026] A=Softmax(Conv 1×1 (AvgPool(X))),
[0027] Generate receptive field feature X through layer-by-layer convolution and batch normalization rf , and use the ReLU activation function to enhance nonlinear feature representation:
[0028] X rf =ReLU(BatchNorm(Conv k×k (X))),
[0029] The generated weight A and the receptive field feature X rf Multiplication:
[0030] F rf =A⊙X rf ,
[0031] Where ⊙ represents element-by-element multiplication;
[0032] The feature map is reorganized and the final feature extraction is performed through standard convolution Conv:
[0033] F=Conv k×k,stride=k (F rf ).
[0034] In the above method, optionally, in S4, a multi-scale spatial enhanced attention mechanism MultiSEAM module is introduced in the feature extraction process;
[0035] The MultiSEAM module introduces three different scale patches (3, 5, 7). The specific steps are as follows:
[0036] First, input the feature map:
[0037] X∈R B×C×H×W ,
[0038] Feature extraction is performed through three DCovN modules of different scales. Each DCovN module includes initial convolution, depthwise separable convolution and batch normalization operations to generate multi-scale feature maps Y0, Y1, and Y2.
[0039] Y i =DConv(X),i=0,1,2,
[0040] For each scale feature map Y i Perform global average pooling to obtain three feature vectors Z of different scales i , for the input feature map Z i Perform global average pooling to obtain the global feature vector Z x :
[0041] Z i =AvgPool(Y i ),i=0,1,2,
[0042] Z x =AvgPool(X),
[0043] The feature vectors of three different scales are weighted averaged with the global feature vector of the input feature map to obtain the fused feature vector Z f :
[0044]
[0045] The fused feature vector Z f After processing through the fully connected layer, the attention weight W is generated:
[0046] W = Sigmoid(FC(ReLU(FC(Z f )))),
[0047] The generated attention weights W are expanded to the same size as the input feature map through a nonlinear transformation and applied to the input feature map X:
[0048] W exp =exp(W),X out =X⊙W exp ,
[0049] The final output feature map X out .
[0050] The above method is optional. In S6, the C2f_Dual structural optimization model is introduced to perform lightweight processing, and DualConv is used to innovate the lightweight structure of C2f:
[0051] The DualConv convolutional network structure combines 3×3 and 1×1 convolution kernels. The specific process is as follows:
[0052] In the Dual_C2f module, a 1×1 convolution kernel is used to process the input, reducing the number of input channels to half of the number of output channels. The input feature map is:
[0053] X∈R B×C×H×W ,
[0054] The output feature map is:
[0055]
[0056] The output is divided into two parts in the channel dimension through the Split operation, and sent to multiple Bottleneck modules respectively. The two feature maps after segmentation are assumed to be X1 and X2:
[0057] X1,X2=split(X′),
[0058] Each Bottleneck module first performs preliminary feature extraction through a 1×1 convolution kernel, and the output feature map is:
[0059] X b1 =Conv 1×1 (X1),X b2 =Conv 1×1 (X2),
[0060] The DualConv structure combines 3×3 and 1×1 convolution kernels to process the same input feature map channels at the same time, and uses group convolution techniques to efficiently arrange convolution filters:
[0061] F rf1 =DualConv(X b1 ),F rf2 =DualConv(X b2 ),
[0062] Among them, X b1 and X b2 Represent the feature maps in the Bottleneck module, F rf1 and F rf2 Represents the output feature map of DualConv;
[0063] The outputs of all Bottleneck modules are concatenated in the channel dimension to form a new feature map:
[0064] F = concat(F rf1 ,F rf2 ,...,F rfn ),
[0065] Finally, another 1×1 convolution kernel is used to restore the number of channels and complete the final output:
[0066] Y=Conv 1×1 (F).
[0067] The above method is optional. In S7, model training and optimization, during the training process, a large-scale underwater target detection dataset is used for model training, an optimization algorithm is used during the training process, and learning rate preheating and weight decay techniques are adopted.
[0068] In the above method, optionally, in S8, the trained and optimized model is deployed in an actual underwater detection device to perform real-time target detection. After receiving the underwater image, the model quickly processes and outputs the detection results, including the location, category and confidence of the target.
[0069] It can be seen from the above technical solutions that, compared with the prior art, the present invention provides a lightweight and high-precision underwater target detection method, which has the following beneficial effects:
[0070] The present invention effectively solves the problems of insufficient detection accuracy, small target detection and dense target occlusion caused by poor image quality in underwater target detection by introducing the RFAConv module and the multi-scale spatial enhanced attention mechanism MultiSEAM; by optimizing the C2f_Dual structure, the model is lightweight, so that it can meet the real-time requirements in resource-constrained devices; the present invention has significant advantages in complex background processing, high-precision detection, computational efficiency and wide application adaptability, and is particularly suitable for the fields of marine biological monitoring, underwater safety and resource exploration, showing strong robustness and generalization ability, and has broad promotion and application potential. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0072] Figure 1 A flowchart of a lightweight and high-precision underwater target detection method provided by the present invention;
[0073] Figure 2 Schematic diagram of the overall architecture of the YOLO-RDM model of the present invention;
[0074] Figure 3 Schematic diagram of the overall structure of the RFAConv module of the present invention;
[0075] Figure 4 It is a schematic diagram of the overall structure of the MultiSEAM module of the present invention;
[0076] Figure 5It is a schematic diagram of the overall structure of the Dual_C2f module of the present invention. DETAILED DESCRIPTION
[0077] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0078] See also Figure 1 As shown, a lightweight and high-precision underwater target detection method comprises the following steps:
[0079] S1, data acquisition, collecting underwater images;
[0080] S2, preprocessing the collected underwater images;
[0081] S3. Input the preprocessed image into the improved YOLO-RDM model, and the backbone network of the model uses the RFAConv module for feature extraction;
[0082] S4. Introduce a multi-scale spatial enhanced attention mechanism in the feature extraction process to adaptively assign appropriate weights to objects of different scales;
[0083] The multi-layer feature maps extracted from the S5 and Backbone networks are further processed and fused by the Neck layer. The Head layer locates and classifies the fused features and outputs the bounding box and category information of the target.
[0084] S6, introduce C2f_Dual structural optimization model for lightweight processing;
[0085] S7, model training and optimization;
[0086] S8. The trained and optimized model performs real-time target detection, processes and outputs the detection results.
[0087] Furthermore, S2, the collected underwater images are preprocessed, including image denoising, contrast enhancement, and color correction.
[0088] Further, see Figure 2 As shown in S3, the improved YOLO-RDM model is mainly composed of three parts: the Backbone layer on the far left, the Neck layer in the middle, and the Head layer on the far right;
[0089] The Backbone layer consists of multiple Conv, Deconvolution and C2f layers for feature extraction;
[0090] The Neck layer consists of multiple upsampling layers, concatenation layers, convolution layers, and feature extraction modules. It is mainly used to fuse feature maps from different stages of the Backbone layer to enhance feature expression capabilities.
[0091] The Head layer is responsible for the final object detection task.
[0092] The convolution structure in the YOLOv8 model mainly consists of a 2D convolutional layer, a batch normalization layer, and a SiLU activation function, which is responsible for downsampling and enhancing nonlinear representation.
[0093] However, this convolution has obvious limitations when dealing with complex backgrounds and multi-scale targets. The main limitation is that the convolution kernel parameters share the same weights in different regions, which limits the model's ability to learn complex features. To avoid these limitations, we replace the convolution part in the Yolov8 backbone network with RFAConv.
[0094] Reference Figure 3 As shown in Figure 1, RFAConv is an innovative convolution operation designed to solve the parameter sharing problem of standard convolution. It focuses on the spatial features of the receptive field and dynamically generates unique attention weights for each receptive field, thereby significantly improving the efficiency of feature extraction while keeping the computational overhead and parameter increase almost negligible:
[0095] Furthermore, in S3, the RFAConv module is used for feature extraction, and the convolution part in the backbone network Backbone in the YOLO-RDM model is replaced with RFAConv. The implementation steps of RFAConv are as follows:
[0096] First, obtain the feature map X from the upper convolutional layer and get the batch size and number of channels of the input tensor. Suppose the input feature map is:
[0097] X∈R B×C×H×W ,
[0098] Where B represents the batch size, C represents the number of channels, H and W represent the height and width of the feature map respectively;
[0099] Then, the feature map X is converted into global information using Global Average Pooling, and then a 1×1 layer-by-layer convolution Depthwise Convolution is used to generate weights A. These weights are calculated based on the receptive field characteristics of the input feature map, and the spatial attention mechanism is used to determine the importance of each position:
[0100] A=Softmax(Conv 1×1 (AvgPool(X))),
[0101] Generate receptive field feature X through layer-by-layer convolution and batch normalization rf , and use the ReLU activation function to enhance nonlinear feature representation:
[0102] X rf =ReLU(BatchNorm(Conv k×k (X))),
[0103] The generated weight A and the receptive field feature X rf Multiply to dynamically adjust the convolution kernel parameters to ensure that the feature weights in each receptive field match the input feature map after being normalized by the Softmax function:
[0104] F rf =A⊙X rf ,
[0105] Where ⊙ represents element-by-element multiplication;
[0106] The feature map is reorganized and the final feature extraction is performed through standard convolution Conv:
[0107] F=Conv k×k,stride=k (F rf );
[0108] RFAConv implements the ability to dynamically adjust convolution kernel parameters, enabling it to process image information more efficiently and further improving computational efficiency.
[0109] Further, see Figure 4 As shown in S4, a multi-scale spatial enhanced attention mechanism MultiSEAM module is introduced in the feature extraction process;
[0110] In underwater target detection tasks, small target detection and occlusion problems are extremely challenging. A new attention mechanism based on SEAM, MultiSEAM, is proposed. The SEAM module is an attention network module designed to compensate for the response loss of occluded targets. The SEAM module combines deep separable convolution and residual connection to learn channel importance and reduce the number of parameters. It uses 1x1 convolution and fully connected networks to enhance the interaction between channels.
[0111] MultiSEAM introduces three different scales of patches (3, 5, 7) based on the original scale, which enhances the model's adaptability to targets of different sizes and shapes. It extracts features through DCovN modules of different scales and performs global average pooling and fully connected layer processing. MultiSEAM further enhances the information connection between channels and improves feature expression capabilities. It maintains high computational efficiency through deep separable convolution and 1x1 convolution without significantly increasing computational overhead.
[0112] The MultiSEAM module introduces three different scales of patches (3, 5, 7). Compared with the single-scale convolution of the SEAM module, this multi-scale feature extraction method enhances the adaptability of the model in dealing with targets of different sizes and shapes, especially in the detection of small targets in complex backgrounds. In terms of feature fusion, MultiSEAM extracts features through DCovN modules of different scales, and performs global average pooling and fully connected layer processing. Compared with the SEAM module, it further enhances the information connection between channels, thereby improving the feature expression ability. Despite the addition of multi-scale feature extraction, the MultiSEAM module maintains high computational efficiency through deep separable convolution and 1x1 convolution, and does not significantly increase the computational overhead, thereby ensuring the high performance of the model. The specific steps are as follows:
[0113] First, input the feature map:
[0114] X∈R B×C×H×W ,
[0115] Feature extraction is performed through three DCovN modules of different scales. Each DCovN module includes initial convolution, depthwise separable convolution and batch normalization operations to generate multi-scale feature maps Y0, Y1, and Y2.
[0116] Y i =DConv(X),i=0,1,2,
[0117] For each scale feature map Y i Perform global average pooling to obtain three feature vectors Z of different scales i , for the input feature map Z i Perform global average pooling to obtain the global feature vector Z x :
[0118] Z i =AvgPool(Y i ),i=0,1,2,
[0119] Z x =AvgPool(X),
[0120] The feature vectors of three different scales are weighted averaged with the global feature vector of the input feature map to obtain the fused feature vector Z f :
[0121]
[0122] The fused feature vector Z f After processing through the fully connected layer, the attention weight W is generated:
[0123] W = Sigmoid(FC(ReLU(FC(Z f )))),
[0124] The generated attention weights W are expanded to the same size as the input feature map through a nonlinear transformation and applied to the input feature map X:
[0125] W exp =exp(W),X out =X⊙W exp ,
[0126] The final output feature map X out ;
[0127] In this way, the MultiSEAM module effectively combines multi-scale feature extraction and attention mechanism, significantly improving the model's feature extraction capabilities and performance in handling complex scenes.
[0128] Further, see Figure 5 As shown in Figure 6, in order to improve the performance of the C2f module, the DualConv structure is introduced. This convolutional network structure combines 3×3 and 1×1 convolution kernels, processes the same input feature map channel at the same time, and effectively arranges the convolution filters through the group convolution technique, which significantly reduces the computational cost and the number of parameters.
[0129] Despite reducing parameters and computational costs, DualConv can still achieve higher accuracy than the original model. In addition, by applying continuous 1×1 convolutions on the input feature map, DualConv retains the original information, which helps deeper convolutional layers extract information more effectively. Compared with other efficient convolution methods, DualConv not only reduces computational costs and parameters, but also improves information exchange between channels and information retention of the original input feature map. The specific process is as follows:
[0130] In the Dual_C2f module, a 1×1 convolution kernel is used to process the input, reducing the number of input channels to half of the number of output channels. The input feature map is:
[0131] X∈R B×C×H×W ,
[0132] The output feature map is:
[0133]
[0134] The output is divided into two parts in the channel dimension through the Split operation, and sent to multiple Bottleneck modules respectively. The two feature maps after segmentation are assumed to be X1 and X2:
[0135] X1,X2=split(X′),
[0136] Each Bottleneck module first performs preliminary feature extraction through a 1×1 convolution kernel, and the output feature map is:
[0137] X b1 =Conv 1×1 (X1),X b2 =Conv 1×1 (X2),
[0138] The DualConv structure combines 3×3 and 1×1 convolution kernels to process the same input feature map channels at the same time, and uses group convolution techniques to efficiently arrange convolution filters:
[0139] F rf1 =DualConv(X b1 ),F rf2 =DualConv(X b2 ),
[0140] Among them, X b1 and X b2 Represent the feature maps in the Bottleneck module, F rf1 and F rf2 Represents the output feature map of DualConv;
[0141] The outputs of all Bottleneck modules are concatenated in the channel dimension to form a new feature map:
[0142] F = concat(F rf1 ,F rf2 ,...,F rfn ),
[0143] Finally, another 1×1 convolution kernel is used to restore the number of channels and complete the final output:
[0144] Y=Conv 1×1 (F);
[0145] The improved C2f module not only realizes the lightweight of the model, but also improves the feature extraction capability and computational efficiency. In the underwater target detection task, complex lighting conditions and background interference put forward higher requirements on the computational efficiency and detection accuracy of the model. The dynamic weight adjustment and enhanced feature extraction capability of DualConv enable the model to better distinguish between targets and backgrounds and improve detection accuracy.
[0146] Furthermore, in S7, model training and optimization, during the training process, a large-scale underwater target detection dataset is used for model training, and the optimization algorithm used in the training process, and the learning rate warm-up and weight decay techniques are adopted.
[0147] Furthermore, in S8, the trained and optimized model is deployed in an actual underwater detection device to perform real-time target detection. After receiving the underwater image, the model quickly processes and outputs the detection results, including the location, category, and confidence of the target.
[0148] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0149] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A lightweight and high-precision underwater target detection method, characterized in that: The following steps are involved: S1, data acquisition, collecting underwater images; S2, preprocessing the collected underwater images; S3. Input the preprocessed image into the improved YOLO-RDM model, and the backbone network of the model uses the RFAConv module for feature extraction; S4. Introduce a multi-scale spatial enhanced attention mechanism in the feature extraction process to adaptively assign appropriate weights to objects of different scales; The multi-layer feature maps extracted from the S5 and Backbone networks are further processed and fused by the Neck layer. The Head layer locates and classifies the fused features and outputs the bounding box and category information of the target. S6, introduce C2f_Dual structural optimization model for lightweight processing; S7, model training and optimization; S8. The trained and optimized model performs real-time target detection, processes and outputs the detection results.
2. A lightweight and high-precision underwater target detection method according to claim 1, characterized in that: S2. Preprocess the collected underwater images, including image denoising, contrast enhancement, and color correction.
3. A lightweight and high-precision underwater target detection method according to claim 1, characterized in that: In S3, the improved YOLO-RDM model includes: Backbone layer, Neck layer, and Head layer; The Backbone layer consists of multiple Conv, Deconvolution and C2f layers for feature extraction; The Neck layer consists of multiple upsampling layers, concatenation layers, convolution layers, and feature extraction modules, which are used to fuse feature maps from different stages of the Backbone layer; The Head layer is responsible for the final object detection task.
4. A lightweight and high-precision underwater target detection method according to claim 1, characterized in that: In S3, the RFAConv module is used for feature extraction. The convolution part in the backbone network Backbone in the YOLO-RDM model is replaced with RFAConv. The implementation steps of RFAConv are as follows: First, obtain the feature map X from the upper convolutional layer and get the batch size and number of channels of the input tensor. Suppose the input feature map is: X∈R B×C×H×W , Among them, B represents the batch size, C represents the number of channels, H and W represent the height and width of the feature map respectively; Then, Global Average Pooling is used to convert the feature map X into global information, and then a 1×1 layer-by-layer convolution Depthwise Convolution is used to generate the weight A; A=Softmax(Conv 1×1 (AvgPool(X))), Generate receptive field feature X through layer-by-layer convolution and batch normalization rf , and use the ReLU activation function to enhance nonlinear feature representation: X rf =ReLU(BatchNorm(Conv k×k (X))), The generated weight A and the receptive field feature X rf Multiplication: F rf =A⊙X rf , Where ⊙ represents element-by-element multiplication; The feature map is reorganized and the final feature extraction is performed through standard convolution Conv: F=Conv k×k,stride=k (F rf )。 5. The lightweight and high-precision underwater target detection method according to claim 1, characterized in that: In S4, the MultiSEAM module, a multi-scale spatial enhanced attention mechanism, is introduced in the feature extraction process; The MultiSEAM module introduces three different scale patches (3, 5, 7). The specific steps are as follows: First, input the feature map: X∈R B×C×H×W , Feature extraction is performed through three DCovN modules of different scales. Each DCovN module includes initial convolution, depthwise separable convolution and batch normalization operations to generate multi-scale feature maps Y0, Y1, and Y2. Y i =DConv(X),i=0,1,2, For each scale feature map Y i Perform global average pooling to obtain three feature vectors Z of different scales i , for the input feature map Z i Perform global average pooling to obtain the global feature vector Z x : Z i =AvgPool(Y i ),i=0,1,2, Z x =AvgPool(X), The feature vectors of three different scales are weighted averaged with the global feature vector of the input feature map to obtain the fused feature vector Z f : The fused feature vector Z f After processing through the fully connected layer, the attention weight W is generated: W=Sigmoid(FC(ReLU(FC(Z f )))), The generated attention weights W are expanded to the same size as the input feature map through a nonlinear transformation and applied to the input feature map X: W exp =exp(W),X out =X⊙W exp , The final output feature map X out .
6. A lightweight and high-precision underwater target detection method according to claim 1, characterized in that: In S6, the C2f_Dual structural optimization model is introduced for lightweight processing, and DualConv is used to innovate the lightweight structure of C2f: The DualConv convolutional network structure combines 3×3 and 1×1 convolution kernels. The specific process is as follows: In the Dual_C2f module, a 1×1 convolution kernel is used to process the input, reducing the number of input channels to half of the number of output channels. The input feature map is: X∈R B×C×H×W , The output feature map is: The output is divided into two parts in the channel dimension through the Split operation, and sent to multiple Bottleneck modules respectively. The two feature maps after segmentation are assumed to be X1 and X2: X1,X2=split(X′), Each Bottleneck module first performs preliminary feature extraction through a 1×1 convolution kernel, and the output feature map is: X b1 =Conv 1×1 (X1),X b2 =Conv 1×1 (X2), The DualConv structure combines 3×3 and 1×1 convolution kernels to process the same input feature map channels at the same time, and uses group convolution techniques to efficiently arrange convolution filters: F rf1 =DualConv(X b1 ),F rf2 =DualConv(X b2 ), Among them, X b1 and X b2 Represent the feature maps in the Bottleneck module, F rf1 and F rf2 Represents the output feature map of DualConv; The outputs of all Bottleneck modules are concatenated in the channel dimension to form a new feature map: F=concat(F rf1 ,F rf2 ,...,F rfn ), Finally, another 1×1 convolution kernel is used to restore the number of channels and complete the final output: Y=Conv 1×1 (F)。 7. A lightweight and high-precision underwater target detection method according to claim 1, characterized in that: In S7, model training and optimization, during the training process, a large-scale underwater target detection dataset is used for model training, the optimization algorithm used in the training process, and the learning rate warm-up and weight decay techniques are adopted.
8. The lightweight and high-precision underwater target detection method according to claim 1, characterized in that: In S8, the trained and optimized model is deployed in actual underwater detection equipment for real-time target detection. After receiving the underwater image, the model quickly processes and outputs the detection results, including the location, category and confidence of the target.
Citation Information
Cited By
Establishment method of walnut kernel quality detection model and walnut kernel sorting automatic conveying production line based on visual detection
CN119634271A
Lightweight lightning image instance segmentation method
CN119672348A
A lightweight method for instance segmentation of lightning images
CN119672348B
Lightweight target detection method and unmanned aerial vehicle image target detection method
CN120107572A
Lightweight unmanned surface vehicle water surface target identification method based on improved YOLOV8
CN121053539A
