Marine organism detection method, device and equipment and storage medium
By optimizing the convolutional layers and modules of marine biological detection models, the feature extraction and fusion capabilities are enhanced, and the problem of low detection accuracy in underwater environments is solved, and higher detection accuracy is achieved.
Patent Information
- Application Number
- CN202411370897.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-07
AI Technical Summary
Marine biological detection models lack feature extraction capabilities in underwater environments, poor receptive fields and poor feature fusion effect, resulting in low detection accuracy.
By optimizing the convolution layer, cross-level local network module and improved spatial pyramid pool module of the detection model, we can obtain the receptive field attention convolution layer, cross-level local network-receptive field attention convolution layer module and improved spatial pyramid pool. - Perceive kernel convolution module to enhance the feature extraction and fusion capabilities of the model.
The detection accuracy of marine biological detection models has been improved, and the problems of insufficient feature extraction capabilities and low detection accuracy in underwater environments have been overcome.
Smart Images

Figure CN119274210A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of biological detection technology, and in particular to marine biological detection methods, devices, equipment and storage media. Background Art
[0002] Marine life detection models, especially those based on YOLOv8, have shown broad application prospects in the fields of marine ecosystem research, marine species protection, and marine ranch management. Due to its high speed and high precision, YOLOv8 is very suitable for real-time processing of video streams and image data for the detection and classification of marine life. However, in underwater environments, marine life detection models based on YOLOv8 may encounter some challenges, resulting in insufficient feature extraction capabilities. The complexity and particularity of the underwater environment, such as poor lighting conditions and obstructed vision, may limit the receptive field of the model, making it difficult for the model to capture a wide range of features. Due to the low contrast and high noise of underwater images, the fusion between different feature maps is not effective, making it difficult for the model to accurately extract target features from complex underwater backgrounds. The diversity and morphological complexity of underwater organisms, as well as the instability of the underwater environment, may affect the detection accuracy of the model. At the same time, the acquisition cost of underwater images is high, and the annotation work is cumbersome, resulting in a scarcity of high-quality datasets available for training. Summary of the invention
[0003] The main purpose of this application is to provide a marine life detection method, device, equipment and storage medium, aiming to solve the technical problem of how to improve the detection accuracy of the marine life detection model.
[0004] To achieve the above objectives, the present application proposes a method for detecting marine organisms, the method comprising:
[0005] Get a dataset of marine life images;
[0006] Training a preset model based on the marine life image dataset to obtain an initial detection model;
[0007] Optimizing the convolutional layer, the cross-level local network module, and the improved spatial pyramid pooling module of the initial detection model to obtain a target detection model;
[0008] The marine life image is identified by the target detection model to obtain a marine life detection result.
[0009] In one embodiment, the step of optimizing the convolutional layer, the cross-level local network module, and the improved spatial pyramid pooling module of the initial detection model to obtain the target detection model includes:
[0010] Get the Receptive Field Attention Convolutional Layer, Cross-Level Local Network-Receptive Field Attention Convolutional Layer Module, and Improved Spatial Pyramid Pooling-Perceptual Kernel Convolutional Module;
[0011] The convolution layer, the cross-level local network module and the improved spatial pyramid pool module of the initial detection model are optimized through the receptive field attention convolution layer, the cross-level local network-receptive field attention convolution layer module and the improved spatial pyramid pool-perception kernel convolution module to obtain the optimized initial detection model;
[0012] The optimized initial detection model is used as the target detection model.
[0013] In one embodiment, the step of obtaining a receptive field attention convolution layer, a cross-level local network-receptive field attention convolution layer module, and an improved spatial pyramid pool-perceptual kernel convolution module includes:
[0014] Obtaining the attention mechanism module, convolutional layer, cross-level local network module and improved spatial pyramid pool module of the initial detection model;
[0015] Optimizing the attention mechanism module to obtain a receptive field attention convolution module;
[0016] The convolutional layer is merged with the receptive field attention convolutional module to obtain a receptive field attention convolutional layer;
[0017] Replacing the preset convolutional layer of the bottleneck layer of the cross-level local network module with the receptive field attention convolutional layer;
[0018] Replacing the bottleneck layer of the cross-level local network module with a bottleneck layer-receptive field attention convolution layer module to obtain a cross-level local network-receptive field attention convolution module;
[0019] The improved spatial pyramid pooling module is fused with the perceptual kernel convolution module to obtain an improved spatial pyramid pooling-perceptual kernel convolution module.
[0020] In one embodiment, the step of training a preset model based on the marine life image dataset to obtain an initial detection model includes:
[0021] Preprocessing the marine organism image dataset to obtain a preprocessed dataset;
[0022] Obtaining a training data set according to the preprocessed data set;
[0023] The preset model is trained based on the training data set to obtain an initial detection model.
[0024] In one embodiment, the step of identifying the marine life image by using the target detection model to obtain the marine life detection result includes:
[0025] Obtain real-time image data of marine life;
[0026] Inputting the marine life real-time image data into the target detection model to obtain a model output result;
[0027] The model output result is used as the marine organism detection result.
[0028] In one embodiment, the step of identifying the marine life image by the target detection model to obtain the marine life detection result includes:
[0029] The target detection model is evaluated by using a validation data set in a preprocessing data set to obtain an evaluation result;
[0030] When the evaluation result is that the target detection model does not meet the standard, returning to the step of obtaining the marine life image dataset;
[0031] When the evaluation result shows that the target detection model meets the standard, the model evaluation is completed.
[0032] In one embodiment, the step of evaluating the target detection model by using the validation data set in the preprocessing data set to obtain the evaluation result includes:
[0033] Get the validation data set from the preprocessed data set;
[0034] Inputting the validation set data into the target detection model for evaluation to obtain evaluation data;
[0035] When the evaluation data does not meet the preset requirements, the evaluation result is that the target detection model does not meet the standards;
[0036] When the evaluation data meets the preset requirements, the evaluation result is obtained that the target detection model meets the standards.
[0037] In addition, to achieve the above-mentioned purpose, the present application also proposes a marine life detection device, the device comprising: a data acquisition module, used to acquire a marine life image data set;
[0038] A model training module, used to train a preset model based on the marine life image dataset to obtain an initial detection model;
[0039] A model optimization module, used to optimize the convolutional layer, the cross-level local network module and the improved spatial pyramid pool module of the initial detection model to obtain a target detection model;
[0040] The recognition and detection module is used to recognize the marine life image through the target detection model to obtain the marine life detection result.
[0041] In addition, to achieve the above-mentioned purpose, the present application also proposes a marine life detection device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the marine life detection method described above.
[0042] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the marine biological detection method described above are implemented.
[0043] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the marine life detection method described above are implemented.
[0044] One or more technical solutions proposed in this application have at least the following technical effects:
[0045] By optimizing the convolutional layers, cross-level local network modules and improved spatial pyramid pooling modules of the detection model, the technical problems of insufficient feature extraction ability of the marine life detection model caused by the underwater environment, poor receptive field, poor feature fusion effect and low detection accuracy are solved. Compared with the existing technology, the detection accuracy of the marine life detection model is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0047] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0048] Figure 1 A schematic diagram of a process flow provided for Embodiment 1 of the marine organism detection method of the present application;
[0049] Figure 2 A network structure diagram of the optimized YOLOv8 model of the marine organism detection method provided in Example 1 of the present application;
[0050] Figure 3A schematic diagram of the process provided for the second embodiment of the marine organism detection method of the present application;
[0051] Figure 4 A receptive field spatial feature generation diagram of the marine organism detection method provided in Example 2 of the present application;
[0052] Figure 5 This is a structural diagram of RFCA and RFCAConv of the marine organism detection method provided in Example 2 of the present application;
[0053] Figure 6 A network structure diagram of C2f of the marine organism detection method provided in Example 2 of the present application;
[0054] Figure 7 This is a network structure diagram of C2f_RFCAConv of the marine organism detection method provided in Example 2 of the present application;
[0055] Figure 8 This is a network structure diagram of SPPF_UniRepLKNetBlock of the marine organism detection method provided in Example 2 of the present application;
[0056] Fig. 9 A comparison diagram of the receptive fields of the marine organism detection method provided in Example 2 of the present application;
[0057] Fig.10 A schematic diagram of the process provided for the third embodiment of the marine organism detection method of the present application;
[0058] Fig.11 A schematic diagram of a process flow provided for Embodiment 4 of the marine organism detection method of the present application;
[0059] Fig.12 A schematic diagram of the process provided for Embodiment 5 of the marine organism detection method of the present application;
[0060] Fig.13 This is a schematic diagram of the module structure of the marine life detection device according to an embodiment of the present application;
[0061] Fig.14 Schematic diagram of the equipment structure of the hardware operating environment involved in the marine life detection method in the embodiment of the present application.
[0062] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0063] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0064] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0065] The main solution of the embodiment of the present application is: training a preset model based on the marine life image dataset to obtain an initial detection model; optimizing the convolutional layer, cross-level local network module and improved spatial pyramid pool module of the initial detection model to obtain a target detection model; identifying marine life images through the target detection model to obtain marine life detection results.
[0066] In this embodiment, for the convenience of description, the following description is made by taking the internal actuator of the marine life detection system as the execution subject.
[0067] Due to the underwater environment in the existing technology, the feature extraction capability of the marine life detection model is insufficient, resulting in poor receptive field, poor feature fusion effect and low detection accuracy.
[0068] The present application provides a solution to improve the detection accuracy of the marine organism detection model.
[0069] It can be seen from the above embodiments that the present application overcomes the technical problems of insufficient feature extraction ability of the marine life detection model caused by the underwater environment, poor receptive field, poor feature fusion effect and low detection accuracy, thereby improving the detection accuracy of the marine life detection model.
[0070] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, etc. The following takes the internal actuator of the marine biological detection system as an example to illustrate this embodiment and the following embodiments.
[0071] Based on this, the present application embodiment provides a method for detecting marine organisms, referring to Figure 1 , Figure 1 This is a schematic diagram of the flow chart of the first embodiment of the marine organism detection method of the present application.
[0072] In this embodiment, the marine organism detection method includes steps S10 to S40:
[0073] Step S10, obtaining a marine life image dataset.
[0074] It should be noted that marine life includes multiple biological kingdoms, such as the animal kingdom, the plant kingdom, the protist kingdom, the fungal kingdom, etc.
[0075] Through ocean observation instruments such as cameras, acoustic instruments, optical instruments, electronic instruments, mechanical instruments, and remote sensing instruments, images of marine life in the surrounding environment are obtained and summarized into image datasets.
[0076] Step S20, training a preset model based on the marine life image dataset to obtain an initial detection model.
[0077] It should be noted that the preset model is the YOLOv8 model. YOLOv8 is the latest generation of target detection and image segmentation model developed by Ultralytics. It has significant performance advantages in the field of target detection and has achieved new breakthroughs in speed and accuracy. It has diversified model sizes, anchor-free detection heads, new loss functions, attention mechanisms and convolutional layer optimizations, feature fusion and detection head improvements, and lightweight design.
[0078] The YOLOv8 model is trained based on the marine life image dataset. The loss function and optimizer are used to update the network weights. Indicators such as loss and accuracy during the training process are monitored. The trained model is the initial detection model.
[0079] Step S30, optimizing the convolutional layer, the cross-level local network module, and the improved spatial pyramid pooling module of the initial detection model to obtain a target detection model.
[0080] It should be noted that the convolutional layer (Conv) is a neural network layer commonly used in deep learning and computer vision. It can extract useful features from images and is particularly important in image processing and image recognition tasks. The context-aware cross-level fusion network (C2f) is a key component of YOLOv8, which is mainly used to achieve cross-stage partial fusion. The C2f module can be used to fuse feature maps of different levels so that the network can take into account both semantic information and detail information, thereby improving the accuracy and robustness of the target detection network. The improved spatial pyramid pooling module (Spatial PyramidPooling-Fast, SPPF) is an improved spatial pyramid pooling technology that aims to improve the accuracy and efficiency of target detection. It obtains multi-scale feature information by performing pooling operations on the input feature map at different scales, splicing it into a feature vector containing multi-scale information, and inputting it into the fully connected layer for target classification and position regression.
[0081] The network structure diagram of the optimized YOLOv8 model is as follows Figure 2 As shown, it includes: one Input, seven RFCAConv (receptive field attention convolution layers), eight C2f_RFCAConv (cross-level local network-receptive field attention convolution module), four Concat (splicing), one SPPF_UniRepLKNetBlock (improved spatial pyramid pool-perceptual large kernel convolution module), two Unsample (upsampling), and one Detect (detection).
[0082] Step S40, identifying the marine life image through the target detection model to obtain the marine life detection result.
[0083] Collect and annotate marine life images, input them into the target detection model for marine life detection, and obtain marine life detection results.
[0084] This embodiment provides a marine life detection method. By optimizing the convolutional layer, the cross-level local network module and the improved spatial pyramid pool module of the detection model, the technical problems of insufficient feature extraction capability of the marine life detection model caused by the underwater environment, poor receptive field, poor feature fusion effect and low detection accuracy are overcome, thereby improving the detection accuracy of the marine life detection model.
[0085] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 3 , step S30 includes steps S31 to S33:
[0086] Step S31, obtaining a receptive field attention convolution layer, a cross-level local network-receptive field attention convolution layer module and an improved spatial pyramid pool-perception kernel convolution module.
[0087] It should be noted that the receptive field attention convolution layer, namely RFCAConv, is formed by the fusion of RFCA and Conv modules; the cross-level local network-receptive field attention convolution layer module, namely C2f_RFCAConv, is formed by the fusion of C2f and RFCAConv; the improved spatial pyramid pool-perceptual kernel convolution module, namely SPPF_UniRepLKNetBlock, is formed by the fusion of SPPF and UniRepLKNetBlock.
[0088] In addition, it should be noted that UniRepLKNet Block, also known as Perceptual Kernel Convolution, is an innovative network module used in YOLOv8 to improve the performance of the model. The design is inspired by the advantages of large convolution kernels. It enhances the non-expanded large convolution kernel layer by combining the non-expanded small convolution kernel layer with the expanded small convolution kernel layer, thereby optimizing the spatial pattern hierarchy and the network's representation capabilities.
[0089] In a feasible implementation manner, step S31 includes steps S101 to S106:
[0090] Step S101, obtaining the attention mechanism module, convolution layer, cross-level local network module and improved spatial pyramid pool module of the initial detection model.
[0091] It should be noted that the attention mechanism module (CoordAttention, CA), namely the coordinate attention mechanism, enhances the feature expression ability of the model by emphasizing important features and suppressing unimportant features. CA calculates the attention weight by considering the coordinate information of each pixel in the feature map, thereby achieving different processing of features at different positions.
[0092] Step S102, optimizing the attention mechanism module to obtain a receptive field attention convolution module.
[0093] It should be noted that the Receptive Field Conv-olutional Attention (RFCA) module is a new type of attention mechanism module that enhances the representation ability of features by considering the receptive field of each position in the convolution operation.
[0094] Spatial attention is widely used in convolutional neural networks to improve performance, but the information contained in the attention map generated by spatial attention is insufficient for large-sized convolution kernels. CA is widely used in neural networks to improve performance, but it does not completely solve the problem of convolution kernel parameter sharing. Therefore, the idea of receptive field spatial features can be used to optimize it, so that it not only pays attention to the receptive field spatial features, but also provides effective attention weights for large-sized convolution kernels.
[0095] The receptive field spatial feature is specially designed for the convolution kernel. It is dynamically generated according to the size of the convolution kernel. The schematic diagram is as follows Figure 4 As shown, it includes: Spatial Feature is transformed by Transform to obtain Receptive-Field SpatialFeature, and the two work together to obtain Receptive-field.
[0096] In addition, it should be noted that Receptive-field describes the size of the area that a given output feature point in the network can "perceive" or "see" on the original input image. The size of the receptive field directly affects the network's ability to extract input data features and determines the amount of contextual information that the network can capture. SpatialFeature refers to the original feature map. Receptive-Field Spatial Feature is the spatial feature transformed by Transform. It consists of non-overlapping sliding windows. Each 3×3 window in the receptive field spatial feature represents a receptive field slider. CxHxW represents the dimension of the feature map, where C represents the number of channels, H represents the height, and W represents the width. The dimension of Spatial Feature is CxHxW. After Transform conversion, the height and width are enlarged, and the dimension of the obtained Receptive-Field SpatialFeature is Cx3Hx3W.
[0097] Step S103, fusing the convolutional layer with the receptive field attention convolutional module to obtain a receptive field attention convolutional layer.
[0098] The RFCA obtained after CA optimization is integrated with the Conv module to form the RFCAConv module. RFCAConv can achieve significant performance improvement with a small computational overhead.
[0099] The structure diagram of RFCA and RFCAConv is as follows Figure 5 As shown, it includes: input image data, after being processed by Group Conv (group convolution), Norm+ReLU (normalization + activation function), Adjust Shape (adjust dimension), H AvgPool (height average pooling layer), W AvgPool (width average pooling layer), Concat+Conv (splicing + convolution), Norm+Non Linear (normalization + non-linear activation), two Conv (convolution), two Sigmoid (non-linear activation), Re-weight (reweighting) and Conv (convolution), the target image data is output.
[0100] Step S104: replacing the preset convolutional layer of the bottleneck layer of the cross-level local network module with the receptive field attention convolutional layer.
[0101] It should be noted that the cross-level local network module, namely C2f, enhances the model's perception of objects of different sizes by fusing feature maps of different levels. The network structure diagram of C2f is shown in the figure below: Figure 6 As shown, it includes: the Conv module is used to process the input data through Conv2d (two-dimensional convolution layer), BN (batch normalization) and SiLU (activation function); the Bottleneck2 module is used to process the input data through Conv(1.1) (1x1 convolution) and Conv(3.3) (3x3 convolution); C2f is used to process the input data through Conv(1.1) (1x1 convolution), Chunk(2.1) (block segmentation), two Bottleneck2 (bottleneck layers) repeated n times, Concat (splicing) and Conv(1.1) (1x1 convolution).
[0102] Optimize Conv and replace the second Conv in Bottleneck with RFCAConv.
[0103] Step S105, replacing the bottleneck layer of the cross-level local network module with a bottleneck layer-receptive field attention convolution layer module to obtain a cross-level local network-receptive field attention convolution module.
[0104] It should be noted that the bottleneck layer-receptive field attention convolution layer module, namely Bottleneck_RFCAConv, is a network module that combines the Bottleneck structure and the RFCAConv convolution operation. In this structure, Bottleneck usually refers to a standard convolution block composed of 1x1, 3x3 and 1x1 convolution layers, which is used to reduce the number of parameters and computation in deep neural networks.
[0105] Replace the Bottleneck of C2f with the new Bottleneck_RFCAConv to obtain the new module C2f_RFCAConv, which enhances the feature fusion capability based on C2f. The network structure of C2f_RFCAConv is shown in the figure below. Figure 7 As shown, it includes: Bottleneck_RFCAConv is used to process the input data through Conv (convolution) and RFCAConv (receptive field attention convolution layer); C2f_RFCAConv is used to process the input data through Conv (convolution), Chunk (block segmentation), two Bottleneck_RFCAConv (bottleneck layer-receptive field attention convolution layer) repeated n times, Concat (splicing) and Conv (convolution).
[0106] Step S106, fusing the improved spatial pyramid pooling module with the perceptual kernel convolution module to obtain an improved spatial pyramid pooling-perceptual kernel convolution module.
[0107] The main purpose of the SPPF module is to fuse global information. In order to further improve the receptive field and improve the detection accuracy of the model, it is fused with the perception kernel convolution UniRepLKNetBlock to form a new module SPPF_UniRepLKNetBlock. The network structure of SPPF_UniRepLKNetBlock is shown in the figure below. Figure 8 As shown, the input data is processed by Conv (convolution), three MaxPool2d (two-dimensional pooling layers), Concat (concatenation) and UniRepLKNetBlock (perceptual kernel convolution) and then output.
[0108] By optimizing the Conv, C2f and SPPF modules of the initial detection model, the detection performance and accuracy of the model can be improved.
[0109] Step S32, optimizing the convolution layer, the cross-level local network module and the improved spatial pyramid pool module of the initial detection model through the receptive field attention convolution layer, the cross-level local network-receptive field attention convolution layer module and the improved spatial pyramid pool-perception kernel convolution module to obtain the optimized initial detection model.
[0110] The receptive field attention convolution layer RFCAConv is used to replace the convolution layer Conv of the initial detection model to enhance the feature extraction capability of the model. The cross-level local network-receptive field attention convolution layer module C2f_RFCAConv is used to replace the cross-level local network module C2f of the initial detection model to enhance the feature fusion capability of the model. The improved spatial pyramid pool-perceptual kernel convolution module SPPF_UniRepLKNetBlock is used to replace the improved spatial pyramid pool module SPPF to improve the model detection accuracy, thereby optimizing the initial detection model.
[0111] Step S33, using the optimized initial detection model as the target detection model.
[0112] After optimizing the initial detection model, the improved YOLOv8 model is obtained and used as the target detection model. The improved YOLOv8 model has a stronger receptive field. The comparison of the receptive fields obtained by the model is shown in the figure below. Fig. 9 As shown, the left side is the receptive field of the improved model, and the right side is the receptive field of the model before improvement.
[0113] The present embodiment provides a method for detecting marine life, obtaining a receptive field attention convolution layer, a cross-level local network-receptive field attention convolution layer module and an improved spatial pyramid pool-perception kernel convolution module; optimizing the convolution layer, the cross-level local network module and the improved spatial pyramid pool module of the initial detection model through the receptive field attention convolution layer, the cross-level local network-receptive field attention convolution layer module and the improved spatial pyramid pool-perception kernel convolution module to obtain the optimized initial detection model; using the optimized initial detection model as a target detection model to optimize the performance of the YOLOv8 model.
[0114] Based on the first embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Fig.10 , step S20 includes steps S21 to S23:
[0115] Step S21, preprocessing the marine organism image dataset to obtain a preprocessed dataset.
[0116] The marine biological image dataset is preprocessed, such as scaling, cropping, flipping, normalization, etc., to improve the generalization ability of the model and obtain a preprocessed dataset.
[0117] Step S22, obtaining a training data set according to the preprocessed data set.
[0118] The preprocessed data set is divided into a training data set, and a validation data set is further divided to evaluate the detection model.
[0119] Step S23, training the preset model based on the training data set to obtain an initial detection model.
[0120] Input the training data set into the preset model and train the model through the YOLOv8 training command. The model configuration before training may include parameters such as the specified data set configuration file, model configuration file, and training cycle.
[0121] This embodiment provides a method for detecting marine life, which preprocesses the marine life image dataset to obtain a preprocessed dataset; obtains a training dataset based on the preprocessed dataset; and trains a preset model based on the training dataset to obtain an initial detection model, thereby making basic preparations for subsequent model optimization.
[0122] Based on the first embodiment of the present application, in the fourth embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above description, and will not be described in detail later. Fig.11 , step S40 includes steps S41 to S43:
[0123] Step S41, obtaining real-time image data of marine life.
[0124] Through underwater camera equipment, submersibles, seabed observation networks and other technical means, real-time images of surrounding marine life are obtained to obtain real-time image data of marine life.
[0125] Step S42, inputting the marine life real-time image data into the target detection model to obtain a model output result.
[0126] The real-time image data of marine organisms is input into the improved YOLOv8 model for recognition and detection to obtain the model output results. The output results can be displayed through the human-computer interaction interface. The display content may include the category of marine organisms, the confidence of the detected target, etc.
[0127] Step S43, using the model output result as the marine life detection result.
[0128] The output of the model is the marine biological detection result, which can be used in ecological research and detection, environmental impact assessment, resource protection and management and other fields.
[0129] This embodiment provides a method for detecting marine life, which obtains real-time image data of marine life; inputs the real-time image data of marine life into the target detection model to obtain a model output result; and uses the model output result as a marine life detection result to achieve a marine life detection result with higher accuracy.
[0130] Based on the first embodiment of the present application, in the fifth embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above description, and will not be described in detail later. Fig.12 , before step S40, steps S01 to S03 are included:
[0131] Step S01, evaluating the target detection model using a verification data set in a preprocessing data set to obtain an evaluation result.
[0132] The model is evaluated through the validation data set in the preprocessing data set, including the prediction error, model fitting degree, etc. The evaluation indicators include accuracy, precision, F1 score, etc.
[0133] In a feasible implementation, step S01 includes steps S011 to S014:
[0134] Step S011, obtaining a verification data set in the preprocessing data set.
[0135] The preprocessed data set can be divided into a validation data set for subsequent evaluation of the detection model.
[0136] Step S012: input the validation set data into the target detection model for evaluation to obtain evaluation data.
[0137] It should be noted that the evaluation data is the specific data of the evaluation indicators, such as an accuracy of 0.9, an F1 score of 0.95, etc.
[0138] Step S013, when the evaluation data does not meet the preset requirements, the evaluation result is that the target detection model does not meet the standards.
[0139] It should be noted that the preset requirements are the standards that the evaluation data must meet when the model performance meets the detection standards.
[0140] When the evaluation data does not meet the preset requirements, for example, the accuracy is less than 0.9, or the F1 score is less than 0.9, it is judged that the model performance cannot meet the work requirements, and the evaluation result is that the target detection model does not meet the standards.
[0141] Step S014, when the evaluation data meets the preset requirements, the evaluation result is obtained that the target detection model meets the standards.
[0142] When the evaluation data meets the preset requirements, for example, the accuracy is greater than or equal to 0.9, and the F1 score is greater than or equal to 0.9, the model performance is judged to meet the work requirements, that is, the evaluation result is that the target detection model meets the standards.
[0143] The model is evaluated through evaluation indicators to improve the accuracy and performance of model detection.
[0144] Step S02, when the evaluation result is that the target detection model does not meet the standard, return to the step of obtaining the marine life image dataset.
[0145] When the evaluation result of the model is that the target detection model does not meet the standards, return to the step of obtaining the marine life image dataset and re-train and optimize the model.
[0146] Step S03, when the evaluation result is that the target detection model meets the standard, the model evaluation is completed.
[0147] When the evaluation result of the model shows that the target detection model meets the standards, the evaluation process ends and the model evaluation is completed.
[0148] This embodiment provides a method for detecting marine organisms, which evaluates the target detection model through a verification data set in a preprocessing data set to obtain an evaluation result; when the evaluation result is that the target detection model does not meet the standards, return to the step of obtaining the marine organism image data set; when the evaluation result is that the target detection model meets the standards, complete the model evaluation, and implement verification and evaluation of the model to improve model performance.
[0149] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the marine organism detection method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0150] This application also provides a marine life detection device, please refer to Fig.13 , the device comprises:
[0151] The data acquisition module 10 is used to acquire a marine life image dataset.
[0152] The model training module 20 is used to train a preset model based on the marine life image dataset to obtain an initial detection model.
[0153] The model optimization module 30 is used to optimize the convolutional layer, the cross-level local network module and the improved spatial pyramid pooling module of the initial detection model to obtain a target detection model.
[0154] The recognition and detection module 40 is used to recognize the marine life image through the target detection model to obtain the marine life detection result.
[0155] In one embodiment, the model optimization module 30 is also used to obtain a receptive field attention convolution layer, a cross-level local network-receptive field attention convolution layer module and an improved spatial pyramid pool-perceptual kernel convolution module; the convolution layer, the cross-level local network module and the improved spatial pyramid pool module of the initial detection model are optimized by the receptive field attention convolution layer, the cross-level local network-receptive field attention convolution layer module and the improved spatial pyramid pool-perceptual kernel convolution module to obtain the optimized initial detection model; the optimized initial detection model is used as the target detection model.
[0156] In one embodiment, the model optimization module 30 is also used to obtain the attention mechanism module, convolution layer, cross-level local network module and improved spatial pyramid pool module of the initial detection model; optimize the attention mechanism module to obtain a receptive field attention convolution module; fuse the convolution layer with the receptive field attention convolution module to obtain a receptive field attention convolution layer; replace the preset convolution layer of the bottleneck layer of the cross-level local network module with the receptive field attention convolution layer; replace the bottleneck layer of the cross-level local network module with a bottleneck layer-receptive field attention convolution layer module to obtain a cross-level local network-receptive field attention convolution module; fuse the improved spatial pyramid pool module with the perception kernel convolution module to obtain an improved spatial pyramid pool-perception kernel convolution module.
[0157] In one embodiment, the model training module 20 is further used to preprocess the marine biological image dataset to obtain a preprocessed dataset; obtain a training dataset based on the preprocessed dataset; and train a preset model based on the training dataset to obtain an initial detection model.
[0158] In one embodiment, the identification and detection module 40 is also used to obtain real-time image data of marine organisms; input the real-time image data of marine organisms into the target detection model to obtain a model output result; and use the model output result as a marine organism detection result.
[0159] In one embodiment, the recognition detection module 40 is also used to evaluate the target detection model through the verification data set in the preprocessing data set to obtain an evaluation result; when the evaluation result is that the target detection model does not meet the standards, return to the step of obtaining the marine biological image data set; when the evaluation result is that the target detection model meets the standards, complete the model evaluation.
[0160] In one embodiment, the recognition and detection module 40 is also used to obtain a verification data set in a preprocessed data set; input the verification set data into the target detection model for evaluation to obtain evaluation data; when the evaluation data does not meet the preset requirements, the evaluation result is that the target detection model does not meet the standards; when the evaluation data meets the preset requirements, the evaluation result is that the target detection model meets the standards.
[0161] The marine life detection device provided by the present application adopts the marine life detection method in the above embodiment, which can solve the technical problem of how to improve the detection accuracy of the marine life detection model. Compared with the prior art, the beneficial effects of the marine life detection device provided by the present application are the same as the beneficial effects of the marine life detection method provided by the above embodiment, and the other technical features in the marine life detection device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0162] The present application provides a marine life detection device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the marine life detection method in the above-mentioned embodiment one.
[0163] Reference below Fig.14 , which shows a schematic diagram of the structure of a marine life detection device suitable for implementing the embodiment of the present application. The marine life detection device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.14 The marine life detection device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0164] like Fig.14As shown, the marine life detection device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM) 1004. In RAM 1004, various programs and data required for the operation of the marine life detection device are also stored. The processing device 1001, ROM 1002, and RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the marine life detection device to communicate with other devices wirelessly or wired to exchange data. Although the figure shows a marine life detection device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0165] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0166] The marine life detection device provided by the present application adopts the marine life detection method in the above embodiment, which can solve the technical problem of how to improve the detection accuracy of the marine life detection model. Compared with the prior art, the beneficial effects of the marine life detection device provided by the present application are the same as the beneficial effects of the marine life detection method provided by the above embodiment, and the other technical features in the marine life detection device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0167] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0168] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0169] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the marine life detection method in the above-mentioned embodiment.
[0170] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0171] The computer-readable storage medium may be included in the marine life detection device; or may exist independently without being assembled into the marine life detection device.
[0172] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the marine life detection device, the marine life detection device: obtains a marine life image data set; trains a preset model based on the marine life image data set to obtain an initial detection model; optimizes the convolutional layer, the cross-level local network module and the improved spatial pyramid pool module of the initial detection model to obtain a target detection model; recognizes marine life images through the target detection model to obtain marine life detection results.
[0173] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0174] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0175] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0176] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned marine organism detection method, and can solve the technical problem of how to improve the detection accuracy of the marine organism detection model. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the marine organism detection method provided in the above-mentioned embodiment, and will not be repeated here.
[0177] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned marine organism detection method when executed by a processor.
[0178] The computer program product provided in this application can solve the technical problem of how to improve the detection accuracy of the marine life detection model. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the marine life detection method provided in the above embodiment, which will not be repeated here.
[0179] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A method for detecting marine organisms, characterized in that: The method comprises: Get a dataset of marine life images; Training a preset model based on the marine life image dataset to obtain an initial detection model; Optimizing the convolutional layer, the cross-level local network module, and the improved spatial pyramid pooling module of the initial detection model to obtain a target detection model; The marine life image is identified by the target detection model to obtain a marine life detection result.
2. The method according to claim 1, characterized in that The step of optimizing the convolutional layer, the cross-level local network module, and the improved spatial pyramid pool module of the initial detection model to obtain the target detection model includes: Get the Receptive Field Attention Convolutional Layer, Cross-Level Local Network-Receptive Field Attention Convolutional Layer Module, and Improved Spatial Pyramid Pooling-Perceptual Kernel Convolutional Module; The convolution layer, the cross-level local network module and the improved spatial pyramid pool module of the initial detection model are optimized through the receptive field attention convolution layer, the cross-level local network-receptive field attention convolution layer module and the improved spatial pyramid pool-perception kernel convolution module to obtain the optimized initial detection model; The optimized initial detection model is used as the target detection model.
3. The method according to claim 2, characterized in that The steps of obtaining the receptive field attention convolution layer, the cross-level local network-receptive field attention convolution layer module and the improved spatial pyramid pool-perception kernel convolution module include: Obtaining the attention mechanism module, convolutional layer, cross-level local network module and improved spatial pyramid pool module of the initial detection model; Optimizing the attention mechanism module to obtain a receptive field attention convolution module; The convolutional layer is merged with the receptive field attention convolutional module to obtain a receptive field attention convolutional layer; Replacing the preset convolutional layer of the bottleneck layer of the cross-level local network module with the receptive field attention convolutional layer; Replacing the bottleneck layer of the cross-level local network module with a bottleneck layer-receptive field attention convolution layer module to obtain a cross-level local network-receptive field attention convolution module; The improved spatial pyramid pooling module is fused with the perceptual kernel convolution module to obtain an improved spatial pyramid pooling-perceptual kernel convolution module.
4. The method according to claim 1, characterized in that The step of training a preset model based on the marine life image dataset to obtain an initial detection model comprises: Preprocessing the marine organism image dataset to obtain a preprocessed dataset; Obtaining a training data set according to the preprocessed data set; The preset model is trained based on the training data set to obtain an initial detection model.
5. The method according to claim 1, characterized in that The step of identifying the marine life image by the target detection model to obtain the marine life detection result comprises: Obtain real-time image data of marine life; Inputting the marine life real-time image data into the target detection model to obtain a model output result; The model output result is used as the marine organism detection result.
6. The method according to claim 1, characterized in that The step of identifying the marine life image by the target detection model to obtain the marine life detection result includes: The target detection model is evaluated by using a validation data set in a preprocessing data set to obtain an evaluation result; When the evaluation result is that the target detection model does not meet the standard, returning to the step of obtaining the marine life image dataset; When the evaluation result shows that the target detection model meets the standard, the model evaluation is completed.
7. The method according to claim 6, characterized in that The step of evaluating the target detection model by using the validation data set in the preprocessing data set to obtain the evaluation result comprises: Get the validation dataset from the preprocessed dataset; Inputting the validation set data into the target detection model for evaluation to obtain evaluation data; When the evaluation data does not meet the preset requirements, the evaluation result is that the target detection model does not meet the standards; When the evaluation data meets the preset requirements, the evaluation result is obtained that the target detection model meets the standards.
8. A marine life detection device, characterized in that: The device comprises: A data acquisition module, used to acquire a marine life image dataset; A model training module, used to train a preset model based on the marine life image dataset to obtain an initial detection model; A model optimization module, used to optimize the convolutional layer, the cross-level local network module and the improved spatial pyramid pool module of the initial detection model to obtain a target detection model; The recognition and detection module is used to recognize the marine life image through the target detection model to obtain the marine life detection result.
9. A marine life detection device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the marine organism detection method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the marine organism detection method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Lightweight model-based chemical instrument identification method, apparatus and device, and medium
CN121617078A