A lightweight underwater target detection method

By introducing RepGhost parameter heavy-parameter module, SPD convolution module, global feature pyramid GFPN and CLLA detection heads into the YOLOv8 model, a lightweight underwater target detection model is formed, which solves the problems of insufficient detection accuracy and unlighted model in complex underwater environments by traditional methods, and efficient and accurate underwater target detection is achieved.

CN119418180BActive Publication Date: 2025-04-11GUANGDONG OCEAN UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Traditional underwater object detection methods are difficult to achieve accurate detection in complex underwater environments, and have not fully considered model lightweighting to meet the needs of limited computing resources.

Method used

Using YOLOv8 as the benchmark model, feature reuse is achieved through the RepGhost parameter re-parameter module, and the convolution layer is replaced by the SPD convolution module; the global feature pyramid GFPN is used to replace the network neck for feature fusion; the CLLA detection head is used to replace the network head, improve the target recognition and positioning capabilities, and form a lightweight underwater target detection model.

Benefits of technology

It realizes high-precision underwater target detection under limited computing resources, and is suitable for underwater drone platforms with limited hardware performance, balancing detection accuracy and model complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119418180B_ABST
    Figure CN119418180B_ABST
Patent Text Reader

Abstract

The present invention discloses a lightweight underwater target detection method, which relates to the technical field of underwater target detection, including: taking YOLOv8 as a benchmark model, using a lightweight RepGhost re-parameter module to realize feature reuse for the network backbone of the YOLOv8, and using an SPD convolution module to replace the convolution layer of the network backbone; using a global feature pyramid GFPN to replace the network neck of the YOLOv8 to perform feature fusion; using a CLLA detection head to replace the network head of the YOLOv8 to improve the recognition and positioning of the target, and obtain a lightweight underwater target detection model; performing performance evaluation on the lightweight underwater target detection model, and applying it to actual scenarios to realize underwater target detection. The present invention solves the problem that traditional methods are difficult to perform accurate detection in complex underwater environments and limited computing resources, and fail to consider model lightweighting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of underwater target detection, and in particular to a lightweight underwater target detection method. Background Art

[0002] Underwater target detection plays a vital role in fishery resource assessment and ecological environmental protection. As global attention to sustainable development increases, it is particularly important to accurately monitor the status of underwater ecosystems and resources. In recent years, target detection technology based on deep learning has been widely used in various fields. The target detection algorithm based on deep learning is mainly divided into two-stage target detection algorithm and one-stage target detection algorithm. The principle of the former is to generate candidate areas first, and then classify and locate these candidate areas. It has high detection accuracy, but the structure is complex and the real-time performance is poor; the latter directly completes target detection in a single forward propagation without generating candidate areas.

[0003] However, traditional underwater target detection methods often face challenges in complex underwater environments, such as insufficient lighting, clutter interference, and limited computing resources, resulting in insufficient detection accuracy and failure to consider model lightweighting to meet actual deployment requirements. These problems limit effective resource management and ecological monitoring. Therefore, the development of efficient and reliable underwater target detection technology will not only help improve the accuracy of fishery resource assessment, but also provide a scientific basis for ecological and environmental protection and ensure the sustainable development of marine ecosystems. Summary of the invention

[0004] In view of the above-mentioned deficiencies in the prior art, a lightweight underwater target detection method provided by the present invention solves the problem that traditional methods are difficult to perform accurate detection in complex underwater environments and with limited computing resources, and fail to consider the lightweighting of the model.

[0005] In order to achieve the above-mentioned invention object, the technical solution adopted by the present invention is: a lightweight underwater target detection method, comprising the following steps:

[0006] S1: Taking YOLOv8 as the benchmark model, a lightweight RepGhost re-parameter module is used to implement feature reuse on the network backbone of YOLOv8, and the SPD convolution module is used to replace the convolution layer of the network backbone;

[0007] S2: The global feature pyramid GFPN is used to replace the network neck of the YOLOv8 to perform feature fusion;

[0008] S3: The CLLA detection head is used to replace the YOLOv8 network head to improve the recognition and positioning of the target and obtain a lightweight underwater target detection model;

[0009] S4: Evaluate the performance of the lightweight underwater target detection model and apply it to actual scenarios to achieve underwater target detection.

[0010] Furthermore, the RepGhost re-parameter module in S1 uses the re-parameterization technology to sequentially add a batch normalization layer, an Add connection layer and an activation layer after the deformable convolution layer, and add a batch normalization branch between the deformable convolution layer and the Add connection layer.

