Statistical method for attachment density of jellyfish and hydranth in seawater
By using grid segmentation and object detection models to identify jellyfish hydrate bodies in seawater, the problems of low efficiency and poor accuracy of existing statistical methods are solved, and efficient and accurate jellyfish hydrate density statistics are achieved.
Patent Information
- Application Number
- CN202510203128.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-06-10
AI Technical Summary
The existing jellyfish hydrodynamic statistical methods have low statistical efficiency and poor statistical accuracy, which affects the accuracy of hydrodynamic disaster intensity assessment.
The jellyfish hydrate body attachment density statistics method is used in seawater. By making an attachment plate with grid cells, the jellyfish hydrate body images on the attachment plate are collected, and the underwater attachment plate image grid segmentation model and jellyfish hydrate body target detection model are established. The jellyfish hydrate body in the effective grid cells are identified and counted, and the density of jellyfish hydrate body is estimated.
It realizes intelligent recognition of jellyfish hydrants, with high recognition accuracy and good recognition effect, and improves the efficiency and accuracy of jellyfish hydrants statistics.
Smart Images

Figure CN120125982A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of marine biostatistics, and particularly to a method for statistically calculating the attachment density of jellyfish polyps in seawater. Background Art
[0002] Polyps are the early life history stage of jellyfish. They have the habits of attaching and growing and asexual reproduction, and are an important life stage that is closely concerned in the monitoring and prevention of jellyfish disasters. Observing the attachment amount and changes of polyps in-situ by hanging plates underwater is a common method for evaluating the intensity of polyp disasters.
[0003] Since jellyfish polyps are small and the polyps are densely distributed, it is not easy to identify and count them in-situ. In the specific implementation process, underwater in-situ images can be collected and then manually counted in the laboratory. The existing statistical methods for jellyfish polyps have low statistical efficiency and poor statistical accuracy, which greatly affects the accuracy of the later evaluation results. Summary of the Invention
[0004] To solve the above technical problems, the present application provides a method for statistically calculating the attachment density of jellyfish polyps in seawater, which can intelligently identify jellyfish polyps, and has a high recognition accuracy and good recognition effect.
[0005] A method for statistically calculating the attachment density of jellyfish polyps in seawater includes:
[0006] Manufacture an attachment plate with a number of grid units on its surface, and fix the attachment plate in the seawater of the sea area to be detected;
[0007] After the jellyfish polyps are attached, collect images of the jellyfish polyps on the attachment plate;
[0008] Establish an underwater attachment plate image grid segmentation model, and segment the images of the jellyfish polyps on the collected attachment plate according to the grid unit boundaries of the attachment plate;
[0009] Screen out single valid grid units after excluding incomplete grid units and areas outside the grid units;
[0010] Establish a jellyfish polyp target detection model, and identify and count the jellyfish polyps in the valid grid units;
[0011] Estimate the density of jellyfish polyps based on the number of jellyfish polyps in the valid grid units.
[0012] Preferably, the manufacture of an attachment plate with a number of grid units on its surface and hanging the attachment plate in the seawater of the sea area to be detected includes:
[0013] Manufacture an attachment plate, and divide the plate surface into a number of rectangular grids of the same size;
[0014] Fix the attachment plate in the sea water of the water area to be monitored with wild jellyfish polyps. Select a dark location for fixation, hang the attachment plate horizontally, and provide an attachment surface facing downwards for the jellyfish polyps.
[0015] Preferably, after the jellyfish polyps attach, collect images of the jellyfish polyps on the attachment plate, including:
[0016] Dive to observe the attachment situation of the jellyfish polyps;
[0017] After the jellyfish polyps attach, gently touch and shake the attachment plate to remove the sediment on the surface of the attachment plate;
[0018] Keep the attachment plate facing upwards and stationary until the jellyfish polyps are fully extended;
[0019] Underwater photograph and record the population situation of each grid of jellyfish polyps on the attachment plate to obtain an image containing a complete single grid unit.
[0020] Preferably, establish an underwater attachment plate image grid segmentation model, and perform grid segmentation on the collected images of jellyfish polyps on the attachment plate according to the grid unit boundaries of the attachment plate, including:
[0021] Use the polygon tool of the image annotation tool to perform polygon annotation on the boundaries within each grid unit of the underwater attachment plate image, and save the annotation information as a JSON file;
[0022] Convert the polygon annotation information in the JSON file into the format required for the YOLO model instance segmentation task, and save it as the first dataset;
[0023] Select the instance segmentation models in the YOLOv11-seg series for different sizes, and perform transfer learning on the above dataset using the pre-trained weights of the COCO dataset;
[0024] Train the instance segmentation model, and select the model with the best performance in the evaluation metrics as the underwater attachment plate grid instance segmentation model;
[0025] Select the final grid instance segmentation model to perform grid segmentation on the collected images of jellyfish polyps on the attachment plate according to the grid unit boundaries of the attachment plate.
[0026] Preferably, screen out individual valid grid units after excluding incomplete grid units and areas outside the grid units, including:
[0027] Use the underwater attachment plate grid instance segmentation model to predict the underwater attachment plate image to obtain the instance segmentation mask result corresponding to the underwater attachment plate image. This result contains the grid unit numbers to which each pixel in the underwater attachment plate image belongs;
[0028] Calculate the area of each mask, obtain the coordinates of the bounding box of each mask, calculate the coordinates of its center point, and extract the confidence score of the bounding box of each mask;
[0029] Sort according to the area of each object, the larger the area, the higher the score; calculate the distance from the center point of each object to the center point of the image, the farther the distance, the higher the score; sort according to the confidence score of each object, the higher the confidence, the higher the score;
[0030] Add the area score, distance score and confidence score to obtain the total score of each object, and use the grid cell instance with the largest total score as the valid grid cell.
[0031] Preferably, the establishment of the jellyfish polyp target detection model for identifying and counting the jellyfish polyps in the valid grid cell includes:
[0032] Extract the range of the central grid cell and crop the underwater attachment image;
[0033] Use the rectangular annotation tool of the image annotation tool to annotate the jellyfish polyps in the central grid cell image of the underwater attachment board, and save the annotation information as a JSON file;
[0034] Convert the rectangular box annotation information in the JSON file into the format required for the YOLO model target detection task and save it as the second dataset;
[0035] Select the models for different sizes in the YOLOv11 target detection series and perform transfer learning on the above dataset using the pre-trained weights of the COCO dataset;
[0036] Train the instance segmentation model and select the model with the best performance of the evaluation metrics as the final jellyfish polyp target detection model;
[0037] Use the jellyfish polyp target detection model to perform inference on all images, obtain the number of jellyfish polyp detection boxes predicted by the model, and identify and count the jellyfish polyps in the valid grid cell.
[0038] Preferably, when using the jellyfish polyp target detection model to perform inference on all images, obtain the number of jellyfish polyp detection boxes predicted by the model, and identify and count the jellyfish polyps in the valid grid cell, it is necessary to determine the relationship between the number of grid cells and the counting accuracy through combined calculation to determine the number of the smallest grid cells:
[0039] In the array formed by predicting the number of detection boxes and the number of ground truth annotation boxes in each loop, randomly obtain several samples, calculate the sum of the ground truth counts and the sum of the predicted counts of the selected several samples respectively, use the absolute value of the difference between the sum of the ground truth counts and the sum of the predicted counts as the absolute error, divide the absolute error by the sum of the ground truth counts to obtain the error rate, and calculate the accuracy rate;
[0040] Repeat the above process several times for each sample, and calculate the average value and standard deviation of the accuracy rate, and the average value and standard deviation of the error rate for this sample;
[0041] Draw a graph of the average accuracy rate to show the relationship between the number of samples and the average accuracy rate, and represent the standard deviation of the accuracy rate by error bars;
[0042] Draw a graph of the average error rate to show the relationship between the number of samples and the average error rate, and represent the standard deviation of the error rate by error bars;
[0043] Compare the graph of the average accuracy rate and the graph of the average error rate, and select the abscissa at the turning point from steep to gentle as the number of the required minimum grid units.
[0044] Compared with the prior art, the present application has at least the following beneficial effects:
[0045] The present invention can intelligently identify the hydroid of jellyfish, and has a high recognition accuracy and a good recognition effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Some specific embodiments of the present invention will be described in detail hereinafter with reference to the accompanying drawings in an exemplary but not restrictive manner. The same reference numerals in the drawings denote the same or similar components or parts. Those skilled in the art should understand that these drawings are not necessarily drawn to scale. Attached
[0047] In the figure:
[0048] Figure 1 is a schematic diagram of the overall flow of the present invention;
[0049] Figure 2 is a schematic diagram of an attachment plate with several grids;
[0050] Figure 3 is the original image collected;
[0051] Figure 4 is the result diagram after instance segmentation;
[0052] Figure 5 is the extraction diagram of the central grid area of the underwater attachment plate mask;
[0053] Figure 6 is the detection diagram of the hydroid target in the central grid;
[0054] Figure 7 It is the average accuracy rate graph;
[0055] Figure 8 It is the average error rate graph. Specific implementation manners
[0056] To make the objectives, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be clearly and completely described below in conjunction with specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts shall fall within the protection scope of the present application.
[0057] As Figure 1 shown, a method for statistically analyzing the attachment density of jellyfish polyps in seawater includes the following steps:
[0058] S1. Make an attachment plate with a number of grid units on its surface and fix the attachment plate in the seawater of the sea area to be detected;
[0059] S2. After the jellyfish polyps are attached, collect images of the jellyfish polyps on the attachment plate;
[0060] S3. Establish an underwater attachment plate image grid segmentation model and perform grid segmentation on the images of the jellyfish polyps on the collected attachment plate according to the grid unit boundaries of the attachment plate;
[0061] S4. Screen out single valid grid units after excluding incomplete grid units and areas outside the grid units;
[0062] S5. Establish a jellyfish polyp target detection model to identify and count the jellyfish polyps in the valid grid units;
[0063] S6. Estimate the density of the jellyfish polyps based on the number of the jellyfish polyps in the valid grid units.
[0064] In this embodiment, a method for statistically analyzing the attachment density of jellyfish polyps in seawater is as follows:
[0065] First, make an attachment plate with a number of grid units on its surface and fix the attachment plate in the seawater of the sea area to be detected.
[0066] Based on the attachment living habits of the jellyfish polyps, the following hanging plate and underwater shooting processes are designed to ensure that images reflecting the relative biomass of the jellyfish polyps are collected. The specific process is as follows:
[0067] The attachment plate is made of environmentally friendly organic materials. The size of the attachment plate is designed to be 320mm×220mm, and round holes with a diameter of 5mm are processed at a distance of 5mm from the edge at the four corners for easy fixation. The plate surface is divided into 24 grids, and the area of each grid is 50mm×50mm, as Figure 2 shown.
[0068] It should be noted that when making the attachment plate, various materials that can achieve the attachment of jellyfish polyps and are resistant to seawater corrosion can be selected according to the actual situation, preferably polyethylene terephthalate (PET). At the same time, when determining the size of the attachment plate and the division of each grid, it can also be adaptively set according to the actual needs such as the size of the jellyfish polyps, the pixel of the camera, the turbidity of the seawater, and the shooting distance, rather than completely processing the attachment plate and dividing the grid according to the above size. However, the size or area of the grid unit needs to be a determined data to ensure the subsequent density calculation.
[0069] The attachment plate should be fixed in the area of Aurelia aurita wild polyps in the monitoring water area, and a dark position should be selected for fixation so that the attachment plate is horizontally hung, giving the jellyfish polyps an attachment surface with the attachment surface facing down. Correspondingly, the sediment will cover the upward attachment surface and affect the attachment of the jellyfish polyps, thereby affecting the density statistical results of the jellyfish polyps.
[0070] II. After the jellyfish polyps are attached, collect the images of the jellyfish polyps on the attachment plate.
[0071] The diver dives to observe according to the requirements of the investigation project. After waiting for the jellyfish polyps to attach, regularly dive to collect the images of the polyps on the attachment plate. Before taking pictures, gently touch and shake the attachment plate to remove the sediment on the surface of the attachment plate. After that, the attachment plate should be face up until the jellyfish polyps are fully extended. Subsequently, underwater shooting records are made for each grid of polyps. The obtained original images are as Figure 3 shown.
[0072] When taking underwater pictures, each grid unit on the attachment plate is photographed in sequence to obtain several images with a complete single grid unit.
[0073] It should be noted that due to the water transparency and camera equipment problems, the method of photographing each grid unit in sequence can make the camera closer to the attachment plate, and the obtained images are clearer.
[0074] On the contrary, using the method of photographing the entire attachment plate can also obtain the images of the jellyfish polyps on the attachment plate, but the effect is poor, and the jellyfish polyps cannot be clearly seen from the obtained images.
[0075] Furthermore, on the premise that the image acquisition device and water transparency meet the requirements, the method of photographing the entire attachment plate can also be used to obtain the images of the jellyfish polyps on the attachment plate.
[0076] The grid cell area of the underwater attachment plate image is the key area for jellyfish polyp counting. Through the instance segmentation method, we extracted the area of each grid cell and excluded the incomplete grid cells and the areas outside the grid cells through a scoring mechanism, thus providing a measurable attachment plate area for counting.
[0077] III. Establish a grid segmentation model for the underwater attachment plate image, and perform grid segmentation on the jellyfish polyp images collected on the attachment plate according to the grid cell boundaries of the attachment plate.
[0078] The central grid cell is the target grid cell for counting jellyfish polyps. In addition, during the underwater shooting process, other areas outside the central grid cell will inevitably enter the image field of view. Therefore, through grid segmentation, the central grid cell is retained, and non-central grid cells with only half a grid cell or partial grid cells are deleted.
[0079] (1) Use the Polygon tool of the open-source image annotation tool LabelMe to perform polygon annotation on the boundaries within each grid cell of the underwater attachment plate image, and save the annotation information as a JSON file; then convert the polygon annotation information in the JSON into the format required for the YOLO model instance segmentation task, and this dataset is denoted as D1.
[0080] The dataset D1 is the dataset for training the segmentation central grid model. It is an image segmentation dataset. All the grid cells in the field of view are annotated, and then the corresponding grid cells are segmented. The segmented grid cells include both complete central grid cells and non-central grid cells with only half a grid cell or partial grid cells. The complete central grid cells are used as the areas for jellyfish polyp counting.
[0081] (2) Select a total of 5 instance segmentation models of the YOLOv11-seg series with different sizes, and perform transfer learning on the above dataset using the pre-trained weights of the COCO dataset; each model is trained for 300 epochs, and the image size is 640; select the model with the best performance of the evaluation metrics as the final grid instance segmentation model M1.
[0082] Table 1 Comparison table of the effects of the instance segmentation model of the underwater attachment plate image under the condition of the intersection over union threshold of 0.5
[0083]
[0084] As can be seen from Table 1, the average precision of all classes (detection boxes) and the average precision of all classes (segmentation masks) of yolo11l-seg can reach 0.990 and 0.987 under the condition of an intersection over union (IoU) threshold of 0.5, which is better than the precision of other grid instance segmentation models. Therefore, it can be used as the final grid instance segmentation model for the attachment plate.
[0085] Use the final grid instance segmentation model M1 to perform grid cell segmentation on the collected images. The segmented grid cell images are as Figure 4 shown.
[0086] IV. Screen out individual valid grid cells after excluding incomplete grid cells and areas outside the grid cells.
[0087] Since the grid cells are not photographed completely, and in underwater photography, due to being located at the edge of the field of view, out-of-focus blurring often occurs. Therefore, it is necessary to screen out the central grid cells as valid grid cells based on the previous step and exclude the peripheral grid cells. The specific process is as follows:
[0088] Use the underwater attachment plate grid instance segmentation model M1 to predict the underwater attachment plate image, and obtain the instance segmentation mask result corresponding to the underwater attachment plate image. This result contains the grid cell numbers to which each pixel in the underwater attachment plate image belongs.
[0089] Perform the following statistics on the mask of the underwater attachment plate image to be processed: calculate the area of each mask, that is, the sum of all pixels in the mask; obtain the coordinates of the bounding box of each mask and calculate its center point coordinates; extract the confidence score of the bounding box of each mask.
[0090] Score each grid cell instance mask according to the mask statistical parameters of the underwater attachment plate image to be processed: sort according to the area of each object, and the larger the area, the higher the score; calculate the distance from the center point of each object to the center point of the image, and the farther the distance, the higher the score; sort according to the confidence score of each object, and the higher the confidence, the higher the score.
[0091] Add the above three scores to obtain the total score of each object. The grid cell instance with the highest score is the main grid cell. In this embodiment, the obtained main grid cell is as Figure 5 shown.
[0092] V. Establish a jellyfish polyp target detection model and identify and count the jellyfish polyps in the valid grid cells.
[0093] Extract the range of the central grid cell and crop the underwater attachment image.
[0094] Use the rectangular annotation tool of the open-source image annotation tool LabelMe to perform rectangular box annotation on the jellyfish polyps in the image of the central grid unit of the underwater attachment plate, and save the annotation information as a JSON file; then convert the rectangular box annotation information in the JSON into the format required for the YOLO model object detection task, and this dataset is denoted as D2. The dataset denoted as D2 is used to train the polyp detection model, and each polyp is annotated with a separate detection box.
[0095] Select 5 object detection models with different sizes from the YOLOv11 object detection series, and perform transfer learning on the above dataset using the pre-trained weights of the COCO dataset. Among them, each model is trained for 300 epochs, and the image size is 640.
[0096] Select the model with the best performance in the evaluation metrics as the final jellyfish polyp object detection model M2.
[0097] Table 2 Comparison table of the effects of the jellyfish polyp object detection models on the underwater attachment plate
[0098]
[0099] It can be seen from the comparison table of the effects of the jellyfish polyp object detection models on the underwater attachment plate that the mean average precision of the yolo11m object detection model is 0.867, which is higher than other jellyfish polyp object detection models. Therefore, it can be used as the final jellyfish polyp object detection model.
[0100] Use the final jellyfish polyp object detection model M2 to perform jellyfish polyp object detection, and perform jellyfish polyp object statistics on this basis, as Figure 6 shown.
[0101] In addition, the size of the grid unit in this implementation case is selected to be able to clearly photograph jellyfish polyps in-situ underwater. However, sometimes the number of jellyfish polyps in a single grid unit is small, and using a single grid unit for analysis will lead to deviations in the evaluation of the distribution coverage of jellyfish polyps. Therefore, the combined analysis of multiple grid units is a way to solve this contradiction. This requires determining the relationship between the number of combined calculation grid units and the counting accuracy.
[0102] Obtain the total number of images and the corresponding jellyfish polyp annotation boxes from the validation set of the object detection dataset D2.
[0103] Use the jellyfish polyp object detection model M2 to perform inference on all the images, and obtain the number of jellyfish polyp detection boxes predicted by the model.
[0104] Set the maximum number of merged analysis grid cells N to ensure that it does not exceed the number of validation set samples in dataset D2; perform loop processing with the number of merged analysis grid cells n = 1:N; the specific process is as follows:
[0105] A. In the array formed by predicting the number of detection boxes and the number of true annotation boxes in each loop, randomly obtain n samples, calculate the total sum S1 of the true counts and the total predicted count S2 of the selected n samples respectively, divide the absolute error |S1 - S2| by the true count S1 to obtain the error rate Error, and use 1 - error rate Error to obtain the accuracy Acc.
[0106] B. Repeat the above process 50 times for each n, and calculate the average value and standard deviation of the accuracy rate, and the average value and standard deviation of the error rate at this n.
[0107] C. Plot the average accuracy graph to show the relationship between the number of samples and the average accuracy, as Figure 7 shown, and represent the standard deviation of the accuracy rate through error bars; plot the average error rate graph to show the relationship between the number of samples and the average error rate, as Figure 8 shown, and represent the standard deviation of the error rate through error bars. Compare the average accuracy graph and the average error rate graph, and select the abscissa at the turning point from steep to gentle as the number of the required minimum grid cells.
[0108] VI. Estimate the density of jellyfish polyps by the number of jellyfish polyps in the effective grid cells.
[0109] When estimating the density of jellyfish polyps, divide the statistically counted number of jellyfish polyp detection boxes by the total area of the effective grid cells to obtain the density of jellyfish polyps.
[0110] From the overall solution of this embodiment, its core lies in using the underwater attachment plate grid region instance segmentation model to obtain the grid region instance segmentation mask; then perform underwater attachment plate center grid extraction to obtain the center grid region image; use the jellyfish polyp target detection model to detect jellyfish polyps; since there are several grids on an entire underwater attachment plate, exceeding the minimum required number of grids, so divide the count on the entire plate by the total grid area. Divide the number of jellyfish polyp detection boxes on the entire grid by the area of the entire network to obtain the density of jellyfish polyps.
[0111] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular forms are also intended to include the plural forms. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they specify the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0112] It should be noted that the terms "first", "second", etc. in the description and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein.
[0113] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention can have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A statistical method for the attachment density of jellyfish polyps in seawater, characterized in that: include: An attachment plate having a plurality of grid units on its surface is manufactured, and the attachment plate is fixed in the seawater of the sea area to be detected; After the jellyfish polyp is attached, an image of the jellyfish polyp on the attachment plate is collected; Establishing an underwater attachment plate image grid segmentation model, and performing grid segmentation on the collected jellyfish polyp image on the attachment plate according to the grid unit boundaries of the attachment plate; Screen out a single valid grid cell after excluding incomplete grid cells and areas outside the grid cells; Establish a jellyfish polyp target detection model to identify and count the jellyfish polyps in the effective grid cells; The density of jellyfish polyps was estimated by the number of jellyfish polyps within the valid grid cells.
2. The method for calculating the density of jellyfish polyps in seawater according to claim 1, characterized in that: The method comprises: manufacturing an attachment plate having a plurality of grid units on its surface, and hanging the attachment plate in the seawater of the sea area to be detected, comprising: Make an attachment plate and divide the plate surface into a number of rectangular grids of the same size; The attachment plate is fixed in the seawater of the water area to be monitored with wild jellyfish polyps, and a dark location is selected for fixing, so that the attachment plate is hung horizontally with the jellyfish polyps facing downward.
3. The method for calculating the density of jellyfish polyps in seawater according to claim 2, characterized in that: After the jellyfish polyp is attached, collecting an image of the jellyfish polyp on the attachment plate includes: Dive to observe the attachment of jellyfish polyps; After the jellyfish polyp attaches, gently touch and shake the attachment plate to remove the sediment on the surface of the attachment plate; Keep the attachment plate facing upward until the jellyfish polyp is fully extended; The population situation of each jellyfish polyp grid on the attachment plate was recorded underwater to obtain an image containing a complete single grid unit.
4. The method for calculating the density of jellyfish polyps in seawater according to claim 3, characterized in that: The method of establishing an underwater attachment plate image grid segmentation model and performing grid segmentation on the collected jellyfish polyp image on the attachment plate according to the grid unit boundaries of the attachment plate includes: Use the polygon tool of the image annotation tool to perform polygon annotation on the boundaries of each grid cell in the underwater attachment plate image, and save the annotation information as a JSON file; Convert the polygon annotation information in the JSON file to the format required by the YOLO model instance segmentation task and save it as the first dataset; Select instance segmentation models for different sizes from the YOLOv11-seg series and perform transfer learning on the above datasets using the pre-trained weights of the COCO dataset; Train the instance segmentation model and select the model with the best evaluation index as the underwater attachment plate mesh instance segmentation model; The final grid instance segmentation model is selected to perform grid segmentation on the collected jellyfish polyp image on the attachment plate according to the grid unit boundaries of the attachment plate.
5. The method for calculating the density of jellyfish polyps in seawater according to claim 4, characterized in that: The screening out of a single valid grid cell after excluding incomplete grid cells and areas outside the grid cells includes: The underwater attachment plate image is predicted using the underwater attachment plate grid instance segmentation model to obtain the instance segmentation mask result corresponding to the underwater attachment plate image, which contains the grid unit number to which each pixel in the underwater attachment plate image belongs; Calculate the area of each mask, obtain the coordinates of each mask bounding box, calculate its center point coordinates, and extract the confidence score of each mask bounding box; Sort by the area of each object. The larger the area, the higher the score. Calculate the distance from the center point of each object to the center point of the image. The farther the distance, the higher the score. Sort by the confidence score of each object. The higher the confidence, the higher the score. The area score, distance score, and confidence score are added together to obtain the total score of each object, and the grid cell instance with the largest total score is taken as the valid grid cell.
6. The method for calculating the density of jellyfish polyps in seawater according to claim 5, characterized in that: The jellyfish polyp target detection model is established to identify and count the jellyfish polyps in the effective grid cells, including: Extract the range of the central grid unit and crop the image of the underwater attachment image; Use the rectangle annotation tool of the image annotation tool to annotate the jellyfish polyp in the center grid unit image of the underwater attachment plate with a rectangular frame, and save the annotation information as a JSON file; Convert the rectangular box annotation information in the JSON file into the format required by the YOLO model target detection task and save it as the second data set; Select models of different sizes from the YOLOv11 object detection series and perform transfer learning on the above datasets using the pre-trained weights of the COCO dataset; Train the instance segmentation model and select the model with the best evaluation index as the final jellyfish polyp object detection model; The jellyfish polyp target detection model is used to infer all images, obtain the number of jellyfish polyp detection frames predicted by the model, and identify and count the jellyfish polyps in the valid grid cells.
7. The method for calculating the density of jellyfish polyps in seawater according to claim 6, characterized in that: The jellyfish polyp target detection model is used to infer all images, obtain the number of jellyfish polyp detection frames predicted by the model, and identify and count the jellyfish polyps in the effective grid cells. It is necessary to determine the minimum number of grid cells by combining the relationship between the number of grid cells and the counting accuracy: In each cycle, randomly obtain several samples from the array formed by the number of predicted detection boxes and the number of true annotation boxes, calculate the sum of the true counts and the sum of the predicted counts of the selected samples, use the absolute value of the difference between the sum of the true counts and the sum of the predicted counts as the absolute error, divide the absolute error by the sum of the true counts to get the error rate, and calculate the accuracy; The above process is repeated several times for each sample, and the mean and standard deviation of the accuracy and the mean and standard deviation of the error rate are calculated for the sample; Draw an average accuracy graph to show the relationship between the number of samples and the average accuracy, and use error bars to represent the standard deviation of the accuracy; Draw a mean error rate graph to show the relationship between sample size and mean error rate, and use error bars to represent the standard deviation of the error rate; By comparing the average accuracy graph and the average error rate graph, the horizontal coordinate of the turning point from steep to gentle is selected as the minimum number of grid units required.