Method and device for detecting planktonic algae, electronic equipment and storage medium
By combining 3D image acquisition, pyramid fusion, and offline detection models in phytoplankton detection methods, the problems of high computational load and information loss in existing technologies are solved, achieving efficient algae detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANDONG HYDROLOGY & WATER RESOURCES BUREAU OF YELLOW RIVER WATER RESOURCES COMMISSION
- Filing Date
- 2023-06-20
- Publication Date
- 2026-06-19
AI Technical Summary
Existing deep learning-based methods for detecting phytoplankton suffer from high graphics processor overhead and significant time consumption during 3D scanning, and cannot effectively identify algae that are large in size or difficult to sink.
Image sequences are obtained by taking three-dimensional images from multiple viewpoints. After feature extraction using image detail extraction operators, Gaussian and Laplacian pyramids are constructed, weighted operations are performed, and the fused image is reconstructed and input into an offline detection model for detection.
Without losing 3D view information, the computational load is significantly reduced, the overhead of the graphics processor is decreased, the computing speed is increased, and information loss is avoided.
Smart Images

Figure CN116740699B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and more specifically, to a method, apparatus, electronic device, and storage medium for detecting phytoplankton. Background Technology
[0002] In recent years, with the implementation of the "Yellow River Protection Law of the People's Republic of China," provinces in the Yellow River Basin have continuously strengthened ecological supervision, making automated detection and monitoring of algae increasingly important. Therefore, it is necessary to identify, detect, and statistically analyze phytoplankton in water bodies.
[0003] With the development of deep learning technology, phytoplankton identification has gradually evolved from traditional methods such as ordinary spectral analysis to image recognition methods based on deep learning. Compared with traditional methods, deep learning-based detection methods have the advantages of more reliable detection data and stronger data traceability.
[0004] Existing deep learning-based methods for phytoplankton detection mainly involve 3D scanning of the sample and detecting images at different focal planes within each field of view. The detection results are then superimposed and deduplicated to obtain the final detection and recognition result. However, this method has certain drawbacks: in practice, each field of view often contains hundreds of images. If all these images are to be recognized, the GPU overhead is significant, and the process is extremely time-consuming. Summary of the Invention
[0005] To address the aforementioned technical problems, embodiments of this application provide a method, apparatus, electronic device, and storage medium for detecting phytoplankton.
[0006] In a first aspect, embodiments of this application provide a method for detecting planktonic algae, the method comprising:
[0007] Three-dimensional images are captured from multiple fields of view of the algae sample to be tested to obtain the first image sequence;
[0008] The first image sequence is subjected to feature extraction using an image detail extraction operator to obtain a first weighted mask image sequence.
[0009] Construct a Gaussian pyramid and a Laplacian pyramid of a preset number of layers for the first image sequence to obtain a first initial Gaussian pyramid image and a first initial Laplacian pyramid image;
[0010] Using the first weighted mask image sequence as weights, the first initial Gaussian pyramid image and the first initial Laplacian pyramid image are weighted respectively to obtain the first weighted Gaussian pyramid image and the first weighted Laplacian pyramid image.
[0011] The first fused image is reconstructed based on the first weighted Gaussian pyramid image and the first weighted Laplacian pyramid image;
[0012] The first fused image is input into the offline detection model, which outputs algae detection results and algae statistics.
[0013] In one embodiment, the step of obtaining the offline detection model includes:
[0014] Three-dimensional images were captured from multiple views of the training algae samples to obtain a second image sequence;
[0015] The image detail extraction operator is used to extract features from the second image sequence to obtain a second weighted mask image sequence.
[0016] Construct a Gaussian pyramid and a Laplacian pyramid of a preset number of layers for the second image sequence to obtain a second initial Gaussian pyramid image and a second initial Laplacian pyramid image;
[0017] Using the second weighted mask image sequence as weights, the second initial Gaussian pyramid image and the second initial Laplacian pyramid image are weighted respectively to obtain the second weighted Gaussian pyramid image and the second weighted Laplacian pyramid image.
[0018] The second fused image is reconstructed based on the second weighted Gaussian pyramid image and the second weighted Laplacian pyramid image;
[0019] The second fused image is calibrated to obtain a calibration training set;
[0020] The initial detection model is trained based on the calibration training set to obtain the offline detection model.
[0021] In one embodiment, the step of performing three-dimensional imaging of multiple fields of view of the algae sample to be detected to obtain a first image sequence includes:
[0022] Obtain focal plane images of multiple focal planes for each of the stated fields of view;
[0023] The set of multiple focal plane images is determined as the first image sequence.
[0024] In one embodiment, the step of extracting features from the first image sequence using an image detail extraction operator to obtain a first weighted mask image sequence includes:
[0025] The image detail extraction operator is convolved with each of the focal plane images to obtain an initial mask image sequence;
[0026] The initial mask image sequence is normalized to obtain the first weighted mask image sequence.
[0027] In one embodiment, the step of determining the image detail extraction operator includes:
[0028] Based on the preset edge extraction matrix:
[0029]
[0030] Determine the image detail extraction operator.
[0031] In one embodiment, normalizing the initial mask image sequence to obtain the first weighted mask image sequence includes:
[0032] Each image in the first weighted mask image sequence is calculated using the following formula:
[0033]
[0034] in, This represents the k-th image in the first weighted mask image sequence, where n represents the number of images in the first weighted mask image sequence. This represents the pixel value at the (x, y) coordinates of the k-th image.
[0035] In one embodiment, the step of reconstructing the first fused image from the first weighted Gaussian pyramid image and the first weighted Laplacian pyramid image includes:
[0036] The first weighted Gaussian pyramid image and the first weighted Laplacian pyramid image are fused together to obtain the first fused pyramid;
[0037] The first fused pyramid is upsampled and accumulated a preset number of times to obtain the first fused image, wherein the preset number of times is equal to the preset number of layers.
[0038] Secondly, embodiments of this application provide a planktonic algae detection device, the device comprising:
[0039] The image acquisition module is used to acquire three-dimensional images of multiple fields of view of the algae sample to be tested, and obtain the first image sequence;
[0040] The extraction module is used to extract features from the first image sequence using an image detail extraction operator to obtain a first weighted mask image sequence;
[0041] The construction module is used to construct a Gaussian pyramid and a Laplacian pyramid of a preset number of layers for the first image sequence, so as to obtain a first initial Gaussian pyramid image and a first initial Laplacian pyramid image.
[0042] The weighting module is used to use the first weighted mask image sequence as weights to perform weighted operations on the first initial Gaussian pyramid image and the first initial Laplacian pyramid image respectively, to obtain the first weighted Gaussian pyramid image and the first weighted Laplacian pyramid image.
[0043] The reconstruction module is used to reconstruct a first fused image based on the first weighted Gaussian pyramid image and the first weighted Laplacian pyramid image;
[0044] The output module is used to input the first fused image into the offline detection model and output algae detection results and algae statistical information.
[0045] Thirdly, embodiments of this application provide an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the computer program executes the phytoplankton detection method provided in the first aspect when the processor is running.
[0046] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when run on a processor, executes the phytoplankton detection method provided in the first aspect.
[0047] The phytoplankton detection method provided in this application performs pyramid fusion of the three-dimensional scanning results of each field of view, which significantly reduces the amount of computation without losing the three-dimensional field of view information, thereby reducing the overhead of the graphics processor and improving the computing speed. Attached Figure Description
[0048] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0049] Figure 1 This is a schematic flowchart of a planktonic algae detection method provided in an embodiment of this application;
[0050] Figure 2 This is a schematic diagram of a sub-process of the phytoplankton detection method provided in the embodiments of this application;
[0051] Figure 3 A schematic diagram illustrating the training process of the offline detection model provided in this application embodiment;
[0052] Figure 4 A schematic diagram of the pyramid fusion method provided in the embodiments of this application;
[0053] Figure 5 This is a schematic diagram of the structure of the phytoplankton detection device provided in the embodiments of this application. Detailed Implementation
[0054] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0055] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0056] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0057] In the description of this invention, it should be noted that if terms such as "upper," "lower," "inner," or "outer" are used to indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship in which the product of this invention is usually placed, they are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention.
[0058] Furthermore, the terms "first" and "second" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.
[0059] It should be noted that, where there is no conflict, the features in the embodiments of the present invention can be combined with each other.
[0060] Example 1
[0061] With the development of deep learning technology, phytoplankton identification has gradually evolved from traditional methods such as ordinary spectral analysis to image recognition methods based on deep learning. Compared with traditional methods, deep learning-based phytoplankton detection methods have the advantages of more reliable detection data and stronger data traceability. In existing technologies, two main approaches are used for phytoplankton detection and identification: First, a three-dimensional scan is performed, and then images at different focal planes in each field of view are identified. The identification results of each image are then superimposed and deduplicated to obtain the final identification result for each field of view. Second, only a two-dimensional scan is performed on the bottom of the liquid in the slide, as most algae will settle to this focal plane.
[0062] However, for the first approach, in practice, each field of view often contains hundreds of images. If all these images are to be recognized, the GPU overhead is significant and the time consumption is substantial. For the second approach, larger algae, such as those commonly found in the Yellow River basin (e.g., *Diptychnea*, *Elaphe*, *Nephrolepis*), chain-like algae (e.g., *Anabaena*, *Zoophia*, *Stramonium*), or algae that are difficult to sink (e.g., some *Fragaria* species), cannot be recognized using a single focal plane, resulting in information loss.
[0063] Therefore, there is an urgent need for a method for detecting phytoplankton with minimal information loss and low computational cost. Based on this, this application proposes a novel method: performing 3D scanning, but instead of directly identifying the image of each focal plane, it first fuses the focal planes of each field of view before performing annotation, training, detection, and statistical operations. This reduces GPU overhead and time consumption while also ensuring biological detection across multiple focal planes to avoid missed detections.
[0064] For details, please see Figure 1 and Figure 2 The phytoplankton detection method provided in this embodiment includes the following steps:
[0065] Step S110: Take three-dimensional images of multiple fields of view of the algae sample to be detected to obtain the first image sequence;
[0066] In one embodiment, the step of taking three-dimensional images of multiple fields of view of the algae sample to be detected to obtain a first image sequence includes: acquiring focal plane images of multiple focal planes of each field of view; and determining the set of multiple focal plane images as the first image sequence.
[0067] Images of the sample to be tested at different focal planes in each field of view under a microscope or electron microscope are acquired to obtain a first image sequence corresponding to each field of view. This first image sequence is denoted as I1. An image sequence can correspond to images of all focal planes in one field of view, or it can be images of all focal planes in multiple fields of view. This embodiment takes multiple fields of view as an example; all focal planes are a continuous set of data, so it can also be an image sequence of discontinuous sampling.
[0068] Step S120: Extract features from the first image sequence using an image detail extraction operator to obtain a first weighted mask image sequence;
[0069] In one embodiment, the step of extracting features from the first image sequence using an image detail extraction operator to obtain a first weighted mask image sequence includes: performing a convolution operation between the image detail extraction operator and each of the focal plane images to obtain an initial mask image sequence; and normalizing the initial mask image sequence to obtain the first weighted mask image sequence.
[0070] The image detail extraction operator is used as the convolution kernel to perform a sliding window convolution operation with the images in the first image sequence. Optional image detail extraction operators include the Laplacian operator, the Sobel edge operator, the Roberts operator, etc. In one embodiment, the step of determining the image detail extraction operator includes:
[0071] Based on the preset edge extraction matrix:
[0072]
[0073] Determine the image detail extraction operator.
[0074] This operator is a two-dimensional Laplace operator, where each element represents the weight of its corresponding pixel. The Laplace operator uses an approximate second derivative to calculate the gradient between pixels, thus it can be used to detect edge information in images. In other words, this operator includes not only gradients in the horizontal and vertical directions but also gradient information at an angle. The operator given here is only an example; in practical applications, it may include, but is not limited to, such edge extraction operators.
[0075] The result of the convolution operation is the initial mask image sequence w. This initial mask image sequence w also needs to be normalized or standardized to avoid errors caused by differences in the numerical values of individual image pixels.
[0076] For example, the normalization method provided in the embodiments of this application can be:
[0077] In one embodiment, normalizing the initial mask image sequence to obtain the first weighted mask image sequence includes:
[0078] Each image in the first weighted mask image sequence is calculated using the following formula:
[0079]
[0080] in, This represents the k-th image in the first weighted mask image sequence, where n represents the number of images in the first weighted mask image sequence. This represents the pixel value at the (x, y) coordinates of the k-th image.
[0081] For example, for a pixel with coordinates (0, 0), assuming there are three mask images in w with pixel values of 1, 4, and 5, the normalized pixel values should be 0.1, 0.4, and 0.5 respectively.
[0082] Step S130: Construct a Gaussian pyramid and a Laplacian pyramid of a preset number of layers for the first image sequence to obtain a first initial Gaussian pyramid image and a first initial Laplacian pyramid image.
[0083] In one embodiment, the preset number of layers can be 6. The higher the number of layers, the better the fusion effect, but the actual computing power must also be taken into account. Therefore, this embodiment takes 6 layers as an example to construct the first Gaussian pyramid image and the first Laplacian pyramid image.
[0084] Specifically, a Gaussian pyramid is constructed first. In the process of constructing the Gaussian pyramid, the first image sequence is copied to the bottom layer of the pyramid, i.e., the first layer. Then, Gaussian convolutional filtering is performed step by step using Gaussian convolution kernels, building up layer by layer until the required number of layers is reached.
[0085] Then, a Laplacian pyramid is constructed based on the Gaussian pyramid. The resulting Gaussian pyramids are stacked sequentially, and layers can be stored using cell arrays. The Gaussian pyramids are then processed from the bottom layer image, undergoing an upsampling process to obtain an image with the same size as the penultimate layer of the Gaussian pyramid.
[0086] The upsampled image is processed using Gaussian convolution filtering, and the resulting image is used as one layer of the Laplacian pyramid. The filtered image from the previous step is subtracted from the image of the same size as the Gaussian pyramid to obtain the residual. The above steps are repeated until the top layer of the Gaussian pyramid is reached.
[0087] Step S140: Using the first weighted mask image sequence as weights, perform weighted operations on the first initial Gaussian pyramid image and the first initial Laplacian pyramid image respectively to obtain the first weighted Gaussian pyramid image and the first weighted Laplacian pyramid image.
[0088] Based on the first weighted mask image sequence W, the Laplacian pyramid images of each first image sequence are weighted and summed, where the values in W are the weights of the corresponding images. The summed result is the new first weighted Laplacian pyramid image, denoted as IMGL1. Simultaneously, the Gaussian pyramids of the first image sequences undergo the same operation to obtain the first weighted Gaussian pyramid image, denoted as IMGG1.
[0089] Step S150: Reconstruct the first fused image based on the first weighted Gaussian pyramid image and the first weighted Laplacian pyramid image;
[0090] In one embodiment, the step of reconstructing the first fused image based on the first weighted Gaussian pyramid image and the first weighted Laplacian pyramid image includes: fusing the corresponding layers of the first weighted Gaussian pyramid image and the first weighted Laplacian pyramid image to obtain a first fused pyramid; and upsampling and accumulating the first fused pyramid a preset number of times to obtain the first fused image, wherein the preset number of times is equal to the preset number of layers.
[0091] The final image was reconstructed based on this first fused pyramid; the reconstruction process is as follows: Figure 4 As shown.
[0092] A formula similar to alpha fusion can be applied to fuse the layers of IMGL1 and IMGG1 to obtain a new first fused pyramid, IMG1. Then, IMG1 is upsampled and added to the top layer of the first fused pyramid to obtain IMG2; IMG2 is upsampled and added to the next layer to obtain IMG3, and this process is repeated until six layers are stacked. The final image is the result of the pyramid fusion algorithm, which is the first fused image. Compared to directly calculating the weights of the mask image, pyramid fusion produces a more natural fused image.
[0093] Step S160: Input the first fused image into the offline detection model and output algae detection results and algae statistics.
[0094] In one embodiment, the step of obtaining the offline detection model includes:
[0095] A second image sequence is obtained by taking three-dimensional images of multiple views of the training algae samples. Features are extracted from the second image sequence using the image detail extraction operator to obtain a second weighted mask image sequence. A Gaussian pyramid and a Laplacian pyramid with a preset number of layers are constructed from the second image sequence to obtain a second initial Gaussian pyramid image and a second initial Laplacian pyramid image. The second weighted mask image sequence is used as weights to perform weighted operations on the second initial Gaussian pyramid image and the second initial Laplacian pyramid image to obtain a second weighted Gaussian pyramid image and a second weighted Laplacian pyramid image. A second fused image is reconstructed from the second weighted Gaussian pyramid image and the second weighted Laplacian pyramid image. The second fused image is calibrated to obtain a calibration training set. The initial detection model is trained based on the calibration training set to obtain the offline detection model.
[0096] Please see Figure 3 The process of obtaining the training set for the offline detection model is similar to the image processing process during detection. The purpose of both is to fuse multiple focal plane images to preserve information about the three-dimensional field of view.
[0097] After obtaining the second fused image, it needs to be calibrated. The calibrated database is then used as the training set for the offline detection model. The initial detection model can be a commonly used image recognition neural network such as the YOLO series, SSD series, or Mask-RCNN series. These neural networks can often determine the location, bounding box, and classification information of algae in the image; no specific limitations are specified here. This process trains the final offline detection model.
[0098] The final output includes the image detection results obtained by the offline detection model, as well as biological information for each field of view, such as algae classification information and the number of algae.
[0099] In summary, this embodiment fuses training data and data to be detected into a new fused image, which preserves the information of the three-dimensional field of view, enabling the detection of algal cells in three-dimensional space. Simultaneously, because it eliminates the need to calculate multiple focal planes, it significantly reduces the computational load, decreases the overhead of the graphics processor, and accelerates the computation speed.
[0100] Example 2
[0101] In addition, this application provides a planktonic algae detection device.
[0102] Specifically, such as Figure 5 As shown, the phytoplankton detection device 500 includes:
[0103] The image acquisition module 510 is used to acquire three-dimensional images of multiple fields of view of the algae sample to be detected, and obtain the first image sequence.
[0104] Extraction module 520 is used to extract features from the first image sequence using an image detail extraction operator to obtain a first weighted mask image sequence;
[0105] Construction module 530 is used to construct a Gaussian pyramid and a Laplacian pyramid of a preset number of layers in the first image sequence to obtain a first initial Gaussian pyramid image and a first initial Laplacian pyramid image.
[0106] The weighting module 540 is used to use the first weighted mask image sequence as weights to perform weighted operations on the first initial Gaussian pyramid image and the first initial Laplacian pyramid image respectively, to obtain the first weighted Gaussian pyramid image and the first weighted Laplacian pyramid image.
[0107] The reconstruction module 550 is used to reconstruct a first fused image based on the first weighted Gaussian pyramid image and the first weighted Laplacian pyramid image;
[0108] The output module 560 is used to input the first fused image into the offline detection model and output algae detection results and algae statistical information.
[0109] The phytoplankton detection device provided in this embodiment fuses training data and data to be detected into a new fused image. This fused image preserves information from the three-dimensional field of view, enabling the detection of algal cells in three-dimensional space. Simultaneously, because it eliminates the need for calculations on multiple focal planes, it significantly reduces the computational load, decreases the overhead of the graphics processor, and accelerates the calculation speed.
[0110] Example 3
[0111] Furthermore, this application provides an electronic device, including a memory and a processor. The memory stores a computer program, which executes the planktonic algae detection method provided in Embodiment 1 when the computer program is run on the processor.
[0112] The electronic device provided in this embodiment can implement the planktonic algae detection method provided in Embodiment 1. To avoid repetition, it will not be described again here.
[0113] The electronic device provided in this embodiment fuses training data and data to be detected into a new fused image. This fused image preserves information from the three-dimensional field of view, enabling the detection of algal cells in three-dimensional space. Simultaneously, because it eliminates the need for calculations on multiple focal planes, it significantly reduces the computational load, decreases the overhead of the graphics processor, and accelerates the computation speed.
[0114] Example 4
[0115] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the phytoplankton detection method provided in Embodiment 1.
[0116] In this embodiment, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0117] The computer-readable storage medium provided in this embodiment can implement the phytoplankton detection method provided in Embodiment 1. To avoid repetition, it will not be described again here.
[0118] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal that includes that element.
[0119] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0120] The above description is merely a specific 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 method for detecting planktonic algae, characterized by, The method includes: Three-dimensional images are captured from multiple fields of view of the algae sample to be tested to obtain the first image sequence; The first image sequence is subjected to feature extraction using an image detail extraction operator to obtain a first weighted mask image sequence. Construct a Gaussian pyramid and a Laplacian pyramid of a preset number of layers for the first image sequence to obtain a first initial Gaussian pyramid image and a first initial Laplacian pyramid image; Using the first weighted mask image sequence as weights, the first initial Gaussian pyramid image and the first initial Laplacian pyramid image are weighted respectively to obtain the first weighted Gaussian pyramid image and the first weighted Laplacian pyramid image. The first fused image is reconstructed based on the first weighted Gaussian pyramid image and the first weighted Laplacian pyramid image; The first fused image is input into the offline detection model, which outputs algae detection results and algae statistical information. The step of taking three-dimensional images of multiple fields of view of the algae sample to be detected to obtain a first image sequence includes: acquiring focal plane images of multiple focal planes of each field of view; and determining the set of multiple focal plane images as the first image sequence. The step of extracting features from the first image sequence using an image detail extraction operator to obtain a first weighted mask image sequence includes: performing a convolution operation between the image detail extraction operator and each of the focal plane images to obtain an initial mask image sequence; and normalizing the initial mask image sequence to obtain the first weighted mask image sequence.
2. The method according to claim 1, characterized in that, The steps for obtaining the offline detection model include: Three-dimensional images were captured from multiple views of the training algae samples to obtain a second image sequence; The image detail extraction operator is used to extract features from the second image sequence to obtain a second weighted mask image sequence. Construct a Gaussian pyramid and a Laplacian pyramid of a preset number of layers for the second image sequence to obtain a second initial Gaussian pyramid image and a second initial Laplacian pyramid image; Using the second weighted mask image sequence as weights, the second initial Gaussian pyramid image and the second initial Laplacian pyramid image are weighted respectively to obtain the second weighted Gaussian pyramid image and the second weighted Laplacian pyramid image. The second fused image is reconstructed based on the second weighted Gaussian pyramid image and the second weighted Laplacian pyramid image; The second fused image is calibrated to obtain a calibration training set; The initial detection model is trained based on the calibration training set to obtain the offline detection model.
3. The method according to claim 1, characterized in that, The steps for determining the image detail extraction operator include: Based on the preset edge extraction matrix: Determine the image detail extraction operator.
4. The method according to claim 1, characterized in that, The step of normalizing the initial mask image sequence to obtain the first weighted mask image sequence includes: Each image in the first weighted mask image sequence is calculated using the following formula: ; in, This represents the k-th image in the first weighted mask image sequence, where n represents the number of images in the first weighted mask image sequence. Represents the k-th image Pixel value at coordinates.
5. The method according to claim 1, characterized in that, The process of reconstructing the first fused image based on the first weighted Gaussian pyramid image and the first weighted Laplacian pyramid image includes: The first weighted Gaussian pyramid image and the first weighted Laplacian pyramid image are fused together to obtain the first fused pyramid; The first fused pyramid is upsampled and accumulated a preset number of times to obtain the first fused image, wherein the preset number of times is equal to the preset number of layers.
6. A phytoplankton detection device, characterized in that, The device includes: The image acquisition module is used to acquire three-dimensional images of multiple fields of view of the algae sample to be detected, and obtain the first image sequence; The extraction module is used to extract features from the first image sequence using an image detail extraction operator to obtain a first weighted mask image sequence; The construction module is used to construct a Gaussian pyramid and a Laplacian pyramid of a preset number of layers for the first image sequence, so as to obtain a first initial Gaussian pyramid image and a first initial Laplacian pyramid image. The weighting module is used to use the first weighted mask image sequence as weights to perform weighted operations on the first initial Gaussian pyramid image and the first initial Laplacian pyramid image respectively, to obtain the first weighted Gaussian pyramid image and the first weighted Laplacian pyramid image. The reconstruction module is used to reconstruct a first fused image based on the first weighted Gaussian pyramid image and the first weighted Laplacian pyramid image; The output module is used to input the first fused image into the offline detection model and output algae detection results and algae statistical information; The step of taking three-dimensional images of multiple fields of view of the algae sample to be detected to obtain a first image sequence includes: acquiring focal plane images of multiple focal planes of each field of view; and determining the set of multiple focal plane images as the first image sequence. The step of extracting features from the first image sequence using an image detail extraction operator to obtain a first weighted mask image sequence includes: performing a convolution operation between the image detail extraction operator and each of the focal plane images to obtain an initial mask image sequence; and normalizing the initial mask image sequence to obtain the first weighted mask image sequence.
7. An electronic device, characterized in that, The device includes a memory and a processor, wherein the memory stores a computer program that executes the phytoplankton detection method according to any one of claims 1 to 5 when the processor is running.
8. A computer-readable storage medium, characterized in that, It stores a computer program that, when run on a processor, executes the phytoplankton detection method according to any one of claims 1 to 5.