Underwater fish detection method based on improved YOLOv11n model

By improving the YOLOv11n model and integrating edge perception and multi-scale feature fusion structures, a lightweight underwater fish detection model CRL-YOLOv11 was constructed. This solved the problems of unstable accuracy and insufficient real-time performance of underwater fish detection models in complex environments, and achieved efficient fish target recognition.

CN121074618APending Publication Date: 2025-12-05CHINA THREE GORGES UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511085453.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-04
Publication Date
2025-12-05

AI Technical Summary

Technical Problem

Existing underwater fish detection models suffer from unstable detection accuracy and insufficient real-time performance in complex underwater environments. The large number of model parameters leads to high computational resource consumption, making it difficult to meet the needs of engineering applications.

Method used

Based on the YOLOv11n model, a lightweight underwater fish detection model CRL-YOLOv11 is constructed by integrating an edge perception enhancement module and a multi-scale feature fusion structure. The model enhances data diversity through image preprocessing and improves model adaptability and inference efficiency by combining a lightweight detection head.

Benefits of technology

It significantly improves the detection accuracy of small and distant targets in complex underwater environments, reduces the false negative rate and false positive rate, and is suitable for fish detection in complex underwater backgrounds, which has strong engineering application significance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121074618A_ABST
    Figure CN121074618A_ABST
Patent Text Reader

Abstract

The invention discloses an underwater fish detection method based on an improved YOLOv11n model. The method comprises the following steps: S1, screening and sorting a captured underwater fish target data set; s2, carrying out a series of pre-processing on the image in the data set, including operations of overturning, cutting, brightness adjustment, fuzzy processing and the like, so as to increase the diversity of data and improve the adaptability of the model to a complex underwater environment; s3, labeling the processed data sets by using LabelImg, and dividing the data sets into a training set, a verification set and a test set according to a certain proportion to ensure that the model can be effectively trained and evaluated on different data sets; s4, a CRL-YOLOv11 network is constructed; s5, inputting the processed data set into a CRL-YOLOv11 model, performing target detection on the obtained underwater fish image by using the model, and evaluating the model by using indexes such as a recall rate, an average precision mean value, a transmission frame number per second and the like; and S6, performing image prediction and accurate identification on a to-be-detected image by using the trained model.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image recognition, and particularly relates to an underwater fish detection method based on an improved YOLOv11n model. BACKGROUND

[0002] Currently, underwater target detection technology, as an important part of intelligent marine observation and fishery resource monitoring, has been widely applied in marine ecological protection, unmanned underwater exploration, smart fisheries and other fields. Fish, as the most common and representative detection object in underwater images, its accurate identification is of great significance for carrying out marine biodiversity investigation, resource assessment and automatic fishing management. However, due to the physical characteristics of the underwater environment itself (such as uneven illumination, turbid water, reflection disturbance, etc.), fish images often show problems such as blurred edges, low contrast, small target size, etc., which greatly increase the detection difficulty.

[0003] With the wide application of deep learning technology, target detection algorithms based on convolutional neural networks have become the mainstream detection method. Among them, the YOLO (You Only Look Once) series algorithm is widely used in various target detection tasks due to its end-to-end structure, fast detection speed and high deployment efficiency. YOLOv11n is a lightweight design version in this series, suitable for deployment in scenarios with limited computing resources. Although YOLOv11n reduces the complexity of the model while maintaining a certain detection accuracy, it still has limitations in underwater complex background environment, small target detection and edge detail preservation.

[0004] Although existing research has made some progress in underwater fish target detection, there are still many problems, including low detection accuracy of small and fuzzy targets, insufficient model real-time performance, large parameter quantity and low image contrast, etc. These factors limit the application effect of the detection algorithm in the actual complex underwater environment. Most existing methods are difficult to achieve a good balance between computational complexity, detection accuracy and inference speed, especially in high-density fish groups and low-quality images, which are prone to miss detection and false detection. In order to effectively deal with the above problems, this research proposes a lightweight underwater fish detection model CRL-YOLOv11 based on edge perception and multi-scale fusion.

[0005] There are three technical difficulties in underwater fish detection: first, the underwater environment is complex and changeable, and fish targets usually have small size, blurred edges, uneven lighting, etc., which leads to high missing detection rate and unstable precision in actual detection of the model; second, the detection model needs to have strong real-time performance to adapt to the deployment needs of underwater robots or edge devices, which requires high inference speed and computing resources for the algorithm; third, existing algorithms generally have problems such as redundant model structure and excessive parameter quantity, which indirectly leads to difficulties in system deployment and low running efficiency, making it difficult to meet the needs of engineering applications.

[0006] Zhao et al. proposed a new composite fish detection framework based on composite skeleton and enhanced path aggregation network (EPANet) to address the challenges of underwater fish detection. By improving the residual network and designing a new composite backbone network, this framework can effectively learn the changing information of underwater scenes. In addition, EPANet is introduced to address the problem of insufficient utilization of semantic information in the traditional linear up-sampling process. Liu et al. proposed a new underwater fish detection model Fish-Finder, which uses the dual-path routing attention protocol of BiFormer to design the C2fBF structure, and fuses high-level semantic structure and low-level spatial details through RepGFPN, significantly enhancing multi-scale detection capability. Liu et al. also proposed DP-FishNet, a dual-path pyramid visual transformer feature extraction network, which consists of VisionTransformer and convolutional neural network in parallel, combining the advantages of both architectures to improve feature extraction quality. In addition, the network introduces the CARAFE module in the feature pyramid, further improving the utilization efficiency of feature information. Qin et al. proposed YOLO8-FASG, a high-precision small fish detection model, which introduces AKConv convolution and global attention mechanism (GAM) to improve the attention ability to target features, simplifies the spatial pyramid pooling structure, and effectively enhances the extraction ability of small fish features, significantly improving the detection accuracy.

[0007] The present invention addresses the above three problems and proposes an underwater fish target detection method and model based on YOLOv11n. SUMMARY

[0008] The purpose of the present application is to solve the technical problems of the existing underwater fish detection technology in the following aspects: the current underwater fish detection model often leads to a significant decrease in detection accuracy when faced with a variety of fish species and obvious appearance differences, especially in complex underwater environments, the details and edge information of fish targets are easily lost; the inference speed of the existing detection method cannot meet the requirements of real-time detection, especially in edge devices and resource-constrained environments, real-time performance becomes a serious bottleneck; the current model generally has the problem of excessive number of parameters, resulting in high occupation of computing resources, slow inference speed, affecting the performance of system deployment, leading to slow response and unsatisfactory results of the deployed system; thereby a kind of underwater fish target detection method and model based on YOLOv11n are proposed.

