Enteromorpha detection method based on yolov8 neural network

By improving the YOLOV8 neural network, the problem of difficulty in detecting small and medium-sized targets and insufficient optimization of computing resources has been solved, and high-precision and real-time detection of the Ultimate detection has been achieved, which has improved the ability of marine ecological monitoring.

CN119672525APending Publication Date: 2025-03-21SHANDONG JIAOTONG UNIV TESTING TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411730245.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

The prior art has problems such as small object detection difficulty, insufficient computing resource optimization and insufficient model robustness in the detection of Ulva. It is difficult to achieve high-precision and real-time marine ecological monitoring.

Method used

The Ultimate detection method based on YOLOV8 neural network is adopted, and by modifying the SPPF module of YOLOV8, adding PSA attention module, large-scale convolutional attention and multi-branch groups to enhance fusion attention, building an improved YOLOV8 neural network, and improving the accuracy and robustness of the detection through data enhancement and loss function optimization.

Benefits of technology

It improves the accuracy and robustness of Ulva detection, maintains a high detection speed, and is suitable for real-time monitoring needs of marine ecological protection and management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119672525A_ABST
    Figure CN119672525A_ABST
Patent Text Reader

Abstract

The invention relates to an enteromorpha detection method, and particularly discloses an enteromorpha detection method based on a yov8 neural network. In the invention, a Backbone part (backbone network) and a Neck part (neck network) are used for modifying an SPPF module of YOLOv8, adding a PSA attention module, # large-scale convolution attention (LSKA) and multi-branch group enhanced fusion attention (MGEFA). The invention aims to solve the limitation of the prior art in the aspects of small target detection, computing resource optimization, model robustness improvement and the like through technical innovation. According to the invention, the YOLOv8 is enabled to maintain a high detection speed, and meanwhile, the detection accuracy and robustness are further improved. Due to the characteristics of YOLOv8, the YOLOv8 has greater potential in practical application such as enteromorpha detection and the like, and is expected to provide more powerful technical support for marine ecological protection and management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for detecting enteromorpha, and in particular to a method for detecting enteromorpha based on yolov8 neural network Background Art

[0002] With its vast space and abundant resources, the ocean plays a key role in regulating the global ecological environment. However, with the continuous development of the economy, the frequency of marine pollution incidents has increased year by year, resulting in the destruction of a large number of marine organisms and resources, even endangering human health, and having a negative impact on various marine activities. As a typical marine pollutant, the large-scale outbreak of Enteromorpha is an ecological imbalance phenomenon caused by eutrophication of seawater, which not only causes serious environmental problems, but also has a significant impact on marine economic fields such as coastal fisheries, seafood safety, port engineering and tourism. Enteromorpha disasters have become a common problem in the coastal areas from Jiangsu to Shandong. Therefore, it is urgent to monitor Enteromorpha pollution and protect the marine environment. Timely and accurate tracking and acquisition of Enteromorpha dynamic information is of great practical significance for disaster reduction and prevention.

[0003] Monitoring and prevention of submarine disasters has become one of the focal issues of common concern for managers and scholars. Traditional machine methods such as Wang et al. use multi-temporal SAR images, especially images with short time intervals, as well as current data from buoys and wind products from SeaWinds scatterometers, to perform EP dynamic monitoring and drift trend analysis. The analysis results show that SAR values, ocean currents, and wind data can be used to predict the trend of EP drift. Xie et al. proposed a new object-oriented random forest classification (OORFC) framework based on synthetic aperture radar (SAR) images. The method is to perform a multi-scale segmentation process on each SAR image to generate patches with homogeneous attributes; then, a random forest classifier is trained based on the features of these patches. Finally, for new SAR images, E. prolifera can be detected by the generated random forest classifier, and operational monitoring of E. prolifera outbreaks can be achieved. The detection of E. prolifera on multi-temporal SAR images was experimentally evaluated. Deep learning-based detection methods, for example, Dong et al. proposed a method for Enteromorpha detection in high-resolution remote sensing images (HSRIs) based on boundary-assisted dual-path convolutional neural networks (BADP-CNNs) to address the difficulty of accurately detecting the boundaries of Enteromorpha regions in HSRIs. First, a large-scale HSRIs Enteromorpha detection dataset FIO-EP was created and released to promote the development of the HSRIs Enteromorpha detection field. Then, a BADP-CNN framework was designed to detect Enteromorpha in HSRIs based on the shape distribution characteristics of Enteromorpha. In the CNN framework, accurate detection of Enteromorpha regions in HSRIs was achieved by fusing the accurate detection and boundary detection results of Enteromorpha regions in HSRIs. Wan et al. proposed a neural network-based EP extraction method considering sample balance, called EP rough and accurate extraction network. The method consists of two parts: EP rough extraction (a strategy focusing on sample balance) and EP accurate extraction (EP accurate extraction), which is a deep neural network based on a one-dimensional convolutional neural network and a bidirectional long short-term memory (Bi-LSTM), which fully considers the spectral information of each pixel and the contextual dependency between pixels.

