This patent application claims the benefit and priority of Chinese Patent Application No. 202211127801.5 filed with the China National Intellectual Property Administration on Sep. 16, 2022, and entitled “THREE-DIMENSIONAL DETECTION METHOD AND DEVICE FOR RED TIDE ALGAE BASED ON HOLOGRAPHIC IMAGING”, the disclosure of which is incorporated by reference herein in its entirety as part of the present application.
The present disclosure relates to the technical field of red tide algae monitoring, and relates to a three-dimensional detection method for red tide algae based on holographic imaging and a three-dimensional detection device for red tide algae.
The frequent occurrence of harmful red tide algae has caused severe ecological damage and massive economic losses to marine aquaculture as well. They are monitored through optical microscopy, flow cytometry, fluorescence spectrometry or holographic microscopic imaging at present.
A traditional optical microscope can merely be used for clearly imaging red tide algae on the focal plane due to its small depth of field, resulting in a small sample size and limited information available to each detection.
A flow cytometer is used for detecting cells in fluid. It is likely to produce errors because bubbles, produced by a peristaltic pump, are identified as algae and cell walls of red tide algae are damaged after passing through the peristaltic pump.
The fluorescence spectrometry is merely applicable to algae with required abundance in seawater, and cannot detect algae with low density.
As for the existing holographic microscopic imaging, extraction of a target area, autofocus and classification of algae are performed with complex and time-consuming algorithms, which requires high accuracy of autofocus.
As disclosed in Patent Application Publication No. CN114418995A, a cascading statistical method for algae cells based on a microscope image includes: collecting and labeling algae image sample data, and constructing a deep learning model; training the deep learning model to obtain a deep learning detection model; and identifying labeled image sample data based on the deep learning detection model to obtain an identification result. The method has the problem of undesired identification accuracy since bubbles or impurities probably existing in a sample liquid may be identified as algae cells.
As disclosed in Patent document CN215727660U, a system for rapidly detecting marine red tide based on spectral imaging includes a master controller and a spectral imaging device for imaging a sample culture dish. The spectral imaging device includes an industrial camera, as well as a background plate and a light source in a camera obscura. The sample culture dish is placed at the background plate and irradiated by the light source. The light source includes a halogen light source and an optical filter which may transmit light with relevant characteristic wavelengths of red tide algae at the light input end. The optical filter is mounted on a rotary wheel, and the rotary wheel is driven by a stepping motor. The master controller collects a sample image from the culture dish by controlling the industrial camera and the stepping motor to detect the red tide. In order to identify features of a spectrogram of red tide algae, the method obtains and processes the spectrogram with plenty of time but low accuracy.
In order to solve the above problem, the present disclosure provides a three-dimensional detection method for red tide algae based on holographic imaging. The method can improve a detection speed and detection accuracy of the red tide algae.
The three-dimensional detection method for red tide algae based on holographic imaging includes:
According to the present disclosure, the pre-constructed detection model is trained with the three-dimensional spatial sampling data constructed based on the hologram of the red tide alga and the two corresponding reconstructed holograms to obtain the corresponding red tide alga detection model, and the red tide alga detection model analyzes and detects the algae to be detected and outputs the detection result of the red tide algae.
Specifically, the original hologram data set of the red tide algae is obtained by photographing a cuvette having a back wall fixed on a focal plane of an object optical axis of the digital holographic imaging system and having an optical path of 200 μm.
Specifically, in step 3, the reconstruction distances are 0.08 m and 0.16 m respectively.
Specifically, the reconstructed holograms are obtained by computing the hologram of the red tide algae with an angular spectrum reconstruction algorithm.
Specifically, the angular spectrum reconstruction algorithm is specifically expressed as follows:
where represents Fourier transform,
−1 represents inverse Fourier transform, Filter{·} represents a frequency filter for obtaining +1 order spectrum and −1 order spectrum of a sample, λ represents a wave field of a light source, z represents a reconstruction distance, and G(fx, fy, z) represents an optical transfer function in a frequency domain corresponding to a propagation distance.
Specifically, in step 3, the three-dimensional spatial sampling data are three-dimensional matrix data consisting of the hologram of the red tide algae and the two reconstructed holograms in an ascending order of reconstruction distances.
Specifically, in step 5, the label set includes positions and sizes of bounding boxes and species of the red tide algae, and a position of each bounding box is an XY two-dimensional plane position.
The present disclosure further provides a three-dimensional detection device for red tide algae. The three-dimensional detection device for red tide algae includes a computer memory, a computer processor and a computer program that is stored in the computer memory and executable on the computer processor, where the red tide alga detection model above is stored in the computer memory.
When executing the computer program, the computer processor implements steps including: inputting three-dimensional spatial sampling data of red tide algae to be detected, performing analysis and detection with the red tide alga detection model, and outputting a detection result of the red tide algae to be detected.
Compared with the conventional art, the present disclosure has the following beneficial effects:
according to the present disclosure, it is not necessary to extract and cut an image area of the red tide algae, the original hologram and the two corresponding reconstructed holograms are merely needed to be combined into the three-dimensional spatial sampling data, and the red tide alga detection model obtained through training is used for detection, so as to improve the identification accuracy and the identification speed of the red tide algae.
In order to facilitate understanding by a person of ordinary skill in the art, a structure of the present disclosure will be further described in detail with reference to embodiments and accompanying drawings.
As shown in
Whether the resolution plate in the image is focused is determined artificially, and the reconstruction distance for the hologram in the case of being focused is determined. A cuvette (sample cuvette: a sample put therein) is fixed, instead of the resolution plate, on the manual linear slide platform, as shown in
In the embodiment, an optical path of the sample cuvette is 200 μm and several kinds of red tide algae are selected for experiments, and a hologram of red tide algae is taken to construct an original hologram data set of the red tide algae.
where represents Fourier transform,
−1 represents inverse Fourier transform, Filter {·} represents a frequency filter for obtaining +1 order spectrum and −1 order spectrum of a sample, λrepresents a wave field of a light source, z represents the reconstruction distance, and G(fx, fy, z) represents an optical transfer function in a frequency domain corresponding to a propagation distance.
The original hologram and the two reconstructed holograms constitute a three-dimensional matrix in an ascending order based on the reconstruction distances, this three-dimensional matrix is the three-dimensional spatial sampling data of the original hologram, and the matrix is exported and saved in the format of RGB.
The training set is used to train different target detection models, the models are evaluated by the test set, and evaluation parameters are average precision (AP) and recall rate with a formula as follows:
where TP (true positive) represents the number of samples, which are determined by the model to be positive samples and actually positive samples, FN (false negative) represents the number of samples, which are determined by the model to be false samples but actually positive samples, and FP (false positive) represents the number of samples, which are determined by the model to be positive samples but actually negative samples.
IOU refers to a ratio of an overlapping area of two bounding boxes to a combined area. AP is an evaluation index that comprehensively considers the recall rate and accuracy. IOU and AP are expressed as:
where TB represents a real bounding box, PB represents a predicted bounding box, t represents the preset number of systems, and when IOU is greater than t, it is assumed that the model have correctly detected a target, and p(t) represents precision when the recall rate is r(t)
where F1 represents a final evaluation index.
According to the above evaluation index, the model is evaluated, so as to select a qualified red tide alga detection model.
The disclosure further provides a three-dimensional detection device for red tide algae. The three-dimensional detection device for red tide algae includes a computer memory, a computer processor and a computer program that is stored in the computer memory and executable on the computer processor, where the red tide alga detection model above is used in the computer memory.
When executing the computer program, the computer processor implements steps including: inputting three-dimensional spatial sampling data of red tide algae to be detected, performing analysis and detection with the red tide alga detection model, and outputting a detection result of the red tide algae to be detected.
The embodiment adopts common toxic red tide algae which include alexandrium tamarense (AT), chattonella marina (CM), prorocentrum donghaiense (PD), prorocentrum lima (PL), prorocentrum micans (PM), karlodinium veneficum (KV), heterosigma akashiwo (HA) and karenia mikimotoi (KM), and two detection models are selected for test.
A YOLOv4-tiny model and a YOLOv7 model are constructed, and the data set obtained in the above steps is used for training with results obtained shown in Table 1 and Table 2:
For the same graphic data of the red tide algae, time required by the YOLOv4-tiny model
and the YOLOv7 model is as follows:
In addition, average precision of the above two models reaches 98.5% and 99.55% respectively.
Number | Date | Country | Kind |
---|---|---|---|
202211127801.5 | Sep 2022 | CN | national |