[0009] In order to solve the above technical problems, the technical scheme adopted by the present application is: An underwater fish detection method based on an improved YOLOv11n model, comprising the following steps: Step S1: collecting and organizing underwater fish image data sets; Step S2: performing image preprocessing operations on the original images in the image data set to enhance data diversity and improve the robustness and adaptability of the target detection model in complex underwater environments; Step S3: using LabelImg to label the processed data set, and dividing the data set into training set, validation set and test set according to a certain proportion, to ensure that the model can be effectively trained and evaluated on different data sets; Step S4: constructing a lightweight underwater fish detection model CRL-YOLOv11; Step S5: inputting the preprocessed and labeled data set into the constructed CRL-YOLOv11 model, using the model to perform target detection training on underwater fish images, and continuously learning the spatial distribution and semantic features of fish targets through forward propagation and backward gradient optimization mechanism; Step S6: applying the trained target detection model to the underwater image to be detected, automatically identifying the target region in the image through the inference process, outputting the detection results containing the target bounding box coordinates and class labels, and realizing accurate positioning and identification of fish targets.

[0010] In step S1, the image data includes the following two parts: one is high-quality image samples selected from existing public underwater image data sets, and the other is images obtained by shooting fish samples in the South China Sea under natural light and actual water environment conditions through field collection, which has stronger realistic and complex background interference characteristics; In step S2, the image preprocessing operation includes but is not limited to: random rotation, scaling, cropping, color disturbance, brightness and contrast adjustment, blur processing and affine transformation. By introducing various image distortions and noise changes, the image degradation phenomena caused by uneven illumination, turbidity of water body, motion blur and other factors in the actual underwater environment are simulated, thereby improving the detection accuracy and generalization ability of the model for fish targets under different scales, poses and illumination conditions.

[0011] In step S3, specifically: using LabelImg tool to perform target labeling on the preprocessed image data, using the image labeling tool to perform target labeling on the preprocessed image, obtaining the position coordinates and category information of the fish target, and constructing a standardized target detection labeling format; after labeling, the data set is divided into training set, validation set and test set according to the ratio of 8:1:1, to ensure the training and evaluation effect of the model on different data distributions; finally, the constructed data set contains 13,500 images, covering fish targets under different scales, poses, illuminations and background complexities, providing a high-quality data basis for subsequent model training and performance evaluation; In step S4, the model is improved on the basis of the YOLOv11 framework, integrating an edge perception enhancement module and a multi-scale feature fusion structure. The edge guiding module is used to extract fine-grained edge features in the image, improving the model's perception ability for weak feature targets. The aggregation module adopts a reparameterization multi-branch structure to realize cross-scale semantic fusion, thereby enhancing the model's detection performance for small targets and low-contrast targets, and combining a lightweight detection head to improve the model's inference efficiency while ensuring detection accuracy.

[0012] In step S5, the training set is put into the CRL-YOLOv11 model for training, and the detection result is obtained and the best.pt file is generated; through evaluation indexes including recall rate Recall, average precision mean mAP, frames per second FPS and model parameter quantity Parameters; after training, the model is detected and evaluated on the validation set and test set, and a variety of evaluation indexes (such as mAP50, Precision, Recall, etc.) are used to comprehensively evaluate the model performance, verify the detection ability of the detection method for multi-scale, low-contrast and small target fish in complex underwater environment, and ensure its good generalization performance and practical application value.

[0013] In step S4, the constructed CRL-YOLOv11 model includes a backbone network Backbone, a neck network Neck and a head network Head, specifically as follows: The backbone network is specifically: the image is input to a first Conv convolutional module, the first Conv convolutional module is connected to the input of a first CGCAB module, the output of the first CGCAB module is connected to the input of a first RGCSPELAN module, the output of the first RGCSPELAN module is connected to the input of a second CGCAB module, the output of the second CGCAB module is connected to the input of a second RGCSPELAN module, the output of the second RGCSPELAN module is connected to the input of a second Conv module, the output of the second Conv module is connected to the input of a third RGCSPELAN module, the output of the third RGCSPELAN module is connected to the input of a third CGCAB module, the output of the third CGCAB module is connected to the input of a fourth RGCSPELAN module, the output of the fourth RGCSPELAN module is connected to the input of a SPPF spatial pyramid network, and the output of the SPPF spatial pyramid network is connected to the input of a C2PSA compression channel level partial self-attention mechanism; The neck network is specifically: the output of the C2PSA is divided into two branches, one output is connected to the input of a first up-sampling module, and the other output is directly connected to the input of a first concatenation layer module; the output of the first up-sampling module is connected to a second concatenation layer, and the third RGCSPELAN module is also connected to the second concatenation layer module; the output of the second concatenation layer module is transmitted to the input of a fifth RGCSPELAN module, the output of the fifth RGCSPELAN module is connected to the input of a second up-sampling module, and the output of the second RGCSPELAN module and the output of the second up-sampling module are jointly connected to the input of a third concatenation layer module; the output of the third concatenation layer module is connected to the input of a sixth RGCSPELAN module; The output of the sixth RGCSPELAN module is connected to the input of a fourth CGCAB module, the output of the fourth CGCAB module is connected to the input of a fourth concatenation layer module, the output of the fifth RGCSPELAN module is also connected to the input of the fourth concatenation layer module, and the output of the fourth concatenation layer module is connected to the input of a seventh RGCSPELAN module; the output of the seventh RGCSPELAN module is connected to the input of a first SCDown module, the output of the first SCDown module is connected to the input of a first concatenation layer, and the output of the first concatenation layer is connected to the input of an eighth RGCSPELAN module. The head network is specifically: the output of the sixth RGCSPELAN module forms a first detection head; the output of the seventh RGCSPELAN module forms a second detection head; and the output of the eighth RGCSPELAN module forms a third detection head.

[0014] The first detection head, the second detection head and the third detection head adopt a LADH-Head detection head; and the LADH-Head detection head is specifically: The input feature map is outputted into two branches, the regression branch is further optimized by three deep separable convolution DSConv and one normal convolution, and then a 2D convolution layer; the classification branch is further optimized by two 1x1 convolution and a 2D convolution layer.

[0015] The first detection head, the second detection head and the third detection head are specifically: The first detection head is specifically: the output of the sixth RGCSPELAN module is formed into two branches, which are a first detection head one branch and a first detection head two branch; the first detection head one branch is specifically: the output of the sixth RGCSPELAN module is connected to the input of the first DSConv module, the output of the first DSConv module is connected to the input of the second DSConv module, the output of the second DSConv module is connected to the input of the third DSConv module, the output of the third DSConv module is connected to the input of the first Conv module, and the output of the first Conv module is connected to the first Conv2d module; the first detection head two branch is specifically: the output of the sixth RGCSPELAN module is connected to the input of the second Conv module, the output of the second Conv module is connected to the input of the third Conv module, the output of the third Conv module is connected to the second Conv2d module; The second detection head is specifically: the output of the seventh RGCSPELAN module is formed into two branches, which are a first detection head one branch and a first detection head two branch; the first detection head one branch is specifically: the output of the seventh RGCSPELAN module is connected to the input of the fourth DSConv module, the output of the fourth DSConv module is connected to the input of the fifth DSConv module, the output of the fifth DSConv module is connected to the input of the sixth DSConv module, the output of the sixth DSConv module is connected to the input of the fourth Conv module, and the output of the fourth Conv module is connected to the third Conv2d module; the first detection head two branch is specifically: the output of the seventh RGCSPELAN module is connected to the input of the fifth Conv module, the output of the fifth Conv module is connected to the input of the sixth Conv module, and the output of the sixth Conv module is connected to the fourth Conv2d module; The third detection head is specifically: the output of the eighth RGCSPELAN module forms two branches, which are a first detection head one branch and a first detection head two branch; the first detection head one branch is specifically: the output of the eighth RGCSPELAN module is connected to the input of the seventh DSConv module, the output of the seventh DSConv module is connected to the input of the eighth DSConv module, the output of the eighth DSConv module is connected to the input of the ninth DSConv module, the output of the ninth DSConv module is connected to the input of the seventh Conv module, and the output of the seventh Conv module is connected to the fifth Conv2d module; the first detection head two branch is specifically: the output of the eighth RGCSPELAN module is connected to the input of the eighth Conv module, the output of the eighth Conv module is connected to the input of the ninth Conv module, and the output of the ninth Conv module is connected to the sixth Conv2d module.

