A faster R-CNN marine benthos detection method based on an improved attention mechanism

By improving the Faster R-CNN model and using ResNet50, MSCAM, RoIAlign, and ELM classifiers, the problem of insufficient accuracy in marine benthic organism detection was solved, achieving high-precision and efficient target detection.

CN119418367BActive Publication Date: 2025-12-05ZHEJIANG SCI-TECH UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411359698.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-12-05
Estimated Expiration
2044-09-27

AI Technical Summary

Technical Problem

Traditional marine benthic organism detection algorithms suffer from insufficient detection accuracy and real-time performance issues in complex marine environments. In particular, when dealing with multi-scale and multi-class targets, feature extraction is insufficient, affecting detection accuracy.

Method used

An improved Faster R-CNN model is adopted, using ResNet50 as the backbone network, adding a multi-scale channel attention mechanism (MSCAM) to enhance feature extraction, replacing the RoIPooling layer with the RoIAlign layer, and replacing the fully connected layer with an extreme learning machine (ELM) classifier to improve feature representation and classification accuracy.

Benefits of technology

It significantly improves the accuracy and generalization ability of marine benthic organism detection, with an average accuracy of 82.5%, and is suitable for the detection of targets of various sizes, enhancing the model's feature representation and classification efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119418367B_ABST
    Figure CN119418367B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of marine benthic organism detection, and provides a Faster R-CNN marine benthic organism detection method based on an improved attention mechanism. In view of the problems of complex environmental noise, diverse biological scales, insufficient target detection frame positioning and classification accuracy and the like of marine benthic organisms, an improved multi-scale channel attention mechanism is used to optimize a ResNet50 network, and the ResNet50 network is used as a backbone network of a Faster R-CNN model to enhance the feature extraction capability. Then, a RoIAlign layer with a bilinear interpolation technology is used to replace a traditional RoIPooling layer, so that the position accuracy of the detection frame is improved. In the final classification stage, an extreme learning machine (ELM) feedforward classification network is introduced to replace a full connection layer, so that the classification accuracy is improved. The average precision mean (mAP) of the model is as high as 82.5% and 81.36% respectively, and these results fully prove the effectiveness of the algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of marine benthic organism detection, and particularly relates to a Faster R-CNN marine benthic organism detection method based on an improved attention mechanism. BACKGROUND

[0002] With the continuous development of society and the progress of science and technology, the scarcity of land resources is increasingly apparent, and the development of marine resources has become a common goal pursued by the world. In recent years, the rapid development of computer vision technology has enabled humans to explore the seabed and develop marine ecological resources in a non-invasive manner using devices such as remotely operated vehicles (ROVs) and autonomous underwater vehicles (AUVs). Underwater target detection is an important research direction of computer vision technology in the development of marine resources. However, traditional target detection algorithms often perform poorly in terms of accuracy and real-time performance when dealing with complex underwater image scenarios such as color shift, low contrast, and blurring. With the widespread application and rapid development of deep learning technology in the field of image processing, complex tasks such as image classification, target detection, and image segmentation can be achieved with high precision and speed through the construction of deep neural network models. Marine benthic organism detection algorithms based on deep learning have thus continuously improved, providing more effective technical support for the development of marine resources.

[0003] Today, marine benthic organism detection algorithms mainly rely on optical images for feature extraction and can be divided into two-stage and single-stage detection algorithms. Two-stage detection algorithms first generate candidate regions and then perform classification and position fine-tuning. Although this method has a higher computational cost, it is more accurate in terms of precision and is suitable for scenarios where accuracy is highly valued. Girshick et al. first proposed a method that combines candidate regions with a convolutional neural network: R-CNN, which opened the door to two-stage detection algorithms. Subsequent improvements to the R-CNN algorithm include Fast R-CNN, Faster R-CNN, and Mask R-CNN and R-FCN, which were developed by upgrading the network structure. These methods have achieved good detection results. Single-stage target detection methods do not require the generation of candidate regions and directly convert the problem into an end-to-end regression problem. For example, the YOLO series, SSD series, and DSSD series. These methods directly use neural networks to detect and locate targets from the entire image, although they are faster, but the detection accuracy is slightly inferior. Wang et al. optimized the YOLO-v2 algorithm by increasing the grid size of the last convolution layer of the model and reducing the number of filters, improving the fast classification and recognition effect of fish images. Muksit et al. improved the YOLO-v3 algorithm by adjusting the upsampling step size and adding spatial pyramid pooling to improve detection accuracy.

