Image segmentation-based planktonic algae biomass calculation method, system and device
Through the combination of XYZ three-dimensional microscopy platform and semantic segmentation network, the light adaptability and multi-level target matching problems of phytoplankton algae biomass determination are solved, and efficient and accurate biomass calculation is achieved.
Patent Information
- Application Number
- CN202510545380.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-08-29
Smart Images

Figure CN120564183A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of biological detection, and in particular to a method, system and device for calculating phytoplankton biomass based on image segmentation. Background Art
[0002] The measurement of phytoplankton biomass is of great significance for aquatic ecological environment monitoring, algal bloom warning, and fishery resource assessment. However, traditional measurement methods mainly rely on manual microscopic observation and statistical analysis. This method is not only time-consuming and labor-intensive, but also prone to data bias and consistency issues due to human subjective factors. In addition, manual detection methods are difficult to apply in large-scale water body monitoring and cannot meet the needs of efficient and accurate monitoring. With the development of computer vision and deep learning technologies, phytoplankton detection methods based on image analysis have gradually become a research hotspot. Among them, the use of deep learning models to segment and analyze microscopic images has become a feasible automated method.
[0003] However, existing computer vision-based detection methods still have certain limitations. Existing methods mainly rely on traditional image processing techniques, such as edge detection and color feature extraction. However, these methods have poor adaptability under different lighting conditions and complex backgrounds, and it is difficult to stably distinguish algae from impurities. Secondly, existing detection methods are usually based on single-frame image recognition. In the process of measuring phytoplankton biomass, phytoplankton may exist at multiple depth levels. A single-frame image cannot easily determine the spatial position and morphological structure of the algae, resulting in an inability to accurately calculate its volume. In addition, current phytoplankton biomass calculation methods are usually based on the area measurement of two-dimensional images and assume that the algae morphology is a regular geometric shape, such as a sphere or ellipsoid, to estimate its volume. This assumption has large errors in practical applications because phytoplankton has diverse morphologies and is not always a regular geometric shape. Therefore, area estimation methods based on two-dimensional images have obvious limitations in accurately calculating algal biomass.
[0004] Furthermore, existing biomass calculation methods often use fixed density coefficients for conversion, failing to fully account for the morphological and density differences among algae species, resulting in inaccurate calculations. Consequently, existing technologies struggle to achieve accurate and stable identification, volume measurement, and biomass assessment of phytoplankton. Summary of the Invention
[0005] The present invention provides a method, system and device for calculating phytoplankton biomass based on image segmentation to solve at least one of the above technical problems.
[0006] The technical solution of the present invention to solve the above technical problems is as follows: a method for calculating phytoplankton biomass based on image segmentation, comprising:
[0007] S1, using the XYZ three-dimensional microscope platform to scan the phytoplankton water sample at multiple depths along the Z axis to obtain a sequence of phytoplankton microscopic images;
[0008] S2, preprocessing each frame in the phytoplankton microscopic image sequence to obtain a preprocessed image sequence;
[0009] S3, using a semantic segmentation network to segment and classify each frame in the preprocessed image sequence to obtain a segmentation and classification result image sequence;
[0010] S4, using the center point offset of the horizontal rectangle circumscribing the segmented area and the structural similarity to determine whether the target segmentation results of each two adjacent frames in the segmentation and classification result image sequence belong to the same phytoplankton;
[0011] S5, based on the classification confidence, performing cross-layer redundancy verification on the target at the same position in multiple frames of the segmentation and classification result image sequence to determine whether the target at the same position is a valid phytoplankton;
[0012] S6, matching and associating multiple frames of the segmentation and classification result image sequence that are valid and belong to the same phytoplankton, obtaining area data of the matched phytoplankton at different depth layers, and performing trapezoidal integration and edge compensation on the area data to obtain volume data of the matched phytoplankton;
[0013] S7: Calculate the biomass of the matched phytoplankton according to the volume data of the matched phytoplankton and the density information of the matched phytoplankton.
[0014] On the basis of the above technical solution, the present invention can also be improved as follows.
[0015] Furthermore, in S2, the pre-processing includes: white balance processing, noise removal processing and contrast enhancement processing.
[0016] Furthermore, the white balance processing specifically adopts gray world algorithm processing or Laplace transform-based adaptive white balance processing;
[0017] The denoising process specifically adopts Gaussian filtering, mean filtering or wavelet transform denoising process;
[0018] The contrast enhancement process adopts histogram equalization process or adaptive contrast adjustment process.
[0019] Furthermore, in S3, the semantic segmentation network is specifically a deep learning semantic segmentation network based on UNet.
[0020] Furthermore, the S4 is specifically:
[0021] S41, generating a circumscribed horizontal rectangle for the target segmentation area of each frame in the segmentation and classification result image sequence, and calculating the center point position of the circumscribed horizontal rectangle;
[0022] S42, calculating a Euclidean distance offset between the center points of the circumscribed horizontal rectangles of the target segmented regions of each two adjacent frames in the segmentation and classification result image sequence according to the center point positions of the circumscribed horizontal rectangles of the target segmented regions of each two adjacent frames in the segmentation and classification result image sequence;
[0023] S43, determining whether the Euclidean distance offset is less than a preset offset threshold; if not, determining that the target segmentation results of two adjacent frames in the segmentation and classification result image sequence do not belong to the same phytoplankton; if so, executing S44 to S45;
[0024] S44, calculating the structural similarity of the circumscribed horizontal rectangles of the target segmented regions of two adjacent frames in the segmentation and classification result image sequence according to the circumscribed horizontal rectangles of the target segmented regions of two adjacent frames in the segmentation and classification result image sequence;
[0025] S45, determining whether the structural similarity is greater than a preset structural similarity threshold; if not, determining that the target segmentation results of two adjacent frames in the segmentation and classification result image sequence do not belong to the same phytoplankton; if so, determining that the target segmentation results of two adjacent frames in the segmentation and classification result image sequence belong to the same phytoplankton.
[0026] Furthermore, the S5 is specifically:
[0027] In all frames of the segmentation and classification result image sequence, it is determined whether the classification confidence of the target at the same position in a preset number of frames exceeds a preset confidence threshold. If so, the target at the same position is determined to be valid phytoplankton; if not, the target at the same position is determined to be impurity and is removed.
[0028] Furthermore, in S6, the formula for performing trapezoidal integration and edge compensation processing on the area data is:
[0029]
[0030] Where V represents the volume data of the matched associated phytoplankton; s i Represents the area data of the matched associated phytoplankton at the i-th depth layer, s i+1 represents the area data of the matched phytoplankton at the i+1 depth layer; n represents the total number of frames in the phytoplankton microscopic image sequence, and the depth layer corresponds to the number of frames; Δz i,i+1represents the interlayer distance between the i-th depth layer and the i+1-th depth layer when the XYZ three-dimensional microscopy platform performs multi-depth layer scanning along the Z axis, and Δz i,i+1 =z i+1 -z i ; V ′ represents the edge compensation volume, and V ′ =0.5(s1+s n )Δz, s1 represents the area data of the matched associated phytoplankton in the first depth layer, s n represents the area data of the matched phytoplankton at the nth depth layer, and Δz represents the average interlayer distance between all adjacent layers when the XYZ three-dimensional microscope platform performs multi-depth layer scanning along the Z axis.
[0031] Furthermore, the frame images in the segmentation and classification result image sequence are specifically binary mask images of phytoplankton;
[0032] The area data of the matched associated phytoplankton at each depth layer is specifically the mask pixel area of the corresponding frame image in the segmentation and classification result image sequence.
[0033] On the basis of the above-mentioned method for calculating phytoplankton biomass based on image segmentation, the present invention also provides a system for calculating phytoplankton biomass based on image segmentation.
[0034] The phytoplankton biomass calculation system based on image segmentation includes:
[0035] A multi-depth layer scanning module is used to perform multi-depth layer scanning of phytoplankton water samples along the Z axis using an XYZ three-dimensional microscopic platform to obtain a sequence of phytoplankton microscopic images;
[0036] a preprocessing module, configured to preprocess each frame in the phytoplankton microscopic image sequence to obtain a preprocessed image sequence;
[0037] A segmentation and classification module, which is used to segment and classify the target for each frame in the preprocessed image sequence using a semantic segmentation network to obtain a segmentation and classification result image sequence;
[0038] a multi-layer matching module for determining whether the target segmentation results of two adjacent frames in the segmentation and classification result image sequence belong to the same phytoplankton by using the center point offset of the horizontal rectangle circumscribing the segmented area and the structural similarity;
[0039] An impurity separation module is used to perform cross-layer redundant verification on the target at the same position in multiple frames of the segmentation and classification result image sequence based on the classification confidence, so as to determine whether the target at the same position is a valid phytoplankton;
[0040] a volume calculation module, which matches and associates multiple frames of targets in the segmentation and classification result image sequence that are valid and belong to the same phytoplankton, obtains area data of the matched and associated phytoplankton at different depth layers, and performs trapezoidal integration and edge compensation on the area data to obtain volume data of the matched and associated phytoplankton;
[0041] The biomass calculation module calculates the biomass of the matched associated phytoplankton based on the volume data of the matched associated phytoplankton and the density information of the matched associated phytoplankton.
[0042] On the basis of the above-mentioned method for calculating phytoplankton biomass based on image segmentation, the present invention also provides a device for calculating phytoplankton biomass based on image segmentation.
[0043] The device for calculating phytoplankton biomass based on image segmentation includes a processor, a memory, and a computer program stored in the memory. When the computer program is executed by the processor, the phytoplankton biomass method based on image segmentation as described above is implemented.
[0044] The beneficial effects of the present invention are as follows: the method, system and device for calculating the biomass of phytoplankton based on image segmentation of the present invention can realize pixel-level fine segmentation and classification by adopting semantic segmentation network, which greatly improves the accuracy of distinguishing phytoplankton from impurities; at the same time, the present invention adopts multi-depth layer continuous scanning, and through the offset analysis of the center point of the circumscribed rectangle of the segmentation result and the secondary verification of the structural similarity, it can accurately associate the segmentation results of the same algae in different frames, and effectively solve the problem of multi-level target matching; moreover, the present invention adopts a multi-frame collaborative decision fusion strategy, and performs cross-layer redundant verification through a multi-frame voting mechanism, which can suppress the interference of single-frame noise, and the best Ultimately, the precise identification and separation of phytoplankton and impurities is achieved; and, the present invention collects and extracts area data at each depth level layer by layer, and then uses the trapezoidal integration method to accurately calculate the three-dimensional volume, fully considering the change of area with depth, avoiding the volume error calculated by assuming that the morphology of phytoplankton is a regular geometric body, thereby significantly improving the accuracy of volume and biomass calculations; in addition, the present invention uses an XYZ three-dimensional microscope platform for multi-depth layer scanning combined with the segmentation and classification of a semantic segmentation network, which can realize automatic analysis and processing of large quantities of images, not only reducing labor costs, but also greatly improving detection efficiency and the accuracy of calculation results. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 This is a flow chart of the method for calculating phytoplankton biomass based on image segmentation according to the present invention;
[0046] Figure 2Schematic diagram of the process for determining whether the target segmentation results of two adjacent frames in the segmentation and classification result image sequence belong to the same phytoplankton;
[0047] Figure 3 This is a structural block diagram of the phytoplankton biomass calculation system based on image segmentation of the present invention. DETAILED DESCRIPTION
[0048] The principles and features of the present invention are described below with reference to the accompanying drawings. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.
[0049] like Figure 1 As shown in FIG, the method for calculating phytoplankton biomass based on image segmentation includes:
[0050] S1, using the XYZ three-dimensional microscope platform to scan the phytoplankton water sample at multiple depths along the Z axis to obtain a sequence of phytoplankton microscopic images;
[0051] S2, preprocessing each frame in the phytoplankton microscopic image sequence to obtain a preprocessed image sequence;
[0052] S3, using a semantic segmentation network to segment and classify each frame in the preprocessed image sequence to obtain a segmentation and classification result image sequence;
[0053] S4, using the center point offset of the horizontal rectangle circumscribing the segmented area and the structural similarity to determine whether the target segmentation results of each two adjacent frames in the segmentation and classification result image sequence belong to the same phytoplankton;
[0054] S5, based on the classification confidence, performing cross-layer redundancy verification on the target at the same position in multiple frames of the segmentation and classification result image sequence to determine whether the target at the same position is a valid phytoplankton;
[0055] S6, matching and associating multiple frames of the segmentation and classification result image sequence that are valid and belong to the same phytoplankton, obtaining area data of the matched phytoplankton at different depth layers, and performing trapezoidal integration and edge compensation on the area data to obtain volume data of the matched phytoplankton;
[0056] S7: Calculate the biomass of the matched phytoplankton according to the volume data of the matched phytoplankton and the density information of the matched phytoplankton.
[0057] The phytoplankton biomass calculation method based on image segmentation of the present invention can not only realize the precise identification and tracking of phytoplankton at different depths, but also efficiently and accurately complete the phytoplankton biomass calculation through the steps of microscopic image acquisition, image preprocessing, semantic segmentation based on deep learning, multi-layer matching, multi-frame target fusion decision, volume calculation and biomass calculation.
[0058] Each step of the method of the present invention is described in detail below.
[0059] In some embodiments, the S1 collects microscopic images of the phytoplankton water sample by scanning at multiple depths along three axes (X, Y, and Z), obtaining microscopic images of the phytoplankton at different depths. High-resolution microscopy is used for automated scanning to ensure image clarity and data integrity.
[0060] In some embodiments, S2 performs pre-processing on each frame in the sequence of phytoplankton microscopic images to improve the accuracy of subsequent analysis. Pre-processing includes white balancing, denoising, and contrast enhancement to improve image quality and provide more accurate input data for subsequent phytoplankton detection and identification.
[0061] Specifically, the white balance processing specifically adopts Gray World algorithm (Gray World) processing or Laplace transform-based adaptive white balance processing to make the image color tend to be natural and eliminate the color cast caused by lighting conditions;
[0062] The denoising process specifically adopts Gaussian filtering, mean filtering or wavelet transform denoising to remove background noise in the microscopic image while retaining edge information of phytoplankton;
[0063] The contrast enhancement process adopts histogram equalization process or adaptive contrast adjustment process to improve the contrast of the algae area, making the target easier to segment and identify.
[0064] In some embodiments, S1 employs a UNet-based deep learning semantic segmentation network to segment and classify the target for each frame in the preprocessed image sequence. Specifically, the frame images in the preprocessed image sequence are input into a UNet-based deep learning semantic segmentation network. The encoder portion of the network extracts image features, and the decoder portion performs progressive upsampling to restore the boundary information of the target region. Finally, the network classifies and segments the target region in the image based on the trained phytoplankton features, obtaining a binary segmentation result (a phytoplankton binary mask image) and a classification label (a classification result).
[0065] In some embodiments, as Figure 2 As shown, the S4 is specifically:
[0066] S41, generating a circumscribed horizontal rectangle for the target segmentation area of each frame in the segmentation and classification result image sequence, and calculating the center point position of the circumscribed horizontal rectangle;
[0067] S42, calculating a Euclidean distance offset between the center points of the circumscribed horizontal rectangles of the target segmented regions of each two adjacent frames in the segmentation and classification result image sequence according to the center point positions of the circumscribed horizontal rectangles of the target segmented regions of each two adjacent frames in the segmentation and classification result image sequence;
[0068] S43, determining whether the Euclidean distance offset is less than a preset offset threshold; if not, determining that the target segmentation results of two adjacent frames in the segmentation and classification result image sequence do not belong to the same phytoplankton; if so, executing S44 to S45;
[0069] S44, calculating the structural similarity of the circumscribed horizontal rectangles of the target segmented regions of two adjacent frames in the segmentation and classification result image sequence according to the circumscribed horizontal rectangles of the target segmented regions of two adjacent frames in the segmentation and classification result image sequence;
[0070] S45, determining whether the structural similarity is greater than a preset structural similarity threshold; if not, determining that the target segmentation results of two adjacent frames in the segmentation and classification result image sequence do not belong to the same phytoplankton; if so, determining that the target segmentation results of two adjacent frames in the segmentation and classification result image sequence belong to the same phytoplankton.
[0071] After obtaining the image sequence of segmentation and classification results based on UNet semantic binarization, a bounding horizontal rectangle is generated for each segmented area in each frame of the image, and its center point position is calculated. By extracting the X and Y axis coordinate information, the center point offset of the target between adjacent frames is calculated to determine whether it belongs to the same phytoplankton individual. The center point offset calculation process: First, the geometric center point of the bounding rectangle of each segmented target is obtained, and based on the center point coordinates (X1, Y1) and (X2, Y2) of the previous and next two frames, the Euclidean distance offset d is calculated:
[0072]
[0073] If the Euclidean distance offset d is less than the preset offset threshold d threshold, then the target is likely the same phytoplankton. Structural similarity (SSIM) is then used to calculate the similarity of the bounding rectangle to ultimately confirm the consistency of the target regions and achieve matching of the same algae at different depths. If the SSIM value is greater than a preset structural similarity threshold (e.g., 0.85), the target regions are confirmed to be consistent. Traditional matching methods (e.g., based on Intersection over Union (IoU)) are easily affected by changes in target shape and size. Therefore, this paper introduces structural similarity (SSIM) for secondary verification. SSIM is more stable when measuring image similarity and can adapt to morphological changes that may occur at different depths. Structural similarity (SSIM) is an indicator specifically used to measure image similarity. It not only takes into account the pixel-level differences between two images, but also introduces local brightness, contrast and structural information. This is more in line with the perception of the human visual system than the traditional mean square error (MSE) or peak signal-to-noise ratio (PSNR). This is especially important for phytoplankton because its morphology may change slightly due to the influence of the depth layer, while structural similarity (SSIM) can tolerate morphological differences within a reasonable range and can still correctly judge whether it is the same target. In addition, the calculation of structural similarity (SSIM) is mainly based on mean, variance and covariance, and the amount of calculation is relatively small, which is suitable for efficient image matching tasks. In the matching process of the present invention, the SSIM calculation is only applied to targets whose center point offset meets the threshold, so it will not significantly increase the computational cost, but can effectively improve the reliability of the matching.
[0074] In some embodiments, the S5 is specifically:
[0075] In all frames of the segmentation and classification result image sequence, it is determined whether the classification confidence of the target at the same position in a preset number of frames exceeds a preset confidence threshold. If so, the target at the same position is determined to be valid phytoplankton; if not, the target at the same position is determined to be impurity and is removed.
[0076] For example, the segmentation and classification result image sequence output by the UNet deep learning semantic segmentation network performs cross-layer redundant verification on targets at the same spatial position (X / Y coordinates) during 10 consecutive frames of scanning on the Z axis. Through a multi-frame voting mechanism, when the classification confidence of a target exceeds a preset confidence threshold (for example, classification confidence ≥ 0.8) in a preset number of frames (for example, the target is in more than 7 frames), it is determined to be valid phytoplankton; otherwise, it is eliminated as impurities. This can suppress single-frame noise interference and ultimately achieve accurate determination and separation of phytoplankton and impurities.
[0077] In some embodiments, in S6, the formula for performing trapezoidal integration and edge compensation on the area data is:
[0078]
[0079] Where V represents the volume data of the matched associated phytoplankton; s i Represents the area data of the matched associated phytoplankton at the i-th depth layer, s i+1 represents the area data of the matched phytoplankton at the i+1 depth layer; n represents the total number of frames in the phytoplankton microscopic image sequence, and the depth layer corresponds to the number of frames; Δz i,i+1 represents the interlayer distance between the i-th depth layer and the i+1-th depth layer when the XYZ three-dimensional microscopy platform performs multi-depth layer scanning along the Z axis, and Δz i,i+1 =z i+1 -z i ; V ′ Indicates the edge compensation volume. For the focal planes not covered at the head and tail, the area is compensated by linear extrapolation, such as the area data s1 and s n Multiply by a factor of 0.5 to correct the boundary truncation error, that is: V ′ =0.5(s1+s n )Δz, s1 represents the area data of the matched associated phytoplankton in the first depth layer, s n represents the area data of the matched phytoplankton at the nth depth layer, and Δz represents the average interlayer distance between all adjacent layers when the XYZ three-dimensional microscope platform performs multi-depth layer scanning along the Z axis.
[0080] Specifically, the frame images in the segmentation and classification result image sequence are binary mask images of phytoplankton; the area data of the matched phytoplankton at each depth layer are the mask pixel areas of the corresponding frame images in the segmentation and classification result image sequence.
[0081] In some embodiments, the formula for calculating the biomass of the matched associated phytoplankton is:
[0082] Q = V × ρ;
[0083] Wherein, Q represents the biomass of the matched associated phytoplankton, V represents the volume data of the matched associated phytoplankton, and ρ represents the density information of the matched associated phytoplankton.
[0084] On the basis of the above-mentioned method for calculating phytoplankton biomass based on image segmentation, the present invention also provides a system for calculating phytoplankton biomass based on image segmentation.
[0085] like Figure 3 As shown, the phytoplankton biomass calculation system based on image segmentation includes:
[0086] A multi-depth layer scanning module is used to perform multi-depth layer scanning of phytoplankton water samples along the Z axis using an XYZ three-dimensional microscopic platform to obtain a sequence of phytoplankton microscopic images;
[0087] a preprocessing module, configured to preprocess each frame in the phytoplankton microscopic image sequence to obtain a preprocessed image sequence;
[0088] A segmentation and classification module, which is used to segment and classify the target for each frame in the preprocessed image sequence using a semantic segmentation network to obtain a segmentation and classification result image sequence;
[0089] a multi-layer matching module for determining whether the target segmentation results of two adjacent frames in the segmentation and classification result image sequence belong to the same phytoplankton by using the center point offset of the horizontal rectangle circumscribing the segmented area and the structural similarity;
[0090] An impurity separation module is used to perform cross-layer redundant verification on the target at the same position in multiple frames of the segmentation and classification result image sequence based on the classification confidence, so as to determine whether the target at the same position is a valid phytoplankton;
[0091] a volume calculation module, which matches and associates multiple frames of targets in the segmentation and classification result image sequence that are valid and belong to the same phytoplankton, obtains area data of the matched and associated phytoplankton at different depth layers, and performs trapezoidal integration and edge compensation on the area data to obtain volume data of the matched and associated phytoplankton;
[0092] The biomass calculation module calculates the biomass of the matched associated phytoplankton based on the volume data of the matched associated phytoplankton and the density information of the matched associated phytoplankton.
[0093] On the basis of the above-mentioned method for calculating phytoplankton biomass based on image segmentation, the present invention also provides a device for calculating phytoplankton biomass based on image segmentation.
[0094] The device for calculating phytoplankton biomass based on image segmentation includes a processor, a memory, and a computer program stored in the memory. When the computer program is executed by the processor, the phytoplankton biomass method based on image segmentation as described above is implemented.
[0095] The method, system, and device for calculating phytoplankton biomass based on image segmentation of the present invention have the following advantages:
[0096] (1) High-precision algae identification: Compared with traditional manual microscope observation and simple threshold segmentation methods, this invention uses a deep learning semantic segmentation model based on UNet to achieve pixel-level fine segmentation and classification, greatly improving the accuracy of distinguishing phytoplankton from impurities;
[0097] (2) Continuous scanning of multiple depth layers: Traditional methods usually rely on single-frame data or simple morphological processing. However, the present invention uses the offset analysis of the center point of the circumscribed rectangle of the network segmentation result and the secondary verification of structural similarity (SSIM) to accurately associate the segmentation results of the same algae in different frames, effectively solving the problem of multi-level target matching.
[0098] (3) Fully utilize Z-axis information: Traditional volume calculation methods often rely on the average value of two-dimensional area, which cannot fully reflect the true form of phytoplankton at different depths. The present invention collects and extracts area data at each depth layer by layer, and then uses the trapezoidal integration method to accurately calculate the three-dimensional volume, thereby more accurately estimating biomass;
[0099] (4) Accurate volume and biomass calculation: Compared with the errors caused by traditional simple geometric assumptions (such as sphere or ellipsoid models), the present invention adopts the trapezoidal integration method for volume calculation, which fully considers the change of area with depth and significantly improves the accuracy of volume and biomass calculation;
[0100] (5) Efficient and automated processing: Traditional manual detection methods are time-consuming and highly subjective. However, the present invention, based on deep learning algorithms, realizes automatic analysis and processing of large quantities of images, which not only reduces labor costs but also greatly improves detection efficiency and the accuracy of calculation results.
[0101] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for calculating phytoplankton biomass based on image segmentation, characterized in that: include: S1, using the XYZ three-dimensional microscope platform to scan the phytoplankton water sample at multiple depths along the Z axis to obtain a sequence of phytoplankton microscopic images; S2, preprocessing each frame in the phytoplankton microscopic image sequence to obtain a preprocessed image sequence; S3, using a semantic segmentation network to segment and classify each frame in the preprocessed image sequence to obtain a segmentation and classification result image sequence; S4, using the center point offset of the horizontal rectangle circumscribing the segmented area and the structural similarity to determine whether the target segmentation results of each two adjacent frames in the segmentation and classification result image sequence belong to the same phytoplankton; S5, based on the classification confidence, performing cross-layer redundancy verification on the target at the same position in multiple frames of the segmentation and classification result image sequence to determine whether the target at the same position is a valid phytoplankton; S6, matching and associating multiple frames of the segmentation and classification result image sequence that are valid and belong to the same phytoplankton, obtaining area data of the matched phytoplankton at different depth layers, and performing trapezoidal integration and edge compensation on the area data to obtain volume data of the matched phytoplankton; S7: Calculate the biomass of the matched phytoplankton according to the volume data of the matched phytoplankton and the density information of the matched phytoplankton.
2. The method for calculating phytoplankton biomass based on image segmentation according to claim 1, characterized in that: In S2, the pre-processing includes: white balance processing, noise removal processing and contrast enhancement processing.
3. The method for calculating phytoplankton biomass based on image segmentation according to claim 2, characterized in that: The white balance processing specifically adopts gray world algorithm processing or Laplace transform-based adaptive white balance processing; The denoising process specifically adopts Gaussian filtering, mean filtering or wavelet transform denoising process; The contrast enhancement process adopts histogram equalization process or adaptive contrast adjustment process.
4. The method for calculating phytoplankton biomass based on image segmentation according to claim 1, wherein: In S3, the semantic segmentation network is specifically a deep learning semantic segmentation network based on UNet.
5. The method for calculating phytoplankton biomass based on image segmentation according to claim 1, wherein: The S4 is specifically: S41, generating a circumscribed horizontal rectangle for the target segmentation area of each frame in the segmentation and classification result image sequence, and calculating the center point position of the circumscribed horizontal rectangle; S42, calculating a Euclidean distance offset between the center points of the circumscribed horizontal rectangles of the target segmented regions of each two adjacent frames in the segmentation and classification result image sequence according to the center point positions of the circumscribed horizontal rectangles of the target segmented regions of each two adjacent frames in the segmentation and classification result image sequence; S43, determining whether the Euclidean distance offset is less than a preset offset threshold; if not, determining that the target segmentation results of two adjacent frames in the segmentation and classification result image sequence do not belong to the same phytoplankton; if so, executing S44 to S45; S44, calculating the structural similarity of the circumscribed horizontal rectangles of the target segmented regions of two adjacent frames in the segmentation and classification result image sequence according to the circumscribed horizontal rectangles of the target segmented regions of two adjacent frames in the segmentation and classification result image sequence; S45, determining whether the structural similarity is greater than a preset structural similarity threshold; if not, determining that the target segmentation results of two adjacent frames in the segmentation and classification result image sequence do not belong to the same phytoplankton; if so, determining that the target segmentation results of two adjacent frames in the segmentation and classification result image sequence belong to the same phytoplankton.
6. The method for calculating phytoplankton biomass based on image segmentation according to claim 1, characterized in that: The S5 is specifically: In all frames of the segmentation and classification result image sequence, it is determined whether the classification confidence of the target at the same position in a preset number of frames exceeds a preset confidence threshold. If so, the target at the same position is determined to be valid phytoplankton; if not, the target at the same position is determined to be impurity and is removed.
7. The method for calculating phytoplankton biomass based on image segmentation according to claim 1, characterized in that: In S6, the formula for performing trapezoidal integration and edge compensation processing on the area data is: Where V represents the volume data of the associated phytoplankton; s i Represents the area data of the matched associated phytoplankton at the i-th depth layer, s i+1 represents the area data of the matched phytoplankton at the i+1 depth layer; n represents the total number of frames in the phytoplankton microscopic image sequence, and the depth layer corresponds to the number of frames; Δz i,i+1 represents the interlayer distance between the i-th depth layer and the i+1-th depth layer when the XYZ three-dimensional microscopy platform performs multi-depth layer scanning along the Z axis, and Δz i,i+1 =z i+1 -z i ; V ′ represents the edge compensation volume, and V ′ =0.5(s1+s n )Δz, s1 represents the area data of the matched associated phytoplankton in the first depth layer, s n represents the area data of the matched phytoplankton at the nth depth layer, and Δz represents the average interlayer distance between all adjacent layers when the XYZ three-dimensional microscope platform performs multi-depth layer scanning along the Z axis.
8. The method for calculating phytoplankton biomass based on image segmentation according to claim 7, characterized in that: The frame images in the segmentation and classification result image sequence are specifically binary mask images of phytoplankton; The area data of the matched associated phytoplankton at each depth layer is specifically the mask pixel area of the corresponding frame image in the segmentation and classification result image sequence.
9. The phytoplankton biomass calculation system based on image segmentation is characterized by: include: A multi-depth layer scanning module is used to perform multi-depth layer scanning of phytoplankton water samples along the Z axis using an XYZ three-dimensional microscopic platform to obtain a sequence of phytoplankton microscopic images; a preprocessing module, configured to preprocess each frame in the phytoplankton microscopic image sequence to obtain a preprocessed image sequence; A segmentation and classification module, which is used to segment and classify the target for each frame in the preprocessed image sequence using a semantic segmentation network to obtain a segmentation and classification result image sequence; a multi-layer matching module for determining whether the target segmentation results of two adjacent frames in the segmentation and classification result image sequence belong to the same phytoplankton by using the center point offset of the horizontal rectangle circumscribing the segmented area and the structural similarity; An impurity separation module is used to perform cross-layer redundant verification on the target at the same position in multiple frames of the segmentation and classification result image sequence based on the classification confidence, so as to determine whether the target at the same position is a valid phytoplankton; a volume calculation module, which matches and associates multiple frames of targets in the segmentation and classification result image sequence that are valid and belong to the same phytoplankton, obtains area data of the matched and associated phytoplankton at different depth layers, and performs trapezoidal integration and edge compensation on the area data to obtain volume data of the matched and associated phytoplankton; The biomass calculation module calculates the biomass of the matched associated phytoplankton based on the volume data of the matched associated phytoplankton and the density information of the matched associated phytoplankton.
10. A device for calculating phytoplankton biomass based on image segmentation, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory, wherein when the computer program is executed by the processor, the method for determining phytoplankton biomass based on image segmentation according to any one of claims 1 to 8 is implemented.