[0004] Traditional ground survey methods are usually costly, inefficient, and limited by spatial and temporal factors. Given the large scale, random floating locations, and long duration of seagrass outbreaks, the use of advanced detection technologies is particularly important. Although remote sensing technology occupies an important position in seagrass monitoring, it also has certain limitations, such as low image resolution and long monitoring periods, which usually cannot achieve high-precision monitoring and assessment.

[0005] With the advancement of artificial intelligence technology, the application of YOLOv8 detection technology has provided new possibilities for Enteromorpha monitoring. As an advanced target detection algorithm, YOLOv8 can quickly and accurately identify and locate Enteromorpha areas in images, and has the advantages of high efficiency, low cost, strong timeliness, and high resolution. Compared with traditional satellite remote sensing technology, YOLOv8 not only improves the accuracy and real-time performance of monitoring, but can also be flexibly applied in various complex environments. Summary of the invention

[0006] In view of the defects and shortcomings in the above-mentioned prior art, the present application proposes a method for detecting Enteromorpha based on YOLOv8 neural network.

[0007] In order to achieve the above-mentioned purpose, the present invention adopts the following technical scheme:

[0008] A method for detecting enteromorpha based on YOLOV8, comprising the following steps:

[0009] S1, obtaining a training set and a test set for Enteromorpha detection; specifically comprising the following steps:

[0010] The available sea surface temperature (SST), sea surface height anomaly (SLA) and Argo observation data are assimilated into the FIO-COM model. In order to simulate the mixing effect of tides, parameterized tides are introduced into the FIO-COM model to induce mixing.

[0011] S2. Construct an improved YOLOV8 neural network for Enteromorpha detection;

[0012] The YOLOv8 network is also composed of three parts: Backbone, Neck and Head. For Backbone and Neck, the SPPF module of YOLOv8 is modified, the PSA attention module, large-scale convolutional attention (LSKA) and multi-branch group enhanced fusion attention (MGEFA) are added.

[0013] S3, constructing a loss function, and training an improved YOLOV8 neural network for Enteromorpha detection based on the loss function and the training set;

[0014] The loss function of the YOLOv8 model consists of three parts:

[0015] 1. Location Loss:

[0016]

[0017] IoU is the intersection over union ratio, b and b gtrepresents the center point of the two rectangular boxes, ρ represents the Euclidean distance between the two rectangular boxes, c represents the diagonal distance of the closed area of ​​the two rectangular boxes, v is used to measure the consistency of the relative proportions of the two rectangular boxes, and α is the weight coefficient;

[0018] Purpose: Ensure that the predicted bounding box is as close as possible to the true bounding box.

[0019] Implementation: Use Generalized Intersection over Union (GIOU) loss because it can better handle the situation where the predicted box does not completely overlap with the true box;

[0020] 2. Objectness Loss:

[0021]

[0022] Where N is the number of categories, y i is the true label, P i is the predicted probability;

[0023] Purpose: Predict whether a bounding box contains an object;

[0024] Implementation: Use Binary Cross-Entropy Loss;

[0025] 3. Classification Loss:

[0026]

[0027] Purpose: Predict the category of the object within the bounding box;

[0028] Implementation: Use Cross-Entropy Loss;

[0029] The total loss function is expressed as a combination of these three losses:

[0030] L=λ loc L GIOU +λ obj L obj +λ cls L cls

[0031] Among them, λ loc ,λ obj and λ cls is a hyperparameter that balances the weights of different loss terms.

[0032] Preferably, in step S2, the PSA module: generates a spatial attention weight map through average pooling and maximum pooling operations to enhance the spatial attention of the feature map; multiplies the attention weight map generated by the PSA module by the output of the SPPF module element by element, so that the network can pay more attention to important spatial areas. This design combining SPPF and PSA can further enhance the network's perception of targets of different scales, and through the spatial attention mechanism, the network can more effectively utilize the information in the feature map.

[0033] Preferably, in step S2, Head part: replace traditional convolution with dynamic convolution

[0034] The traditional or static perceptron is represented as y = g(W T x+b), where W and b are the weight matrix and bias vector, g is the activation function, where x, y, and T represent input, output, and transposition respectively; by aggregating K linear functions To define a dynamic perceptron, we can use the following:

[0035]

[0036] st0≤π k (x)≤1,

[0037] where π k is the kth linear function The attention weights are Represents transpose; aggregation weight and deviation is a function of the input and shares the same attention, with attention weights {π k (x)} are not fixed but vary for each input x; they represent a linear model for a given input The best aggregation of To represent the kth predefined convolution kernel parameter; aggregation model is a nonlinear function; therefore, the dynamic perceptron has more representation power than the static perceptron, and st represents the constraint.

[0038] Preferably, in step S3, the improved YOLOV8 neural network for Enteromorpha detection is trained based on the loss function and the training set; specifically comprising the following steps:

[0039] Training process:

[0040] 1. Data preparation:

[0041] Get the dataset

[0042] The data set is divided into training set, validation set and test set. The training set has 800 pictures, the validation set has 267 pictures, and the final test set has 50 pictures.

[0043] 2. Model initialization:

[0044] Download the pre-trained YOLOv8 weights as model initialization; pre-trained weights are model parameters trained based on large-scale datasets, which can help the model converge faster and improve performance on specific tasks;

[0045] 3. Set hyperparameters:

[0046] Determine the number of iterations, batch size, and learning rate weight decay. The training is repeated for 100 generations, with a batch size of 64. The learning rate is set to a linear decay from 0.01 to 0.001.

[0047] 4. Training:

[0048] Forward propagation: Input a batch of image data and obtain the predicted bounding box, confidence and category probability through the trained model;

[0049] Calculate loss: Calculate the loss function based on the predicted results and the true label;

[0050] Back propagation: calculate the gradient of the loss function with respect to the model parameters;

[0051] Update weights: Update model weights using gradient descent or its variants (such as Adam, SGD);

[0052] 5. Evaluation and optimization:

[0053] Evaluate the performance of the model on the validation set;

[0054] Adjust hyperparameters or model structure based on validation results;

[0055] Use techniques such as early stopping or learning rate decay to avoid overfitting;

[0056] 6. Model saving and testing:

[0057] After the training is completed, save the trained model weights.

[0058] Use the test set to evaluate the final performance of the model.

[0059] Compared with the prior art, the beneficial technical effects of the present invention are:

[0060] With the continuous improvement of environmental protection awareness and the demand for ecological civilization construction, and in view of the current related technologies, such as: technology accumulation in the fields of image processing, machine learning, remote monitoring, etc., the present invention realizes that these technologies can be cross-border applied to the fields of marine ecological protection such as early detection and early warning of Enteromorpha. Therefore, in this context, the present invention aims to solve the limitations of existing technologies in small target detection, computing resource optimization, and model robustness improvement through technological innovation. The improvements of the present invention enable YOLOv8 to further improve the accuracy and robustness of detection while maintaining a high detection speed. These characteristics of YOLOv8 give it greater potential in practical applications such as Enteromorpha detection, and are expected to provide more powerful technical support for marine ecological protection and management. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] The present invention will be further described below in conjunction with the accompanying drawings:

[0062] Figure 1 This is the YOLOv8 network architecture diagram of the present invention;

[0063] Figure 2 The test results of the test set of the present invention on YOLOv5;