[0016] The CGCAB module is specifically: the input feature is connected to a 1x1 convolution module, the output of the 1x1 convolution is connected to two branches, the first branch of the output is connected to a 3x3 ordinary convolution, and the second branch of the output is connected to a 3x3 dilated convolution; the outputs of the ordinary convolution and the dilated convolution are spliced by a Concat operation, the spliced feature map is subjected to a BN normalization operation and a ReLU activation function, and the output after the operation is connected to a coordinate attention CA module for weighting operation to obtain the feature map after output.

[0017] The coordinate attention CA module is specifically: The input feature map of the coordinate attention CA module is subjected to global average pooling in the width and height directions respectively to obtain feature maps in the width and height directions respectively; the shape of the input feature layer is [H, W, C], after global pooling in the width direction, a [H, 1, C] vector is obtained, at this time the feature is mapped to a high dimension; after global pooling in the height direction, a [1, W, C] vector is obtained, at this time the feature is mapped to a wide dimension; the two feature vectors are spliced to form a new feature vector, which is standardized by a normal convolution (Conv) and connected to an activation function to generate two complementary spatial attention maps, which are used for weighting adjustment of the input feature map in the height and width directions respectively; after adjusting the channel number by a 1x1 convolution, the generated spatial attention map is multiplied by the input feature map by a Sigmoid activation function, and the input feature map is weighted, and the output obtained is the output of the coordinate attention CA module.

[0018] The RGCSPELAN module is specifically: The input features are first compressed in channels by 1x1 convolution, and the output of the convolution module is connected to the input of the Spilt module, and the output of the Spilt module is divided into two branches for operation; under one branch, the output of the Spilt module is directly connected to the input of the concatenation layer, and under the other branch, the output of the Spilt module is processed by the RepConv module and N-1 convolution, and the features extracted by multiple processing paths are fused in the channel dimension through the Concat operation, and finally compressed in dimension by 1x1 convolution, and the aggregated features are output.

[0019] The SCDown module specifically comprises: Firstly, the channel dimension is adjusted by 1x1 point convolution, and then 3x3 deep convolution is used for spatial down-sampling.

[0020] Compared with the prior art, the present application has the following technical effects: The model of the present application is superior to the existing underwater fish target detection model in terms of precision, speed and lightweight. Especially when facing small targets and long-distance targets, the detection accuracy is significantly improved, the missed detection rate and the false judgment rate are reduced, and it is especially suitable for fish detection in underwater complex environment. Compared with the baseline model, the present application has significant performance improvement in small target detection and complex background recognition, especially in underwater complex background, it can effectively reduce the false detection and missed detection, and improve the stability and adaptability of the model, and has strong engineering application significance. BRIEF DESCRIPTION OF DRAWINGS

[0021] The present application will be further described below in conjunction with the drawings and examples: Figure 1 The flowchart of the present application is shown in Figure 1. Figure 2 The CRL-YOLOv11 network diagram of the present application is shown in Figure 2. Figure 3 The structural diagram of the CGCAB module is shown in Figure 3. Figure 4 The CA attention mechanism diagram is shown in Figure 4. Figure 5 The structural diagram of the RGCSPELAN module is shown in Figure 5. Figure 6 The SCDown principle diagram is shown in Figure 6. Figure 7 The LADH-Head detection head structure diagram is shown in Figure 7. Figure 8 The detection result example diagram of the present application is shown in Figure 8. DETAILED DESCRIPTION

[0022] An underwater fish detection method based on an improved YOLOv11n model, comprising the following steps: Step S1: Collect and organize the underwater fish image dataset, which includes two parts: one is high-quality image samples selected from existing public underwater image datasets, and the other is images obtained by capturing fish samples in the South China Sea under natural lighting and actual water environment conditions, which have stronger realism and complex background interference characteristics; Step S2: Perform image preprocessing operations on the original images in the image dataset to enhance data diversity and improve the robustness and adaptability of the target detection model in complex underwater environments. The image preprocessing operations include but are not limited to random rotation, scaling, cropping, color disturbance, brightness and contrast adjustment, blur processing, and affine transformation. By introducing various image distortions and noise changes, the image degradation phenomena caused by uneven lighting, turbid water, motion blur, and other factors in the actual underwater environment are simulated, thereby improving the detection accuracy and generalization ability of the model for fish targets under different scales, poses, and lighting conditions; Step S3: Use the LabelImg tool to label the preprocessed image data. Use the image labeling tool to label the preprocessed image, obtain the position coordinates and class information of the fish target, and construct a standardized target detection labeling format. After labeling, divide the dataset into training set, validation set and test set according to the ratio of 8:1:1 to ensure the training and evaluation effect of the model on different data distributions. The final constructed dataset contains 13,500 images, covering fish targets under different scales, poses, lighting and background complexity, providing a high-quality data basis for subsequent model training and performance evaluation; Step S4: Construct a lightweight underwater fish detection model CRL-YOLOv11, which is improved based on the YOLOv11 framework, integrating edge perception enhancement module and multi-scale feature fusion structure. The edge guidance module is used to extract fine-grained edge features in the image, improving the model's perception ability for weak feature targets. The aggregation module uses a reparameterization multi-branch structure to realize cross-scale semantic fusion, thereby enhancing the model's detection performance for small targets and low-contrast targets, and combining a lightweight detection head to improve the model's inference efficiency while ensuring detection accuracy; Step S5: input the pre-processed and labeled dataset into the constructed CRL-YOLOv11 model, use the model to train the underwater fish image target detection, and continuously learn the spatial distribution and semantic features of the fish target through the forward propagation and backward gradient optimization mechanism. After training, the model is detected and evaluated on the validation set and test set, and a variety of evaluation indexes (such as mAP50, Precision, Recall, etc.) are used to comprehensively evaluate the model performance, verify the detection ability of the detection method in complex underwater environment for multi-scale, low-contrast and small target fish, and ensure its good generalization performance and practical application value; Step S6: apply the trained target detection model to the underwater image to be detected, automatically identify the target region in the image through the inference process, output the detection results containing the target bounding box coordinates and its class label, and realize the accurate positioning and identification of the fish target.

[0023] In step S5, the training set is put into the CRL-YOLOv11 model for training, and the detection result is obtained and the best.pt file is generated. Through the evaluation indexes including recall rate, average precision mean mAP, frame rate per second FPS and model parameter quantity Parameters, the performance of the model is comprehensively evaluated.