[0004] Chinese patent CN116778311A proposes an underwater target detection method based on an improved Faster R-CNN. However, this method may have some limitations or deficiencies, especially in the selection of attention mechanisms and classifiers, which are different from our proposed scheme. Our scheme introduces a multi-scale channel attention mechanism (MSCAM), which can more effectively capture key features at different scales and enhance feature representation capabilities. In contrast, CN116778311A uses a more traditional spatial channel mixed attention mechanism (CBAM) and does not use a similar multi-scale processing method, which may result in insufficient feature extraction when dealing with complex scenes with multiple size targets, thereby affecting detection accuracy. Our method uses an extreme learning machine (ELM) feedforward classification network in the classification stage, which not only improves the model's generalization ability but also enhances classification efficiency. CN116778311A, on the other hand, uses standard fully connected layers or other conventional classifiers, which may not provide the same generalization ability and classification performance, especially when dealing with complex and diverse marine benthic organism data.

[0005] As the target detection research deepens, researchers have found that the concepts of single-stage and two-stage detection methods are not completely different. Some research works aim to leverage the advantages of two-stage detection methods to enhance the performance of single-stage detection methods. RefineDet divides single-stage detection into two sub-modules: anchor optimization module and target detection module. AlignDet uses deformable convolution (DCN) to mimic RoIAlign and obtain aligned features in the second stage. RepPoints draws on the ideas of optimization and feature alignment and proposes an anchor-free detector based on keypoint detection. The progress of single-stage detection methods also promotes the development of two-stage detection methods. CenterNet2 finds that a powerful anchor-free single-stage detector can be used as an RPN to predict accurate target likelihoods and provide overall detection scores. Combining the target likelihoods of RPN and the conditional classification scores of R-CNN can reduce the number of proposals while achieving higher performance, thereby reducing inference costs. Mandal et al. combined Faster R-CNN with three classification networks to achieve automatic detection and identification of fish species in underwater videos. SUMMARY

[0006] The purpose of the present application is to solve the problems of complex environment noise, diverse biological scales, insufficient target detection frame positioning and classification accuracy of marine benthic organisms, and propose a new marine benthic organism detection technology based on attention mechanism, bilinear interpolation technology and feedforward neural network. An improved multi-scale channel attention mechanism is used to optimize the ResNet50 network, and the network is used as the backbone network of the Faster R-CNN model to enhance the feature extraction capability. Then, the RoIAlign layer with bilinear interpolation technology is used to replace the traditional RoIPooling layer, so as to improve the position accuracy of the detection frame. In the final classification stage, the extreme learning machine (ELM) feedforward classification network is introduced to replace the fully connected layer to improve the classification accuracy.

[0007] The present application provides a Faster R-CNN marine benthic organism detection method based on an improved attention mechanism, comprising the following steps:

[0008] Step 1: Obtain a marine benthic organism target detection data set, each data in the marine benthic organism target detection data set comprising a marine benthic organism picture and a biological species label;

[0009] Step 2: Construct a Faster R-CNN marine benthic organism detection model based on an improved attention mechanism:

[0010] Replace the original convolutional neural network VGG16 in the Faster R-CNN model with a residual network ResNet50 network, and add a multi-scale channel attention mechanism MSCAM after stage 3 of the residual network ResNet50, which can enhance the attention of important features by processing features of different scales, and help feature fusion in stage 4.

[0011] Replace the original RoIPooling layer in the Faster R-CNN model with a RoIAlign layer to significantly reduce quantization errors;

[0012] In the final classification and bounding box regression part of the Faster R-CNN model, replace the original classification fully connected layer in the Faster R-CNN model with an extreme learning machine ELM classifier to improve the classification performance and generalization ability, and obtain a marine benthic organism detection model.

[0013] Step 3: Use the marine benthic organism target detection data set obtained in step 1 to train the marine benthic organism detection model, and obtain a trained marine benthic organism detection model. Obtain a marine benthic organism picture to be detected, input the trained marine benthic organism detection model, and obtain a detection result.

[0014] Preferably, in step S1, the marine benthic organism detection dataset includes the URPC2020 dataset and the RUOD dataset. The URPC2020 dataset contains four marine organism categories: echinus, holothurians, scallops, and starfish. The RUOD dataset contains ten biological detection categories: holothurian, echinus, scallops, starfish, fish, corals, diver, cuttlefish, turtle, and jellyfish. The two marine benthic organism target detection datasets are then divided into their respective training sets, validation sets, and test sets, and the image sizes in the datasets are uniformly set.

[0015] Preferably, in step S2, the input feature map of the multi-scale channel attention mechanism MSCAM is a three-dimensional tensor with a shape of CxHxW, where C is the number of channels, H and W are spatial dimensions. F F First, different scale feature maps are obtained according to different scale factors through a bilinear interpolation function. The specific calculation formula is as follows:

[0016]