[0064] Figure 3 This is the test result of the test set of the present invention on YOLOv8. DETAILED DESCRIPTION

[0065] Example 1

[0066] A method for detecting enteromorpha based on YOLOV8, comprising the following steps:

[0067] S1, obtaining a training set and a test set for Enteromorpha detection; specifically comprising the following steps:

[0068] The available sea surface temperature (SST), sea surface height anomaly data (SLA) and Argo observation data are assimilated into the FIO-COM model (a wave-tide-circulation coupled ocean model developed by the First Institute of Oceanography of China). In order to simulate the mixing effect of tides, this application also introduces parameterized tides into the FIO-COM model to induce mixing;

[0069] In this embodiment, the FIO-EP dataset is designed for Enteromorpha detection in high-resolution remote sensing images, so that researchers can combine current advanced detection methods to achieve accurate detection results, which is very useful for preventing the spread of Enteromorpha and the resulting marine ecological disasters.

[0070] Specifically, the dataset is generated by assimilating available sea surface temperature (SST), sea surface height anomaly (SLA) and Argo observations into FIOCOM (a wave-tide-circulation coupled ocean model developed by the First Institute of Oceanography, China) using the EAKF (Ensemble Adjusted Kalman Filter Data Assimilation Scheme) model. The FIOCOM model is a state-of-the-art primitive equation general model based on MOM5 (Modular Ocean Model Version 5) and the MASNUM surface wave model. In FIOCOM, mixing caused by non-breaking surface waves is incorporated into the KPP (K-profile parameterization) vertical mixing scheme. In order to simulate the mixing effect of tides, parameterized tides are also introduced in FIOCOM to induce mixing. The dataset has a horizontal resolution of 0.1°×0.1° and a total of 54 layers in the vertical direction, with spacing varying smoothly from about 2 m at the surface to 366 m at the bottom.

[0071] The FIO-EP dataset contains a total of 1334 images of 512×512 pixels, which are specially used for the detection and classification of Enteromorpha, providing rich data resources for image processing and machine learning in related fields. 1067 images were randomly selected from these 1334 images for this experiment, and divided into a training set and a validation set, with 800 images in the training set and 267 images in the validation set.

[0072] Table 1. Statistics of data set division

[0073]

[0074] When using YOLOv8 for Enteromorpha detection, the data enhancement methods used include Mosaic enhancement, which is to stitch four images into one to enrich the background diversity; MixUp enhancement, which creates new training samples by mixing two images; Random horizontal flipping, which enhances the model's adaptability to changes in target direction; Random cropping, which prompts the model to learn partially visible targets; Color jittering, which adjusts brightness, contrast, saturation and hue to simulate different lighting conditions; Scale jittering, which randomly adjusts the image scale to simulate targets at different distances. By using the above data enhancement methods, the generalization ability and robustness of the model of the present invention in the Enteromorpha detection task are improved.

[0075] S2. Construct an improved YOLOV8 neural network for Enteromorpha detection;

[0076] The YOLOv8 network in this application is also composed of three parts: Backbone, Neck and Head. Among them, Backbone part (trunk network), Neck part (neck network): modify the SPPF module of YOLOv8, add PSA attention module, #Large-scale convolutional attention (LSKA), multi-branch group enhanced fusion attention (MGEFA).

[0077] Among them, the PSA module: generates a spatial attention weight map through average pooling and maximum pooling operations to enhance the spatial attention of the feature map. The attention weight map generated by the PSA module is multiplied element by element with the output of the SPPF module, so that the network can pay more attention to important spatial areas, specifically, element by element multiplication. Assuming that S is the spatial attention weight map generated by the PSA module and P is the output feature map of the SPPF module, the element-by-element multiplication operation can be expressed as: O=S⊙P, where O is the output feature map after multiplication, and ⊙ represents the element-by-element multiplication operation. This design combining SPPF and PSA can further enhance the network's perception of targets of different scales, and through the spatial attention mechanism, the network can more effectively utilize the information in the feature map.

[0078] Head part (head network): replace traditional convolution with dynamic convolution