[0024] In step S6, the best.pt file obtained after training is used as the pre-training weight of the model, and the image to be detected is put into it for detection and identification.

[0025] In step S4, as shown in Figure 2 The constructed CRL-YOLOv11 model includes a backbone network Backbone, a neck network Neck and a head network Head, as follows: The backbone network is specifically: the image is input to a first Conv convolutional module, the first Conv convolutional module is connected to an input of a first CGCAB module, an output of the first CGCAB module is connected to an input of a first RGCSPELAN module, an output of the first RGCSPELAN module is connected to an input of a second CGCAB module, an output of the second CGCAB module is connected to an input of a second RGCSPELAN module, an output of the second RGCSPELAN module is connected to an input of a second Conv module, an output of the second Conv module is connected to an input of a third RGCSPELAN module, an output of the third RGCSPELAN module is connected to an input of a third CGCAB module, an output of the third CGCAB module is connected to an input of a fourth RGCSPELAN module, an output of the fourth RGCSPELAN module is connected to an input of a SPPF spatial pyramid network, and an output of the SPPF spatial pyramid network is connected to an input of a C2PSA compression channel level partial self-attention mechanism; The neck network is specifically: an output of the C2PSA is divided into two branches, one output is connected to an input of a first up-sampling module, and the other output is directly connected to an input of a first concatenation layer module; an output of the first up-sampling module is connected to a second concatenation layer, and a third RGCSPELAN module is also connected to the second concatenation layer module; an output of the second concatenation layer module is transmitted to an input of a fifth RGCSPELAN module, an output of the fifth RGCSPELAN module is connected to an input of a second up-sampling module, and an output of the second RGCSPELAN module and an output of the second up-sampling module are jointly connected to an input of a third concatenation layer module; an output of the third concatenation layer module is connected to an input of a sixth RGCSPELAN module; An output of the sixth RGCSPELAN module is connected to an input of a fourth CGCAB module, an output of the fourth CGCAB module is connected to an input of a fourth concatenation layer module, an output of the fifth RGCSPELAN module is also connected to the input of the fourth concatenation layer module, and an output of the fourth concatenation layer module is connected to an input of a seventh RGCSPELAN module; an output of the seventh RGCSPELAN module is connected to an input of a first SCDown module, an output of the first SCDown module is connected to an input of a first concatenation layer, and an output of the first concatenation layer is connected to an input of an eighth RGCSPELAN module. The head network is specifically: an output of the sixth RGCSPELAN module forms a first detection head; an output of the seventh RGCSPELAN module forms a second detection head; and an output of the eighth RGCSPELAN module forms a third detection head.

[0026] The first detection head is specifically: the output of the sixth RGCSPELAN module forms two branches, which are a first detection head one branch and a first detection head two branch; the first detection head one branch is specifically: the output of the sixth RGCSPELAN module is connected to the input of the first DSConv module, the output of the first DSConv module is connected to the input of the second DSConv module, the output of the second DSConv module is connected to the input of the third DSConv module, the output of the third DSConv module is connected to the input of the first Conv module, and the output of the first Conv module is connected to the first Conv2d module; the first detection head two branch is specifically: the output of the sixth RGCSPELAN module is connected to the input of the second Conv module, the output of the second Conv module is connected to the input of the third Conv module, the output of the third Conv module is connected to the second Conv2d module; The second detection head is specifically: the output of the seventh RGCSPELAN module forms two branches, which are a first detection head one branch and a first detection head two branch; the first detection head one branch is specifically: the output of the seventh RGCSPELAN module is connected to the input of the fourth DSConv module, the output of the fourth DSConv module is connected to the input of the fifth DSConv module, the output of the fifth DSConv module is connected to the input of the sixth DSConv module, the output of the sixth DSConv module is connected to the input of the fourth Conv module, and the output of the fourth Conv module is connected to the third Conv2d module; the first detection head two branch is specifically: the output of the seventh RGCSPELAN module is connected to the input of the fifth Conv module, the output of the fifth Conv module is connected to the input of the sixth Conv module, and the output of the sixth Conv module is connected to the fourth Conv2d module; The third detection head is specifically: the output of the eighth RGCSPELAN module forms two branches, which are a first detection head one branch and a first detection head two branch; the first detection head one branch is specifically: the output of the eighth RGCSPELAN module is connected to the input of the seventh DSConv module, the output of the seventh DSConv module is connected to the input of the eighth DSConv module, the output of the eighth DSConv module is connected to the input of the ninth DSConv module, the output of the ninth DSConv module is connected to the input of the seventh Conv module, and the output of the seventh Conv module is connected to the fifth Conv2d module; the first detection head two branch is specifically: the output of the eighth RGCSPELAN module is connected to the input of the eighth Conv module, the output of the eighth Conv module is connected to the input of the ninth Conv module, and the output of the ninth Conv module is connected to the sixth Conv2d module; Figure 3 is Figure 2 the CGCAB module in the CGCAB module in the Figure 3 as shown in the following: The input of the input feature connection 1x1 convolution module, the output of the 1x1 convolution is connected to two branches, the first branch of the output is connected to a 3x3 normal convolution, and the second branch of the output is connected to a 3x3 dilated convolution, the outputs of the normal convolution and the dilated convolution are spliced by a Concat operation, and the spliced feature map is subjected to a BN normalization operation and a ReLU activation function, and the output after the operation is connected to a coordinate attention CA module for weighting operation to obtain a feature map after output; Figure 4 is the coordinate attention CA module in Figure 3 , and specifically as follows: The input feature map of the coordinate attention CA module is respectively subjected to global average pooling in the width and height directions to obtain feature maps in the width and height directions respectively; the shape of the input feature layer is [H, W, C], after global pooling in the width direction, a [H, 1, C] vector is obtained, at this time the feature is mapped to a high dimension; after global pooling in the height direction, a [1, W, C] vector is obtained, at this time the feature is mapped to a wide dimension; the two feature vectors are spliced to form a new feature vector, which is connected to an activation function after standardization by a normal convolution Conv to generate two complementary spatial attention maps, which are respectively used for weighting adjustment of the input feature map in the height and width directions, and the generated spatial attention maps are multiplied with the input feature map after adjusting the channel number by a 1x1 convolution and passing through a Sigmoid activation function, to perform weighting processing on the input feature map, and the output obtained is the output of the coordinate attention CA module.

[0027] Figure 5 is the RGCSPELAN module in Figure 2 , and specifically as follows: The input feature is first compressed in channels by a 1x1 convolution, and the output of the convolution module is connected to the input of the Spilt module, and the output of the Spilt module is divided into two branches for operation; under one branch, the output of the Spilt module is directly connected to the input of the concatenation layer, and under the other branch, the output of the Spilt module is processed by a RepConv module and N-1 convolutions, and the features extracted by the multiple processing paths are fused in the channel dimension by a Concat operation, and finally the dimension is compressed by a 1x1 convolution to output aggregated features.