[0017] wherein is the scale factor at different scales, is the input feature map at different scales, which is then input into the module of the channel attention mechanism to calculate the channel attention map The calculation expression of is as follows:

[0018]

[0019] wherein is a multilayer perceptron, indicating that the parameters pass through two fully connected layers and a ReLU activation function. and represent the calculation results of the features with channels after global average pooling and global maximum pooling, respectively. and represent the trainable parameters of the two fully connected layers.Finally, the original sigmoid activation function is replaced by a Hard sigmoid, which does not affect the performance, but further improves the calculation efficiency and effectively reduces the impact of the gradient vanishing problem.

[0020] Through the calculation of the channel attention mechanism, the attention maps at different scales are obtained. Then, these attention maps are added and averaged to obtain the fused attention map , the specific calculation formula is as follows:

[0021]

[0022] Wherein represent the number of scales;

[0023] Finally, the obtained comprehensive attention map is extended to the size shape of the input feature map F , and is applied to the input feature map F element by element to obtain the final output feature map F out .

[0024] Preferably, in step S2, the RoIAlign layer has a bilinear interpolation technology, which implements accurate sampling for each region of interest RoI, instead of the traditional RoIPooling layer which relies on simple integer coordinate mapping. Further reduce the quantization error, ensure that the features extracted from each candidate region are more faithful to the original information, especially for small object detection, RoIAlign layer can capture target details more subtly, greatly improve the positioning accuracy, and thus optimize the detection performance of the model.

[0025] Preferably, in step S2, the hidden layer parameters of the extreme learning machine ELM remain unchanged after initialization, and the ELM mainly calculates the weights on the output layer by using the least square method or the efficient solution of linear system through the pseudo-inverse matrix technology, which greatly reduces the training time of the Faster R-CNN model, improves the efficiency of model iteration and deployment, and further improves the classification performance and generalization ability.

[0026] Preferably, in step S3, the marine benthic organism detection model is trained, including: in the URPC2020 dataset, setting the training round Epoch to 100, the batch size BatchSize to 4, and the learning rate Learning-rate to 1e-4; in the RUOD dataset, setting the training round Epoch to 60, the batch size BatchSize to 4, and the learning rate Learning-rate to 1e-4.

[0027] The beneficial effects of the present application are:

[0028] The present application is directed to the increasing demand for marine resource development, the importance of marine benthic organism detection, and the challenges faced by traditional detection algorithms in complex marine environments. A series of improvements are made based on the two-stage target detection framework Faster R-CNN, taking advantage of its multi-scale, multi-class, and high-precision detection performance. The Faster R-CNN-ResNet50-MSCAM-RoIAlign-ELM marine benthic organism detection model is proposed to improve the detection speed. The backbone network is updated to ResNet50 and a multi-scale channel attention mechanism (MSCAM) is added to effectively highlight key features and consider different scale information, significantly enhancing the feature representation capability, especially for detecting multiple size targets. The RoIAlign layer replaces the original RoIPooling layer, using bilinear interpolation method to eliminate quantization error, further improving the accuracy of detection results. The extreme learning machine (ELM) feedforward classification network is used in the classification regression stage, which not only increases the generalization ability of the model, but also improves the classification efficiency. Through experimental verification, the average precision (mAP) of the proposed model on two marine benthic organism datasets is up to 82.5% and 81.36%, respectively, fully demonstrating the effectiveness of the proposed algorithm. BRIEF DESCRIPTION OF DRAWINGS

[0029] Figure 1 is a BottleNeck structure diagram

[0030] Among them, the 1x1 convolution layer along the input channel is used for dimension reduction to reduce the number of channels, the BN layer is used to standardize the input to accelerate convergence, the ReLU layer is used to introduce non-linear activation to prevent gradient disappearance, the 3x3 convolution layer is used to capture features on the feature map with reduced channel number and reduce calculation parameters, and the last 1x1 convolution layer is used for dimension increase to restore the number of channels. The left dashed line acts as an identity mapping between the BottleNeck layers in each stage, and the right down-sampling solid line acts as a dimension matching between stages through the 1x1 convolution layer dimension increase operation.

[0031] Figure 2 is a traditional ResNet50 network structure diagram

[0032] Wherein, the traditional ResNet50 network is composed of input layer, stage0 layer, stage1 layer, stage2 layer, stage3 layer, stage4 layer, global average pooling layer Avg layer, full connection layer FC layer and output layer in turn; wherein, the stage0 layer is composed of 7*7 convolution layer, BN layer, ReLU activation layer and 3*3 maximum pooling layer 7*7 convolution layer, BN layer, ReLU activation layer and 3*3 maximum pooling layer in turn, the stage1 layer includes 3 BottleNecks, the stage2 layer includes 4 BottleNecks, the stage3 layer includes 6 BottleNecks, and the stage4 layer includes 3 BottleNecks.