[0011] Furthermore, the SPD convolution module in S1 performs the following operations:

[0012] S11: For sizes The original feature map Downsample by the scaling factor to obtain the feature sub-graph, is the spatial dimension of the original feature map, is the number of channels of the original feature map;

[0013] S12: Connect the feature subgraphs along the channel dimension to obtain a feature graph , is the proportionality coefficient;

[0014] S13: Add a The convolutional layer of the filter transforms the feature map Convert to .

[0015] Furthermore, the formula for obtaining the characteristic subgraph in S11 is:

[0016]

[0017] ,

[0018] in, is the feature subgraph, A feature map or tensor representing the input, and The subscript index of the coordinate.

[0019] Furthermore, the global feature pyramid GFPN in S2 uses CSPStage to realize skip connection, while replacing C2f and combining convolutional layers.

[0020] Furthermore, the CLLA detection head in S3 includes a CLLA cross-layer local attention mechanism layer and a DFL loss function layer, and the CLLA cross-layer local attention mechanism layer and the DFL loss function layer are connected through a convolutional layer.

[0021] Furthermore, the CLLA cross-layer local attention mechanism layer performs the following operations:

[0022] S31: Assuming low-level feature maps and mid-level feature maps Contains shallow information, high-level feature maps Contains deep semantic information;

[0023] S32: using average pooling and Convolution reduces the low-level feature maps separately and mid-level feature maps The spatial size of , and the number of channels are unified to obtain a new low-level feature map and the new intermediate feature map , making the size similar to the high-level feature map same;

[0024] S33: Using learnable parameters to transform new low-level feature maps Project to In the space of Projected onto and In the space of , the formula is:

[0025]

[0026]

[0027]

[0028] in, , and are query, key and value vectors respectively, , and represents three learnable parameters used to generate query, key, and value vectors respectively;

[0029] S34: Calculate using dot product and softmax function and The relevant weights of Perform dot product to obtain a new feature map;

[0030] S35: Add new feature maps to high-level feature maps , get the aggregate feature map , the formula is:

[0031]

[0032] in, is the activation function, the superscript is the transpose of the matrix, is the dimension of the vector used to calculate the attention weights.

[0033] Furthermore, the DFL loss function layer uses the cross entropy function to focus the network distribution near the label value, and the formula is:

[0034]

[0035] in, For the predicted value and The distributed focal loss of two adjacent locations, For the network Sigmoid at position The output, For the network Sigmoid at position The output, For label In Location The probability of For label In Location probability.

[0036] The beneficial effects of the present invention are as follows: the underwater target detection model LFN-YOLO proposed in the present invention can better meet the balance between the accuracy and model complexity of the underwater target detection model, can adapt to the target detection of underwater UAV platforms with limited hardware performance, has better accuracy and volume than mainstream visual models, and can realize accurate detection of underwater targets in limited computing resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 The figure is a flow chart of a lightweight underwater target detection method.

[0038] Figure 2 This is the network structure diagram of the underwater target detection model LFN-YOLO.

[0039] Figure 3 Schematic diagram of the RepGhost reparameterization process.

[0040] Figure 4 For =2, Space-to-depth conversion feature map.

[0041] Figure 5 This is the feature fusion structure diagram of GFPN.

[0042] Figure 6 This is the structural diagram of the CLLA cross-layer local attention mechanism layer. DETAILED DESCRIPTION

[0043] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.

[0044] like Figure 1 As shown, a lightweight underwater target detection method includes the following steps:

[0045] S1: Taking YOLOv8 as the benchmark model, a lightweight RepGhost re-parameter module is used to implement feature reuse on the network backbone of YOLOv8, and the SPD convolution module is used to replace the convolution layer of the network backbone;

[0046] S2: The global feature pyramid GFPN is used to replace the network neck of the YOLOv8 to perform feature fusion;

[0047] S3: The CLLA detection head is used to replace the YOLOv8 network head to improve the recognition and positioning of the target and obtain a lightweight underwater target detection model;

[0048] S4: Evaluate the performance of the lightweight underwater target detection model and apply it to actual scenarios to achieve underwater target detection.