[0028] Figure 6 is the SCDown module in Figure 2 , and specifically as follows: First, the channel dimension is adjusted by a 1x1 point convolution, and then a 3x3 deep convolution is used for spatial downsampling.

[0029] Figure 7 is the RGCSPELAN module in Figure 2The LADH-Head detection head structure in the LADH-Head detection head structure in the specific as follows: The input feature map is divided into two branches, and the regression branch passes through three depth separable convolutions DSConv and a normal convolution, and then passes through a 2D convolution layer to further optimize the features; the classification branch passes through two 1x1 convolutions and a 2D convolution layer The application also comprises a CRL-YOLOv11 model, which comprises a backbone network Backbone, a neck network Neck and a detection head network Head, and specifically comprises: The backbone network Backbone is specifically: the image is input to a first Conv convolution module, the first Conv convolution module is connected to the input of a first CGCAB module, the output of the first CGCAB module is connected to the input of a first RGCSPELAN module, the output of the first RGCSPELAN module is connected to the input of a second CGCAB module, the output of the second CGCAB module is connected to the input of a second RGCSPELAN module, the output of the second RGCSPELAN module is connected to the input of a second Conv module, the output of the second Conv module is connected to the input of a third RGCSPELAN module, the output of the third RGCSPELAN module is connected to the input of a third CGCAB module, the output of the third CGCAB module is connected to the input of a fourth RGCSPELAN module, the output of the fourth RGCSPELAN module is connected to the input of a SPPF spatial pyramid network, and the output of the SPPF spatial pyramid network is connected to the input of a C2PSA compression channel level partial self-attention mechanism; The neck network Neck is specifically: the output of the C2PSA is divided into two branches, one output is connected to the input of a first upsampling module, and the other output is directly connected to the input of a first splicing layer module; the output of the first upsampling module is connected to a second splicing layer, and the third RGCSPELAN module is also connected to the second splicing layer module; the output of the second splicing layer module is transmitted to the input of a fifth RGCSPELAN module, the output of the fifth RGCSPELAN module is connected to the input of a second upsampling module, the output of the second RGCSPELAN module and the output of the second upsampling module are jointly connected to the input of a third splicing layer module; the output of the third splicing layer module is connected to the input of a sixth RGCSPELAN module; The output of the sixth RGCSPELAN module is connected to the input of the fourth CGCAB module, the output of the fourth CGCAB module is connected to the input of the fourth concatenation layer module, the output of the fifth RGCSPELAN module is also connected to the input of the fourth concatenation layer module, and the output of the fourth concatenation layer module is connected to the input of the seventh RGCSPELAN module; the output of the seventh RGCSPELAN module is connected to the input of the first SCDown module, and the output of the first SCDown module is connected to the input of the first concatenation layer; and the output of the first concatenation layer is connected to the input of the eighth RGCSPELAN module. The head network Head specifically comprises: the output of the sixth RGCSPELAN module forms a first detection head; the output of the seventh RGCSPELAN module forms a second detection head; and the output of the eighth RGCSPELAN module forms a third detection head.

[0030] The first detection head specifically comprises: the output of the sixth RGCSPELAN module forms two branches, which are a first detection head one branch and a first detection head two branch; the first detection head one branch specifically comprises: the output of the sixth RGCSPELAN module is connected to the input of the first DSConv module, the output of the first DSConv module is connected to the input of the second DSConv module, the output of the second DSConv module is connected to the input of the third DSConv module, the output of the third DSConv module is connected to the input of the first Conv module, and the output of the first Conv module is connected to the first Conv2d module; and the first detection head two branch specifically comprises: the output of the sixth RGCSPELAN module is connected to the input of the second Conv module, the output of the second Conv module is connected to the input of the third Conv module, the output of the third Conv module is connected to the second Conv2d module. The second detection head specifically comprises: the output of the seventh RGCSPELAN module forms two branches, which are a first detection head one branch and a first detection head two branch; the first detection head one branch specifically comprises: the output of the seventh RGCSPELAN module is connected to the input of the fourth DSConv module, the output of the fourth DSConv module is connected to the input of the fifth DSConv module, the output of the fifth DSConv module is connected to the input of the sixth DSConv module, the output of the sixth DSConv module is connected to the input of the fourth Conv module, and the output of the fourth Conv module is connected to the third Conv2d module; and the first detection head two branch specifically comprises: the output of the seventh RGCSPELAN module is connected to the input of the fifth Conv module, the output of the fifth Conv module is connected to the input of the sixth Conv module, and the output of the sixth Conv module is connected to the fourth Conv2d module. The third detection head is specifically configured as follows: the output of the eighth RGCSPELAN module forms two branches, namely the first detection head branch one and the first detection head branch two; the first detection head branch one is specifically configured as follows: the output of the eighth RGCSPELAN module is connected to the input of the seventh DSConv module, the output of the seventh DSConv module is connected to the input of the eighth DSConv module, the output of the eighth DSConv module is connected to the input of the ninth DSConv module, the output of the ninth DSConv module is connected to the input of the seventh Conv module, and the output of the seventh Conv module is connected to the fifth Conv2d module; the first detection head branch two is specifically configured as follows: the output of the eighth RGCSPELAN module is connected to the input of the eighth Conv module, the output of the eighth Conv module is connected to the input of the ninth Conv module, and the output of the ninth Conv module is connected to the sixth Conv2d module; Figure 3 yes Figure 2 The CGCAB module in [the document], such as [the module name] Figure 3 As shown, the details are as follows: The input feature is connected to the input of a 1×1 convolution module. The output of the 1×1 convolution is connected to two branches. The first branch of the output is connected to a 3×3 ordinary convolution, and the second branch of the output is connected to a 3×3 dilated convolution. The outputs of the ordinary convolution and the dilated convolution are concatenated by a Concat operation. The concatenated feature map is then normalized by BN and activated by ReLU. The output of the operation is then connected to a coordinate attention (CA) module for weighting to obtain the output feature map. Figure 4 yes Figure 3 The coordinate attention (CA) module in the code is as follows: The input feature map of the Coordinate Attention (CA) module is globally pooled in both the width and height directions to obtain feature maps in the width and height directions respectively. The shape of the input feature layer is [H, W, C]. After global pooling in the width direction, a vector of [H, 1, C] is obtained, which maps the feature to the high dimension. After global pooling in the height direction, a vector of [1, W, C] is obtained, which maps the feature to the width dimension. These two feature vectors are concatenated to form a new feature vector. After normalization by ordinary convolution (Conv), two complementary spatial attention maps are generated by connecting them to the activation function. These maps are used to adjust the weights of the input feature map in the height and width directions respectively. After adjusting the number of channels by 1x1 convolution, they are passed through the Sigmoid activation function. The generated spatial attention map is multiplied with the input feature map, and the input feature map is weighted. This is the CA attention mechanism.

[0031] Figure 5 yes Figure 2The RGCSPELAN module in the document is as follows: The input features are first compressed through a 1×1 convolution. The output of the convolution module is connected to the input of the Split module. The output of the Split module is divided into two branches for operation. In one branch, the output of the Split module is directly connected to the input of the concatenation layer. In the other branch, the output of the Split module is processed by the RepConv module and N-1 convolutions. The features extracted by multiple processing paths are fused in the channel dimension through the Concat operation, and finally compressed in dimension by a 1×1 convolution to output aggregated features.