[0079] Definition: The present invention represents the traditional or static perceptron as y=g(W T x+b), where W and b are the weight matrix and bias vector, g is the activation function, where x, y, and T represent input, output, and transpose respectively; by aggregating K linear functions To define a dynamic perceptron, we can use the following:

[0080]

[0081] st0≤π k (x)≤1,

[0082] where π k is the kth linear function The attention weights are represents the transpose; note that the aggregate weights and deviation is a function of the input and shares the same attention, with attention weights {π k (x)} are not fixed, but vary for each input x. They represent a linear model for a given input The best aggregation of To represent the kth predefined convolution kernel parameters. Aggregation model is a nonlinear function; therefore, the dynamic perceptron has more representation power than the static perceptron, and st represents the constraint.

[0083] Next, we extend it to DynamicConv, which is actually very similar to the idea of ​​Dynamic Perceptron. For a layer, we set K kernels with the same scale and number of channels, and use their respective attention weights π k Fusion is performed to obtain the convolution kernel parameters of this layer. Calculate π k The process (x) first performs GlobalAvgPooling to obtain global spatial features, then maps them to K dimensions through two FC layers, and finally performs softmax normalization. The K attention weights obtained in this way can be assigned to the K kernels of this layer.

[0084] Dynamic convolution adaptively adjusts the convolution kernel parameters according to the characteristics of the input image, and because dynamic convolution is combined with the attention mechanism, multiple convolution kernels can be superimposed in a nonlinear way, which means that the convolution kernel can generate different weights according to different inputs, thereby better capturing the details and features in the image.

[0085] At the same time, dynamic convolution can adaptively generate convolution kernel coefficients according to different inputs, thus breaking the limitation of traditional convolution that all input samples are treated equally. This adaptability enables the model to better extract features when processing diverse inputs.

[0086] Training results after model changes:

[0087]

[0088] Later, the PSA part of SPPF was changed to SE and ECA, but the final results were not as good as PSA. Below are the final test results, including PSA's map (0.7933), SE (0.77923), and ECA (0.76512). Among them, PSA: Pyramid Split Attention Module, SE: Squeeze-and-Excitation Attention Mechanism, ECA: Efficient Channel Attention Mechanism.

[0089]

[0090]

[0091] S3, constructing a loss function, and training an improved YOLOV8 neural network for Enteromorpha detection based on the loss function and the training set; including the following steps

[0092] S3-1, construct loss function;

[0093] The loss function of the YOLOv8 model consists of three main parts:

[0094] 1. Location Loss:

[0095]

[0096] IoU is the intersection over union ratio, b and b gt represents the center point of the two rectangular boxes, ρ represents the Euclidean distance between the two rectangular boxes, c represents the diagonal distance of the closed area of ​​the two rectangular boxes, v is used to measure the consistency of the relative proportions of the two rectangular boxes, and α is the weight coefficient.

[0097] Purpose: Ensure that the predicted bounding box is as close as possible to the true bounding box.

[0098] Implementation: We use the Generalized Intersection over Union (GIOU) loss because it can better handle situations where the predicted boxes do not completely overlap with the true boxes.

[0099] 2. Objectness Loss:

[0100]

[0101] Where N is the number of categories, y i is the true label, P i is the predicted probability.

[0102] Purpose: Predict whether a bounding box contains an object.

[0103] Implementation: Use Binary Cross-Entropy Loss.

[0104] 3. Classification Loss:

[0105]

[0106] Purpose: Predict the category of the object within the bounding box.

[0107] Implementation: Use Cross-Entropy Loss.

[0108] The total loss function can be expressed as a combination of these three losses:

[0109] L=λ loc L GIOU +λ obj L obj +λ cls L cls

[0110] Among them, λ loc ,λ obj and λ cls is a hyperparameter that balances the weights of different loss terms.

[0111] S3-1, training the improved YOLOV8 neural network for Enteromorpha detection based on the loss function and the training set; specifically including the following steps:

[0112] Training process:

[0113] 1. Data preparation:

[0114] Get the dataset

[0115] The dataset is divided into training set, validation set and test set. The training set contains 800 pictures, the validation set contains 267 pictures, and the final test set contains 50 pictures.

