A biometric detection method and system suitable for underwater unmanned equipment
By processing the underwater image dataset and improving the structure of the YOLOv8 model, the problem of traditional sonar technology in identification in the underwater environment is solved, and the accuracy and robustness of underwater biometrics are achieved, and complex underwater conditions are adapted to complex underwater conditions.
Patent Information
- Application Number
- CN202410420654.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-09
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-04-09
AI Technical Summary
Traditional sonar technology is difficult to accurately identify small or dense underwater organisms in underwater environments, and high power consumption limits the functions of unmanned equipment. The existing YOLOv8 model is difficult to achieve accurate recognition effect in underwater image processing.
By removing outliers and fusion of high-quality data sets on the underwater image data set, the structure of the YOLOv8 model is improved, and the receptive field attention convolution layer and Focal SIoU indicators are used to enhance the model's adaptability and recognition accuracy to the underwater environment.
It significantly improves the accuracy and speed of underwater biometric detection, enhances the robustness of the model, can better capture the details and textures of underwater organisms, reduces the probability of missing detection, and adapts to complex underwater conditions.
Smart Images

Figure CN118537713B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a biometric detection method and system suitable for underwater unmanned equipment. Background Art
[0002] As we all know, the ocean covers about 71% of the earth's surface, containing a large number of known or unknown species, which are valuable biological wealth for mankind. By using underwater biological classification and identification techniques, scientists can better understand the diversity of marine life, and conduct in-depth research on the distribution, quantity and relationship of different species in the ocean, thereby revealing the structure and function of the marine ecosystem. This is of vital importance for the effective protection and management of marine biological resources, the promotion of biodiversity conservation, and the making of scientifically based environmental protection decisions.
[0003] Traditional underwater unmanned equipment usually uses sonar technology to identify and detect underwater organisms. However, with the further development of underwater missions, the underwater environment faced by underwater unmanned equipment has become more and more complex. Sonar technology has also shown some shortcomings in this process, such as: the resolution of the sonar system is limited by the wavelength, and in low-frequency sonar, it may not be able to accurately identify small or dense underwater organisms; the complex terrain and water temperature differences in the underwater environment will greatly affect the propagation and reflection of sonar signals, and thus affect the identification and detection of organisms; high-power sonar systems usually generate a lot of energy consumption when working, but some underwater unmanned equipment cannot carry enough energy due to size limitations, which limits the function of the sonar system.
[0004] As an excellent target detection algorithm in deep learning technology, the YOLOv8 model can effectively avoid the difficulties currently encountered by sonar technology. However, compared with shooting and obtaining easy-to-process image datasets on land, the acquisition of underwater image datasets is quite challenging. The dynamic and uncontrollable nature of the underwater environment makes the shooting process full of uncertainty. Underwater images may be blurred, deformed, and have changes in brightness and color. The existing YOLOv8 model is difficult to achieve accurate recognition results. Summary of the invention
[0005] The purpose of the present invention is to propose a biometric detection method suitable for underwater unmanned equipment. By processing the training data set and rebuilding the YOLOv8 model, the obtained underwater biometric recognition model can accurately identify the organisms in underwater images;
[0006] Another object of the present invention is to propose a biometric detection system suitable for underwater unmanned equipment, which significantly improves the accuracy of underwater biological detection and recognition and reduces the probability of missing biological detection in images, thereby enhancing the performance of underwater unmanned equipment when performing biometric detection tasks in complex underwater environments.
[0007] To achieve this object, the present invention adopts the following technical solutions:
[0008] A biometric detection method applicable to underwater unmanned equipment comprises the following steps:
[0009] S1. Dataset processing: obtaining an underwater image dataset, removing outlier images in the underwater image dataset, dividing the remaining images in the underwater image dataset into a high-quality dataset and a common dataset, fusing the images in the high-quality dataset with the images in the common dataset to obtain a fused dataset; and using the fused dataset as a training dataset;
[0010] S2. Model construction: Based on the YOLOv8 model, the convolutional layer in the Backbone module of the YOLOv8 model is replaced with the receptive field attention convolutional layer, the C2f layer in the Neck module is fused with the large separation convolutional attention module, a receptive field block is added before the Detect layer in the Head module, and the Focal SIoU is used as an indicator to calculate the similarity between bounding boxes for bounding box regression;
[0011] S3, model training: divide the training data set obtained in S1 into a training set, a test set and a validation set, and train the underwater biological recognition model;
[0012] S4. The underwater unmanned equipment is loaded with the underwater biometric recognition model trained in S3, and the underwater unmanned equipment is placed in water to perform the biometric recognition detection task, and the detection results with confidence levels lower than the threshold are saved and recorded for updating the underwater image dataset.
[0013] The order of S1 and S2 can be reversed
[0014] Furthermore, in S1, the outlier image in the underwater image data set is identified using Formula 1;
[0015]
[0016] Among them, x (c,s,d) Represents the three parameters corresponding to any image in the underwater image dataset, μ (c,s,d) represents the mean of all image data values, σ (c,s,d) Represents the standard deviation of all image data values, P (α,γ,β) It represents the abnormal detection value set according to the water quality characteristics, c represents contrast, s represents clarity, and d represents detail.
[0017] Furthermore, in S1, the remaining images of the underwater image dataset are evaluated using Formula 2, and the remaining images of the underwater image dataset are divided into a high-quality dataset and a normal dataset according to the evaluation result;
[0018] QS=exp(C·w c )+exp(D·w d )+exp(Sharpness·w s )+exp(Saturation·w sat )+exp(N·w n ) Formula 2
[0019] Among them, QS represents the quality score of the image, C represents the contrast of the image, D represents the details of the image, Sharpness represents the clarity of the image, Saturation represents the color vividness of the image, N represents the image noise level, and w c represents the contrast weight, w d represents the weight of the details, w s Indicates the weight of clarity, w sat Indicates the weight of color vividness, w n Represents the weight of the noise.
[0020] Furthermore, the S1 also includes a step of preprocessing the images in the training data set:
[0021] Mosaic data enhancement and HSV color space methods are used to perform data enhancement on the image;
[0022] Normalize the size of the data augmented images.
[0023] Furthermore, in S2, the calculation formula of Focal SIoU is Formula 3:
[0024]
[0025] Among them, IoU represents the intersection over union ratio between two boxes, C D is the distance cost between two boxes; C S represents the shape cost between two boxes, α represents the weight of positive and negative samples, and R s Indicates the ratio of the biological target bounding box to the entire image, ∈≤0.00001.
[0026] Furthermore, the Backbone module of the YOLOv8 model includes a first convolutional layer, a second convolutional layer, a third convolutional layer, a fourth convolutional layer and a fifth convolutional layer arranged in sequence;
[0027] In S2, the second convolutional layer, the third convolutional layer, the fourth convolutional layer and the fifth convolutional layer are respectively replaced by receptive field attention convolutional layers, and each of the receptive field attention convolutional layers is connected to different C2f layers in the Backbone module.
[0028] Furthermore, in S2, in the Neck module of the YOLOv8 model, four C2f layers are respectively fused with large separation convolutional attention modules to obtain LSKAC2f layers; each of the LSKAC2f layers contains at least two LSKAs.
[0029] Furthermore, in S2, the Head module of the YOLOv8 model has three Detect layers, and a receptive field block is added before each Detect layer;
[0030] The receptive field block increases the receptive field of the feature map output by the Neck module and then inputs it into the Detect layer.
[0031] A biometric detection system applicable to underwater unmanned equipment adopts the above-mentioned biometric detection method applicable to underwater unmanned equipment; the system comprises an image collection module, an image processing module and a data storage module;
[0032] The image collection module is used to store and acquire underwater images;
[0033] The image processing module is loaded with the underwater biological recognition model trained in step S3, and the image processing is used to input the underwater image into the underwater biological recognition model to obtain the biological species and confidence of the underwater image;
[0034] The data storage module is used to store underwater images and their corresponding biological species and confidence levels, and to save underwater images with confidence levels lower than a threshold value for updating an underwater image data set.
[0035] A computer-readable storage medium stores computer-executable instructions for executing the above-mentioned biometric detection method applicable to underwater unmanned equipment.
[0036] The technical solution provided by the present invention may include the following beneficial effects:
[0037] 1. The present invention improves the image quality of the entire data set by identifying images with abnormal parameters and improving the quality of ordinary pictures with high-quality images, enhances the expressiveness of underwater biological features in the image, and is more conducive to the learning of neural networks, thereby providing richer and more accurate training data for deep learning models.
[0038] 2. The underwater organism recognition model of the present invention has a better performance in underwater organism classification tasks, can better capture the details and textures of underwater organisms, enhance the adaptability of the model to various underwater conditions, improve the detection speed of the model, and improve the robustness and accuracy of the model. The model of the present invention can enable underwater unmanned equipment to have better detection capabilities and higher classification and recognition accuracy in underwater organism classification tasks.
[0039] 3. The improved Focal SIoU in the present invention, as an improved IoU indicator, can not only better measure the similarity between two bounding boxes, but also optimize the regression of the bounding boxes. In addition, the problem that the appearance and size differences between different underwater organisms are often large is taken into account. The relationship between the size of the organism and the entire image is considered in the calculation process. At the same time, it can play a certain role in solving the problem of sample imbalance in underwater organism classification, and improve the recognition accuracy of the YOLOv8 model in underwater organism classification tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is a schematic flow diagram of the method of the present invention;
[0041] Figure 2 It is a schematic diagram of the network structure of the underwater biometric recognition model;
[0042] Figure 3 It is a schematic diagram of the structure of the LSKAC2f layer;
[0043] Figure 4 It is a workflow diagram of underwater unmanned equipment;
[0044] Figure 5 It is the recognition result of the underwater biological recognition model trained by the underwater image dataset;
[0045] Figure 6 The fusion data set is used as the training data set, and the recognition result of the underwater biological recognition model obtained by training is obtained. DETAILED DESCRIPTION
[0046] Combine the following Figures 1 to 6 , describing a biometric detection method and system suitable for underwater unmanned equipment according to an embodiment of the present invention.
[0047] Reference Figure 1 and Figure 2 , a biometric detection method for underwater unmanned equipment, comprising the following steps:
[0048] S1. Dataset processing: obtaining an underwater image dataset, removing outlier images in the underwater image dataset, dividing the remaining images in the underwater image dataset into a high-quality dataset and a common dataset, fusing the images in the high-quality dataset with the images in the common dataset to obtain a fused dataset; and using the fused dataset as a training dataset;
[0049] S2. Model construction: Based on the YOLOv8 model, the convolutional layer in the Backbone module of the YOLOv8 model is replaced with the receptive field attention convolutional layer, the C2f layer in the Neck module is fused with the large separation convolutional attention module, a receptive field block is added before the Detect layer in the Head module, and the Focal SIoU is used as an indicator to calculate the similarity between bounding boxes for bounding box regression to obtain an underwater biological recognition model;
[0050] S3, model training: divide the training data set obtained in S1 into a training set, a test set and a validation set, and train the underwater biological recognition model;
[0051] S4. The underwater unmanned equipment is loaded with the underwater biometric recognition model trained in S3, and the underwater unmanned equipment is placed in water to perform the biometric recognition detection task, and the detection results with confidence levels lower than the threshold are saved and recorded for updating the underwater image dataset.
[0052] The method of the present invention is directed to the processing of underwater images by underwater unmanned equipment. Compared with shooting and obtaining easy-to-process image datasets on land, the acquisition of underwater image datasets is quite challenging. The dynamic and uncontrollable nature of the underwater environment makes the shooting process full of uncertainty. The unevenness of water quality may cause the image to appear blurred and hazy, and the presence of water flow may cause the image to shake and deform. In addition, the propagation of light underwater is affected by the absorption and scattering of the water body, which means that there may be huge changes in the lighting conditions at different depths and waters, which in turn affects the brightness and color performance of the image. These problems make the quality of underwater image datasets generally low. It is difficult to obtain a high-precision recognition model by directly using these underwater image datasets for model training, because the underwater images may be blurred, deformed, and have changes in brightness and color, which reduces the model's ability to accurately recognize the image. Therefore, the underwater image dataset is optimized in S1 of the present invention.
[0053] In S1 of the present invention, images containing outliers are first identified. The outliers here refer to image parameters that are abnormal due to factors such as light, scene content or camera shooting angle. The images with outliers will introduce noise and affect the recognition accuracy of the trained model. The present invention removes the outlier images in the underwater image data set by identifying images with abnormal parameters, and then processes the remaining images, thereby effectively improving the accuracy of the underwater biological recognition model. In addition, the present invention divides the remaining images of the underwater image data set into a high-quality data set and a general data set, and fuses the images of the two data sets, thereby improving the image quality of the entire data set, and can also enhance the expressiveness of the underwater biological features in the image, which is more conducive to the learning of the neural network, thereby providing richer and more accurate training data for the deep learning model.
[0054] In the method of the present invention, the YOLOv8 model is improved, and the underwater biometric recognition model obtained has high detection accuracy and detection speed. Specifically, the four convolutional layers (Conv) in the Backbone module are replaced with the receptive field attention convolutional layer (RFAConv), which can enhance the model's perception of complex features in the underwater environment; the four C2f layers in the Neck module are fused with the Large Separable Kernel Attention (LSKA) module, and a receptive field block (RFB) is added before the Detect layer in the Head module, which can better capture the key features in the underwater environment and improve the accuracy and robustness of the model.
[0055] In addition, in view of the fact that underwater organism recognition and detection is greatly affected by factors such as water quality and light, and that the appearance and size differences between different underwater organisms are often large, and considering the relationship between the size of the organism and the entire image, the present invention adopts an improved Focal SioU, which makes the model pay more attention to difficult-to-distinguish biological samples and better solves the sample imbalance problem in underwater organism classification.
[0056] It can be understood that the order of S1 and S2 in the method of the present invention can be reversed.
[0057] Furthermore, in S1, the outlier image in the underwater image data set is identified using Formula 1;
[0058]
[0059] Among them, x (c,s,d) Represents the three parameters corresponding to any image in the underwater image dataset, μ (c,s,d) represents the mean of all image data values, σ (c,sd,d)Represents the standard deviation of all image data values, P (α,γ,β) It represents the abnormal detection value set according to the water quality characteristics, c represents contrast, s represents clarity, and d represents detail.
[0060] Furthermore, in S1, the remaining images of the underwater image dataset are evaluated using Formula 2, and the remaining images of the underwater image dataset are divided into a high-quality dataset and a normal dataset according to the evaluation result;
[0061] QS=exp(C·w c )+exp(D·w d )+exp(Sharpness·w s )+exp(Saturation·w sat )+exp(N·w n ) Formula 2
[0062] Among them, QS represents the quality score of the image, C represents the contrast of the image, D represents the details of the image, Sharpness represents the clarity of the image, Saturation represents the color vividness of the image, N represents the image noise level, and w c represents the contrast weight, w d represents the weight of the details, w s Indicates the weight of clarity, w sat Indicates the weight of color vividness, w n Represents the weight of the noise.
[0063] When evaluating the image quality in the underwater image dataset, contrast, detail, clarity, color vividness and noise are important evaluation indicators. These indicators can directly reflect the visual effect of the image and the richness of the information it carries. Therefore, the performance of each image in the dataset in these aspects can be quantitatively evaluated. In one embodiment of the present invention, the quality of the image is calculated according to the parameters of the image by formula 2. The median of the quality scores of all images is taken as the classification threshold, and images with quality scores higher than the classification threshold are regarded as high-quality images and classified into the high-quality dataset, and images with quality scores lower than the classification threshold are regarded as ordinary images and classified into the ordinary dataset.
[0064] In S1 of the present invention, by fusing the high-quality image with the ordinary image, the rich information in the high-quality image is used to enhance the visual features of the ordinary image, which can not only improve the visual quality of the image, but also enhance the expressiveness of the underwater biological features in the image, which is more conducive to the learning of the neural network, thereby providing richer and more accurate training data for the deep learning model. Specifically, the image fusion operation can be expressed by the following formula 4:
[0065] I f =α·Ihq +(1-α)·I lq Formula 4
[0066] Among them, I f is the fused image, I hq It is a high-quality image. lq is a common image, α is a fusion coefficient, and the fusion coefficient is used to control the ratio of high-quality images to common images in the fusion result. Specifically, the value range of α is 0.5~1.
[0067] Furthermore, the S1 also includes a step of preprocessing the images in the training data set: performing data enhancement processing on the images using Mosaic data enhancement and HSV color space methods; and normalizing the size of the data enhanced images.
[0068] In one embodiment of the present invention, the probability of Mosaic data enhancement is set to 100%, and the values of H, S and V in the HSV image space are set to 0.015, 0.7 and 0.4 respectively. Data enhancement can increase the diversity of the data set, so that the model can better learn the target features in different situations; in terms of normalization processing, the size of the input image is uniformly adjusted to (640×640×3) so that the model can better learn the target features, thereby improving the robustness and generalization ability of the model.
[0069] Furthermore, in S2, the calculation formula of Focal SIoU is Formula 3:
[0070]
[0071] Among them, IoU represents the intersection over union ratio between two boxes, C D is the distance cost between two boxes; C S represents the shape cost between two boxes, α represents the weight of positive and negative samples, and R s Indicates the ratio of the biological target bounding box to the entire image, ∈≤0.00001.
[0072] The three Detect layers of the YOLOv8 model all use Bbox loss as the loss function for optimizing bounding box prediction. Bbox loss consists of two parts: CIoU Loss and DFL Loss, where CIoU is an IoU indicator used to measure the similarity between bounding boxes. In the present invention, Focal SIoU is used as the IoU indicator, which can better measure the similarity between bounding boxes than CIoU.
[0073] In one embodiment of the present invention, the predicted box is B1 = (x1, y1, w1, h1), and the real box is B2 = (x2, y2, w2, h2), where (x i ,y i ) represents the center coordinate of the box, (w i ,h i ) represents the width and height of the box, then the area A of the intersection of the predicted box and the true box is calculated I The process is as follows:
[0074] A I =α(Min1-Max1)(Min2-Max2)#(1)
[0075]
[0076]
[0077]
[0078]
[0079] Calculate the area A of the union of the predicted box and the true box U The process is as follows:
[0080] A U =w1h1+w2h2-A I #(6)
[0081] The process of calculating the IoU between the predicted box and the true box using equations (1) and (6) is as follows:
[0082]
[0083] Calculate the distance cost C between the predicted box and the true box D The process is as follows (8)-(16):
[0084] C D =0.5(C A +C E )#(8)
[0085]
[0086]
[0087]
[0088]
[0089]
[0090]
[0091]
[0092]
[0093] In the above formulas (1) to (16), C A The angle cost is used to represent the difference between the angle between the predicted box and the real box and the angle in the horizontal direction; C E is the Euclidean distance cost used to represent the difference between the Euclidean distance between the centers of two boxes and the ratio between the width or height of the two boxes; γ is a cost used to control C E The weight parameter in the calculation process of Focal SIoU; c and r Respectively represent the horizontal and vertical offsets of the centers of the two frames; σ represents the square of the ratio of the distance between the centers of the two frames in the horizontal and vertical directions to the width and height of the two frames; sinα represents the sine value of the angle between the two frames; ρ x and ρ y Represents the square of the ratio between the horizontal and vertical distances between the centers of the predicted box and the true box and the width or height of the two boxes, respectively.
[0094] Calculate the distance cost C between the predicted box and the true box S The process is as follows (17)-(21):
[0095] C S =0.5(C W +C H )#(17)
[0096]
[0097]
[0098]
[0099]
[0100] Among them, C W and C H Respectively represent the width cost and height cost; ω w and ω h Represents the ratio of the difference between the width and height of the two boxes to the maximum width and maximum height respectively.
[0101] The process of calculating Focal SIoU using equations (7), (8) and (17) is as follows:
[0102]
[0103] Among them, α represents the weight of positive and negative samples, R S Indicates the ratio of the biological target bounding box to the entire image, R S The larger the value, the larger the shape of the organism, and the easier it is to detect the organism. At this time, α×(1-R s ) is smaller, the Focal SIoU makes the model pay less attention to the creature; conversely, R s The smaller the value, the smaller the shape of the organism, and the more difficult it is to detect. s ) is larger, the Focal SIoU makes the model pay more attention to the creature and emphasizes the learning of the target.
[0104] Focal SIoU is an IoU index formed by introducing the idea of Focal Loss on the basis of SIoU. It takes into account the angle cost, distance cost and shape cost, and can better measure and optimize the similarity between bounding boxes. At the same time, the present invention aims to solve the problem that the difference in the refractive index of underwater light and the change in light easily cause large changes in the shape of organisms, and increases the use of R s This parameter makes the calculation process of the loss function more in line with the characteristics of underwater organism recognition. It gives greater weight to samples that are difficult to classify, so that the model pays more attention to difficult-to-classify biological samples, better solves the sample imbalance problem of underwater organism classification, and improves the recognition accuracy and performance of the YOLOv8 model for underwater organisms.
[0105] Furthermore, the Backbone module of the YOLOv8 model includes a first convolutional layer, a second convolutional layer, a third convolutional layer, a fourth convolutional layer and a fifth convolutional layer arranged in sequence;
[0106] In S2, the second convolutional layer, the third convolutional layer, the fourth convolutional layer and the fifth convolutional layer are respectively replaced by receptive field attention convolutional layers, and each of the receptive field attention convolutional layers is connected to different C2f layers in the Backbone module.
[0107] RFAConv uses the idea of sharing receptive field spatial features and convolution kernel parameters to extract features from feature maps. Receptive field spatial features can emphasize the importance of features at different scales at different locations. In one embodiment of the present invention, the four convolutional layers (Conv) in the Backbone module of the YOLOv8 model are replaced with receptive field attention convolution (RFAConv). After the four RFAConvs replace the four Conv modules in the original YOLOv8 model Backbone, Backbone uses the large kernel convolution after the attention weight enhancement to extract features from the feature map. On the one hand, this helps to improve the ability of underwater biological feature representation, so that the network can better capture the details and textures of underwater organisms. On the other hand, it can enhance the adaptability of the model to various underwater conditions, which is conducive to improving the classification and detection accuracy of underwater organisms.
[0108] Furthermore, in S2, in the Neck module of the YOLOv8 model, four C2f layers are respectively fused with large separation convolutional attention modules to obtain LSKAC2f layers; each of the LSKAC2f layers contains at least two LSKAs.
[0109] The LSKAC2f layer allows the YOLOv8 model to use a larger convolution kernel to enhance the discrimination and robustness of different features of underwater organisms. At the same time, due to the use of a larger kernel convolution, the number of parameters of the YOLOv8 model is reduced, and the detection speed of the model is improved. In one embodiment of the present invention, the large separation convolution attention module (LSKA) is fused with the four C2f layers in the Neck of the YOLOv8 model, and the fused module is named the LSKAC2f layer. Specifically, in one embodiment, in the present invention, the LSKAC2f layer uses a large kernel convolution with a convolution kernel of 7×7 to extract features from the feature map. On the one hand, the 7×7 large kernel convolution can capture long-distance dependencies in the feature map, so that the YOLOv8 model pays more attention to the shape of underwater organisms during training, so that the neural network obtains more information about the shape characteristics of underwater organisms, and further improves the detection accuracy; on the other hand, an LSKAC2f layer contains n LSKAs, n≥2, which can greatly reduce the number of parameters in the model calculation process, thereby improving the detection speed and improving the robustness of the YOLOv8 model.
[0110] Furthermore, in S2, the Head module of the YOLOv8 model has three Detect layers, and a receptive field block is added before each Detect layer;
[0111] The receptive field block increases the receptive field of the feature map output by the Neck module and then inputs it into the Detect layer.
[0112] In the original YOLOv8 model, the input feature map is directly input into the Detect layer in the Head after being processed by Neck. The function of the Detect layer is to convert the feature map into a detection result to achieve classification and regression. Therefore, the richer the information contained in the feature map input into the Detect layer, the better the quality, and the better the final detection result. In the present invention, a Receptive Field Block (RFB) is added before each Detect layer to provide a better quality feature map for the Detect layer.
[0113] The RFB module uses convolution kernels of different sizes and dilation rates to perform multi-branch pooling by imitating the structure of the receptive field (RFs) in the human visual system, thereby capturing receptive fields (RFs) of different sizes, and applying dilation convolution to control the eccentricity of RFs. Specifically in the present invention, by adding an RFB module to each of the three Detect layers of the YOLOv8 model, a significant impact is produced on the classification and detection of underwater organisms. These impacts include enhancing feature representation capabilities, improving small target detection, maintaining real-time performance, adapting to complex underwater environments, and more accurate target positioning. By increasing the number of receptive fields and feature map channels, the RFB module enables the network to better capture the contextual information of underwater organisms, improving the distinguishability and robustness of features. In an underwater environment, the RFB module helps the network better detect overlapping small targets, thereby improving the accuracy of underwater organism classification. At the same time, by adding an RFB module before the detection layer, the performance of the model can be improved without sacrificing data processing speed, maintaining a fast response. Underwater images have complex changes in illumination, color, and texture. The RFB module can help the network better adapt to these changes and improve the robustness of underwater biological classification. Finally, using the feature map enhanced by the RFB module, the Detect layer can generate more accurate target prediction boxes and category probabilities, which is critical for the positioning and classification of underwater targets. In summary, the application of the RFB module is expected to significantly improve the classification and detection performance of underwater organisms, improve the robustness and accuracy of the model, and maintain real-time performance.
[0114] In one embodiment of the present invention, the fused 5543 images are used as a training data set, and the images in the training data set are divided into a test set, a test set, and a validation set in a ratio of 7:2:1 to train the YOLOv8 model. The detection results before the YOLOv8 model training are as follows: Figure 5 As shown in Figure 2, the test results after training are as follows: Figure 6 shown.
[0115] In the present invention, the test set is input into the trained improved YOLOv8 model to obtain the detection results to test the detection performance of the model. Specifically, the parameters of the improved YOLOv8 model are set: the optimizer type is set to sgd, the momentum is set to 0.937, the initial weight decay is set to 0.0005, the initial learning rate is set to 0.01, and the batch_size is set to 64. The detection results contain the category and confidence information of the underwater target.
[0116] The performance of the model is evaluated by three performance indicators: mAP@.5, mAP@.5:.95 and R. mAP@.5 represents the statistics of the prediction results of all categories, and calculates the AP value (Average Precision) of each category, and finally averages the AP values of all categories to obtain the index, while @.5 represents the calculation of the AP value when the IoU is 0.5. The higher the mAP@.5, the higher the accuracy and recall rate of the model in detecting the target; mAP@.5:.95 represents the calculation within the range of the IoU threshold from 0.5 to 0.95 to obtain an average precision value. mAP@.5:.95 can more comprehensively evaluate the performance of the model under different IoU thresholds, reflecting the accuracy of the model under different strict requirements; R represents the recall rate of the model, that is, the higher the ratio of the detected correct target to the actual target, the wider the detection coverage of the model. The model obtained by the present invention is compared with the YOLOv8 model before improvement, and the experimental results are shown in the following table.
[0117] Testing the Model mAP@.5 mAP@.5:.95 R YOLOv8 model before improvement 63.2% 32.8% 0.539 Improved model of the present invention 76.7% 46.5% 0.657
[0118] As can be seen from the above table, the model of the present invention is superior to the YOLOv8 model before improvement in terms of mAP@.5, mAP@.5:.95 and R. In particular, the mAP@50 of the model of the present invention is improved by 13.5% and the mAP@.5:.95 is improved by 13.7% compared with the YOLOv8 model before improvement. The improvement of these two data indicates that the recognition accuracy of the model of the present invention is significantly improved. The R value is increased from 0.539 to 0.657, indicating that the improved YOLOv8 model significantly reduces the possibility of missed detection. The various indicators of the model of the present invention are significantly improved, indicating that the model of the present invention has higher recognition accuracy and better performance in underwater target detection tasks.
[0119] Accordingly, the present invention also provides a biometric detection system applicable to underwater unmanned equipment, which adopts the above-mentioned biometric detection method applicable to underwater unmanned equipment; the system includes an image collection module, an image processing module and a data storage module;
[0120] The image collection module is used to store and acquire underwater images;
[0121] The image processing module loads the underwater biological recognition model trained in step S3. The image processing is used to input the underwater image into the underwater biological recognition model to obtain the biological species and confidence of the underwater image.
[0122] The data storage module is used to store underwater images and their corresponding biological species and confidence levels, and to save underwater images with confidence levels below a threshold for updating an underwater image dataset.
[0123] Correspondingly, the present invention also provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to execute the above-mentioned biometric detection method applicable to underwater unmanned equipment.
[0124] Other structures and operations of a biometric detection method and system for underwater unmanned equipment according to an embodiment of the present invention are well known to ordinary technicians in the field and will not be described in detail here.
[0125] In the description of this specification, the description with reference to the terms "embodiment", "example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0126] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
Claims
1. A biometric detection method suitable for underwater unmanned equipment, characterized in that: The following steps are involved: S1. Dataset processing: obtaining an underwater image dataset, removing outlier images in the underwater image dataset, dividing the remaining images in the underwater image dataset into a high-quality dataset and a common dataset, fusing the images in the high-quality dataset with the images in the common dataset to obtain a fused dataset; and using the fused dataset as a training dataset; S2. Model building: YOLO v 8 models, YOLO v 8 Model Backbon e The convolutional layer in the module is replaced with a receptive field attention convolutional layer. The C2f layer in the Neck module is fused with a large separation convolutional attention module. A receptive field block is added before the Detect layer in the Head module. Focal SIoU is used as an indicator to calculate the similarity between bounding boxes for bounding box regression. S3, model training: divide the training data set obtained in S1 into a training set, a test set and a validation set, and train the underwater biological recognition model; S4, the underwater unmanned equipment is loaded with the underwater biometric recognition model trained in S3, the underwater unmanned equipment is placed in water, the biometric recognition detection task is performed, and the detection results with confidence levels lower than the threshold are saved and recorded for updating the underwater image dataset; In S1, the remaining images of the underwater image dataset are evaluated using Formula 2, and the remaining images of the underwater image dataset are divided into a high-quality dataset and a normal dataset according to the evaluation result; QS = exp(C·w c ) + exp(D·w d ) + exp(Sharpness·w s ) + exp(Saturation·w sat ) + exp(N·w n ) Formula 2 Among them, QS represents the quality score of the image, C represents the contrast of the image, D represents the details of the image, Sharpness represents the clarity of the image, Saturation represents the color vividness of the image, N represents the image noise level, and w c represents the contrast weight, w d represents the weight of the details, w s Indicates the weight of clarity, w sat Indicates the weight of color vividness, w n Represents the weight of the noise.
2. The method according to claim 1, characterized in that In S1, the outlier image in the underwater image data set is identified using Formula 1; Among them, x (c,s,d) Represents the three parameters corresponding to any image in the underwater image dataset, μ (c,s,d) represents the mean of all image data values, σ (c,s,d) represents the standard deviation of all image data values, P (α,γ,β) It represents the abnormal detection value set according to the water quality characteristics, c represents contrast, s represents clarity, and d represents detail.
3. The method according to claim 1, characterized in that In the S1, there is also a step of preprocessing the images in the training data set: Using Mosai c Data enhancement and HSV color space methods are used to perform data enhancement processing on images; Normalize the size of the data augmented images.
4. The method according to claim 1, characterized in that: In S2, the calculation formula of Focal SIoU is formula 3: Among them, IoU represents the intersection-over-union ratio between two boxes, C D is the distance cost between two boxes; C S represents the shape cost between two boxes, α represents the weight of positive and negative samples, and R s Indicates the ratio of the biological target bounding box to the entire image, ∈≤0.00001.
5. The method according to claim 1, characterized in that The Backbone module of the YOLOv8 model includes a first convolutional layer, a second convolutional layer, a third convolutional layer, a fourth convolutional layer and a fifth convolutional layer arranged in sequence; In S2, the second convolutional layer, the third convolutional layer, the fourth convolutional layer and the fifth convolutional layer are respectively replaced by receptive field attention convolutional layers, and each of the receptive field attention convolutional layers is connected to the Backbon e Different C2f layers in the module.
6. The method according to claim 5, characterized in that In S2, YOLO v In the Neck module of the 8 model, the four C2f layers are fused with the large separation convolutional attention modules to obtain LSKAC2f layers; each of the LSKAC2f layers contains at least two LSKAs.
7. The method according to claim 6, characterized in that In S2, the Head module of the YOLOv8 model has three Detect layers, and a receptive field block is added before each Detect layer; The receptive field block increases the receptive field of the feature map output by the Neck module and then inputs it into the Detect layer.
8. An underwater unmanned device, characterized in that: Implement the biometric detection method for underwater unmanned equipment as described in any one of claims 1 to 7; the underwater unmanned equipment includes a camera, an image collection module, an image processing module and a data storage module; The image collection module is used to store underwater images captured by a camera; The image processing module loads the underwater biological recognition model trained in S3, and the image processing is used to input the underwater image into the underwater biological recognition model to obtain the biological species and confidence of the underwater image; The data storage module is used to store underwater images and their corresponding biological species and confidence levels, and to save underwater images with confidence levels lower than a threshold value for updating an underwater image data set.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to execute the biometric detection method applicable to underwater unmanned equipment as described in any one of claims 1-7.