[0032] Figure 6 yes Figure 2 The SCDown module in the code is as follows: First, a 1×1 point convolution is used to adjust the channel dimensions, and then a 3×3 depth convolution is used for spatial downsampling.

[0033] Figure 7 yes Figure 2 The LADH-Head detection head structure is as follows: The input feature map is divided into two branches. The regression branch is processed by three depthwise separable convolutions (DSConv) and a regular convolution, followed by a 2D convolutional layer to further optimize the features. The classification branch is processed by two 1×1 convolutions and a 2D convolutional layer.

[0034] Example: This invention incorporates edge information and a context guidance module (CGCAB) into the Backbone and Neck sections of YOLOv11n. Secondly, it replaces the original C3k2 module with the lightweight and efficient aggregation module RGCSPELAN. Furthermore, it introduces a lightweight downsampling structure (SCDown) into the Neck section. Finally, it replaces the original YOLOv11n detection head with an asymmetric lightweight detection head (LADH-Head), the structure of which is as follows: Figure 2 As shown.

[0035] The edge information and context guidance module CGCAB mainly consists of ordinary convolution, dilated convolution, and coordinate attention (CA). It uses standard convolution operations to extract local features from the dimensionality-reduced feature map, dilated convolution to expand the receptive field of the convolution kernel to obtain richer contextual information, concatenates features using channel dimensions, optimizes feature distribution through batch normalization and activation functions, and uses 1×1 convolution to compress the number of channels to reduce computational overhead. The coordinate attention (CA) mechanism significantly improves detail preservation and cross-layer semantic relevance, alleviating the shortcomings of traditional convolutional blocks in underwater fish target detection.

[0036] The application replaces part of the convolution structure in Backbone and Neck by combining edge information with a context guidance module CGCAB, and a structural diagram thereof is as shown in Figure 3 The CA mechanism better captures the spatial structure and position change characteristics of the target while maintaining computational efficiency. Figure 4 The CA mechanism better captures the spatial structure and position change characteristics of the target while maintaining computational efficiency.

[0037] First, one-dimensional global pooling is performed along the height and width directions of the feature map respectively to generate two direction perception feature vectors; then the two direction perception feature vectors are spliced and fused by 1x1 convolution to generate two complementary spatial attention maps, and feature weights in different directions are obtained through a Sigmoid activation function; finally, the features in the two different directions are fused by weighted calculation to obtain the final output feature map.

[0038] Meanwhile, the application replaces the original C3k2 module with a lightweight and efficient aggregation module RGCSPELAN, and a structural diagram thereof is as shown in Figure 5 The module discards the bottleneck structure commonly used in the C3 module and replaces the traditional residual block with a lightweight RepConv (Reparameterization Convolution). Specifically, the input features are first compressed in the channel by 1x1 convolution, and are divided into two sub-paths by split operation. The main branch is directly connected to the output to play the role of feature reservation and information channel. The auxiliary branch is processed by RepConv layer and multiple convolution. The features extracted by multiple processing paths are fused in the channel dimension by Concat operation, and finally compressed in dimension by 1x1 convolution to output the aggregated features.

[0039] The application introduces a selective channel down-sampling SCDown in the Neck part, and a specific structure thereof is as shown in Figure 6 The SCDown is a lightweight down-sampling method, which first adjusts the channel dimension by point convolution, and then performs spatial down-sampling by depth convolution.

[0040] The application introduces a lightweight asymmetric detection head LADH-Head based on the original decoupled detection head architecture of YOLOv11n, and a structure thereof is as shown in Figure 7 The detection head in YOLOv11 adopts a decoupled structure, which is divided into a classification branch and a positioning branch. The positioning branch uses two standard 3x3 convolution modules, while the classification branch uses two depth separable convolutions (DWConv). Although this structure has certain advantages in detection accuracy, the parameter quantity is relatively large, and the computational resource consumption is obvious.

[0041] To solve the above problems, the LADH-Head module optimizes in two aspects: the positioning branch uses 3x3 depth separable convolution (DSConv) instead of traditional convolution, which greatly reduces the parameters and calculation amount; the classification branch uses two 1x1 pointwise convolutions instead of the original DWConv, which improves the cross-channel information fusion efficiency and significantly reduces the parameter overhead.

[0042] The present application selects precision (Precision, P), recall, mean average precision (mean Average Precision, mAP) and frame rate (Frame Per Second, FPS) as evaluation indicators of the model.

[0043] (1) (2) (3) (4) Among them, represents the number of positive samples predicted to be true; represents the number of negative samples predicted to be true; represents the number of negative samples predicted to be false; is the proportion of actual correctness in the correct target detected by the model; is the proportion of correct identification of the correct target by the model. is the total number of samples, is the mean value of the average precision in the data set. mAP50 represents the mean value of the average precision when IoU is 0.5. In addition, model parameters (Parameter), calculation amount (GFLOPs) and frame rate (FPS) are crucial in fish detection, which directly affects the required computing resources of detection.

[0044] The hardware and software used in the experiment of the embodiment of the present application are shown in Table 1.

[0045] Table 1 Selection of Software and Hardware

[0046] In addition, the image input size of the model of the present application is 640x640; the training round is 200 times; the batch size used for training is 32, the number of working threads is set to 8; the learning rate is 0.01; the optimizer uses SGD; and no pre-training weight is used.

[0047] ​Ablation experiment of CGCAB module In order to evaluate the effectiveness of the proposed CGCAB module in the backbone network and its feasibility to replace the traditional convolution module, the present application sets up multiple replacement combinations in the Backbone of YOLOv11, using different numbers of CGCAB modules to replace the original ordinary convolution module (Conv) for ablation experiments. The results are shown in Table 2.

[0048] Table 2 Ablation Study of replacing the convolution module with the CGCAB module Table 2 Ablation Study of replacing the convolution module with the CGCAB module

[0049] As shown in Table 2, the present application uses different numbers of CGCAB modules to replace the standard convolution (Conv) in the Backbone part for experiments to evaluate their impact on model performance and resource consumption. The experimental results show that among the various schemes, the structure using 3 CGCAB modules combined with 1 Conv module achieves the optimal detection accuracy (mAP50 of 86.3%), while maintaining a low parameter size and computational complexity. Compared with the full replacement (4xCGCAB) scheme, this combination has an advantage in computational load, representing a better performance-efficiency trade-off. This experiment verifies that selectively introducing CGCAB modules at key positions can effectively improve detection performance while maintaining model lightweight.

[0050] Ablation experiment of CRL-YOLOv11 To verify the effectiveness of the CRL-YOLOv11 model, ablation experiments were conducted on the improved parts. First, the CGCAB module was added, then the lightweight RGCSPELAN module was added, then the SCDown downsampling was added, and finally the LADH-Head detection head was added. Under the same experimental conditions, the detection effect of the model was evaluated, and the experimental results are shown in Table 3. In the experiment, “√” indicates that the corresponding module is introduced.

[0051] Table 3 Results of the Ablation Study Table 3 Results of the Ablation Study