[0116] Data enhancement, such as random cropping, flipping, scaling, etc., the main function of the image enhancement algorithm in this embodiment is to perform a series of processing on the image collected by the imaging device, enhance the overall effect or local details of the image, thereby improving the overall and local contrast, suppressing unnecessary detail information, and improving the quality of the image to make it conform to the visual characteristics of the human eye. In addition to simply expanding the diversity of image data, generalized data enhancement also includes improving sample quality, such as reducing the negative impact of imbalanced sample data between classes, class optimization scale adaptability, and difficulty in distinguishing boundary samples on system performance, thereby improving the generalization ability of the model and enhancing robustness. When using YOLOv8 for Enteromorpha detection, the data enhancement method used in the present invention includes Mosaic enhancement, that is, splicing four images into one to enrich the background diversity; MixUp enhancement, creating a new training sample by mixing two images; random horizontal flipping, enhancing the model's adaptability to changes in target direction; random cropping, prompting the model to learn partially visible targets; color jittering, adjusting brightness, contrast, saturation and hue to simulate different lighting conditions; scale jittering, randomly adjusting the image scale to simulate targets at different distances. By using the above data enhancement methods, the generalization ability and robustness of the model of the present invention in the enteromorpha detection task are improved.

[0117] 2. Model initialization:

[0118] Download the pre-trained YOLOv8 weights as model initialization; in this embodiment, the pre-trained weights are model parameters obtained by training based on a large-scale dataset (such as the COCO dataset), which can help the model converge faster and improve performance on specific tasks.

[0119] 3. Set hyperparameters:

[0120] Determine the number of iterations, batch size, and learning rate weight decay. The training is repeated for 100 generations with a batch size of 64. The learning rate is set to a linear decay from 0.01 to 0.001.

[0121] 4. Training:

[0122] Forward propagation: Input a batch of image data and obtain the predicted bounding box, confidence, and category probability through the trained model.

[0123] Calculate loss: Calculate the loss function based on the predicted results and the true labels.

[0124] Backpropagation: Calculate the gradient of the loss function with respect to the model parameters.

[0125] Update weights: Update the model weights using gradient descent or its variants (such as Adam, SGD).

[0126] 5. Evaluation and optimization:

[0127] Evaluate the performance of the model on the validation set.

[0128] Adjust hyperparameters or model structure based on the validation results.

[0129] Use techniques such as early stopping or learning rate decay to avoid overfitting.

[0130] 6. Model saving and testing:

[0131] After the training is completed, save the trained model weights.

[0132] Use the test set to evaluate the final performance of the model.

[0133] Example 2

[0134] In this application, the environment for training the improved YOLOV8 neural network for Enteromorpha detection is as follows: the operating system is CentOS 7.9, the Linux kernel version is 3.10.0-1160.41.1.el7.x86_64, and the gcc version is 4.8.5; the programming language used is Python 3.8. The computer hardware platform uses the NVIDIA Tesla K40m computing platform and uses the CUDA10.2 acceleration algorithm.

[0135] test:

[0136] This application first uses the training set to train the YOLOV5 neural network model for 100 epochs, and then uses the test set to test the improved YOLOV8 neural network model and the YOLOV5 neural network model described in this application. The test results are shown in Table 1:

[0137]

[0138] In Table 1, m AP Indicates the average mean precision, average mean precision m AP As an indicator for evaluating the accuracy of the training model, the average mean precision m AP It is a performance indicator for predicting target location and category, which refers to the average accuracy of different categories A p The average value, average mean precision m AP The higher the mapping value, the better the model. Precision P and recall R are also key indicators, where precision indicates the accuracy of detecting the target, and recall R measures the ability to detect all relevant targets. Precision P, recall R, average precision A p And the average mean precision m AP The calculation formulas are shown in equations (1) to (4):

[0139]

[0140] In formula (1) to formula (4), P represents the precision, R represents the recall, and T p Indicates the number of correctly predicted positive samples, F p Indicates the number of negative samples predicted as positive samples, F N Indicates the number of positive samples predicted as negative samples; A p represents the average accuracy of the category, k represents the number of categories; m AP Represents the average accuracy A of different categories p The average value of .