[0033] Figure 3 Figure is a channel attention mechanism structure diagram

[0034] Figure 4 Figure is a multi-scale channel attention mechanism structure flow chart

[0035] Figure 5 Figure is a Fater R-CNN-ResNet50-MSCAM-RoIAlign-ELM marine benthic organism detection network structure diagram

[0036] Figure 6 Figure is a training visualization of the model of the present application

[0037] Wherein, (a) and (b) are the training visualization process of the model on the URPC2020 dataset; (c) and (d) are the training visualization process of the model on the RUOD dataset.

[0038] Figure 7 Figure is the mAP growth curve of each algorithm on the URPC2020 dataset

[0039] Figure 8 Figure is the mAP growth curve of each algorithm model on the RUOD dataset DETAILED DESCRIPTION

[0040] The present application will be further described below in conjunction with the accompanying drawings.

[0041] The present application comprises the following steps:

[0042] Step 1: Obtain marine benthic organism images, prepare data sets and perform pretreatment

[0043] Two data sets specially designed for evaluating and optimizing the performance of marine benthic organism detection, i.e., URPC2020 and RUOD data sets, are selected in the experimental process of the present application.

[0044] The URPC2020 dataset is derived from the Underwater Robot Perception Challenge, focusing on four types of marine benthic organisms: echinus, holothurians, scallops, and starfish. The dataset follows the VOC format and consists of two subdirectories: "JPEGImages" and "Annotations". The "JPEGImages" directory contains 7543 images, of which 5543 are labeled as the training set. The "Annotations" directory details the species and their specific locations within each image, providing detailed annotation information for model training.

[0045] The RUOD dataset is specifically designed to address the inherent issues of uneven lighting, color attenuation, and suspended particle interference in underwater environments. Its goal is to establish a comprehensive benchmark platform to promote and measure the progress of marine benthic organism detection algorithms. The dataset also follows the VOC format and contains 14000 high-resolution marine organism images and over 74903 carefully annotated instances, covering a wide range of underwater species, including echinus, holothurian, scallops, starfish, fish, corals, diver, cuttlefish, turtle, jellyfish. The dataset is divided into training and test sets in a 9:1 ratio, with the training set further divided into training and validation sets in a 9:1 ratio for training purposes, and the test set for final performance testing.

[0046] Step 2: Replace the Faster R-CNN backbone network with a ResNet50 network with improved attention mechanism

[0047] The original Faster R-CNN model's backbone network, VGG16, has a high parameter density of fully connected layers, significantly increasing the computational cost and memory requirements. Especially when GPU resources are scarce, it can easily form a performance bottleneck. In addition, its limited structural depth restricts its learning ability when facing complex scenes and subtle features, and gradient vanishing and insufficient generalization are also its weaknesses. These factors make it difficult to meet the needs of contemporary model selection. The deep residual network ResNet50, with its 50-layer depth and expanded model capacity, enables the network to capture more subtle feature details, which is expected to significantly enhance model performance. The introduction of attention mechanisms can further enhance the model's focus on important features while suppressing irrelevant or secondary features, thereby improving the model's performance.

[0048] (2.1) ResNet50 network

[0049] As shown in the attachedFigure 1 As shown, the ResNet50 network utilizes BottleNeck residual blocks and employs 1×1 convolutional layers for dimensionality reduction and upscaling, reducing the computational cost of the intermediate 3×3 convolutional layers, thereby improving computational efficiency and saving computational resources. Each convolutional layer is followed by a ReLU activation function, introducing a non-linear transformation that helps the model learn more complex feature representations. The solid shortcut on the right side of the diagram applies downsampling, using a 1×1 convolutional layer for dimensionality upscaling, mainly for matching the dimensionality of the output channels from the previous stage with the input channels in the current stage, primarily affecting the first layer of each stage. The dashed shortcut on the left side maintains the same input and output dimensions through direct identity mapping, acting on the later layers of each stage in a concatenated manner to further deepen the network.

[0050] According to the appendix Figure 2 As shown, the ResNet50 network structure can be divided into five stages. In this underwater target detection study, the first four stages are mainly used for feature extraction and processing, while the last stage is mainly used for target classification. Stage 0 is for input preprocessing, performing resizing and normalization on the input image. Then, through feature extraction in stages 1 to 3, the edge texture features, object part and shape features, and features that determine the position and size of the object in the input image are gradually learned and understood. Finally, through feature fusion in stage 4, the high-resolution and rich semantic information obtained is fused with features from other branches to generate high-quality candidate boxes and perform accurate target classification.

[0051] (2.2) Multiscale Channel Attention Mechanism (MSCAM)