[0052] Experiments show that the introduction of the above four modules improves the mAP50 index. First, the introduction of the CGCAB module improves the detection accuracy to 86.3%, which is 1.7 percentage points higher than the baseline model, and the recall rate is improved by 1.8%, which verifies the effectiveness of the edge information and context guidance module in enhancing the fuzzy fish body edge perception. The RGCSPELAN module reduces the model parameter quantity from 2.58M to 2.24M, and the mAP50 is improved by 0.8%, which shows its good feature expression ability and lightweight advantage. The SCDown module and LADH-Head detection head are added respectively, while maintaining relatively high accuracy, further compressing the model volume and computational overhead.

[0053] When CGCAB and RGCSPELAN are used together, the model improves the mAP50 to 86.3% while maintaining a low parameter quantity (2.90M) and computational quantity (8.0 GFLOPs), showing a synergistic enhancement effect between structures. Compared with the introduction of only the CGCAB module, the computational complexity is significantly reduced, further proving the complementarity of the two in feature enhancement and model compression. After further adding the SCDown module, the model parameter quantity is compressed to 2.43M, and the mAP50 is steadily improved to 86.4%, indicating that this lightweight downsampling structure effectively maintains spatial information while reducing information loss and improving the accuracy of multi-scale feature expression. Finally, the four modules are integrated to form a complete CRL-YOLOv11 model, which further reduces the parameter quantity to 2.14M (down by 17%) and controls the computational quantity at 6.6 GFLOPs while achieving the optimal performance of 86.7% mAP50 and 78.9% recall rate, which is significantly better than the baseline YOLOv11. In actual underwater fish group detection, this combination significantly reduces the missed detection rate by 2.9% in dense occlusion scenarios, verifying the good balance between accuracy, efficiency, and lightweight of the model.

[0054] Comparative experiment with other algorithms In order to verify the effectiveness of the model method proposed in the present application, experiments are carried out using the divided data set, and the CRL-YOLOv11 is compared with the currently commonly used target detection algorithms, and the experimental results are shown in Table 4.

[0055] Table 4 Comparative experiment among different algorithms Table 4Comparative Experiment among Different Algorithms

[0056] The experimental results show that the CRL-YOLOv11 reaches 86.7% and 61.1% in mAP50 and mAP50-95 indexes, respectively, and has improved detection accuracy compared with mainstream models such as YOLOv5n (84.4%), YOLOv8n (84.7%) and YOLOv11n (84.6%). At the same time, the recall rate of CRL-YOLOv11 reaches 78.9%, which is better than the above-mentioned comparison methods in reducing missed detection, indicating that the method can more comprehensively perceive and capture targets in complex underwater environments. In terms of comprehensive accuracy and recall rate performance, CRL-YOLOv11 shows strong performance advantages and application potential in underwater fish target detection tasks.

[0057] The present application aims at the problems of small target detection difficulty, image blur, edge feature missing and the like in underwater fish target detection. Based on YOLOv11n, the CRL-YOLOv11 model is proposed. Firstly, the CGCAB module uses the coordinate attention mechanism to enhance edge perception and context modeling capability, improving the detection performance of blurred fish contours. The RGCSPELAN module combines RepConv and multi-scale convolution strategy to effectively reduce the parameter quantity and computational quantity while maintaining high feature expression. The SCDown downsampling and LADH-Head detection head are introduced to reduce the model complexity while improving the classification and positioning performance. The experimental results on the data set of the present application show that CRL-YOLOv11 has obvious advantages in detection accuracy, recall rate and model efficiency, and especially shows stronger robustness and adaptability in complex underwater scenes such as multi-target dense and image blur. The model will be applied to mobile devices in the future, and application tests will be carried out to further study its applicability.

Claims

1. An underwater fish detection method based on an improved YOLOv11n model, characterized in that, The method comprises the following steps: Step S1: collecting and organizing an underwater fish image dataset; Step S2: performing image preprocessing operations on the original images in the image dataset to enhance data diversity and improve the robustness and adaptability of the target detection model in complex underwater environments; Step S3: labeling the processed dataset using LabelImg and dividing the dataset into a training set, a validation set, and a test set according to a certain proportion to ensure that the model can be effectively trained and evaluated on different datasets; Step S4: constructing a lightweight underwater fish detection model CRL-YOLOv11; Step S5: inputting the preprocessed and labeled dataset into the constructed CRL-YOLOv11 model, using the model to perform target detection training on underwater fish images, and continuously learning the spatial distribution and semantic features of fish targets through forward propagation and backward gradient optimization mechanisms; Step S6: applying the trained target detection model to the underwater images to be detected, automatically identifying the target regions in the images through an inference process, and outputting detection results containing target bounding box coordinates and class labels to achieve accurate positioning and recognition of fish targets.

2. The method of claim 1, wherein, In step S1, the image data includes two parts: one is high-quality image samples selected from existing public underwater image datasets, and the other is images obtained by photographing fish samples caught in the South China Sea under natural lighting and actual water environment conditions, which have stronger realism and complex background interference characteristics; In step S2, the image preprocessing operations include but are not limited to random rotation, scaling, cropping, color disturbance, brightness and contrast adjustment, blurring, and affine transformation. By introducing various image distortions and noise changes, the image degradation phenomena caused by uneven lighting, turbid water, and motion blur in actual underwater environments are simulated, thereby improving the detection accuracy and generalization ability of the model for fish targets under different scales, poses, and lighting conditions.

3. The method of claim 1, wherein, In step S3, the specific steps are as follows: using LabelImg to perform target labeling on the preprocessed image data, using the image labeling tool to perform target labeling on the preprocessed images, obtaining the position coordinates and class information of fish targets, and constructing a standardized target detection labeling format; After labeling, the dataset is divided into a training set, a validation set, and a test set according to a certain proportion to ensure the training and evaluation effect of the model on different data distributions; the finally constructed dataset contains several images covering fish targets under different scales, poses, lighting, and background complexity, providing a high-quality data basis for subsequent model training and performance evaluation; In step S4, the model is improved based on the YOLOv11 framework, integrating an edge perception enhancement module and a multi-scale feature fusion structure. The edge guidance module is used to extract fine-grained edge features in the image, improving the model's perception ability for weak feature targets. The aggregation module adopts a re-parameterized multi-branch structure to realize cross-scale semantic fusion, thereby enhancing the detection performance of the model on small targets and low-contrast targets, and combining a lightweight detection head to improve the inference efficiency of the model and balance the detection accuracy.

4. The method of claim 1, wherein, In step S5, the training set is put into the CRL-YOLOv11 model for training to obtain a detection result and generate a best.pt file; through evaluation indexes including recall, mean average precision (mAP), frames per second (FPS) and model parameter quantity (Parameters); after the training is completed, the model is detected and evaluated on the validation set and the test set, a variety of evaluation indexes are used to comprehensively evaluate the performance of the model, and the detection ability of the detection method on multi-scale, low-contrast and small target fish in a complex underwater environment is verified, so as to ensure that the detection method has good generalization performance and actual application value.