[0049] The present invention proposes an algorithm for underwater target recognition, which can improve the detection performance of small-sized targets while ensuring the detection effect of normal-sized targets, and reduce the number of model parameters and computational complexity. Figure 2 As shown, first, the present invention proposes to use the network structure reparameterization module RepGhost to improve the network backbone of YOLOv8 to achieve feature reuse. Secondly, the SPD convolution module is used to replace the stepwise convolution in the network backbone, and a pooling layer is added to the network. Then, the neck fusion feature mode is improved to GFPN, so that high-level semantic information and low-level spatial information can be fully exchanged. Finally, a CLLA detection head combining cross-layer attention mechanism and distributed focal loss is proposed to replace the original YOLOv8 detection head to improve the model's recognition and positioning of targets, and finally form the LFN-YOLO underwater target detection model.

[0050] The RepGhost re-parameter module in S1 uses the re-parameterization technology to sequentially add a batch normalization layer, an Add connection layer, and an activation layer after the deformable convolution layer, and add a batch normalization branch between the deformable convolution layer and the Add connection layer.

[0051] Feature reuse plays an important role in lightweight convolutional neural networks. Existing feature reuse methods usually use serial operations to reuse feature maps from other layers to maintain a large number of channels, but the computational cost of this method on hardware devices is not optimistic, which brings certain troubles to actual industrial applications. Therefore, this solution proposes to add the RepGhost module to the YOLOv8 network backbone to achieve feature reuse through structural reparameterization technology, and abandon the computational burden brought by the serial operators commonly used in feature reuse.

[0052] The RepGhost reparameterization module replaces the concatenation operator in Ghost with the Add operator, which is shorter and more efficient. The ReLU activation layer is then moved after the deep convolution layer and the addition operation layer to meet the rules of the reparameterization structure. Finally, a batch normalization (BN) branch is added to the module, and the deep convolution layer is fused during the inference process to reduce floating-point operations. Figure 3 Demonstrates the RepGhost reparameterization process.

[0053] Introducing the RepGhost module into the YOLOv8 network backbone allows for more efficient training of target detection models. In the inference phase, it effectively improves the model detection speed while reducing the loss of accuracy, taking into account both simplified model complexity and efficient detection performance, and can meet the target detection tasks in industrial applications with limited hardware performance.

[0054] In object detection, when the target is small, there is less feature information. In this case, using normal strided convolution and pooling will lead to the loss of granularity information, which is the key factor leading to the low efficiency of small-size target detection. To solve this problem, the present invention introduces a convolution method called SPD to replace the convolution layer in the YOLOv8 network.

[0055] SPD convolution is composed of a depth-to-space layer (Space-to-depth layer) and a non-strided-convolution layer (non-strided-convolution layer). The Space-to-depth layer converts the original feature map Downsample while preserving information in the channel dimension to prevent loss of size The intermediate feature map information.

[0056] The SPD convolution module in S1 performs the following operations:

[0057] S11: For sizes The original feature map Downsample by the scaling factor to obtain the feature sub-graph, is the spatial dimension of the original feature map, is the number of channels of the original feature map;

[0058] The formula for obtaining the characteristic subgraph in S11 is:

[0059]

[0060] ,

[0061] in, is the feature subgraph, A feature map or tensor representing the input, and is the subscript index of the coordinate, used to divide the sub-feature map;

[0062] S12: Connect the feature subgraphs along the channel dimension to obtain a feature graph , is the proportionality coefficient;

[0063] S13: Add a The convolutional layer of the filter transforms the feature map Convert to .

[0064] Each sub-map is obtained from the original feature map by a scaling factor These feature sub-graphs are then connected along the channel dimension to obtain a feature map , the spatial sum dimension of the feature map is reduced by a scaling factor, and the channel dimension is increased by the square of the scaling factor. Figure 4 Shown when = 2, the process of converting feature maps in the Space-to-depth layer. After the feature conversion in the Space-to-depth layer, an additional Filter non-strided convolutional layer, where The reason for using non-strided-convolution is to preserve as much discriminative information as possible, otherwise the feature map will be reduced like using a 3×3 filter with stride=3, but each pixel is sampled only once. If stride=2, asymmetric sampling will occur, where even rows / columns are sampled at different times. In general, a stride greater than 1 will result in non-discriminative loss of information, although it may seem to also reduce the feature map. Convert to , but no reservations feature information.