[0052] like Figure 4 The structure of the multi-scale channel attention mechanism is as follows:

[0053] The input feature map module will input the feature map F First, the data is fed into the scaling module, where a bilinear interpolation algorithm is used to scale the feature map. F The dimensions are adjusted proportionally to obtain the adjusted feature map. F cx Subsequently, feature maps F cx Passed to the channel attention module (e.g.) Figure 3 As shown in the diagram, in this module, attention weight matrices are learned in different channel dimensions through global max pooling and global average pooling operations combined with a multilayer perceptron (MLP) structure. These attention weight matrices are further multiplied with the input feature map channel by channel to generate channel attention feature maps. Mcx ; next, the channel attention feature maps from different scales M cx are integrated via a weighted average fusion module to form a comprehensive multi-scale channel attention feature map M c , finally, the comprehensive feature map M c is mapped back to the original input feature map through an expansion feature map module to generate the final output feature map F out , achieving effective processing and enhancement of the input data.

[0054] To further enhance the model's attention to important features, the present application proposes adding a multi-scale channel attention mechanism after stage3 of the deep residual network ResNet50, which processes features of different scales to enable the model to further identify detection objects of different sizes and help the model more efficiently utilize computing resources to improve detection and classification accuracy. Figure 3 As shown in the accompanying

[0055] The input feature map F is a three-dimensional tensor with a shape of CxHxW, where C is the number of channels, and H and W are spatial dimensions. F The input feature map

[0056] (1)

[0057] where is the scale factor at different scales, is the input feature map at different scales, which is then input into the channel attention mechanism module to calculate their respective channel attention maps The calculation expression of the channel attention map is as follows:

[0058] (2)

[0059] (3)

[0060] where is a multi-layer perceptron, indicating that the parameters pass through two fully connected layers and a ReLU activation function; and represent the calculation results of the features with channels after global average pooling and global maximum pooling, respectively, and Then, the trainable parameters of two full connection layers are represented; finally, the original sigmoid activation function is replaced by Hard sigmoid, which improves the computational efficiency without affecting the performance and effectively reduces the influence of gradient vanishing problem.

[0061] Through the calculation of the channel attention mechanism, attention maps at different scales are obtained Then, these attention maps are added and averaged to obtain the fused attention map The specific calculation is as follows:

[0062] (4)

[0063] Wherein represents the number of scales, that is, the number of different proportions of interpolated feature maps in the multi-scale channel attention module. By fusing attention information from different scales, a comprehensive attention map is generated, which can effectively capture the importance of features at multiple scales. Finally, the comprehensive attention map obtained is expanded to the size and shape of the input feature map F , and is applied to the input feature map F element by element to obtain the final output feature map F out .

[0064] The feature map refined by the multi-scale channel attention mechanism significantly enhances the ability of the ResNet50 network to analyze core features, while effectively reducing irrelevant and noise components, achieving precise pruning and selection at the feature level. This mechanism, through its unique multi-scale insight, can extract image information from micro to macro and multiple directions, covering a wide field of view of details, and then selectively activate features. This gives the network the intelligence to dynamically adjust its attention focus, enabling it to flexibly respond to the diversity of external inputs. In summary, this design effectively promotes the performance leap of the ResNet50 network in the fourth stage of performing target detection and classification tasks, not only improving the detection accuracy, but also enhancing the accuracy of classification judgment.

[0065] Step 3: Introduce RoIAlign layer and extreme learning machine (ELM) feedforward classification network

[0066] In the Faster R-CNN model, although the RoIPooling layer successfully converts candidate regions of arbitrary size into feature maps of uniform specifications, its coarse-grained sampling strategy based on integer coordinates introduces non-negligible quantization errors. This error is caused by the non-accurate matching between the RoI boundaries and the feature map grid, especially when dealing with small-scale targets, the cumulative effect of the error is particularly evident, which may lead to distortion of key feature information, thereby weakening the detection performance.

[0067] (3.1) RoIAlign layer

[0068] In view of this, the present application proposes to replace the traditional RoIPooling layer with the RoIAlign layer, and introduce the bilinear interpolation technology to implement accurate sampling for each RoI instead of relying on simple integer coordinate mapping. This innovative method significantly reduces the quantization error, ensuring that the features extracted from each candidate region are more faithful to the original information, especially for small object detection, the RoIAlign layer can capture target details more subtly, greatly improving the positioning accuracy. The leap progress of positioning accuracy is of great significance for target detection tasks, because it is directly related to the geometric accuracy of the detection box, thereby optimizing the detection performance of the model as a whole.

