A flow cytometer cell scatter plot classification method based on deep learning
Through the deep learning-based flow cytometer cell scatter plot classification method, the problem of inaccurate classification of flow cytometers when cell characteristics overlap is solved, and a high accuracy and robust cell classification is achieved.
Patent Information
- Application Number
- CN202110987128.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-26
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2041-08-26
AI Technical Summary
When flow cytometry analyzers face the problem of inaccurate classification when overlapping characteristics of different types of cells.
Using the flow cytometer cell scatter plot classification method based on deep learning, cell characteristics are collected through flow cytometer analyzer, classification and data enhancement are carried out, multi-layer perceptron model is constructed, and the loss function is optimized using regular terms to improve classification accuracy Rate.
It realizes high-accuracy cell classification under the overlap of characteristics of different types of cell, has strong generalization ability and robustness, and can handle abnormal samples.
Smart Images

Figure CN113870181B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical diagnosis technology, and in particular to a flow cytometer cell scatter plot classification method based on deep learning. Background Art
[0002] Flow cytometer is an important instrument for diagnosing common diseases. The classification and counting of lymphocytes, neutrophils, monocytes, eosinophils and basophils is a key performance technical indicator of white blood cell classification. When the human body is infected with certain diseases, the number of different types of cells in the blood and the morphology of the cells will change. Medical staff can use the cell analyzer to detect and quantify the changes in the number of cells and the changes in the morphology for diagnosis and treatment.
[0003] There are two existing cell classification methods: fixed region segmentation and dynamic region segmentation using automatic classification algorithms. Currently, most cell analyzers use the method of calculating the cell segmentation line by analyzing the characteristics of cell clusters to achieve cell classification. Compared with the cell classification method with a fixed segmentation line, the automatic classification algorithm is undoubtedly more accurate, but it also has its own shortcomings: when the characteristics of two or more types of cells in a sample are similar, the automatic classification algorithm is not accurate enough to accurately distinguish multiple types of cells by calculating the segmentation line. Summary of the invention
[0004] The purpose of the present invention is to provide a flow cytometer cell scatter plot classification method based on deep learning to solve the problem of inaccurate classification of flow cytometers when faced with overlapping characteristics of different types of cells.
[0005] To achieve the above object, the present invention provides a flow cytometer cell scatter plot classification method based on deep learning, comprising the following steps:
[0006] Using a flow cytometer to collect cell features of multiple samples, and classifying and data enhancing the samples to obtain multiple labeled samples;
[0007] Inputting the input tensor in the training set into the classification model for training, and optimizing the classification model based on a loss function containing a regularization term;
[0008] The test set is input into the optimized classification model to perform classification calculation, obtain the classification accuracy, and complete the classification.
[0009] Wherein, after collecting cell features of multiple samples by using a flow cytometer, classifying and data enhancing the samples to obtain multiple labeled samples, the method further includes:
[0010] The multiple labeled samples are divided into a training set, a test set and a validation set in a ratio of 7:2:1.
[0011] The test set is input into the optimized classification model to perform classification calculation to obtain the classification accuracy. Before completing the classification, the method further includes:
[0012] After the classification model is trained with ten batches of training samples, a validation is performed using the validation samples in the validation set, and the loss and classification accuracy are output. All data are trained 20 times, and the weight parameters of the model are saved after each iteration.
[0013] Wherein, the method further comprises:
[0014] All classification results are visualized.
[0015] The input tensor in the training set is input into the classification model for training, and the classification model is optimized based on a loss function containing a regularization term, including:
[0016] Input the obtained input tensor into the first multi-layer perceptron for training, and then multiply the first output tensor of the training output by the T-Net matrix to obtain the conversion tensor;
[0017] The converted amount is input into a second multi-layer perceptron for training, and after passing through a maximum pooling layer, a global feature is obtained;
[0018] After adding the global features to the transformation tensor, two multi-layer perceptrons are trained to output a score tensor.
[0019] After adding the global feature to the conversion tensor, two multi-layer perceptrons are trained to output a score tensor, including:
[0020] Adding the global feature to each row of the transformation tensor, and then inputting the obtained feature tensor into a third multi-layer perceptron for training to obtain a third output tensor;
[0021] The third output tensor is input into a fourth multi-layer perceptron for training to obtain a score tensor.
[0022] The present invention discloses a method for classifying cell scattergrams of a flow cytometer based on deep learning, wherein the cell features of multiple samples are collected by a flow cytometer, and the samples are classified and data enhanced to obtain multiple label samples; the input tensors in the training set are input into a classification model for training, and the classification model is optimized based on a loss function containing a regularization term; the test set is input into the optimized classification model for classification calculation, the classification accuracy is obtained, and the classification is completed; the problem of inaccurate classification of the flow cytometer when facing overlapping features of different types of cells is solved. The method has strong generalization ability, robustness, and the ability to handle abnormal samples, and has high classification accuracy for cell classification. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 It is a schematic diagram of the steps of a flow cytometer cell scatter plot classification method based on deep learning provided by the present invention.
[0025] Figure 2 This is the classification model structure provided by the present invention.
[0026] Figure 3 It is the verification loss change curve during the classification model training process provided by the present invention.
[0027] Figure 4 It is a curve showing the change of classification accuracy of the validation set during the classification model training process provided by the present invention.
[0028] Figure 5 It is a three-dimensional scatter plot of the four-classification results of white blood cells provided by the present invention.
[0029] Figure 6 It is a three-dimensional scatter SS-FS view of the four-classification result of white blood cells provided by the present invention.
[0030] Figure 7 It is a three-dimensional scattered FL-FS view of the four-classification result of white blood cells provided by the present invention.
[0031] Figure 8 It is a three-dimensional scattered SS-FL view of the four-classification result of white blood cells provided by the present invention. DETAILED DESCRIPTION
[0032] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0033] In the description of the present invention, “plurality” means two or more than two, unless otherwise clearly and specifically defined.
[0034] See also Figure 1 The present invention provides a flow cytometer cell scatter plot classification method based on deep learning, comprising the following steps:
[0035] S101. Collect cell features of multiple samples using a flow cytometer, and classify and enhance the data of the samples to obtain multiple labeled samples.
[0036] Specifically, the flow cytometer collected cell features of 500 samples, and used manual classification to classify each type of cell to obtain label samples. There are four categories of white blood cells, namely monocytes, lymphocytes, neutrophils, and eosinophils. The existing data samples were used for data enhancement to obtain 5000 label samples. One sample contains n points, and each point has three dimensions. Data enhancement is achieved by adding Gaussian noise to the 500 label samples. Gaussian noise refers to a type of noise whose probability density function follows a Gaussian distribution. The Gaussian distribution is defined as follows:
[0037]
[0038] Among them, μ represents the average value of 0, σ 2 represents the variance of 20, x is a random variable, f(x) is the probability density function, and σ represents the standard deviation of exp represents the exponential function with the natural constant e as the base. The label data is preprocessed to obtain 5000 sample data X, each sample data contains n points (about 6000 points), these n points represent the cell data of a blood sample, each point contains three-dimensional coordinate data and its classification label, there are 4 classification labels, 1 represents monocytes, 2 represents lymphocytes, 3 represents neutrophils, and 4 represents eosinophils. The method of adding Gaussian noise to the blood sample data realizes blood sample data enhancement. This method can improve the generalization performance of the model and solve the problems of difficulty in collecting a large amount of blood sample data, high cost of extracting blood samples, and high cost of manually annotating cell classification. The X sample data are divided into training set, test set and validation set in a ratio of 7:2:1.
[0039] S102, inputting the input tensor in the training set into the classification model for training, and optimizing the classification model based on a loss function containing a regularization term.
[0040] Specifically, the classification model obtains the training set data, and the input tensor A is n×3. In order to achieve alignment in the feature space, the model adds a regularization term to the loss function:
[0041]
[0042] Where B is the transformation tensor, I is the identity matrix, and L reg is the regularization term of the loss function, T represents the transpose of the matrix, and F is the norm symbol. The input tensor A is input to the first multilayer perceptron MLP1 (MultilayerPerceptron), which contains 64 hidden layer nodes and 64 output layer nodes. The input data is fully connected to each hidden layer node, and each hidden layer node is fully connected to each output layer node. The connection weights are the same. The size of the first output tensor C1 is n×64. This step can effectively increase the feature dimension. Then, the T-Net matrix T (size 64×64) is multiplied with the first output tensor C1 to obtain a conversion tensor B of size n×64. The role of the T-Net matrix is to normalize the feature data. The conversion tensor B is input to the second multi-layer perceptron MLP2, which consists of three layers of neural networks, namely the first hidden layer with 64 nodes, the second hidden layer with 128 nodes, and the output layer with 1024 nodes, where the weights in the layers are equal, and the second output tensor C2 of n×1024 is obtained. After the maximum pooling layer, the global feature G of size 1×1024 is obtained. The maximum pooling layer is a symmetric function, which makes the output result unaffected by the order of the input data.
[0043] Add the global feature G to each row of the transformation tensor B to obtain a feature tensor S of size n×1088. At this time, the ratio of local features to global features is 64:1024. The feature tensor S is input into the third multi-layer perceptron MLP3, which consists of three layers of neural networks, namely the first hidden layer containing 512 nodes, the second hidden layer containing 256 nodes, and the output layer containing 128 nodes, where the weights within the layers are equal, and the third output tensor C3 of n×128 is obtained. The third output tensor C3 is input into the fourth multi-layer perceptron MLP4, which consists of two layers of neural networks, namely the first hidden layer containing 128 nodes and the output layer containing m nodes, where m is the number of white blood cell classifications, that is, m=4. Finally, a score tensor F of size n×m is obtained, which represents the score of each point corresponding to each category. The flowchart of the classification model is as follows Figure 2 shown.
[0044] In the process of model training, the cross entropy loss function is used for training, and the Adam optimization algorithm is used, which can find the optimal solution more quickly, and has a good classification accuracy after the network converges. The learning rate is set to 0.001. The learning rate refers to the amplitude of updating the network weights during the optimization process. If the learning rate is too large, the network will not converge, and if the learning rate is too small, the network training time will be too long. Therefore, the learning rate should be adjusted adaptively, and the learning rate is halved after every 5 training cycles. The model will continuously update the learning rate. Every time the model trains ten batches of training samples, it will perform a verification with the verification sample, and output the loss and classification accuracy. All data are trained 20 times, and the weight parameters of the model are saved after each iteration. The hyperparameter configuration of the classification model is shown in Table 1.
[0045] Table 1 Initial parameter settings of classification model
[0046] Parameter name English name Numeric The number of points in a single sample Number of Points 6000 Iterations Epoch 20 Batch size Batch Size 15 Learning Rate Learning Rate 0.001
[0047] S103, inputting the test set into the optimized classification model to perform classification calculation, obtain the classification accuracy, and complete the classification.
[0048] Specifically, the model converges quickly, and the verification loss change curve during training is as follows: Figure 3 As shown in the figure, the classification accuracy curve of the validation set during the training process is as follows Figure 4 As shown. The final classification model was tested with a test set containing 500 blood samples, and the classification accuracy was 91.96% and the MIOU (mean intersection over union) was 0.89. The definition of MIOU is as follows:
[0049]
[0050] Among them, i represents the true value and j represents the predicted value. ij Indicates the number of true values i that are predicted as j. k represents the number of categories (including empty categories). ii Indicates the true quantity. ij 、p ji The closer MIOU is to 1, the better the classification performance of the model.
[0051] By training the classification model, the model can automatically learn the cell classification features. By inputting new blood sample data into the trained classification model, the four classifications of white blood cells can be achieved with high accuracy, and the classification results can be visualized. The classification model has the following characteristics:
[0052] 1. The model has a multi-layer structure that increases the feature dimension and learns the deep features of the input data.
[0053] 2. The purpose of adding the T-Net matrix to the classification model is to normalize the features.
[0054] 3. A regular term is added to the loss function to achieve alignment in the feature space.
[0055] 4. In order to make the output result not affected by the order of input data, a maximum pooling layer is added after feature extraction.
[0056] 5. Combine local features with global features in a ratio of 64:1024, and then use them for scoring and classification.
[0057] 6. The model converges quickly. The verification loss change curve during training is as follows: Figure 3 As shown in the figure, the classification accuracy curve of the validation set during the training process is as follows Figure 4 As shown, epoch represents the training batch, loss represents the test loss, and classification accuracy percentage represents the classification accuracy percentage.
[0058] The final classification model was tested with a test set of 500 blood samples, and the classification accuracy was 91.96% and the MIOU (mean intersection over union) was 0.89. The three-dimensional scatter plot of the four classifications of white blood cells is shown in the figure. Figure 5 As shown, the coordinate axes FS, FL, and SS represent the cell volume, the types and number of nucleic acids and organelles in the cell, and the complexity of the cell's internal structure. The diamonds are lymphocytes, the solid circles are monocytes, the squares are neutrophils, and the five-pointed stars are eosinophils. The three-dimensional scatter plot of the four-classification results of white blood cells is shown in the figure. Figure 6 , Figure 7 , Figure 8 As shown, the coordinate axes and icons have the same meaning as Figure 5 It can be seen that the classification results are basically correct and consistent with the above indicators. Among them, the diamonds are lymphocytes, the solid circles are monocytes, the squares are neutrophils, and the five-pointed stars are eosinophils.
[0059] What is disclosed above is only a preferred embodiment of the present invention, and it certainly cannot be used to limit the scope of rights of the present invention. Ordinary technicians in this field can understand that all or part of the processes of the above embodiment and equivalent changes made according to the claims of the present invention still fall within the scope of the invention.
Claims
1. A flow cytometer cell scatter plot classification method based on deep learning, characterized in that: The following steps are involved: Using a flow cytometer to collect cell features of multiple samples, and classifying and data enhancing the samples to obtain multiple labeled samples; Inputting the input tensor in the training set into the classification model for training, and optimizing the classification model based on a loss function containing a regularization term; The test set is input into the optimized classification model to perform classification calculation, obtain the classification accuracy, and complete the classification; Inputting the input tensor in the training set into the classification model for training, and optimizing the classification model based on a loss function containing a regularization term, including: Input the obtained input tensor into the first multi-layer perceptron for training, and then multiply the first output tensor of the training output by the T-Net matrix to obtain the conversion tensor; The transformation tensor is input into a second multi-layer perceptron for training, and after passing through a maximum pooling layer, a global feature is obtained; After adding the global feature to the transformation tensor, the two multi-layer perceptrons are trained to output a score tensor; After adding the global features to the conversion tensor, two multi-layer perceptrons are trained to output a score tensor, including: Adding the global feature to each row of the transformation tensor, and then inputting the obtained feature tensor into a third multi-layer perceptron for training to obtain a third output tensor; The third output tensor is input into a fourth multi-layer perceptron for training to obtain a score tensor.
2. The method for classifying flow cytometer cell scatter plots based on deep learning as claimed in claim 1, characterized in that: After collecting cell features of multiple samples using a flow cytometer, classifying and data enhancing the samples to obtain multiple labeled samples, the method further includes: The multiple labeled samples are divided into a training set, a test set and a validation set in a ratio of 7:2:
1.
3. The method for classifying cell scatter plots of flow cytometry based on deep learning as claimed in claim 1, characterized in that: The test set is input into the optimized classification model to perform classification calculation to obtain the classification accuracy. Before completing the classification, the method further includes: After the classification model is trained with ten batches of training samples, a validation is performed using the validation samples in the validation set, and the loss and classification accuracy are output. All data are trained 20 times, and the weight parameters of the model are saved after each iteration.
4. The method for classifying flow cytometer cell scatter plots based on deep learning as claimed in claim 1, characterized in that: The method further comprises: All classification results are visualized.
Citation Information
Patent Citations
Training method, service data classification processing method and device, and electronic device
CN108985929A
License-plate-information-free vehicle re-identification method and system, medium and video monitoring system
CN111553205A
Cited By
Flow cytometer assisted diagnosis method and system based on large language model
CN122950093A