[0065] In the feature extraction layer, the network has a small receptive field and weak semantic information representation capability, but has strong representation capability and high resolution for geometric details, which is suitable for perceiving position and geometric details. In contrast, the deep network has a large receptive field and strong semantic information representation capability, but weak geometric information representation capability and low feature map resolution. Therefore, strengthening the exchange between high-level semantic information and low-level spatial information is the key to processing targets of different scales. To this end, the present invention proposes a novel global feature pyramid Generalized Feature Pyramid Network (GFPN). GFPN achieves more effective information transfer by aggregating features of the same level and adjacent levels, and uses skip links to prevent gradient disappearance, thereby enhancing the ability to transfer features to deeper networks. While achieving a good balance between structural volume and performance, GFPN exhibits superior performance in feature fusion. The feature fusion structure diagram of GFPN is shown in the figure below. Figure 5 shown.

[0066] Because the GFPN structure has a higher complexity than other feature fusion network structures. As the number of layers increases, the gradient disappears. The present invention uses CSPStage to implement jump connections, and at the same time, by replacing C2f (Cross Stage Partial Network Fusion) and combining convolutional layers, information is shared between different spatial scales and non-adjacent potential semantic layers. This allows the network to focus on high-level semantic information while avoiding the loss of low-level spatial information.

[0067] The global feature pyramid GFPN in S2 uses CSPStage to implement skip connections, while replacing C2f and combining convolutional layers.

[0068] The reparameterized convolution (RepConv) in the CSPStage module allows multiple computing modules to be merged during the inference phase, thereby improving the efficiency and performance of the model. During training, RepConv uses convolutional layers with multiple branches. During inference, the parameters of these branches are reparameterized into the main branches, thereby reducing the computational burden and memory requirements. Therefore, using CSPStage to implement jump connections can gradually transfer shallow feature information to deep layers, minimize the loss of feature information, and enhance information exchange between shallow and deep layers, thereby adapting to target detection at different scales.

[0069] In scenes with dense small objects, the original YOLOv8 detection head cannot meet the task of efficient and accurate detection. Therefore, the present invention combines the Cross-Level Local Attention (CLLA) mechanism and the Distributed Focal Loss (DFL) to design a CLLA detection head to improve the recognition and positioning capabilities of objects in images.

[0070] The CLLA goal is to model the cross-level feature contextual dependencies and aggregate multi-level features, such as Figure 6 Features at different levels usually have different identification information. In order to capture more fine-grained context information between different feature maps and improve the detection accuracy and robustness of the model, the present invention proposes to embed a CLLA module into the head of the detector.

[0071] The CLLA detection head in S3 includes a CLLA cross-layer local attention mechanism layer and a DFL loss function layer, and the CLLA cross-layer local attention mechanism layer and the DFL loss function layer are connected through a convolutional layer.

[0072] The CLLA cross-layer local attention mechanism layer performs the following operations:

[0073] S31: Assuming low-level feature maps and mid-level feature maps Contains shallow information (such as texture, edges, and color), high-level feature maps Contains deep semantic information;

[0074] S32: using average pooling and Convolution reduces the low-level feature maps separately and mid-level feature maps The spatial size of , and the number of channels are unified to obtain a new low-level feature map and the new intermediate feature map , making the size similar to the high-level feature map same;

[0075] S33: Using learnable parameters to transform new low-level feature maps Project to In the space of Projected onto and In the space of , the formula is:

[0076]

[0077]

[0078]

[0079] in, , and are query, key and value vectors respectively, , and represents three learnable parameters used to generate query, key, and value vectors respectively;

[0080] S34: Calculate using dot product and softmax function and The relevant weights of Perform dot product to obtain a new feature map;

[0081] S35: Add new feature maps to high-level feature maps , get the aggregate feature map , the formula is:

[0082]

[0083] in, is the activation function, the superscript is the transpose of the matrix, The dimension of the vector used to calculate the attention weights is used to scale the dot product to prevent the dot product result from being too large, which would cause the gradient of the softmax function to become unstable.

[0084] DFL allows the network to quickly focus on the values ​​near the label, making the probability density of the label as large as possible, guiding the model to focus on difficult-to-detect targets, and improving the model's ability to detect small targets. The probability of two nearby locations ( and ), the idea of ​​DFL is to use the cross entropy function to focus the network distribution around the label value.

[0085] The DFL loss function layer uses the cross entropy function to focus the network distribution near the label value. The formula is:

[0086]

[0087] in, For the predicted value and The distributed focal loss of two adjacent locations, For the network Sigmoid at position The output, For the network Sigmoid at position The output, For label In Location The probability of For label In Location probability.

