Improved ocean fishery high-precision target detection method based on RT-DETR
By introducing Efficient Block module, small object detection layer and cascaded grouped convolution attention module into the RT-DETR model, combined with the cross-scale fusion module of the attention mechanism, the problem of low accuracy of underwater target recognition in offshore fishery is solved, and higher target recognition accuracy and lightweight network are achieved.
Patent Information
- Application Number
- CN202510038141.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2045-01-10
AI Technical Summary
Due to the large variety of biological agglomerations and complex environment in offshore fisheries, the accuracy of underwater target recognition is low, and the problem of missed detection is prone to occur.
The high-precision object detection improvement method of marine fishery based on RT-DETR is adopted. By introducing Efficient Block module, small object detection layer and cascaded grouped convolution attention module, combined with the cross-scale fusion module of attention mechanism, the feature extraction capability and computing efficiency are improved.
While ensuring the network is lightweight, it improves the multi-level semantic feature capture capability in underwater remote sensing images, improves the accuracy of target recognition and positioning accuracy, and reduces the false detection rate.
Smart Images

Figure CN119963986A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an improved method for high-precision target detection in marine fisheries, specifically to an improved method for high-precision target detection in marine fisheries based on RT-DETR, and belongs to the technical field of target detection algorithms based on deep learning. Background Art
[0002] Generally speaking, the smart ocean and smart aquaculture can be realized by realizing the informationized ocean that combines the ocean with artificial intelligence and building an ocean information system with intelligent ocean information infrastructure as the core. The proposal of smart ocean has prompted the development of marine fisheries, marine ranch construction and marine aquaculture towards informationized aquaculture, and promoted the transformation and upgrading of marine agriculture and animal husbandry.
[0003] At present, many marine ranch companies have begun to collect and use video data using underwater camera systems. The number of real-time videos and the amount of information are huge. It is difficult to extract biological community data using artificial methods from massive video data. Artificial intelligence and image analysis technology are particularly important in marine ranch biological resource monitoring research. The application of artificial intelligence, machine vision technology and other sensor technologies in aquaculture can monitor the ecological environment in real time, and combine deep learning image recognition and detection and machine learning methods to conduct unified analysis of marine biological living habits, feeding intensity, environmental adaptation and ecological environment information, deeply mine the breeding process data, and improve work efficiency and decision reliability.
[0004] However, due to the large number of biological species in offshore fishing grounds, complex biological environments, turbid water quality and obvious underwater scattering effects, the difficulty of underwater target recognition is significantly different from that of land images. Under such special conditions, when using target detection technology to identify underwater targets, it may face lower accuracy and higher false detection and missed detection problems. Summary of the invention
[0005] The purpose of the present invention is to provide an improved method for high-precision target detection in marine fisheries based on RT-DETR, aiming at the problems of low accuracy and easy false detection and missed detection when using target detection technology to identify underwater targets in current offshore fisheries. By balancing computational efficiency and recognition accuracy, the invention utilizes multi-level feature fusion and the introduction of a small target detection layer to achieve better capture of multi-level semantic features in underwater remote sensing images and improved target recognition while ensuring network lightweight, while ignoring the influence of complex background to improve detection effect, and providing methodological theory and data support for the development of intelligent monitoring equipment for marine fisheries, marine ecological protection, and fishery insurance.
[0006] The present invention provides the following technical solution: an improved method for high-precision target detection in marine fisheries based on RT-DETR, the improved method for high-precision target detection in marine fisheries comprising the following steps:
[0007] S1, collect and preprocess multi-view images of marine organisms in offshore fishing grounds to obtain a marine fishing ground target data set;
[0008] S2. Use the Efficient Block module to replace the BasicBlock module in the backbone network of the RT-DETR model, and introduce a small target detection layer to improve the feature extraction capability of the RT-DETR model;
[0009] S3. Introduce the cascaded grouped convolutional attention module to replace the AIFI module in the RT-DETR model to improve the computational efficiency of the RT-DETR model;
[0010] S4. Introduce a cross-scale fusion module based on the attention mechanism into the neck network of the RT-DETR model to enhance feature flow and strengthen the RT-DETR model's ability to acquire multi-scale information;
[0011] S5, configuring a training environment to train the input improvement method of the marine fishery target data set;
[0012] S6. Apply the trained improved high-precision target detection method, take the target image to be detected as input, and obtain the marine fishery target detection result and the marine fishery target recognition information as output.
[0013] As a further technical solution of the present invention: in step S1, the multi-perspective images of marine life in offshore fishing grounds include data received by underwater robot sensors and photographic images taken by divers' manual cameras; preprocessing includes imaging quality screening, data size cropping, marine life identification label production and data set division.
[0014] As a further technical solution of the present invention: imaging quality screening and data size cropping are completed by professional and technical personnel in marine science, and the final input data obtained is an RGB image containing three types of marine organisms: sea cucumbers, sea urchins, and scallops; the content of the marine organism identification label production includes the category of the marine organism bounding box, the coordinates of the upper left corner of the bounding box, and the coordinates of the lower right corner of the bounding box; the data set is divided into a training set: validation set: test set ratio of 7:2:1.
[0015] As a further technical solution of the present invention: in step S2, the Basic Block module in the backbone network of the RT-DETR model is replaced by the Efficient Block module, which specifically includes:
[0016] S21. In the initial stage, in order to minimize the impact of downsampling on feature extraction, the initial embedding layer consists of a 3×3ConvNorm module with a step size of 1, a 3×3ConvNorm module with a step size of 2, and a maximum pooling layer, where the ConvNorm module refers to the sequential processing of feature maps using convolutional layers, batch normalization layers, and SiLU activation functions;
[0017] S22, feature extraction stage, four Efficient Block modules are used to downsample the input feature map. The Efficient Block module consists of a special downsampling residual block and a partial convolution residual block: the special downsampling residual block combines the maximum pooling layer and the average pooling layer to build a residual connection network to achieve the purpose of spatial downsampling and channel expansion; the partial convolution residual block consists of a PConv convolution layer and two 1×1 convolution layers to form a residual structure;
[0018] S23, feature output stage, the input feature map is downsampled through four Efficient Block modules to help the RT-DETR model capture the global information in the input data and retain the most important features, and obtain four feature maps of different scales: P1, P2, P3, and P4.
[0019] As a further technical solution of the present invention: in step S3, the cascaded grouped convolutional attention module includes a CGA mechanism, specifically including: the CGA mechanism of the cascaded grouped convolutional attention module is inspired by grouped convolution, and the head design of the cascaded grouped convolutional attention module is split processed. The split processing means that grouping is started before calculating Q, K and V, and Q, K and V are no longer split during internal calculation.
[0020] As a further technical solution of the present invention: in step S4, the attention mechanism includes upper network spatial attention and lower network channel attention;
[0021] Among them, the spatial attention of the upper network uses the deformable convolution layer DCNv2 as the context aggregator of the local channel to extract spatial features; the channel attention of the lower network extracts features from adjacent parts of the feature map through multiple one-dimensional channel convolutions, specifically including:
[0022] S41, upper network spatial attention processing, upper network spatial attention of global features S att The calculation formula is as follows:
[0023]
[0024] Where: CBR module refers to sequential processing of feature maps using 1×1 convolutional layer, batch normalization layer and ReLU activation function; DBR module extracts spatial features between feature maps of different input paths through deformable convolution; X and Y are feature maps from different input paths; symbol represents the channel dimension series superposition, then represents the sum of X and Y channel features; B represents the batch normalization layer, and δ represents the ReLU activation function; is a convolutional layer with a convolution kernel of 1×1; DCNv2(·) is a deformable convolutional layer;
[0025] S42, the lower network channel attention processing includes halving the number of input feature channels through 1×1 convolution, then taking the pooled result as input, performing one-dimensional convolution with kernel sizes of 3, 5, and 7, and finally superimposing the channels and using 1×1 convolution to restore the number of channels to be consistent with the original input. The lower network channel attention C of the global feature att The calculation formula is as follows:
[0026]
[0027] Where: Gap(·) represents the global average pooling layer; Represents a one-dimensional convolution with a convolution kernel size of k;
[0028] S43, fusion output, using the broadcast mechanism to sum the processing results of the upper network spatial attention and the processing results of the lower network channel attention, and apply the Sigmoid activation function to perform weighted output. The output result is shown as follows:
[0029]
[0030] Where: Output Z represents the output result of the fusion module; (S att +C att ) represents the summation result of two types of attention features; The symbol represents the element-by-element multiplication of the corresponding elements of the two types of feature maps; w is the fusion weight consisting of a real number between 0 and 1.
[0031] As a further technical solution of the present invention: in step S5, a training environment is configured to train the improved input method of the marine fishery target data set, wherein the training parameters are: 200 training rounds; the input image resolution size is 640×640 pixels; the number of iterative training sample groups is 8 groups; the training process optimizer is the AdamW function; the initial learning rate is 0.0001; and the weight decay is 0.0001.
[0032] As a further technical solution of the present invention: in step S6, the improved method for high-precision target detection that completes training satisfies conditions including maximum training rounds, loss function constraints and early stopping mechanism requirements; the marine fishery target detection results and marine fishery target identification information that are finally output include biological species, identification confidence and location information of the identified target in the image.
[0033] Compared with the prior art, the present invention has the following beneficial effects:
[0034] 1) Based on the RT-DETR target detection network, the network backbone is redesigned, a small target detection layer is introduced, and a fast feature extraction network structure is used to ensure the network's fast computing efficiency while making lightweight improvements to the network model for easy deployment and training;
[0035] 2) Improve the encoder part of the RT-DETR target detection network: On the one hand, the AIFI module of the RT-DETR target detection network is modified based on the cascaded group convolutional attention module, which greatly reduces the network redundant calculation amount; on the other hand, a cross-scale fusion module of the attention mechanism is introduced into the neck network of the RT-DETR model to solve the problem of limited context information extraction of the RT-DETR model, enhance feature flow and strengthen the model's ability to obtain multi-scale information;
[0036] 3) The present invention achieves a good balance between target recognition accuracy and network volume. It improves the positioning accuracy and recognition accuracy in the detection task of small-volume, large-number, and multi-species marine biological targets in marine fisheries, and can enhance the detection capabilities in complex marine fishery scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 It is a schematic diagram of the overall steps of the present invention;
[0038] Figure 2 It is a schematic diagram of the overall network structure of the present invention;
[0039] Figure 3 It is a schematic diagram of the structure of the backbone network Efficient Feature Extractor in the present invention;
[0040] Figure 4 It is a schematic diagram of the structure of the Focus Fusion Module, a cross-scale fusion module based on spatial attention and channel attention in the decoder part of the present invention;
[0041] Figure 5 This is a schematic diagram of the original image of the test data set in an embodiment of the present invention;
[0042] Figure 6Schematic diagram of the detection results of the RT-DETR target detection model in an embodiment of the present invention;
[0043] Figure 7 This is a schematic diagram of the detection results of the improved method for high-precision target detection in marine fisheries based on RT-DETR in an embodiment of the present invention. DETAILED DESCRIPTION
[0044] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0045] Embodiment 1, as Figure 1 and Figure 2 As shown, this embodiment provides an improved method for high-precision target detection in marine fisheries based on RT-DETR, and the improved method for high-precision target detection in marine fisheries includes the following steps:
[0046] First: Collect and preprocess multi-perspective images of marine life in offshore fishing grounds to obtain a marine fishing ground target dataset.
[0047] Among them, the multi-perspective images of marine life in offshore fishing grounds include data received by underwater robot sensors and photos taken by divers' manual cameras. The resolution of the multi-perspective images is 3840×2160. The preprocessing includes imaging quality screening, data size cropping, marine life identification label production and data set division.
[0048] like Figure 5 As shown in the figure, it is a multi-view image of marine life in a fishing ground in a near-shore area (the original image of the data set), among which, the imaging quality screening and data size cropping (or data set acquisition and processing) are completed by professional and technical personnel in marine science, and the final input data is an RGB image containing three types of marine life: sea cucumbers, sea urchins and scallops, with a resolution of 640×640; the content of the marine life identification label production includes the category of the marine life bounding box, the coordinates of the upper left corner of the bounding box, and the coordinates of the lower right corner of the bounding box; the data set is divided into a training set: a validation set: a test set, which is equal to 7:2:1.
[0049] Second: Use the Efficient Block module to replace the BasicBlock module in the backbone network of the RT-DETR model, and introduce a small target detection layer to improve the feature extraction capability of the RT-DETR model.
[0050] The small target detection layer, also known as the small target feature layer, has different information extraction layers in the RT-DETR model, and the corresponding effects are also different. Among them, the small target detection layer is mainly used to detect relatively small targets. Its feature map volume is relatively large and the spatial resolution is high, which can obtain more feature information of small-sized targets. In addition, the structure of the backbone network in the RT-DETR model, such as Figure 3 shown.
[0051] Use the Efficient Block module to replace the Basic Block module in the backbone network of the RT-DETR model. The specific steps include the following:
[0052] 1) In the initial stage, in order to minimize the impact of downsampling on feature extraction, the initial embedding layer consists of a 3×3ConvNorm module with a stride of 1, a 3×3ConvNorm module with a stride of 2, and a maximum pooling layer. The ConvNorm module refers to the sequential processing of feature maps using convolutional layers, batch normalization layers, and SiLU activation functions. It should be noted that in order to optimize the traditional convolutional feature extraction process, a 1×1 convolutional layer is used to reduce the number of channels before the downsampling operation;
[0053] 2) In the feature extraction stage, four Efficient Block modules are used to downsample the input feature map. The Efficient Block module consists of a special downsampling residual block and a partial convolution residual block. The special downsampling residual block combines the maximum pooling layer and the average pooling layer to build a residual connection network to achieve the purpose of spatial downsampling and channel expansion. The partial convolution residual block consists of a PConv convolution layer and two 1×1 convolution layers to form a residual structure. In addition, the PConv convolution layer performs convolution operations on part of the input feature map instead of applying it in full, which significantly reduces redundant calculations and memory accesses;
[0054] In the Efficient Block module, the input features are first segmented to obtain two parts of feature information, named feature information 1 and feature information 2. Feature information 1 is downsampled through a 3×3ConvNorm layer with a step size of 1 and a 3×3ConvNorm layer with a step size of 2 to extract features and obtain output information a. Feature information 2 is segmented again to obtain two parts of feature information, named feature information 2-1 and feature information 2-2. Feature information 2-1 is downsampled through a maximum pooling layer and a 1×1ConvNorm layer with a step size of 1 to obtain output information b, and feature information 2-2 is downsampled through an average pooling layer and a step size of 1. The 1×1ConvNorm layer is used to downsample the information to obtain output information c; then, the output information b is connected to the output information c through the channel number connection layer to obtain output information d, and then the output information a and the output information d are superimposed through the network superposition operation to obtain output information e; through the segmentation operation, the output information e is divided into two parts of feature information, named output information f and output information g, respectively, where the output information g is sequentially operated by a PConv convolution layer and two 1×1ConvNorm modules with a step size of 1 to obtain output information h; finally, through the network superposition operation, the output information f and the output information h are superimposed to obtain the output feature, and the EfficientBlock module ends;
[0055] 3) In the feature output stage, the input feature map is downsampled through four Efficient Block modules to help the RT-DETR model capture the global information in the input data and retain the most important features, and obtain four feature maps of different scales: P1, P2, P3, and P4.
[0056] Third: Introduce the cascaded grouped convolutional attention module to replace the AIFI module in the RT-DETR model to improve the computational efficiency of the RT-DETR model.
[0057] In this embodiment, the AIFI module in the RT-DETR model still adopts a multi-head self-attention structure, but in order to improve the performance of the RT-DETR model and reduce the network complexity, the cascaded grouped convolutional attention module proposed in EfficientVIT is introduced, wherein the CGA mechanism of the cascaded grouped convolutional attention module (abbreviated as CGAM) is inspired by grouped convolution, and the head design of the cascaded grouped convolutional attention module is split (i.e., split into groups). The split processing means that grouping begins before calculating Q, K and V, and Q, K and V are no longer calculated separately internally. In the standard multi-head attention of the original RT-DETR model, Q, K and V are obtained using all input feature channels.
[0058] Here are the explanations of Q, K and V respectively: 1) Query (Q): used to "ask" for information, it indicates the part of the current input feature that needs to be paid attention to among other features, similar to a "question"; 2) Key (K): used to "match" queries, it is a vector associated with each feature, representing the "identifier" or "keyword" of each position; 3) Value (V): represents the "content of information", it carries the information of the feature, and will eventually be weighted and output.
[0059] Q and K calculate similarity: In the self-attention mechanism, the similarity between the query (Q) and the key (K) is first calculated. A common approach is to calculate their dot product, which is then normalized through Softmax to obtain the weight of each feature (i.e., attention weight).
[0060] Weighted value (V): The obtained attention weight is multiplied by the value (V) to obtain the weighted information output. The weight of each value will be adjusted according to the degree of match with the query. The higher the degree of match, the greater the weight and the greater the influence of the information.
[0061] In summary, Q, K, and V are three vectors used to calculate attention weights and weighted information: Q determines the "query content" of the current input; K determines whether each position is similar to the query; V carries the information of each position, which will eventually be weighted and summed.
[0062] Fourth: Introduce a cross-scale fusion module based on the attention mechanism into the neck network of the RT-DETR model to solve the problem of limited context information extraction by the RT-DETR model, thereby enhancing feature flow and strengthening the RT-DETR model's ability to obtain multi-scale information, such as Figure 4 shown.
[0063] Among them, the attention mechanism includes the upper network spatial attention and the lower network channel attention, and the upper network and the lower network are channels for feature extraction.
[0064] The spatial attention of the upper network uses the deformable convolution layer DCNv2 as the context aggregator of the local channel to extract spatial features. In order to keep the algorithm lightweight, it only needs to add the local context to the global context of the attention module; the channel attention of the lower network extracts features from adjacent parts of the feature map through multiple one-dimensional channel convolutions. The key idea is to achieve channel attention between multi-scale feature maps by setting the size of a specific pooling calculation layer. The steps include:
[0065] 1) Upper network spatial attention processing, upper network spatial attention S of global features att The calculation formula is as follows:
[0066]
[0067] Where: CBR module refers to sequential processing of feature maps using 1×1 convolution layer, batch normalization layer and ReLU activation function; DBR module extracts spatial features between feature maps of different input paths through deformable convolution; X and Y are feature maps from different input paths, and Y can usually be considered as a feature map with a larger receptive field; symbol represents the channel dimension series superposition, then represents the sum of X and Y channel features; B represents the batch normalization layer, and δ represents the ReLU activation function; is a convolutional layer with a convolution kernel of 1×1; DCNv2(·) is a deformable convolutional layer;
[0068] 2) The lower network channel attention processing includes halving the number of input feature channels through 1×1 convolution, then taking the pooled result as input, performing one-dimensional convolution with kernel sizes of 3, 5, and 7, and finally superimposing the channels and using 1×1 convolution to restore the number of channels to be consistent with the original input. The lower network channel attention C of the global feature att The calculation formula is as follows:
[0069]
[0070] Where: Gap(·) represents the global average pooling layer; Represents a one-dimensional convolution with a convolution kernel size of k;
[0071] Channel attention uses multiple groups of one-dimensional convolutions to test the correlation between features of different scales obtained from the output of the target detection network backbone;
[0072] 3) Fusion output: Use the broadcast mechanism to sum the processing results of the upper network spatial attention and the lower network channel attention, apply the Sigmoid activation function and perform weighted output. The output result formula is as follows:
[0073]
[0074] Where: Output Z represents the output result of the fusion module; (S att +C att ) represents the summation result of two types of attention features; The symbol represents the element-by-element multiplication of the corresponding elements of the two types of feature maps; w is the fusion weight composed of real numbers between 0 and 1, so (1-w) is also a real number. This allows the fusion module based on the attention mechanism to perform soft selection or weighted averaging in the input data, and to achieve fusion between different feature maps by dynamically allocating attention weights to feature maps. While ensuring lightweight, it ignores the influence of complex backgrounds and improves the ability to recognize targets.
[0075] Fifth: Configure the training environment to train the improved input method of the marine fishery target data set (improved method for high-precision target detection).
[0076] The training parameters are as follows: 200 training rounds; 640×640 pixel input image resolution; 8 iterative training sample groups; AdamW function as the training process optimizer; 0.0001 initial learning rate; and 0.0001 weight decay.
[0077] Sixth: Apply the improved method of high-precision target detection that has been trained, take the target image to be detected as input, and obtain the marine fishery target detection results and marine fishery target recognition information as output.
[0078] Among them, the improved method for high-precision target detection that completes training meets the conditions including maximum training rounds, loss function constraints and early stopping mechanism requirements; the final output of marine fishery target detection results and marine fishery target recognition information include biological species, recognition confidence and the position information of the recognized target in the image.
[0079] Embodiment 2, in a real example of a marine fishery, since the underwater target detection network is a key part of the underwater detection system deployed in the marine fishery, it is of great significance for underwater rapid positioning, automatic monitoring of marine biological growth, intelligent fishing and other tasks. Therefore, the best way to improve its performance is to train it with real picked-up environment images, and select the enhanced underwater detection dataset EUDD based on real marine fishery images on the high seas.
[0080] In this embodiment, the data set is obtained from video records of two underwater locations about 500 meters away from Zhangzidao Island. The video is completed by a robot and a diver along a specific loop route. The video is sampled and cut according to the definition (720P, 1080P and 4K video), shooting angle (horizontal, top-down) and terrain scene (such as flat ground, slope, stone), and multiple categories of images are sampled and cut according to a uniform frame rate. The final constructed underwater open sea target detection data set contains 2227 original images of three categories (sea cucumbers, sea urchins, and scallops). The original images of the three seabed creatures are shown in the attached figure. Figure 5 shown.
[0081] The training network setting parameters are: 200 training rounds; input image resolution size is 640×640 pixels; the number of iterative training sample groups is 8; the training process optimizer is AdamW function; the initial learning rate is 0.0001; the weight decay is 0.0001. The hardware and software settings of the network training platform are shown in Table 1.
[0082] Table 1 is the network training software and hardware configuration table
[0083] Configuration parameter operating system Ubuntu 16.04 programming language Python 3.9 CPU 12th Gen Intel(R)Core(TM)i7-12700K 3.60GHz GPU GeForce RTX 3090 GPU memory 24G CUDA Version 12.0 cuDNN version 11.7 RAM capacity 64G Algorithm Framework Pytorch-2.0.1+cu117 Programming software Spyder 3.3.0
[0084] The target image to be detected is used as input, and the marine fishery target detection result and marine fishery target recognition information are obtained as output. The conditions for completing the training of the improved method of high-precision target detection include the maximum training rounds, loss function constraints, and early stopping mechanism requirements; the final output of the marine fishery target detection result includes the species, recognition confidence, and the position information of the recognized target in the image. On the test data set, the detection results of the improved method of high-precision target detection in marine fisheries based on RT-DETR are as follows: Figure 7 shown.
[0085] Table 2 is the target detection results statistics table
[0086]
[0087] Through comparative experiments with the original RT-DETR, it is found that the detection results of the RT-DETR target detection model on the test dataset are as follows: Figure 6 As shown. Table 2 shows the test results of the improved algorithm proposed in the present invention and the RT-DETR network in the underwater biological detection data set. The input data is the test set data divided by EUDD, in which the number of sea urchins detected is greater than the sum of sea cucumber and shell data, which is consistent with the actual species distribution. It can be seen that compared with the RT-DETR network, the improved algorithm proposed in the present invention has higher accuracy in the recognition of three types of underwater biological targets, but in the process of sea cucumber target detection, the number of instances and pictures recognized by RT-DETR is greater than that of the improved algorithm proposed in the present invention, and the recall rate is also higher, but the recognition accuracy is far behind the improved algorithm proposed in the present invention. In the detection of sea urchin targets with a large number and small size, the improved algorithm proposed in the present invention shows its more accurate advantage, identifying more sea urchin instances in a smaller number of pictures, and its accuracy and recall rate are better than the RT-DETR network. In terms of the detection accuracy of the three underwater biological categories of the two networks, the mAP50 of shells is the highest, which is related to the biological attribute of underwater shell features that are easy to distinguish.
[0088] Based on the recognition effects of three underwater creatures in the EUDD dataset involved in this paper, compared with the RT-DETR network before optimization, the improved algorithm proposed in this paper further improves the accuracy of target recognition while meeting the lightweight of the network. The accuracy is increased from 89.2% to 91.4%; the recall rate is increased from 85.2% to 87.1%; mAP50 is increased from 88.5% to 92.7%, and the network recognition accuracy is improved by 4.7%. The detailed comparative statistics are shown in Table 3 below.
[0089] Table 3 is a statistical table of comparative experiments
[0090]
[0091] In summary, the improved algorithm proposed in this invention can effectively identify and accurately locate multi-category, large number, and small-volume underwater biological targets in complex underwater environments. The network has contributed to the advancement of underwater target detection tasks and provided a reliable solution for target detection in actual complex ocean scenes.
[0092] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
[0093] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.
Claims
1. An improved method for high-precision target detection in marine fisheries based on RT-DETR, characterized in that: The improved method for high-precision target detection in marine fisheries comprises the following steps: S1, collect and preprocess multi-view images of marine organisms in marine fisheries to obtain a marine fishery target data set; S2. Use the Efficient Block module to replace the Basic Block module in the backbone network of the RT-DETR model, and introduce a small target detection layer to improve the feature extraction capability of the RT-DETR model; S3. Introduce the cascaded grouped convolutional attention module to replace the AIFI module in the RT-DETR model to improve the computational efficiency of the RT-DETR model; S4. Introducing a cross-scale fusion module based on an attention mechanism into the neck network of the RT-DETR model to enhance feature flow and strengthen the RT-DETR model's ability to acquire multi-scale information; S5, configuring a training environment to train the input improvement method of the marine fishery target data set; S6. Apply the trained improved high-precision target detection method, take the target image to be detected as input, and obtain the marine fishery target detection result and the marine fishery target recognition information as output.
2. The improved method for high-precision target detection in marine fisheries according to claim 1 is characterized in that: In step S1, the multi-view images of near-marine life include data received by underwater robot sensors and images taken by divers' manual cameras; the preprocessing includes imaging quality screening, data size cropping, marine life identification tag production and data set division.
3. The improved method for high-precision target detection in marine fisheries according to claim 2 is characterized in that: The imaging quality screening and data size cropping are completed by professional marine science technicians, and the final input data is an RGB image containing three types of marine organisms: sea cucumbers, sea urchins, and scallops; the content of the marine organism identification label production includes the category of the marine organism bounding box, the coordinates of the upper left corner of the bounding box, and the coordinates of the lower right corner of the bounding box; the data set is divided into a training set: validation set: test set ratio of 7:2:
1.
4. The improved method for high-precision target detection in marine fisheries according to claim 1 is characterized in that: In step S2, the Basic Block module in the backbone network of the RT-DETR model is replaced by the Efficient Block module, which specifically includes: S21. In the initial stage, in order to minimize the impact of downsampling on feature extraction, the initial embedding layer consists of a 3×3ConvNorm module with a step size of 1, a 3×3ConvNorm module with a step size of 2, and a maximum pooling layer, where the ConvNorm module refers to the sequential processing of feature maps using convolutional layers, batch normalization layers, and SiLU activation functions; S22, feature extraction stage, four Efficient Block modules are used to downsample the input feature map. The Efficient Block module consists of a special downsampling residual block and a partial convolution residual block: the special downsampling residual block is combined with the maximum pooling layer and the average pooling layer to build a residual connection network to achieve the purpose of spatial downsampling and channel expansion; the partial convolution residual block is composed of a PConv convolution layer and two 1×1 convolution layers to form a residual structure; S23, feature output stage, the input feature map is downsampled through four Efficient Block modules to help the RT-DETR model capture the global information in the input data and retain the most important features, and obtain four feature maps of different scales: P1, P2, P3, and P4.
5. The improved method for high-precision target detection in marine fisheries according to claim 1 is characterized in that: In step S3, the cascaded grouped convolutional attention module includes a CGA mechanism, specifically including: the CGA mechanism of the cascaded grouped convolutional attention module is inspired by grouped convolution, and the head design of the cascaded grouped convolutional attention module is split. The split processing means that grouping is started before calculating Q, K and V, and Q, K and V are no longer split during internal calculation.
6. The improved method for high-precision target detection in marine fisheries according to claim 1 is characterized in that: In step S4, the attention mechanism includes upper network spatial attention and lower network channel attention; The upper network spatial attention uses the deformable convolution layer DCNv2 as the context aggregator of the local channel to extract spatial features; the lower network channel attention uses multiple one-dimensional channel convolutions to extract features from adjacent parts of the feature map, specifically including: S41, upper network spatial attention processing, upper network spatial attention of global features S att The calculation formula is as follows: Where: CBR module refers to sequential processing of feature maps using 1×1 convolutional layer, batch normalization layer and ReLU activation function; DBR module extracts spatial features between feature maps of different input paths through deformable convolution; X and Y are feature maps from different input paths; symbol represents the channel dimension series superposition, then represents the sum of X and Y channel features; B represents the batch normalization layer, and δ represents the ReLU activation function; is a convolutional layer with a convolution kernel of 1×1; DCNv2(·) is a deformable convolutional layer; S42, the lower network channel attention processing includes halving the number of input feature channels through 1×1 convolution, then taking the pooled result as input, performing one-dimensional convolution with kernel sizes of 3, 5, and 7, and finally superimposing the channels and using 1×1 convolution to restore the number of channels to be consistent with the original input. The lower network channel attention C of the global feature att The calculation formula is as follows: Where: Gap(·) represents the global average pooling layer; Represents a one-dimensional convolution with a convolution kernel size of k; S43, fusion output, using the broadcast mechanism to sum the processing results of the upper network spatial attention and the processing results of the lower network channel attention, and apply the Sigmoid activation function to perform weighted output. The output result is shown as follows: Where: Output Z represents the output result of the fusion module; (S att +C att ) represents the summation result of two types of attention features; The symbol represents the element-by-element multiplication of the corresponding elements of the two types of feature maps; w is the fusion weight consisting of a real number between 0 and 1.
7. The improved method for high-precision target detection in marine fisheries according to claim 1 is characterized in that: In step S5, a training environment is configured to train the input improvement method of the marine fishery target data set, wherein the training parameters are: 200 training rounds; the input image resolution size is 640×640 pixels; the number of iterative training sample groups is 8 groups; the training process optimizer is the AdamW function; the initial learning rate is 0.0001; and the weight decay is 0.0001.
8. The improved method for high-precision target detection in marine fisheries according to claim 1 is characterized in that: In step S6, the improved method for high-precision target detection that completes training meets the conditions including maximum training rounds, loss function constraints and early stopping mechanism requirements; the marine fishery target detection results and marine fishery target recognition information finally output include biological species, recognition confidence and position information of the recognized target in the image.
Citation Information
Patent Citations
Unmanned aerial vehicle aerial photography small target detection method based on improved RT-DETR network
CN118521929A
Improved target detection method in automatic driving scene based on RT-DETR
CN118644824A
Underwater target detection method based on RT-Detrr model
CN118865087A
Fish anomaly detection method based on deep separation convolution and deformable self-attention
CN118865484A
Infrared ship detection method based on improved RT-DETR algorithm
CN119169453A
Cited By
River bank illegal building identification method based on multi-scale fusion
CN121121499A
Shared weight optimization-based target detection lightweight algorithm suitable for unmanned bathyscaph
CN121884096A