A video monitoring-based automatic detection method for globular brown cyst algae red tide
By combining video surveillance and artificial intelligence target detection algorithms, and using the YOLOv8 model to automatically detect red tides of *Phaeocystis globosa*, the problems of untimely monitoring and low automation in existing technologies have been solved, achieving efficient and accurate red tide monitoring and improving real-time performance and automation levels.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2026-03-31
AI Technical Summary
Existing technologies lack an automatic detection method for Phaeocystis globosa red tides based on video monitoring, resulting in untimely red tide monitoring and a low level of automation, which cannot meet the needs of emergency red tide monitoring.
By combining video surveillance technology with artificial intelligence target detection algorithms, and through the training and optimization of the YOLOv8 target detection model, high-definition cameras on buoy platforms are used to collect image data, which is then preprocessed, labeled, and identified to achieve efficient and accurate monitoring of Phaeocystis globosa red tides.
It significantly improves the real-time performance and automation level of Phaeocystis globosa red tide monitoring, enabling rapid identification of cysts and generation of monitoring information, providing a scientific basis for red tide early warning and management, and supporting marine environmental protection.
Smart Images

Figure CN119964054B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer technology, specifically relating to an automatic detection method for red tides caused by *Phaeocystis glomeratus* based on video surveillance. Background Technology
[0002] Phaeocystis globosa is widely distributed in the world's oceans and often triggers large-scale red tides. Phaeocystis globosa red tides not only lead to water quality deterioration and fish mortality, but can also clog the cooling water systems of coastal nuclear power plants, threatening the safe and normal operation of nuclear power plants. Furthermore, in the later stages of a red tide, the cysts of Phaeocystis globosa rupture and decompose, releasing large amounts of polysaccharides into the seawater, resulting in a large amount of foamy organic matter floating on the sea surface, further polluting the marine and coastal ecosystems and impacting the coastal landscape. Therefore, Phaeocystis globosa red tides have attracted significant attention from governments at all levels and the public.
[0003] When *Phaeocystis globosa* red tides erupt, they typically form giant cysts the size of centimeters. These cysts are visible to the naked eye and can be monitored in real time via video surveillance. Compared to traditional methods such as manual sampling, satellite, or drone monitoring, video surveillance technology offers several unique advantages. First, video surveillance provides high-frequency, continuous observational data, tracking the dynamic changes of the red tide in real time, which is crucial for timely detection of red tide development trends and assessment of its severity. Second, video surveillance systems mounted on buoys do not rely on complex external equipment and can operate stably in various sea conditions, making them particularly suitable for long-term monitoring. Furthermore, video data can be directly used for image analysis, and combined with artificial intelligence technology, monitoring accuracy and automation levels can be further improved, achieving efficient and relatively low-cost red tide monitoring. Therefore, video surveillance technology, as an emerging monitoring method, provides a convenient, continuous, and efficient solution for real-time monitoring of *Phaeocystis globosa* red tides. However, currently, there are no technical solutions for the automatic detection of *Phaeocystis globosa* red tides based on video surveillance image data, both domestically and internationally. Therefore, to meet the needs of emergency red tide monitoring, it is crucial to develop an automatic red tide detection method suitable for video surveillance, a high-frequency sampling method. 。 Summary of the Invention
[0004] To address the aforementioned issues, this invention proposes an automatic detection method for *Phaeocystis globosa* red tides based on video surveillance. This method combines video surveillance technology with artificial intelligence target detection algorithms, and through re-labeling and transfer learning after introducing different scenarios, it demonstrates a significant improvement in recognition performance. This method enables efficient and accurate monitoring of the cysts produced during *Phaeocystis globosa* red tides, thereby significantly improving the real-time performance and automation level of *Phaeocystis globosa* red tide monitoring. It not only provides a scientific basis for red tide early warning and management but also offers valuable support for marine environmental protection and red tide prevention.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] An automatic detection method for *Phaeocystis globosum* red tides based on video surveillance includes the following steps:
[0007] S1. Use the high-definition monitoring camera on the buoy platform to collect image data of the sea surface, transmit the image data to the database in real time, and preprocess the image data.
[0008] S2. Develop a labeling scheme, label the preprocessed image data, and build a training sample library;
[0009] S3. Train and optimize the YOLOv8 target detection model to obtain the Phaeocystis globosa recognition model;
[0010] S4. Extract frames from the video surveillance images to be identified at certain time intervals, and then input each frame into the Phaeocystis globosa recognition model for identification, automatically generating Phaeocystis globosa red tide monitoring information.
[0011] Preferably, the preprocessing in step S1 includes denoising, contrast enhancement, and image transformation augmentation, used to remove irrelevant information from the image, restore and enhance useful information, and enhance the detectability of key features.
[0012] Preferably, the denoising process in step S1 is as follows: using a median filtering algorithm, for each image, first determine a filtering window, then traverse each pixel in the image, sort the pixel values in the filtering window, and take the median as the new value of the current pixel.
[0013] Preferably, the specific process of contrast enhancement in step S1 is as follows: Histogram equalization is used to enhance image contrast. First, the frequency of each gray level in the image is counted to construct a gray level histogram. Then, based on the total number of pixels in the image and the frequency of each gray level, a gray level transformation function is calculated. Through the gray level transformation function, the gray level values of darker or brighter areas in the original image are stretched to make the gray level distribution of the image more uniform and improve the image contrast.
[0014] Preferably, the specific process of image transformation and augmentation in step S1 is as follows: First, perform an image segmentation step to obtain the height and width of the original image. Divide the original image into 3×3 grid-like small images, calculate the height and width of each small image, and extract and store the small images sequentially from left to right and from top to bottom. Then, perform small image augmentation operation. For each small image, perform random rotation, randomly select an angle from 0 degrees and 180 degrees, and use the center of the small image as the rotation point. Use an image rotation algorithm to rotate the small image around the center by the corresponding angle. At the same time, perform random flipping operation, randomly deciding whether to perform horizontal flipping or vertical flipping. If horizontal flipping is decided, The horizontal flip function is used to mirror the small images horizontally. If a vertical flip is desired, the vertical flip function is used to mirror them vertically, thus obtaining small images with different rotation and flip states. Finally, image stitching is performed. A blank target image with a resolution of 1080p and the same number of color channels as the original image is created and the pixels are initialized. Any nine small images after random augmentation are stitched into the target image in a 3×3 layout. Based on the size of the small images and the target position, the pixels of the small images are accurately copied to the corresponding areas of the target image using image copying techniques, ultimately forming a new image after segmentation, augmentation, and stitching.
[0015] Preferably, the annotation scheme in step S2 is to mark the position, length, and width of the target in the image, wherein the target includes the spherical brown algae cysts; the specific annotation process is as follows: the built-in EfficientSam function in Labelme annotation software is used to perform semi-automatic annotation of the spherical brown algae cysts, by clicking on the cyst target, the pixel range contained in the cyst is wrapped with dots and lines; after completing the annotation of a series of targets, an annotation file for the corresponding image is formed; then, through batch processing, the annotation file is converted into a text file that can be read by the YOLOv8 object detection model.
[0016] Preferably, the specific process of training the YOLOv8 object detection model in step S3 is as follows:
[0017] S31. Use the labeled data in the training sample library as the input dataset, and adjust the image data to 448×448×3; the labeled data includes the target category c and the bounding box coordinates (x,y,w,h) of the target in the image, where x and y are the x and y coordinates of the target center point, respectively; w and h are the width and height of the target, respectively.
[0018] The backbone network of the S32 and YOLOv8 object detection models is based on a convolutional neural network structure. It extracts features from the input image through a series of convolutional layers and downsampling layers. The calculation formula for the convolution operation is as follows:
[0019] F i,j,k =∑m,n,c W m,n,c.k ·I i+m,j+n,c +b k ,
[0020] Among them, F i,j,k W represents an element in the feature map. m,n,c,k Indicates the convolution kernel weights; I i+m,j+n,c b is the pixel value of the input image; k This is the bias term; after convolution, the spatial features of the image are extracted and downsampled.
[0021] The S33 and YOLOv8 object detection models employ a feature pyramid network structure for multi-scale fusion, which combines features from different scales to grasp global information and local details.
[0022] S34. In the object detection stage, the YOLOv8 object detection model predicts the object's category and bounding box information on each grid of the image. For each predicted grid, the YOLOv8 object detection model outputs a vector:
[0023] [x1,y1,w1,h1,p c p1, p2, p3, ..., p k ],
[0024] Where x1 and y1 are the lateral and vertical offsets of the center point of the predicted bounding box relative to the grid, respectively; w1 and h1 are the width and height of the predicted bounding box, respectively; p c The confidence levels of the target; p1, p2, p3, ..., p k These represent the probability distributions for each target category;
[0025] The S35 and YOLOv8 object detection models are trained using the following loss function:
[0026] L = L bbox +L obj +L class ,
[0027] Where L is the loss function; L bbox The bounding box loss measures the difference between the predicted and ground truth bounding boxes, and is calculated using IoU loss or GIoU loss; L obj Confidence loss measures the difference between the predicted confidence level and the actual confidence level of the target; L class For category loss, the difference between the predicted target category and the true category is measured. Cross-entropy loss or focus loss is used to improve the ability to identify a small number of categories.
[0028] Preferably, the optimization of the YOLOv8 object detection model in step S3 includes increasing the sample size and transfer learning;
[0029] The specific process of increasing the sample size is as follows: In the data acquisition stage, in addition to the initial acquisition and annotation data, new images of *Phaeocystis globosa* are continuously acquired; the new images of *Phaeocystis globosa* include images of *Phaeocystis globosa* in different or special scenarios; the newly acquired images of *Phaeocystis globosa* are manually annotated according to the established annotation scheme; the annotated data is added to the original sample library to expand the sample library.
[0030] The specific process of transfer learning is as follows: during the training phase of the YOLOv8 object detection model, the model weights of the recognition task are used as pre-training weights; the pre-training weights are input into the new model for identifying *Phaeocystis globosa*; fine-tuning is performed on the new dataset of *Phaeocystis globosa* to improve the learning efficiency of the new task, and to reduce training time and improve the adaptability and accuracy of the model by utilizing the knowledge accumulation of the existing model.
[0031] Preferably, in step S4, the *Phaeocystis globosa* identification model automatically detects *Phaeocystis globosa*, marks the specific location on the cyst image, and automatically counts the size and number of *Phaeocystis globosa* cysts identified in each frame of the image; combined with the time of image acquisition, time series data on the size and number of cysts within the monitoring range during the *Phaeocystis globosa* red tide are formed; for the entire red tide event, the average, maximum, minimum, standard deviation, and total number of cysts are automatically counted using the time series data, forming the time trend of the statistical values of each parameter, and generating statistical charts.
[0032] After adopting the above technical solution, the present invention has the following beneficial effects: By combining video surveillance technology with artificial intelligence target detection algorithms, the present invention can quickly acquire monitoring images of *Phaeocystis spherica* under complex sea conditions, and can automatically identify the acquired images, extracting information such as the size and number of *Phaeocystis spherica* cysts; especially after re-labeling and transfer learning after introducing different scenarios, the recognition effect has been significantly improved. For example, in the case of multiple cysts stacked, it can effectively separate the stacked cysts and identify them one by one. Figure 4 and Figure 5 As shown, it can achieve efficient and accurate monitoring of the cysts produced by Phaeocystis globosa during red tides, and improve the temporal resolution and real-time performance of Phaeocystis globosa red tide monitoring, thereby significantly improving the real-time performance and automation level of Phaeocystis globosa red tide monitoring. It can not only provide a scientific basis for red tide early warning and management, but also provide favorable support for marine environmental protection and red tide prevention and control. Attached Figure Description
[0033] Figure 1 This is a schematic diagram of the process of the present invention;
[0034] Figure 2 This is a flowchart of the present invention;
[0035] Figure 3 This is a schematic diagram of the network structure of the YOLOv8 target detection model of the present invention;
[0036] Figure 4 This is a diagram showing the recognition results of spherical Phaeocystis glomeratus cysts using the unoptimized YOLOv8 target detection model of this invention.
[0037] Figure 5 This is a diagram showing the recognition results of spherical Phaeocystis glomeratus cysts after the YOLOv8 target detection model of the present invention has been optimized. Detailed Implementation
[0038] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0039] like Figures 1 to 5 As shown, an automatic detection method for *Phaeocystis globosum* red tides based on video surveillance includes the following steps:
[0040] S1. Use the high-definition monitoring camera on the buoy platform to collect image data of the sea surface, transmit the image data to the database in real time, and preprocess the image data.
[0041] The preprocessing described in step S1 includes denoising, contrast enhancement, and image transformation augmentation, which are used to remove irrelevant information from the image, restore and enhance useful information, and enhance the detectability of key features.
[0042] The specific denoising process described in step S1 is as follows: using the median filtering algorithm, for each image, first determine a filtering window, then traverse each pixel in the image, sort the pixel values in the filtering window, and take the median as the new value of the current pixel;
[0043] The specific process of contrast enhancement in step S1 is as follows: Histogram equalization is used to enhance image contrast. First, the frequency of each gray level in the image is counted to construct a gray level histogram. Then, based on the total number of pixels in the image and the frequency of each gray level, a gray level transformation function is calculated. Through the gray level transformation function, the gray level values of darker or brighter areas in the original image are stretched to make the gray level distribution of the image more uniform and improve the image contrast.
[0044] The specific process of image transformation and augmentation in step S1 is as follows: First, perform image segmentation to obtain the height and width of the original image. Divide the original image into 3×3 grid-like small images, calculate the height and width of each small image, and extract and store the small images sequentially from left to right and from top to bottom. Then, perform small image augmentation. For each small image, perform random rotation, randomly selecting an angle from 0 degrees and 180 degrees. Using the center of the small image as the rotation point, use an image rotation algorithm to rotate the small image around the center by the corresponding angle. At the same time, perform random flipping operations, randomly deciding whether to perform horizontal or vertical flipping. If horizontal flipping is decided, then... The small images are horizontally mirrored using a horizontal flip function. If a vertical flip is desired, a vertical flip function is used to mirror them vertically, resulting in small images with different rotation and flip states. Finally, image stitching is performed. A blank target image with the same number of color channels as the original image is created and its pixels are initialized. Nine random augmented images are then stitched into the target image in a 3×3 layout. Based on the size of the small images and the target position, the pixels of the small images are accurately copied to the corresponding areas of the target image using image copying techniques, ultimately forming a new image after segmentation, augmentation, and stitching.
[0045] S2. Develop a labeling scheme, label the preprocessed image data, and build a training sample library;
[0046] The annotation scheme described in step S2 involves marking the position, length, and width of the target in the image. The target includes the spherical *Phaeocystis* cyst. The specific annotation process is as follows: the built-in EfficientSam function in the Labelme annotation software is used to perform semi-automatic annotation of the spherical *Phaeocystis* cyst. By clicking on the cyst target, the pixel range contained in the cyst is enclosed in a dotted line manner. After completing the annotation of a series of targets, an annotation file for the corresponding image is formed. Then, through batch processing, the annotation file is converted into a text file that can be read by the YOLOv8 object detection model.
[0047] S3. Train and optimize the YOLOv8 target detection model to obtain the Phaeocystis globosa recognition model;
[0048] The specific process of training the YOLOv8 object detection model in step S3 is as follows:
[0049] S31. Use the labeled data in the training sample library as the input dataset, and adjust the image data to 448×448×3; the labeled data includes the target category c and the bounding box coordinates (x,y,w,h) of the target in the image, where x and y are the x and y coordinates of the target center point, respectively; w and h are the width and height of the target, respectively.
[0050] The backbone network of the S32 and YOLOv8 object detection models is based on a convolutional neural network structure. It extracts features from the input image through a series of convolutional layers and downsampling layers. The calculation formula for the convolution operation is as follows:
[0051] F i,j,k =∑ m,n,c W m,n,c.k ·I i+m,j+n,c +b k ,
[0052] Among them, F i,j,k W represents an element in the feature map. m,n,c,k Indicates the convolution kernel weights; I i+m,j+n,c b is the pixel value of the input image; k This is the bias term; after convolution, the spatial features of the image are extracted and downsampled.
[0053] The S33 and YOLOv8 object detection models employ a feature pyramid network structure for multi-scale fusion, which combines features from different scales to grasp global information and local details.
[0054] S34. In the object detection stage, the YOLOv8 object detection model predicts the object's category and bounding box information on each grid of the image. For each predicted grid, the YOLOv8 object detection model outputs a vector:
[0055] [x1,y1,w1,h1,p c p1, p2, p3, ..., p k ],
[0056] Where x1 and y1 are the lateral and vertical offsets of the center point of the predicted bounding box relative to the grid, respectively; w1 and h1 are the width and height of the predicted bounding box, respectively; p c The confidence levels of the target; p1, p2, p3, ..., p k These represent the probability distributions for each target category;
[0057] The S35 and YOLOv8 object detection models are trained using the following loss function:
[0058] L = L bbox +L obj +L class ,
[0059] Where L is the loss function; L bbox The bounding box loss measures the difference between the predicted and ground truth bounding boxes, and is calculated using IoU loss or GIoU loss; L objConfidence loss measures the difference between the predicted confidence level and the actual confidence level of the target; L class For category loss, the category loss measures the difference between the predicted target category and the true category. Cross-entropy loss or focus loss is used to improve the ability to identify a small number of categories.
[0060] Step S3 optimizes the YOLOv8 object detection model by increasing the sample size and using transfer learning.
[0061] The specific process of increasing the sample size is as follows: In the data acquisition stage, in addition to the initial acquisition and annotation data, new images of *Phaeocystis globosa* are continuously acquired; the new images of *Phaeocystis globosa* include images of *Phaeocystis globosa* in different or special scenarios; the newly acquired images of *Phaeocystis globosa* are manually annotated according to the established annotation scheme; the annotated data is added to the original sample library to expand the sample library.
[0062] The specific process of transfer learning is as follows: during the training phase of the YOLOv8 object detection model, the model weights of the recognition task are used as pre-training weights; the pre-training weights are input into the new model for identifying Phaeocystis globosa; fine-tuning is performed on the new dataset of Phaeocystis globosa to improve the learning efficiency of the new task, and the knowledge accumulation of the existing model is utilized to reduce training time and improve the adaptability and accuracy of the model.
[0063] S4. Extract frames from the video surveillance images to be identified at certain time intervals, and then input each frame into the Phaeocystis globosa recognition model for identification, automatically generating Phaeocystis globosa red tide monitoring information.
[0064] In step S4, the *Phaeocystis globosa* identification model automatically detects *Phaeocystis globosa*, marks the specific location of the cyst in the image, and automatically counts the size and number of *Phaeocystis globosa* cysts identified in each frame of the image. Combined with the time of image acquisition, time series data on the size and number of cysts within the monitoring range during the *Phaeocystis globosa* red tide are generated. For the entire red tide event, the time series data is used to automatically calculate the average, maximum, minimum, standard deviation, and total number of cysts, forming the time trend of the statistical values of each parameter, and generating statistical charts.
[0065] Performance testing:
[0066] Performance tests were conducted using the YOLOv8 object detection models before and after optimization. The unoptimized YOLOv8 object detection model did not employ the optimization methods of increasing sample size and transfer learning in step S3; the optimized YOLOv8 object detection model incorporated the optimization methods of increasing sample size and transfer learning in step S3. The optimized YOLOv8 object detection model is the *Phaeocystis globosa* recognition model of this application. The detection results of the unoptimized and optimized YOLOv8 object detection models are shown in Table 1.
[0067] Table 1: Detection results of the YOLOv8 object detection model before and after optimization
[0068] Model evaluation metrics Before optimization After optimization Optimization rate Precision P 0.908 0.960 ↑5.7% Recall rate R 0.564 0.625 ↑10.8% mAP50 0.675 0.721 ↑6.8% mAP@[0.5:0.95] 0.481 0.674 ↑40.1%
[0069] From Table 1, Figure 4 and Figure 5 As can be seen, after re-labeling and transfer learning in different scenarios, this invention shows a significant improvement in recognition performance. For example, in the case of multiple stacked cysts, it can effectively separate the stacked cysts and identify them one by one. Therefore, by combining the two optimization methods of increasing the sample size and transfer learning, this invention can effectively improve the accuracy and reliability of the *Phaeocystis globosa* recognition model in actual marine environmental monitoring.
[0070] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A video monitoring-based automatic detection method for a Phaeocystis globosa red tide, characterized in that, The method comprises the following steps: S1, collecting image data of the sea surface by using a high-definition monitoring camera on a buoy platform, and transmitting the image data to a database in real time, and preprocessing the image data; S2, formulating an annotation scheme, annotating the preprocessed image data, and constructing a training sample library; S3, training and optimizing a YOLOv8 target detection model to obtain a globular brown cyst algae recognition model; The specific process of training the YOLOv8 target detection model in step S3 is as follows: S31, using the annotation data in the training sample library as an input data set, and adjusting the image data to 448x448x3; the annotation data includes the category c of the target and the boundary box coordinates (x, y, w, h) of the target in the image, wherein x and y are the horizontal and vertical coordinates of the center point of the target; w and h are the width and height of the target; S32, the backbone network of the YOLOv8 target detection model is based on a convolutional neural network structure, and features of the input image are extracted through a series of convolutional layers and down-sampling layers, and the calculation formula of the convolution operation is as follows: , wherein, F i,j,k represents an element in a feature map; W m,n,c,k represents a convolution kernel weight; I i+m,j+n,c is a pixel value of an input image; b k is a bias term; after a convolution operation, spatial features of an image are extracted and down-sampled; S33, the YOLOv8 target detection model adopts a feature pyramid network structure for multi-scale fusion, and masters global information and local details by fusing features of different scales; S34, in the target detection stage, the YOLOv8 target detection model predicts the category and boundary box information of the target on each grid of the image, and for each predicted grid, the YOLOv8 target detection model outputs a vector: , wherein, and are a horizontal offset and a vertical offset of a center point of the predicted bounding box with respect to the grid, respectively; and are a width and a height of the predicted bounding box, respectively; p c is a confidence of the target; are probability distributions of respective target classes, respectively. S35, the YOLOv8 target detection model is trained by the following loss function: , wherein L is a loss function; L bbox is a bounding box loss, the bounding box loss measures the difference between the predicted bounding box and the true bounding box, and is calculated using an IoU loss or a GIoU loss; L obj is a confidence loss, the confidence loss measures the difference between the predicted target confidence and the actual target existence; L class is a class loss, the class loss measures the difference between the predicted target class and the true class, and uses a cross-entropy loss or a focal loss to improve the recognition ability for a small number of classes; S4, frame processing is performed on the to-be-recognized video monitoring pictures at a certain time interval, and each frame of picture is input into the globular brown cyst algae recognition model for recognition to automatically generate globular brown cyst algae red tide monitoring information.
2. The automatic detection method of the Phaeocystis globosa red tide based on video monitoring according to claim 1, characterized in that: The preprocessing in step S1 includes denoising, contrast enhancement and image transformation augmentation, which is used to remove irrelevant information in the image, restore and enhance useful information, and enhance the detectability of key features.
3. The automatic detection method of Phaeocystis globosa red tide based on video monitoring according to claim 2, characterized in that: The specific process of the denoising in step S1 is as follows: a median filter algorithm is adopted, for each image, a filter window is first determined, then each pixel in the image is traversed, the pixel values in the filter window are sorted, and the median value is taken as the new value of the current pixel.
4. The automatic detection method of Phaeocystis globosa red tide based on video monitoring according to claim 2, characterized in that: The specific process of the contrast enhancement in step S1 is as follows: a histogram equalization method is used to enhance the contrast of the image, the frequency of each gray level in the image is first counted to construct a gray histogram, then a gray transformation function is calculated according to the total number of pixels in the image and the frequency of each gray level, and the gray values of the darker or brighter areas in the original image are stretched by the gray transformation function, so as to make the gray distribution of the image more uniform and improve the contrast of the image.
5. The automatic detection method of Phaeocystis globosa red tide based on video monitoring according to claim 2, characterized in that: The specific process of image transformation and augmentation in step S1 is as follows: First, perform image segmentation to obtain the height and width of the original image. Divide the original image into 3×3 grid-like small images, calculate the height and width of each small image, and extract and store the small images sequentially from left to right and from top to bottom. Then, perform small image augmentation. For each small image, perform random rotation, randomly selecting an angle from 0 degrees and 180 degrees. Using the center of the small image as the rotation point, use an image rotation algorithm to rotate the small image around the center by the corresponding angle. At the same time, perform random flipping operations, randomly deciding whether to perform horizontal or vertical flipping. If horizontal flipping is decided, then... The small images are horizontally mirrored using a horizontal flip function. If a vertical flip is desired, a vertical flip function is used to mirror them vertically, resulting in small images with different rotation and flip states. Finally, image stitching is performed. A blank target image with the same 1080p resolution and the same number of color channels as the original image is created and its pixels are initialized. Nine random augmented images are then stitched into the target image in a 3×3 layout. Based on the size of the small images and the target position, the pixels of the small images are accurately copied to the corresponding areas of the target image using image copying techniques, ultimately forming a new image after segmentation, augmentation, and stitching.
6. The automatic detection method of Phaeocystis globosa red tide based on video monitoring according to claim 1, characterized in that: The annotation scheme described in step S2 is to mark the position, length, and width of the target in the image. The target includes the spherical brown algae cyst. The specific annotation process is as follows: the built-in EfficientSam function in Labelme annotation software is used to perform semi-automatic annotation of the spherical brown algae cyst. By clicking on the cyst target, the pixel range contained in the cyst is wrapped with dots and lines. After completing the annotation of a series of targets, an annotation file for the corresponding image is formed. Then, through batch processing, the annotation file is converted into a text file that can be read by the YOLOv8 object detection model.
7. The automatic detection method of the brown-cyst algae red tide based on video monitoring according to claim 1, characterized in that: Step S3 optimizes the YOLOv8 object detection model by increasing the sample size and using transfer learning. The specific process of increasing the sample size is as follows: In the data acquisition stage, in addition to the initial acquisition and annotation data, new images of *Phaeocystis globosa* are continuously acquired; the new images of *Phaeocystis globosa* include images of *Phaeocystis globosa* in different or special scenarios; the newly acquired images of *Phaeocystis globosa* are manually annotated according to the established annotation scheme; the annotated data is added to the original sample library to expand the sample library. The specific process of transfer learning is as follows: during the training phase of the YOLOv8 object detection model, the model weights of the recognition task are used as pre-training weights; the pre-training weights are input into the new model for identifying *Phaeocystis globosa*; fine-tuning is performed on the new dataset of *Phaeocystis globosa* to improve the learning efficiency of the new task, and to reduce training time and improve the adaptability and accuracy of the model by utilizing the knowledge accumulation of the existing model.
8. The automatic detection method of the brown-cyst algae red tide based on video monitoring according to claim 1, characterized in that: The Phaeocystis globosa recognition model in step S4 automatically detects Phaeocystis globosa and marks the specific position on the cyst image, and automatically counts the size and quantity of Phaeocystis globosa cysts recognized in each frame of image; in combination with the time of picture acquisition, time series data of the size and quantity of cysts in the monitoring range during the Phaeocystis globosa red tide are formed; for the whole red tide event, the average value, maximum value, minimum value, standard deviation and total quantity of the size of cysts are automatically counted by using the time series data, the time variation trend of each parameter statistical value is formed, and a statistical chart is generated.
Citation Information
Patent Citations
Remote sensing image target detection method and system based on improved YOLOV8 algorithm
CN117197669A