[0088] In one embodiment of the present invention, in order to evaluate and verify the detection performance of the model structure proposed in the present invention, experiments were performed using two challenging underwater target detection datasets, namely the 2021 China Underwater Robot Professional Contest (URPC) dataset and a publicly available European underwater image dataset Brackish.

[0089] The present invention adopts the precision ( ), recall rate ( ), Average Precision( ), computational complexity (FLOPs), number of parameters (parameters) and frames per second (FPS) to evaluate the effectiveness of the model. It reflects the accuracy of classifying positive samples. It reflects the effectiveness of identifying positive samples. It represents the average accuracy of all categories, FLOPs represents the number of floating point operations that can be used for model complexity, and Parameters represents the number of model parameters. The formula is as follows:

[0090]

[0091]

[0092]

[0093]

[0094] in, is the number of positive samples predicted by the model as correct predictions, is the number of incorrectly predicted negative samples, is the number of incorrectly predicted positive samples, represents the precision-recall curve, is the number of categories in the current recognition task. In the target detection task, Depending on the chosen IoU threshold, It indicates the average accuracy of the model on the object detection task when the IoU threshold is 0.5.

[0095] In order to verify the detection performance and model complexity of the model proposed in this invention and explore the influence of specific substructures of the network on the model, an ablation experiment based on YOLOv8n was designed. The results are shown in Table 1, and the bold font indicates the best effect.

[0096] Table 1 Ablation experiment results on URPC and Brackish datasets

[0097]

[0098] The first set of experiments is mainly to evaluate the detection ability of the original model. Subsequently, experiments on improved models, including RepGhost, SPD convolution (SPD-Conv), GFPN and CLLA detection head (CLLAHead), were conducted individually and collectively to evaluate the effectiveness of applying the four improved techniques in the two datasets. The original model achieved accuracies of 79.7 and 96.3 on the URPC and Brackish datasets, respectively. After evaluating each improvement measure individually, it was found that the introduction of the RepGhost module slightly decreased the accuracy index on the URPC dataset, but it can effectively alleviate the problems of large model parameters and large computational workload, and in the subsequent combined experiments, RepGhost had a positive impact on the performance of underwater target detection tasks. On the Brackish dataset, the RepGhost module has a positive impact on both model accuracy and complexity. In addition, it was found that the performance improvement of GFPN on both datasets was relatively obvious, further indicating that the GFPN feature fusion method is feasible and effective in underwater small target detection.

[0099] The proposed LFN-YOLO network achieves 82.1% and 97.4% accuracy on the URPC and Brackish datasets, respectively, which is 2.4% and 1.1% higher than the original model, and the number of parameters and GFLOPs are reduced by 15.6% and 19.1%. In addition, the network improves the recall rate and mAP@0.5 on URPC by 1.5% and 2.2%, respectively, and on the Brackish dataset by 1.3% and 0.6%, respectively. This shows the adaptability and robustness of the LFN-YOLO model in different underwater environments.

[0100] In order to further illustrate that the LFN-YOLO model can better balance model complexity and accuracy, a comparative experiment is conducted with 8 other mainstream one-stage detection models. All experiments are conducted under the same settings, and the performance of the model is evaluated using accuracy, recall, mAP@0.5, number of parameters, computational complexity, and model size. The specific results are shown in Table 2. The algorithms compared in the experiment all meet the requirements of real-time monitoring. LFN-YOLO shows higher detection accuracy on the basis of lighter model complexity.

[0101] Table 2 Comparative experiments of LFN-YOLO on URPC and Brackish datasets

[0102]

[0103] According to the experimental results in Table 2, LFN-YOLO achieved 74.1% mAP@0.5 on the URPC dataset, which is 2.3%, 3.4%, 2.2%, 3.3%, and 8.1% higher than YOLOv5n, YOLOv6-N, YOLOv8n, YOLOv10n, and Mobilevit_v3-YOLO, respectively. Although LFN-YOLO is not as lightweight as Mobilevit_v3-YOLO in terms of model size, number of parameters, and GFOLOPs, its performance in terms of accuracy is much higher than Mobilevit_v3-YOLO. The SSD model with VGG-16 as the backbone network has the best performance on the URPC dataset, but performs poorly on the Brackish dataset. It does not have the generalization and robustness that an underwater target recognition model should have. In addition, the SSD algorithm is relatively large in size among many one-stage algorithms and is not suitable for target recognition tasks for underwater unmanned platforms. It is worth noting that among the first-stage algorithms in the comparative test, only RetinaNet requires higher hardware performance to meet the real-time requirements of underwater detection tasks, and its low FPS makes it unsuitable for underwater real-time target detection. In summary, LFN-YOLO can not only correctly identify targets in underwater images, but also obtain a higher confidence level. It has the lightest structure among the compared networks.