5. The method of claim 1, wherein, In step S4, the CRL-YOLOv11 model constructed includes a backbone network Backbone, a neck network Neck and a detection head network Head, and specifically as follows: The backbone network Backbone is specifically as follows: an image is input into a first Conv convolutional module, the first Conv convolutional module is connected with an input of a first CGCAB module, an output of the first CGCAB module is connected with an input of a first RGCSPELAN module, an output of the first RGCSPELAN module is connected with an input of a second CGCAB module, an output of the second CGCAB module is connected with an input of a second RGCSPELAN module, an output of the second RGCSPELAN module is connected with an input of a second Conv module, an output of the second Conv module is connected with an input of a third RGCSPELAN module, an output of the third RGCSPELAN module is connected with an input of a third CGCAB module, an output of the third CGCAB module is connected with an input of a fourth RGCSPELAN module, an output of the fourth RGCSPELAN module is connected with an input of a SPPF spatial pyramid network, and an output of the SPPF spatial pyramid network is connected with an input of a C2PSA compressed channel level partial self-attention mechanism; The neck network Neck is specifically as follows: the output of the C2PSA is divided into two branches, one output is connected with an input of a first upsampling module, and the other output is directly connected with an input of a first concatenation layer module; an output of the first upsampling module is connected to a second concatenation layer, and the third RGCSPELAN module is also connected to the second concatenation layer module; an output of the second concatenation layer module is transmitted to an input of a fifth RGCSPELAN module, an output of the fifth RGCSPELAN module is connected with an input of a second upsampling module, an output of the second RGCSPELAN module and an output of the second upsampling module are jointly connected with an input of a third concatenation layer module; an output of the third concatenation layer module is connected with an input of a sixth RGCSPELAN module; The output of the sixth RGCSPELAN module is connected to the input of the fourth CGCAB module, the output of the fourth CGCAB module is connected to the input of the fourth concatenation layer module, the output of the fifth RGCSPELAN module is also connected to the input of the fourth concatenation layer module, and the output of the fourth concatenation layer module is connected to the input of the seventh RGCSPELAN module; the output of the seventh RGCSPELAN module is connected to the input of the first SCDown module, and the output of the first SCDown module is connected to the input of the first concatenation layer; the output of the first concatenation layer is connected to the input of the eighth RGCSPELAN module; The network of the detection head Head is specifically: the output of the sixth RGCSPELAN module forms a first detection head; the output of the seventh RGCSPELAN module forms a second detection head; and the output of the eighth RGCSPELAN module forms a third detection head.

6. The method of claim 5, wherein, The first detection head, the second detection head and the third detection head adopt LADH-Head detection heads; specifically: The input feature map is divided into two branches by its output, the regression branch passes through three depth separable convolutions DSConv and a normal convolution, and then passes through a 2D convolution layer to further optimize the features; The classification branch passes through two 1x1 convolutions and a 2D convolution layer.

7. The method of claim 6, wherein, The first detection head, the second detection head and the third detection head are specifically: The output of the sixth RGCSPELAN module forms two branches, which are a first detection head one branch and a first detection head two branch, to form the first detection head; the first detection head one branch is specifically: the output of the sixth RGCSPELAN module is connected to the input of the first DSConv module, the output of the first DSConv module is connected to the input of the second DSConv module, the output of the second DSConv module is connected to the input of the third DSConv module, the output of the third DSConv module is connected to the input of the first Conv module, and the output of the first Conv module is connected to the input of the first Conv2d module; the first detection head two branch is specifically: the output of the sixth RGCSPELAN module is connected to the input of the second Conv module, the output of the second Conv module is connected to the input of the third Conv module, the output of the third Conv module is connected to the input of the second Conv2d module; The second detection head is specifically: the output of the seventh RGCSPELAN module forms two branches, which are a first detection head one branch and a first detection head two branch; the first detection head one branch is specifically: the output of the seventh RGCSPELAN module is connected to the input of the fourth DSConv module, the output of the fourth DSConv module is connected to the input of the fifth DSConv module, the output of the fifth DSConv module is connected to the input of the sixth DSConv module, the output of the sixth DSConv module is connected to the input of the fourth Conv module, and the output of the fourth Conv module is connected to the third Conv2d module; the first detection head two branch is specifically: the output of the seventh RGCSPELAN module is connected to the input of the fifth Conv module, the output of the fifth Conv module is connected to the input of the sixth Conv module, and the output of the sixth Conv module is connected to the fourth Conv2d module. The third detection head is specifically: the output of the eighth RGCSPELAN module forms two branches, which are a first detection head one branch and a first detection head two branch; the first detection head one branch is specifically: the output of the eighth RGCSPELAN module is connected to the input of the seventh DSConv module, the output of the seventh DSConv module is connected to the input of the eighth DSConv module, the output of the eighth DSConv module is connected to the input of the ninth DSConv module, the output of the ninth DSConv module is connected to the input of the seventh Conv module, and the output of the seventh Conv module is connected to the fifth Conv2d module; the first detection head two branch is specifically: the output of the eighth RGCSPELAN module is connected to the input of the eighth Conv module, the output of the eighth Conv module is connected to the input of the ninth Conv module, and the output of the ninth Conv module is connected to the sixth Conv2d module.

8. The method of claim 5, wherein, The CGCAB module is specifically: the input feature is connected to the input of a 1*1 convolution module, the output of the 1*1 convolution is connected to two branches, the first branch of the output is connected to a 3*3 ordinary convolution, and the second branch of the output is connected to a 3*3 dilated convolution; the outputs of the ordinary convolution and the dilated convolution are spliced by a Concat operation, the spliced feature map is subjected to a BN normalization operation and a ReLU activation function, and the output after the operation is connected to a coordinate attention CA module for weighting operation to obtain an output feature map.

9. The method of claim 8, wherein, The coordinate attention CA module is specifically: The input feature map of the coordinate attention CA module is respectively subjected to global average pooling in the width and height directions to obtain feature maps in the width and height directions respectively; the shape of the input feature layer is [H, W, C], after global pooling in the width direction, a [H, 1, C] vector is obtained, at this time the feature is mapped to a high dimension; after global pooling in the height direction, a [1, W, C] vector is obtained, at this time the feature is mapped to a wide dimension; the two feature vectors are spliced to form a new feature vector, which is standardized by a normal convolution Conv and connected with an activation function to generate two complementary spatial attention maps, which are respectively used for weighting adjustment of the input feature map in the height and width directions, and the generated spatial attention maps are multiplied with the input feature map after adjusting the channel number by 1x1 convolution and passing through a Sigmoid activation function, and the obtained output is the output of the coordinate attention CA module.

10. The method according to one of claims 5 to 9, characterized in that, The RGCSPELAN module specifically comprises: The input feature is first compressed in the channel by 1x1 convolution, the output of the convolution module is connected with the input of the Spilt module, and the output of the Spilt module is divided into two branches for operation; under one branch, the output of the Spilt module is directly connected with the input of the splicing layer, and under the other branch, the output of the Spilt module is subjected to RepConv module and N-1 convolution processing, the features extracted by multiple processing paths are fused in the channel dimension by Concat operation, and finally the dimension is compressed by 1x1 convolution to output the aggregated features.