[0069] Moreover, the RoIAlign layer indirectly enhances the generalization ability of the model by reducing the quantization error. In the training stage, more accurate feature extraction prompts the model to learn more robust representations, even if it faces data that has not been experienced or complex and variable real-world scenarios, it can also maintain a high level of detection accuracy. This enhanced generalization ability is particularly critical in the field of object detection, considering the uncertainty and diversity of real-world application environments, the model needs to have strong adaptability to maintain consistent and reliable performance under various conditions. In summary, the introduction of the RoIAlign layer not only directly promotes the improvement of detection accuracy, but also ensures the outstanding stability and reliability of the model in complex and variable real-world applications in the long run.

[0070] (3.2) Extreme learning machine (ELM) classifier

[0071] In order to refine the model training process, improve training stability, strengthen parallel computing performance, improve model generalization ability, and simplify the tediousness of hyperparameter adjustment, the present application proposes to replace the traditional fully connected layer in the classification part of the Faster R-CNN model with an extreme learning machine (ELM) classifier. In the Faster R-CNN model, the classifier plays a core role in classifying candidate regions (Region Proposals), and the integration of ELM significantly optimizes this key link. Since the hidden layer parameters of ELM remain unchanged after initialization, its training process mainly focuses on the calculation of the output layer weights. This step can be efficiently completed by solving linear systems, usually using least squares method or pseudo-inverse matrix technology, which is in sharp contrast to the traditional deep learning model that needs to update all levels of weights through backpropagation iteration. This characteristic of ELM greatly reduces the training time of the Faster R-CNN model, improves the efficiency of model iteration and deployment.

[0072] After improvements, the final Faster R-CNN-ResNet50-MSCAM-RoIAlign-ELM marine benthic organism detection model was obtained, as shown in the attached figure. Figure 4 As shown, the dataset images are preprocessed to a specific size and fed into the feature extraction network. After feature extraction by the ResNet50-MSCAM backbone network, feature maps are obtained. The obtained feature maps are then input into the region proposal network to generate candidate regions that may contain targets. Prior boxes (anchors) of different scales and proportions are classified and bounding box regressions are performed to generate more accurate proposal boxes. Then, the RoIAlign layer is used to ensure that the feature map is accurately aligned with the RoI boundary using bilinear interpolation, eliminating quantization errors and thus improving detection accuracy. Finally, the output of the RoIAlign layer is fed into two sub-networks for classification and bounding box regression. One sub-network uses the feedforward classification network ELM to classify the target and determine whether there is a target in the region, while the other sub-network is used for bounding box regression to accurately locate the target's position.

[0073] Step 4: Set training hyperparameters

[0074] To evaluate the performance differences between the proposed improved Faster R-CNN model and existing mainstream object detection models, we selected a series of widely used object detection algorithms for comparative experiments. The general training parameters for each algorithm in this experiment are set as follows: To ensure the stability and robustness of the training process, the Adam optimizer was uniformly selected for each algorithm, and a cosine decay learning rate adjustment strategy was uniformly chosen to ensure a smooth transition during training. Transfer learning was adopted, using pre-trained weights, which saves computational resources while further improving model learning efficiency and performance. The IOU threshold was 0.5. The remaining parameters and model sizes for each algorithm are listed in Table 1.

[0075] Table 1. Parameter settings of the algorithm in this paper compared with those in other comparative experiments.

[0076]

[0077] Step 5: Input the dataset into the model for training.

[0078] Based on steps 2 and 3, the proposed Faster R-CNN-ResNet50-MSCAM-RoIAlign-ELM marine benthic organism detection model is obtained. In step 1, the training dataset was processed, and in step 4, the training hyperparameters were set. Next, the training and validation sets need to be input into the model for training. (See attached...) Figure 6 The image shows a visualization of the training process of the model of this invention. (See appendix.) Figure 6(a)Part of the training visualization process of the model of the present application on the URPC2020 dataset, after 100 epochs, the mAP index of the model gradually rises and finally tends to be stable, reaching a maximum of nearly 82.5%, and the training loss and validation loss also tend to be stable with training, and there is no back jump, which shows that the model training process does not appear overfitting phenomenon, and the overall implementation of the fitting effect is good. Figure 6 (b)Part of the training visualization process of the present application on the RUOD dataset, because the dataset has high-quality images, the training loss and validation loss of the model tend to be stable after 60 epochs, and there is no overfitting phenomenon, the mAP index also steadily rises and finally tends to be stable, reaching a maximum of nearly 81%.

[0079] In order to better reflect the performance of the model of the present application, we carried out a series of ablation experiments on the URPC2020 dataset, by strategically removing certain parts or functions of the model, to accurately evaluate the relative importance and actual utility of each component. Under the premise that the experimental environment remains unchanged, observe the influence of adding and removing a certain component on the overall model performance. The specific experimental results are shown in Table 2 (where ① represents ResNet50-MSCAM, ② represents RoIAlign, and ③ represents ELM classifier).