[0104] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the invention.

Claims

1. A lightweight underwater target detection method, characterized in that: The following steps are involved: S1: Taking YOLOv8 as the benchmark model, a lightweight RepGhost re-parameter module is used to implement feature reuse on the network backbone of YOLOv8, and the SPD convolution module is used to replace the convolution layer of the network backbone; S2: The global feature pyramid GFPN is used to replace the network neck of the YOLOv8 to perform feature fusion; S3: The CLLA detection head is used to replace the YOLOv8 network head to improve the recognition and positioning of the target and obtain a lightweight underwater target detection model; S4: Evaluate the performance of the lightweight underwater target detection model and apply it to actual scenarios to achieve underwater target detection; The CLLA detection head in S3 includes a CLLA cross-layer local attention mechanism layer and a DFL loss function layer, and the CLLA cross-layer local attention mechanism layer and the DFL loss function layer are connected through a convolution layer; The CLLA cross-layer local attention mechanism layer performs the following operations: S31: Assume that the low-level feature map F1' and the mid-level feature map F'2 contain shallow information, and the high-level feature map F'3 contains deep semantic information; S32: Average pooling and 1×1 convolution are used to reduce the spatial size of the low-level feature map F1' and the intermediate feature map F'2 respectively, and the number of channels is unified to obtain the new low-level feature map F1 l And the new intermediate feature map F2 m , making the size the same as the high-level feature map F′3; S33: Use learnable parameters to transform the new low-level feature map F1 l Projected into the space of Q, the new intermediate feature map F2 m Projected into the space of K and V respectively, the formula is: Q=F1 l W Q K=F2 m W K V=F2 m W V Where Q, K, and V are query, key, and value vectors respectively, and W Q , W K and W V represents three learnable parameters used to generate query, key, and value vectors respectively; S34: Use the dot product and softmax function to calculate the relevant weights of Q and K, and then perform the dot product with V to obtain a new feature map; S35: Add the new feature map to the high-level feature map F′3 to obtain the aggregated feature map F M , the formula is: Among them, softmax(·) is the activation function, the superscript T is the transpose of the matrix, and d k is the vector dimension used to calculate the attention weight; The DFL loss function layer uses the cross entropy function to focus the network distribution near the label value. The formula is: in, is the distributed focal loss of the predicted value at two adjacent positions i and i+1, S i is the output of the network Sigmoid at position i, S i+1 is the output of the network Sigmoid at position i+1, p i is the probability of label p at position i, p i+1 is the probability that label p is at position i+1.

2. A lightweight underwater target detection method according to claim 1, characterized in that: The RepGhost re-parameter module in S1 uses the re-parameterization technology to sequentially add a batch normalization layer, an Add connection layer, and an activation layer after the deformable convolution layer, and add a batch normalization branch between the deformable convolution layer and the Add connection layer.

3. A lightweight underwater target detection method according to claim 1, characterized in that: The SPD convolution module in S1 performs the following operations: S11: Downsample the original feature map X(S,S,C1) of size S×S×C1 by the scaling factor to obtain a feature submap, where S is the spatial dimension of the original feature map and C1 is the number of channels of the original feature map; S12: Connect the feature subgraphs along the channel dimension to obtain a feature graph X'(S Scale,S Scale,Scale 2 C1), Scale is the proportionality coefficient; S13: Add a convolution layer with a C2 filter to transform the feature map X'(S Scale,S Scale,Scale 2 C1) is converted to 4. A lightweight underwater target detection method according to claim 3, characterized in that: The formula for obtaining the characteristic subgraph in S11 is: f x,y =X[x:S:Scale,y:S:Scale] x=0,1,…,Scale-1, y=0,1,…,Scale-1 Among them, f x,y is the feature subgraph, X[·] represents the input feature graph or tensor, and x and y are the subscript indices of the coordinates.

5. A lightweight underwater target detection method according to claim 1, characterized in that: The global feature pyramid GFPN in S2 uses CSPStage to implement skip connections, while replacing C2f and combining convolutional layers.

Citation Information

Patent Citations

  • Lightweight YOLO target detection method based on bidirectional multi-scale feature enhancement

    CN118015247A

  • Lightweight YOLO model construction method for inland ship detection

    CN118747849A