[0141] By comparing the specific experimental results, the present invention can find that all indicators when using YOLOv8 for training are better than YOLOv5, and the accuracy of both is greater than 0.75, which shows that both can complete the task of Enteromorpha detection relatively well. In actual applications, the present invention needs to select different network models according to different scenarios. For example, if you need a model that is easy to use and has more stable performance, YOLOv5 will be a better choice; and if you need to pursue higher accuracy and faster speed, YOLOv8 will have a better performance.

[0142] After that, the present invention used a total of 50 pictures in the test set for testing, and calculated the relevant evaluation indicators by comparing with the true mask. In the experiment, when the IOU (intersection over union) of the true mask and the detection mask is ≥ 0.5 and the confidence is greater than 0.7, the present invention believes that the recognition result at this time is correct. The following figure shows the test results of some pictures. Finally, the present invention statistically analyzed the test results of all test pictures, and the result was that the recognition accuracy of YOLOv5 on the test set was 92%, while the recognition accuracy of YOLOv8 on the test set was 96%.

[0143] In addition, the present invention also uses the Efficientdet network model to test its ability in performing Enteromorpha detection tasks. The specific experimental results are shown in the following table. Moreover, the experimental results show that the performance of Efficientdet is obviously less than that of YOLO for Enteromorpha detection tasks.

[0144] Table 3. Comparison of Efficientdet and YOLOv8 training results

[0145]

[0146] in conclusion

[0147] In this article, the present invention compares the performance of YOLOv5 and YOLOv8 in Enteromorpha detection. First, the present invention converts the labels of the FIO-EP Enteromorpha dataset into a label format that can be recognized and trained by YOLO. Then, the present invention uses the YOLOv5 and YOLOv8 network models to perform feature extraction and model training on the dataset, respectively. The final experimental results show that YOLOv8 not only has a 4% higher recognition accuracy than YOLOv5 on the test set, but also a detection speed that is 0.03 seconds faster, which indicates that YOLOv8 is superior to YOLOv5 in both accuracy and detection speed. Specifically, YOLOv8's anchor-free detection mechanism and improved feature extraction method significantly improve the detection performance of the target.

[0148] In addition, YOLOv8 has also made significant improvements in processing speed compared to YOLOv5, and is more suitable for real-time detection applications. Although YOLOv5 performs better in terms of ease of use and deployment flexibility, the overall performance of YOLOv8 is more superior, which is more obvious in application scenarios that require high precision and high speed. In future work, the present invention will continue to explore methods that can optimize data processing and feature fusion to further improve detection results and network training speed. Through this study, the present invention verifies the potential of the YOLO network model in Enteromorpha detection and provides valuable reference for future research.

[0149] "Limitation and Discussion"

[0150] There are some limitations in using YOLOv8 for Enteromorpha detection: first, the model performs poorly in detecting small targets, especially at long distances or in partial occlusion, which may lead to missed detection or false detection; second, YOLOv8 has high requirements for computing resources, which limits its application in resource-constrained environments; in addition, the model's robustness to occluded and rotated targets needs to be improved; finally, the model performance is highly dependent on the quality and diversity of the training dataset. In view of these limitations, future research directions include improving small target detection capabilities, optimizing computing efficiency, enhancing model robustness, expanding datasets, and exploring cross-domain applications to promote YOLOv8's wider application in Enteromorpha detection and even marine ecological protection and management.

Claims

1. A method for detecting Enteromorpha based on YOLOV8, comprising the following steps: S1, obtaining a training set and a test set for Enteromorpha detection; specifically comprising the following steps: The available sea surface temperature (SST), sea surface height anomaly (SLA) and Argo observation data are assimilated into the FIO-COM model. In order to simulate the mixing effect of tides, parameterized tides are introduced into the FIO-COM model to induce mixing. S2. Construct an improved YOLOV8 neural network for Enteromorpha detection; The YOLOv8 network is also composed of three parts: Backbone, Neck and Head. For Backbone and Neck, the SPPF module of YOLOv8 is modified, the PSA attention module, large-scale convolutional attention (LSKA) and multi-branch group enhanced fusion attention (MGEFA) are added. S3, constructing a loss function, and training an improved YOLOV8 neural network for Enteromorpha detection based on the loss function and the training set; The loss function of the YOLOv8 model consists of three parts:

1. Location Loss: IoU is the intersection over union ratio, b and b gt represents the center point of the two rectangular boxes, ρ represents the Euclidean distance between the two rectangular boxes, c represents the diagonal distance of the closed area of ​​the two rectangular boxes, v is used to measure the consistency of the relative proportions of the two rectangular boxes, and α is the weight coefficient; Purpose: Ensure that the predicted bounding box is as close as possible to the true bounding box. Implementation: Use Generalized Intersection over Union (GIOU) loss because it can better handle the situation where the predicted box does not completely overlap with the true box; 2. Objectness Loss: Where N is the number of categories, y i is the true label, P i is the predicted probability; Purpose: Predict whether a bounding box contains an object; Implementation: Use Binary Cross-Entropy Loss; 3. Classification Loss: Purpose: Predict the category of the object within the bounding box; Implementation: Use Cross-Entropy Loss; The total loss function is expressed as a combination of these three losses: L=λ loc L GIOU +λ obj L obj +λ cls L cls Among them, λ loc ,λ obj and λ cls is a hyperparameter that balances the weights of different loss terms.

2. The YOLOV8-based enteromorpha detection method according to claim 1, characterized in that: In step S2, the PSA module: generates a spatial attention weight map through average pooling and maximum pooling operations to enhance the spatial attention of the feature map; multiplies the attention weight map generated by the PSA module by the output of the SPPF module element by element, so that the network can pay more attention to important spatial areas. This design combining SPPF and PSA can further enhance the network's perception of targets of different scales, and through the spatial attention mechanism, the network can more effectively utilize the information in the feature map.

3. The method for detecting Enteromorpha based on YOLOV8 according to claim 1, characterized in that: In step S2, Head part: replace traditional convolution with dynamic convolution The traditional or static perceptron is represented as y = g(W T x+b), where W and b are the weight matrix and bias vector, g is the activation function, where x, y, and T represent input, output, and transposition respectively; by aggregating K linear functions To define a dynamic perceptron, we can use the following: where π k is the kth linear function The attention weights are Represents transpose; aggregation weight and deviation is a function of the input and shares the same attention, with attention weights {π k (x)} are not fixed but vary for each input x; they represent a linear model for a given input The best aggregation of To represent the kth predefined convolution kernel parameter; aggregation model is a nonlinear function; therefore, the dynamic perceptron has more representation power than the static perceptron, and st represents the constraint.

4. The method for detecting Enteromorpha based on YOLOV8 according to claim 1, characterized in that: In step S3, the improved YOLOV8 neural network for Enteromorpha detection is trained based on the loss function and the training set; specifically, the steps include: Training process:

1. Data preparation: Get the dataset The data set is divided into training set, validation set and test set. The training set has 800 pictures, the validation set has 267 pictures, and the final test set has 50 pictures.

2. Model initialization: Download the pre-trained YOLOv8 weights as model initialization; pre-trained weights are model parameters trained based on large-scale datasets, which can help the model converge faster and improve performance on specific tasks; 3. Set hyperparameters: Determine the number of iterations, batch size, and learning rate weight decay. The training is repeated for 100 generations, with a batch size of 64. The learning rate is set to a linear decay from 0.01 to 0.

001.

4. Training: Forward propagation: Input a batch of image data and obtain the predicted bounding box, confidence and category probability through the trained model; Calculate loss: Calculate the loss function based on the predicted results and the true label; Back propagation: calculate the gradient of the loss function with respect to the model parameters; Update weights: Update model weights using gradient descent or its variants (such as Adam, SGD); 5. Evaluation and optimization: Evaluate the performance of the model on the validation set; Adjust hyperparameters or model structure based on validation results; Use techniques such as early stopping or learning rate decay to avoid overfitting; 6. Model saving and testing: After the training is completed, save the trained model weights. Use the test set to evaluate the final performance of the model.

Citation Information

Cited By

  • Yellow sea enteromorpha remote sensing recognition algorithm based on edge enhanced deep learning

    CN120147760A

  • Sea surface enteromorpha detection method and system based on deep learning

    CN120564034A