[0080] Table 2 Effectiveness analysis of adding each component of the Faster R-CNN model on URPC2020

[0081]

[0082] Based on the analysis of the experimental data in the table, under the premise that the Intersection over Union (IoU) threshold is set to 0.5 and the confidence criterion is also 0.5, the test result mAP of the Faster R-CNN original model backbone network replaced by ResNet50 is 77.90%. After embedding the multi-scale channel attention mechanism (MSCAM) in the original ResNet50 network to form the ResNet50-MSCAM backbone network, the test result mAP has a 1.2% improvement, which reflects the effectiveness of MSCAM in feature refinement and enhancement; after replacing the relatively rough RoIPooling layer in the original model with the more accurate RoIAlign layer, the test result mAP has a 2.4% improvement, which confirms the superiority of RoIAlign in handling irregular shapes of bounding boxes. After adding the ResNet50-MSCAM backbone network and the RoIAlign layer to the original model at the same time, the test result mAP has a 3.1% improvement, which further confirms the important role of the two components. Finally, the three components proposed in this paper are integrated into the original model, and the test result mAP reaches 82.5%, which is 4.6% higher than the baseline model. In addition, focusing on the average precision (AP) performance of four specific detection categories in the data set, the results show that the AP values of these categories show a stable growth trend under the synergistic effect of the components. In summary, the experimental results consistently confirm that the proposed components play an indispensable role in improving the recognition accuracy and generalization ability of the Faster R-CNN model.

[0083] Step 6: Input test data to obtain prediction results

[0084] The optimal weight parameters obtained by training on two data sets respectively in step 5 are loaded into the model, and then the test data set is input into the model to obtain the test results. In order to scientifically evaluate the performance of the proposed model, this study adopts multiple key performance indicators, including Mean Average Precision (mAP), Average Precision (AP), Precision, Recall, Accuracy and F1 score. The following are the definitions and calculation formulas of these indicators:

[0085] (5)

[0086] (6)

[0087] (7)

[0088] (8)

[0089] (9)

[0090] Table 3 shows the performance comparison results of the proposed marine benthic organism detection algorithm model after 100 training iterations on the URPC2020 dataset with all algorithms in step 4, where the detection index always ranks first and can achieve the highest mAP value of 82.5% on the validation set. Secondly, in terms of average precision (AP) of specific categories such as echinus, holothurian, scallop, and starfish, our method also performs well. This means that our algorithm has better detection effect for these marine organisms, which is very important for practical application. In addition, in terms of F1, Precision and Recall, our method is still competitive compared with other methods. This shows that our algorithm can achieve a good balance between Precision and Recall, thereby better identifying the target objects in the image. Although our method is slightly higher in terms of computational complexity and the number of parameters compared with some other methods, it can still meet the requirements in terms of real-time performance, and by sacrificing detection speed, it can achieve higher detection accuracy.

[0091] Table 3 Comparison results on URPC2020 dataset

[0092]

[0093] Appendix Figure 7 The average precision mean (mAP) growth curve of each algorithm model on the URPC2020 dataset after 100 batches of training is presented in Table 3, where our model algorithm grows steadily and always leads after 25 rounds and finally achieves the highest mAP value.

[0094] Table 4 shows the performance of the model algorithm of the present application and other algorithms on the RUOD dataset. The comparison indicators include the Mean Average Precision (mAP) of each algorithm, and the F1 score, Precision and Recall of the echinus, which is the most numerous class. In comparison with each algorithm, the mAP value of the algorithm of the present application achieves the highest value, which indicates that the overall performance is very good. For the representative class echinus, the Average Precision (AP) of the algorithm in this paper is still leading, and a good balance between Precision and Recall is achieved. Since the algorithm of the present application belongs to a two-stage detection model, it may not be as good as other algorithms in terms of computational complexity and detection speed, but this setting can bring higher detection accuracy, which also reflects the advantage of the algorithm in this paper. This comprehensively shows that the algorithm model proposed in the present application effectively improves the target detection effect of marine organisms.

[0095] Table 4 Comparison results on RUOD dataset

[0096]

[0097] Appendix Figure 8 The average precision mean (mAP) growth curve of each algorithm model on the RUOD dataset after 60 batches of training is shown. Due to the diversity of detection categories, the algorithm of the present application has shown advantages from the initial stage, and its detection accuracy curve has consistently led the way throughout the training process until reaching the peak value. These results further confirm the superiority of the algorithm of the present application in detection performance compared with other algorithms.

