Plankton detection and classification method based on deep learning, medium and equipment
Through deep learning methods combined with supervised and unsupervised learning, the MaskR-CNN model and clustering algorithm are used to solve the accuracy and scope of plankton image recognition, and the detection and classification of plankton with high accuracy and wide recognition capabilities are achieved. .
Patent Information
- Application Number
- CN202411101225.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-12-10
AI Technical Summary
In the prior art, plankton image recognition and analysis rely on manual observation, which is time-consuming and susceptible to subjective judgment, resulting in inaccurate data, and automatic analysis methods are inaccurate in classification of unlabeled new plankton images.
Using a deep learning-based method, combined with supervised learning and unsupervised learning, the image features are segmented by obtaining plankton image data sets for annotation and training, using MaskR-CNN model to classify, and using automatic encoder and clustering algorithm to segment image features and cluster, identify new species, and enhance the recognition ability of the model.
It improves the accuracy and identification range of plankton detection and classification, reduces the workload of artificial marking, and can accurately detect new types of plankton in waters.
Smart Images

Figure CN119107642A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of plankton detection and classification, and more specifically, to a plankton detection and classification method, medium and equipment based on deep learning. Background Art
[0002] In aquatic ecosystems, plankton forms the foundation of the food web. Among them, phytoplankton plays the role of primary producers, while zooplankton acts as consumers or secondary producers. Some plankton is a natural food source that is essential for aquatic economic animals such as fish and shrimp. In addition, the diversity and changes in the number of phytoplankton can reflect the nutrient level of the water environment and its pollution status. Excessive growth of certain algae may be a sign of eutrophication or pollution of water bodies. The community composition of these plankton changes with changes in environmental conditions and can be used as a biological indicator for water quality monitoring. In particular, the presence or absence of zooplankton, which is extremely sensitive to environmental changes, can reflect the quality of water. Detecting and classifying plankton can help us understand the dynamic changes of the ecological environment, which plays an important guiding role in environmental protection, water resources management and the development of fisheries.
[0003] In some fish farming industries, the type of plankton is a very important indicator, so the identification of plankton is a very important task. Under the existing technology, the identification and analysis of plankton images mostly rely on manual observation, which is not only time-consuming but also easily affected by subjective judgment, resulting in inaccurate data.
[0004] At present, a variety of methods for detecting and classifying plankton have been proposed. First of all, image data of plankton can be obtained from microscopes in laboratory environments or from imaging platforms deployed in natural environments. Some researchers use deep learning to detect targets. Two common methods are regional convolutional neural networks (R-CNN) or YOLO series models. The R-CNN series of models performs target detection and classification in a two-step process. In the YOLO model, detection and classification are performed on the entire image in one step. Among the existing automatic analysis methods, supervised learning methods are often used. This method requires a large amount of labeled data. At the same time, there may be images of plankton that the model has never seen. The above method cannot accurately classify new unlabeled plankton. Summary of the invention
[0005] The purpose of the present invention is to provide a plankton detection and classification method, medium and equipment based on deep learning, which can improve the accuracy and recognition range of plankton detection and classification.
[0006] The present invention provides a plankton detection and classification method based on deep learning, comprising the following steps: S1: acquiring a plankton image, and obtaining a plankton in-situ image data set according to the plankton image; S2: annotating the plankton in-situ image data set to obtain an annotated data set; dividing the annotated data set according to a preset ratio to obtain a training set, a validation set and a test set; S3: acquiring a deep learning model, and training and tuning the deep learning model using the training set and the validation set to obtain a plankton segmentation model; S4: segmenting and extracting the plankton in-situ image data set using an autoencoder to obtain a single biological image feature; S5: clustering the single biological image features using a clustering algorithm to obtain a clustering result; S6: obtaining a new species according to the clustering result; obtaining a new training set according to the new species and the training set, and training and tuning the deep learning model using the new training set and the validation set to obtain a new plankton segmentation model; processing the test set using the new plankton segmentation model to obtain a plankton detection and classification result.
[0007] Furthermore, the annotated dataset of the above-mentioned deep learning-based plankton detection and classification method includes class labels, bounding boxes, and output object masks; the preset ratio is 70%:15%:15%.
[0008] Furthermore, step S3 of the above-mentioned plankton detection and classification method based on deep learning includes: S31: obtaining a deep learning model, constructing a loss function, and using the loss function and the training set to train the deep learning model to obtain a trained deep learning model; S32: using the validation set to evaluate and tune the trained deep learning model to obtain a plankton segmentation model.
[0009] Furthermore, the deep learning model of the above-mentioned deep learning-based plankton detection and classification method is MaskR-CNN; the loss function includes RPN classification loss, RPN regression loss, MRCNN classification loss, MRCNN regression loss and mask loss.
[0010] Furthermore, the mask loss of the above-mentioned plankton detection and classification method based on deep learning is as follows:
[0011] L(p,t)=-[tlog(p)+(1-t)log(1-p)]
[0012] Among them, L(p,t) is the mask loss, t is the true label of the sample, and p is the predicted probability of the model.
[0013] Furthermore, the mask loss of the above-mentioned plankton detection and classification method based on deep learning may also include a positive sample weight coefficient and a negative sample weight coefficient, such as the formula:
[0014] L(p,t)=-[αtlog(p)+β(1-t)log(1-p)]
[0015] Among them, L(p,t) is the mask loss, t is the true label of the sample, p is the predicted probability of the model; α is the weight coefficient of the positive sample, and β is the weight coefficient of the negative sample.
[0016] Furthermore, the positive sample weight coefficient of the above-mentioned deep learning-based plankton detection and classification method is 0.9, and the negative sample weight coefficient is 0.1.
[0017] Furthermore, the automatic encoder of the above-mentioned deep learning-based plankton detection and classification method includes an encoder CNN and a mirror decoder thereof.
[0018] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-mentioned plankton detection and classification method based on deep learning.
[0019] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the above-mentioned plankton detection and classification method based on deep learning are implemented.
[0020] The implementation of the plankton detection and classification method, medium and equipment based on deep learning provided by the present invention has the following beneficial effects:
[0021] The present invention uses deep learning technology, and adopts an analysis method combining two different routes with supervised learning as the main body and unsupervised learning as the auxiliary to detect and classify plankton images; on the one hand, it relies on a labeled data set to supervise and classify these planktons with marked categories. The supervised learning method learns the characteristics of plankton through an artificially labeled data set, thereby realizing the identification of plankton; on the other hand, an unsupervised method is used to classify and identify untrained plankton images. By this method, plankton can be clustered, and many similar classes are grouped together. Experts only need to identify a small number of plankton images in the same category, and the remaining other images in the same category only need to check whether they belong to this category, so that new plankton species can be discovered in time after they appear. When new species are discovered, they can be marked and then handed over to the network model of the supervised learning method for learning, thereby enhancing the recognition ability of the model; this method can realize the guidance of artificial marking, and can greatly reduce the workload of artificial marking. The technical solution of the present invention has the characteristics of high recognition accuracy and wide recognition range, and also has accurate detection ability for newly appeared plankton categories in waters. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:
[0023] Figure 1 is a flow chart of a plankton detection and classification method based on deep learning provided by the present invention;
[0024] Figure 2 It is a schematic diagram of the operation flow of the plankton detection and classification method based on deep learning provided by the present invention;
[0025] Figure 3 It is a schematic diagram of the plankton identification network architecture provided by the present invention;
[0026] Figure 4 It is a schematic diagram of the process of discovering new species using the unsupervised clustering algorithm provided by the present invention;
[0027] Figure 5 It is a schematic diagram of a scene for detecting and identifying plankton provided by the present invention;
[0028] Figure 6 It is a structural block diagram of the computer device provided by the present invention. DETAILED DESCRIPTION
[0029] In order to have a clearer understanding of the technical features, purposes and effects of the present invention, specific embodiments of the present invention are now described in detail with reference to the accompanying drawings.
[0030] Figure 1 A schematic diagram of a plankton detection and classification method based on deep learning in this embodiment is shown. In this embodiment, the plankton detection and classification method based on deep learning includes the following steps:
[0031] S1: Acquire a plankton image, and obtain a plankton in-situ image dataset based on the plankton image;
[0032] Specifically, the acquisition equipment performs acquisition work in the original waters, which generally contain plankton and other possible impurities. Each acquired image generally contains multiple plankton and possible impurities. In subsequent tasks, the location of each plankton needs to be detected and accurately identified. The acquired images construct a plankton in-situ image dataset and copy it into two copies, one of which is subsequently subjected to deep unsupervised feature extraction and the other to supervised instance segmentation.
[0033] S2: annotating the plankton in situ image dataset to obtain an annotated dataset; dividing the annotated dataset according to a preset ratio to obtain a training set, a validation set, and a test set;
[0034] Specifically, the annotated dataset includes class labels, bounding boxes, and output object masks;
[0035] Specifically, the preset ratio is 70%:15%:15%;
[0036] S3: Obtain a deep learning model, train and tune the deep learning model using the training set and the validation set, and obtain a plankton segmentation model;
[0037] Specifically, the above step S3 includes: S31: obtaining a deep learning model, constructing a loss function, and using the loss function and the training set to train the deep learning model to obtain a trained deep learning model; S32: using the validation set to evaluate and tune the trained deep learning model to obtain a plankton segmentation model;
[0038] Specifically, the deep learning model is MaskR-CNN; the loss functions include RPN classification loss, RPN regression loss, MRCNN classification loss, MRCNN regression loss and mask loss;
[0039] Specifically, the mask loss is as follows:
[0040] L(p,t)=-[tlog(p)+(1-t)log(1-p)]
[0041] Among them, L(p,t) is the mask loss, t is the true label of the sample, and p is the predicted probability of the model;
[0042] Preferably, the mask loss includes a positive sample weight coefficient and a negative sample weight coefficient, such as the formula:
[0043] L(p,t)=-[αtlog(p)+β(1-t)log(1-p)]
[0044] Among them, L(p,t) is the mask loss, t is the true label of the sample, p is the predicted probability of the model; α is the weight coefficient of the positive sample, and β is the weight coefficient of the negative sample;
[0045] Specifically, the weight coefficient of positive samples is 0.9, and the weight coefficient of negative samples is 0.1;
[0046] Specifically, the above-mentioned deep learning model is configured and trained, a configuration file is set, and then the model is trained, and the labeled training set data is used to train the model; the accuracy, precision, recall rate and other indicators of target detection are calculated using the validation set to evaluate the model; when the model accuracy meets the requirements, it can be used to identify and segment new images, that is, a plankton segmentation model is obtained;
[0047] S4: Use autoencoders to segment and extract the plankton in situ image dataset to obtain individual biological image features;
[0048] Specifically, the autoencoder includes an encoder CNN and its mirror image decoder;
[0049] Specifically, another part of the dataset, i.e., another copy of the in situ plankton image dataset, is segmented to extract individual biological images, and then deep unsupervised feature extraction is performed to learn the low-dimensional representation of the input data features through an autoencoder; when performing unsupervised feature extraction on the plankton images, the unsupervised method architecture used is an extended autoencoder architecture, consisting of an encoder CNN and its mirror image decoder; an iterative learning algorithm is used to reconstruct the input image into the same output, and then training is performed to learn the features of the input data; after the training is completed, the decoder part of the architecture is removed; the output of the last encoder layer represents the low-dimensional feature representation of the input data;
[0050] S5: clustering the single biological image features using a clustering algorithm to obtain a clustering result;
[0051] Specifically, the detected object features are clustered using machine learning algorithms, and the model is trained using clustering loss; the clustering results are analyzed to discover and identify new populations;
[0052] Specifically, a clustering algorithm is used for grouping, and similar objects are grouped together according to their feature vector representations. The specific steps of clustering in this embodiment are as follows: (1) Selecting a suitable k value: First, determine how many categories the plankton image is to be divided into, that is, determine the value of k; (2) Initialization: Randomly select k objects from the feature representation data of the plankton image as initial cluster centers; (3) Allocate data points: Calculate the distance between each data point and each cluster center, and allocate the data point to the cluster corresponding to the cluster center closest to it; (4) Update cluster centers: Recalculate the average value of all data points in each cluster as the new cluster center; (5) Determine whether clustering has converged: Repeat steps (3) and (4) until the cluster center no longer changes or reaches a preset number of iterations; (6) Obtain classification results: Finally, the classification results of the plankton image are obtained, and each data point will be assigned to a cluster, that is, the classification of the plankton; wherein, the optimal k value is selected by evaluation indicators such as silhouette coefficient, SSE (sum of squared deviations within clusters), and in particular, multiple runs are performed and the best result is selected;
[0053] S6: Based on the clustering results, new species are obtained; based on the new species and the training set, a new training set is obtained, and the new training set and validation set are used to train and tune the deep learning model to obtain a new plankton segmentation model; the test set is processed using the new plankton segmentation model to obtain plankton detection and classification results.
[0054] In some embodiments, the above-mentioned deep learning-based plankton detection and classification method can also be implemented in the following manner.
[0055] In this embodiment, the plankton detection and classification method based on deep learning is as follows Figure 2 As shown, the method comprises the following steps:
[0056] Step 1. Collect images, construct a plankton in situ image dataset, and copy it into two copies, one of which is subsequently used for deep unsupervised feature extraction, and the other is used for supervised instance segmentation;
[0057] Step 2. Annotate the dataset. Each image should be annotated with a class label, a bounding box, an output object mask, and the dataset should be divided according to a certain ratio.
[0058] Step 3. Model configuration and model training: Set the configuration file, and then perform model training. Use the labeled training set data to train the model.
[0059] Step 4. Model evaluation, using the validation set to calculate the accuracy, precision, recall and other indicators of target detection;
[0060] Step 5. Generate a new model. When the model accuracy meets the requirements, it can be used to identify and segment new images.
[0061] Step 6. Segment another part of the dataset to extract a single biological image, and then perform deep unsupervised feature extraction to learn a low-dimensional representation of the input data through an autoencoder;
[0062] Step 7. Use the machine learning algorithm to cluster the detected object features and then train the model through clustering loss;
[0063] Step 8. Analyze the clustering results to discover and identify new populations;
[0064] Step 9. Label the new populations that appear, and then use the new training set to train and update the model;
[0065] Preferably, in step 1, the acquisition device performs acquisition work in the original water area, which generally contains plankton and other possible impurities, and each acquired image generally contains multiple plankton and possible impurities; in subsequent tasks, the position of each plankton needs to be detected and accurately identified;
[0066] Preferably, in step 2, image annotation is the task of annotating the image content with labels, and image annotation in this section refers to the human task of manual annotation; the annotation part requires annotation by experienced experts, and the annotation content includes a class label, a bounding box, and an output object mask; in order to obtain fair evaluation results, the data set is divided into different subsets; the set is divided into approximately 70%-15%-15% training samples, validation samples, and test samples; the training samples are used to update weights during training, the validation set is used to adjust hyperparameters, and the test set is used to test performance;
[0067] Preferably, in steps 3 to 5, the network model used is MaskR-CNN, which is a network algorithm suitable for real-time detection and segmentation of images in an in-situ system, by adding a branch for predicting a segmentation mask on each region of interest (ROI) in parallel with the existing branches for classification and bounding box regression;
[0068] Specifically, if Figure 3 As shown, this model recognizes plankton images and consists of two stages; the first stage is called the region proposal network, which proposes candidate object bounding boxes; the second stage extracts features from each candidate box, performs classification and bounding box regression, and also outputs a binary mask for each ROI; the features used in the two stages can be shared for faster reasoning; during training, the multi-task loss of each sampled RoI is defined as the sum of classification loss, bounding box loss and average binary cross entropy loss; according to the characteristics of plankton, the appropriate modifications made to the MaskR-CNN network are mainly reflected in the modification of the loss function; first, the original loss function of MaskR-CNN includes: RPN classification loss: for classification of the region proposal network (RPN), cross entropy loss is used; RPN regression loss: for bounding box regression of RPN, SmoothL1 loss is used; MRCNN classification loss: for target classification, cross entropy loss is used; MRCNN regression loss: for bounding box regression, SmoothL1 loss is used; mask loss: for instance segmentation, binary cross entropy loss is used;
[0069] This embodiment mainly modifies the binary cross entropy loss function in the mask loss. The binary cross entropy loss function is used to measure the difference between the probability distribution predicted by the model and the actual label; the formula is:
[0070] L(p,t)=-[tlog(p)+(1-t)log(1-p)]
[0071] Among them, t is the true label of the sample, and p is the predicted probability of the model; the mask loss function of MaskR-CNN is essentially a binary cross entropy loss function; for each ROI (region of interest), MaskR-CNN generates a binary mask and calculates the binary cross entropy loss between the mask and the true mask;
[0072] Since the plankton categories are unbalanced, weights can be assigned to different categories. This embodiment also uses weighted binary cross-entropy loss to balance the problem of category imbalance. The mathematical formula of weighted binary cross-entropy loss is as follows:
[0073] L(p,t)=-[αtlog(p)+β(1-t)log(1-p)]
[0074] α and β are weight coefficients used to balance the impact of positive and negative samples; Positive sample weight (α): used to adjust the loss weight of positive samples; If there are fewer positive samples in the data set, the value of α can be increased; Negative sample weight (β): used to adjust the loss weight of negative samples; If there are fewer negative samples in the data set, the value of β can be increased; For example, assuming that there is an unbalanced data set with fewer positive samples, (α=0.9) and (β=0.1) can be set to increase the weight of positive samples to balance the loss function. Specifically, in PyTorch, the weighted binary cross entropy loss can be implemented through the pos_weight parameter; In general, the weighted binary cross entropy loss balances the imbalanced data set by assigning different weights to positive and negative samples, thereby improving the performance of the model on the minority class; This method is particularly suitable for dealing with situations where the ratio of positive and negative samples is very different, ensuring that the model does not ignore the minority class plankton samples during training;
[0075] Preferably, in step 6, when performing unsupervised feature extraction on the plankton image, the unsupervised method architecture used is an extended autoencoder architecture; the autoencoder has a flexible symmetric architecture, consisting of an encoder CNN and its mirror decoder; an iterative learning algorithm is also used to reconstruct the input image into the same output, and then training is performed to learn the features of the input data; after the training is completed, the decoder part of the architecture will be removed; the output of the last encoder layer represents a low-dimensional feature representation of the input data;
[0076] Preferably, in steps 7 to 8, a clustering algorithm is used for grouping, and similar objects are grouped together according to their feature vector representations. In this embodiment, the K-Means algorithm is used, and the specific steps are as follows: (1) Selecting a suitable k value: First, determine how many categories the plankton image is to be divided into, that is, determine the value of k; (2) Initialization: Randomly select k objects from the feature representation data of the plankton image as initial cluster centers; (3) Assign data points: Calculate the distance between each data point and each cluster center, and assign the data point to the cluster corresponding to the cluster center closest to it; (4) Update cluster centers: Recalculate the average value of all data points in each cluster as the new cluster center; (5) Determine whether the clustering has converged: Repeat steps 3 and 4 until the cluster center no longer changes or reaches a preset number of iterations; (6) Obtain classification results: Finally, the classification results of the plankton image are obtained, and each data point will be assigned to a cluster, that is, the classification of plankton;
[0077] In this process, it is very important to choose a suitable k value, so different k values will be tried, and the optimal k value will be selected through evaluation indicators such as silhouette coefficient and SSE (sum of squared deviations within clusters). In addition, the K-means algorithm is very sensitive to the initialization of cluster centers, which may lead to different clustering results, so multiple runs will be performed and the best result will be selected.
[0078] Preferably, in step 9, Figure 4 As shown in the figure, after the unsupervised clustering operation is performed on the plankton image dataset, corresponding operations are performed according to the recognition results. When a new species appears in the clustering results, the corresponding image can be manually marked as a training set; then it is added to the model for training. After the model learns the information of this species, it can accurately recognize the corresponding species when it encounters it again. This method continuously updates the model and enhances the accuracy of model recognition. Figure 5 Shown is a schematic diagram of the plankton detection and identification scenario.
[0079] This embodiment provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned plankton detection and classification method based on deep learning are implemented. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (Flash Memory), a hard disk (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.
[0080] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of the above-mentioned deep learning-based plankton detection and classification method are implemented.
[0081] like Figure 6 As shown, the computer device may include: at least one processor 121, such as a CPU (Central Processing Unit), at least one communication interface 123, a memory 124, and at least one communication bus 122. Among them, the communication bus 122 is used to realize the connection and communication between these components. Among them, the communication interface 123 may include a display screen (Display), a keyboard (Keyboard), and the optional communication interface 123 may also include a standard wired interface and a wireless interface. The memory 124 may be a high-speed RAM memory (Random Access Memory, volatile random access memory) or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 124 may also be at least one storage device located away from the aforementioned processor 121. Among them, the memory 124 stores an application program, and the processor 121 calls the program code stored in the memory 124 to perform any of the above method steps. Among them, the communication bus 122 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The communication bus 122 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6Only one line is used to represent it, but it does not mean that there is only one bus or one type of bus. Among them, the memory 124 may include a volatile memory (English: volatile memory), such as a random access memory (English: random-access memory, abbreviated: RAM); the memory may also include a non-volatile memory (English: non-volatile memory), such as a flash memory (English: flash memory), a hard disk drive (English: hard disk drive, abbreviated: HDD) or a solid-state drive (English: solid-state drive, abbreviated: SSD); the memory 124 may also include a combination of the above-mentioned types of memory. Among them, the processor 121 may be a central processing unit (English: central processing unit, abbreviated: CPU), a network processor (English: network processor, abbreviated: NP) or a combination of CPU and NP. Among them, the processor 121 may further include a hardware chip. The above-mentioned hardware chip may be an application-specific integrated circuit (English: application-specific integrated circuit, abbreviated: ASIC), a programmable logic device (English: programmable logic device, abbreviated: PLD) or a combination thereof. The PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. Optionally, the memory 124 is also used to store program instructions. The processor 121 can call program instructions to implement the plankton detection and classification method based on deep learning as in this embodiment.
[0082] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.
Claims
1. A plankton detection and classification method based on deep learning, characterized in that: The following steps are involved: S1: Acquire a plankton image, and obtain a plankton in-situ image dataset based on the plankton image; S2: annotating the plankton in situ image dataset to obtain an annotated dataset; dividing the annotated dataset according to a preset ratio to obtain a training set, a validation set, and a test set; S3: Obtain a deep learning model, and use the training set and the validation set to train and tune the deep learning model to obtain a plankton segmentation model; S4: segmenting and extracting the plankton in situ image dataset using an autoencoder to obtain a single biological image feature; S5: clustering the single biological image feature using a clustering algorithm to obtain a clustering result; S6: According to the clustering results, a new species is obtained; according to the new species and the training set, a new training set is obtained, and the deep learning model is trained and tuned using the new training set and the validation set to obtain a new plankton segmentation model; the test set is processed using the new plankton segmentation model to obtain plankton detection and classification results.
2. The plankton detection and classification method based on deep learning according to claim 1, characterized in that: The annotated data set includes a class label, a bounding box, and an output object mask; the preset ratio is 70%:15%:15%.
3. The plankton detection and classification method based on deep learning according to claim 1, characterized in that: Step S3 includes: S31: Acquire a deep learning model, construct a loss function, and train the deep learning model using the loss function and the training set to obtain a trained deep learning model; S32: Using the validation set to evaluate and tune the trained deep learning model to obtain a plankton segmentation model.
4. The plankton detection and classification method based on deep learning according to claim 3 is characterized in that: The deep learning model is Mask R-CNN; the loss function includes RPN classification loss, RPN regression loss, MRCNN classification loss, MRCNN regression loss and mask loss.
5. The plankton detection and classification method based on deep learning according to claim 4, characterized in that: The mask loss is as follows: L(p,t)=-[tlog(p)+(1-t)log(1-p)] Among them, L(p,t) is the mask loss, t is the true label of the sample, and p is the predicted probability of the model.
6. The plankton detection and classification method based on deep learning according to claim 4, characterized in that: The mask loss includes positive sample weight coefficient and negative sample weight coefficient, as shown in the formula: L(p,t)=-[αtlog(p)+β(1-t)log(1-p)] Among them, L(p,t) is the mask loss, t is the true label of the sample, p is the predicted probability of the model; α is the weight coefficient of the positive sample, and β is the weight coefficient of the negative sample.
7. The plankton detection and classification method based on deep learning according to claim 6, characterized in that: The positive sample weight coefficient is 0.9, and the negative sample weight coefficient is 0.
1.
8. The plankton detection and classification method based on deep learning according to claim 1, characterized in that: The autoencoder includes an encoder CNN and its mirror image decoder.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of any deep learning-based plankton detection and classification method as described in claims 1-8 are implemented.
10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of any deep learning-based plankton detection and classification method as described in claims 1-8 are implemented.