[0098] In order to meet the increasing demand for marine resource development, the detection of marine benthic organisms is becoming more and more important. Traditional detection algorithms face challenges in complex marine environments. In this paper, a series of improvements are made based on the two-stage target detection framework Faster R-CNN. The advantages of Faster R-CNN in multi-scale, multi-class and high-precision detection are utilized, and its problems in detection speed are improved. A Faster R-CNN-ResNet50-MSCAM-RoIAlign-ELM marine benthic organism detection model is proposed. The backbone network is updated from the default configuration to ResNet50, and MSCAM is added on this basis. This improvement effectively highlights the key features and takes into account the information of different scales, significantly enhancing the feature representation capability, especially for detecting targets of various sizes. RoIAlign replaces the original RoIPooling layer, which uses bilinear interpolation to eliminate quantization errors, further improving the accuracy of the detection results. In the classification regression stage, the extreme learning machine (ELM) feedforward classification network is adopted, which not only increases the generalization ability of the model, but also improves the classification efficiency. In summary, through innovative improvements, the model can efficiently and accurately complete the target detection task of marine benthic organisms, providing strong support for the scientific research of marine benthic organisms.

Claims

1. A Faster R-CNN marine benthic organism detection method based on an improved attention mechanism, characterized in that, The method comprises the following steps: Step 1: obtaining a marine benthic organism target detection data set, each data in the marine benthic organism target detection data set comprising a marine benthic organism picture and a biological species label; Step 2: constructing a Faster R-CNN marine benthic organism detection model based on an improved attention mechanism to increase the generalization capability: replacing a convolutional neural network VGG16 originally in the Faster R-CNN model with a residual network ResNet50 network, adding a multi-scale channel attention mechanism MSCAM after stage 3 of the residual network ResNet50, processing features of different scales to enhance the attention of important features of the model; replacing a RoIPooling layer originally in the Faster R-CNN model with a RoIAlign layer to significantly reduce quantization errors; replacing a classification full connection layer originally in the Faster R-CNN model with an extreme learning machine ELM classifier in a final classification and bounding box regression part of the Faster R-CNN model to obtain a marine benthic organism detection model; Step 3: training the marine benthic organism detection model using the marine benthic organism target detection data set obtained in step 1 to obtain a trained marine benthic organism detection model; obtaining a marine benthic organism picture to be detected and inputting the marine benthic organism picture to the trained marine benthic organism detection model to obtain a detection result.

2. The Faster R-CNN benthic organism detection method based on an improved attention mechanism according to claim 1, wherein, In step S1, the marine benthic organism detection data set comprises a URPC2020 data set and a RUOD data set. 3.The Faster R-CNN benthic organism detection method based on improved attention mechanism according to claim 1, wherein, In step S2, Input feature map of the multi-scale channel attention mechanism MSCAM F is a three-dimensional tensor with a shape of CxHxW, where C is the number of channels, and H and W are spatial dimensions; input feature map F First, different scale feature maps are obtained according to different scale factors through a bilinear interpolation function, and the specific calculation formula is as follows: ; wherein is a scale factor at different scales, is an input feature map at different scales, respectively into the module of channel attention mechanism, to calculate the channel attention map of each The calculation expression is as follows: ; ; wherein is a multilayer perceptron, representing parameters going through two fully connected layers and a ReLU activation function; and and represent the calculation results of the feature of channel c after global average pooling and global maximum pooling, respectively, and represent the trainable parameters of the two fully connected layers; finally, the original sigmoid activation function is replaced by a Hard sigmoid. Through the calculation of the channel attention mechanism, attention maps at different scales are obtained Then, the attention maps are added and averaged to obtain a fused attention map The specific calculation formula is as follows: ; wherein X represents the number of scales; Finally the resulting integrated attention map is extended to the size shape of the input feature map and applied element-wise to the input feature map to obtain the final output feature map F F F out .​​ 4.The Faster R-CNN benthic organism detection method based on improved attention mechanism according to claim 3, wherein, In step S2, the RoIAlign layer has a bilinear interpolation technology and performs accurate sampling on each region of interest RoI.

5. The Faster R-CNN benthic organism detection method based on an improved attention mechanism according to claim 4, wherein, In step S2, the hidden layer parameters of the extreme learning machine ELM remain unchanged after initialization.

6. The Faster R-CNN benthic organism detection method based on an improved attention mechanism according to claim 1, wherein, In step S3, the marine benthic organism detection model is trained, comprising: in the URPC2020 data set, setting a training round number Epoch to 100, a batch size BatchSize to 4, and a learning rate Learning-rate to 1e-4; and in the RUOD data set, setting a training round number Epoch to 60, a batch size BatchSize to 4, and a learning rate Learning-rate to 1e-4.

Citation Information

Patent Citations

  • Underwater target detection method based on improved Faster R-CNN

    CN116778311A