A serum sample image classification method based on multi-semantic imbalanced learning

Through the combination of multi-semantic imbalanced learning and deep network models, the imbalance and multi-semantic difficulties in serum sample image classification are solved, high accuracy and rapid recognition are achieved, security requirements are met, and efficiency problems in the existing technology are solved. Low and insufficient accuracy issues.

CN116704248BActive Publication Date: 2024-10-25NANJING UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310672837.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-07
Publication Date
2024-10-25
Estimated Expiration
2043-06-07

AI Technical Summary

Technical Problem

There are imbalance and multi-semantic difficulties in serum sample image classification, which are difficult to solve simultaneously with existing methods, resulting in poor classification results, low recognition efficiency and insufficient accuracy.

Method used

Using a method based on multi-semantic imbalance learning, through the four-part process of original image processing, multi-semantic imbalance model training, category imbalance optimization and serum sample image recognition result generation, a deep network model and cross-entropy loss function are used to construct a balanced The data set is used for model training and testing to ensure the accuracy of the recognition results.

Benefits of technology

It achieves a false negative rate and a higher accuracy rate that are far lower than Roche's P612 pre-processing instrument, meets the index requirements of industry standards, improves recognition speed and accuracy, and saves manpower and material resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116704248B_ABST
    Figure CN116704248B_ABST
Patent Text Reader

Abstract

The present invention discloses a serum sample image classification method based on multi-semantic imbalanced learning. First, the original image is cropped and edge-recognized to obtain a square image containing serum sample information; then, the training sample is preprocessed and trained using depth 10 to build a classification model, and a rebalanced data set is constructed and jointly tested during model evaluation so that the method does not favor categories with a large number of appearances; a binary classification model is trained for the sample image; then, these models are optimized using a deep learning method that responds to category imbalance; finally, the obtained models are combined to obtain a model for identifying the quality of serum samples. The present invention proposes a new method for coping with multi-semantic category imbalanced learning, and combines a neural network binary classification method to achieve a higher image classification accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a serum sample image classification method based on multi-semantic imbalance learning, which involves image detection and processing, multi-semantic imbalance learning, and neural network binary classification. Specifically, the key of the present invention is to use multi-semantic imbalance learning to obtain three indicators implicit in the serum sample image, and combine the neural network binary classification method to determine the category of the serum sample image. Background Art

[0002] The recognition of serum sample images usually uses regression models or color space-based classification models, which have problems of low efficiency and inaccurate recognition.

[0003] The classification of serum sample images has difficulties such as imbalance and multi-semantics. On the one hand, serum images can be divided into normal, mild, severe, and serious categories from the three semantic perspectives of lipemia, hemolysis, and icteric blood. In the collected data, there are more normal categories, while serum samples of other categories (collectively referred to as abnormal samples) are less, and the category imbalance phenomenon is obvious; in addition, for a certain sample image, these three different perspectives may get different categories, and the sample features are mixed in the same image, which will cause great interference to the classification. Most of the existing methods cannot solve the two major difficulties of multi-semantics and imbalance at the same time, so the classification effect is not good. Summary of the invention

[0004] Purpose of the invention: In view of the problems and shortcomings of the existing technology in serum sample image classification, such as imbalance and multi-semantics, and the difficulty of existing machine learning methods in training a recognition model that can accurately classify, the present invention provides a serum sample image classification method based on multi-semantic imbalance learning. Under the training of a large number of labeled samples, a false negative rate far lower than that of the Roche P612 pre-treatment instrument and a higher accuracy rate are obtained, and each indicator of the false negative sample can be guaranteed to meet the field standards.

[0005] Technical solution: A serum sample image classification method based on multi-semantic imbalance learning, including original image processing, multi-semantic imbalance and binary classification model training, category imbalance optimization, and serum sample image recognition result generation.

[0006] The process of the original image processing is specifically as follows:

[0007] Step 100, cutting out corresponding image blocks according to the black lines on the original serum image;

[0008] Step 101, using methods such as cropping and edge detection in OpenCV to extract the serum part of the original serum image and eliminate the influence of background and marker occlusion; OpenCV is a Python tool library for image processing;

[0009] Step 102, for the image of the serum part obtained in the previous step, cut out a square image of 32×32; the unit of the size of the image is pixel;

[0010] Step 103: for the square image with poor quality, the above steps cannot obtain an image that can be used for prediction, so it is directly determined as an abnormal sample; the square image with poor quality refers to an image containing a clot or being blocked;

[0011] In step 104, after randomly shuffling all samples, the training set and the test set are roughly divided into two sets according to a ratio of 8:2.

[0012] The specific training process of the multi-semantic imbalance model is as follows:

[0013] Step 200, preprocess the training set data using the RandomResizedCrop method, randomly flip the left and right sides, and then normalize according to the mean and variance of all samples in the training set; the RandomResizedCrop method is an image processing method for randomly cropping pictures of a specified size;

[0014] Step 201, initializing three deep network models that can cope with multiple semantics, respectively coping with three different semantic classifications;

[0015] Step 202, inputting training data into the network model for training;

[0016] Step 203, initializing a deep network model for binary classification, which is used for binary classification of normal and abnormal images;

[0017] Step 204, sampling from the training data set to obtain a subset with consistent distribution of normal and abnormal numbers, inputting the subset into the deep network model, and updating the model based on the classification cross entropy loss, and repeating several times;

[0018] Step 205, testing the above three multi-semantic deep network models and one binary classification deep network model, first scaling the short side of the original serum image to 40 size, and then cutting out a 32 size image from the center for prediction.

[0019] The specific process of class imbalance optimization is:

[0020] Step 300, using two methods to evaluate the models respectively; the models are three deep network models for coping with multi-semantics and one deep network model for binary classification;

[0021] Step 301, the three semantic indicators are evaluated separately, and a balanced data set is constructed for each indicator. A balanced data set is one in which the number of samples of each category is basically the same, such as 100 samples are extracted from each category. Constructing a balanced data set can prevent the algorithm from being biased towards normal categories with a large number of occurrences;

[0022] Step 302, performing a separate test on the balanced data set corresponding to each indicator;

[0023] Step 303, joint test:

[0024] For the samples in the test set, the results of the three semantic indicators are measured at the same time. The test results on the three semantic indicators must be all correct to be considered correct. That is, for a certain test sample, if the model's predicted categories on the three semantic indicators are all consistent with the true labels, that is, all correct, then the model is considered to have made a correct prediction for this sample; if just one is wrong, it is considered a prediction error.

[0025] For the samples in the test set, predict the results of normal and abnormal binary classification, and the results must be consistent with the true labels;

[0026] Step 304: Optimize the constructed model using a deep learning method that addresses category imbalance.

[0027] The specific process of generating serum sample image recognition results is as follows:

[0028] Step 400, cutting out the serum part of the sample image to be identified, and then scaling the short side to 40;

[0029] Step 401, for the image cut out and scaled in the previous step, cut out a square image of size 32 from the center;

[0030] Step 402: Input the image obtained in the previous step into four models respectively to obtain the recognition values ​​of three semantic indicators and the normal and abnormal binary classification results; the four models are three deep network models for multi-semantics and one deep network model for binary classification.

[0031] Step 403, determining whether the predicted values ​​of the three semantic indicators are normal, or determining whether the predicted values ​​of the two-class classification are normal;

[0032] Step 404: if any of the predicted values ​​are abnormal, the sample to be identified is determined to be abnormal and needs to be sent for further inspection;

[0033] Step 405: If the prediction indicators are all normal, the output result is normal.

[0034] The optimized edge detection algorithm is used in the original image processing, which can better crop samples with irregular shapes that are partially blocked by markers, thereby improving the quality of the samples.

[0035] The network model uses a cross entropy loss function and stochastic gradient descent for optimization, and a solution can be obtained in each round of training based on the performance of the current network model to optimize network parameters.

[0036] The binary classification network model initializes a linear correction layer of equal size after the linear classification layer to update the network structure of the classification model.

[0037] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the serum sample image classification method based on multi-semantic imbalance learning as described above is implemented.

[0038] A computer-readable storage medium stores a computer program for executing the serum sample image classification method based on multi-semantic imbalance learning as described above.

[0039] Beneficial effects: Compared with the prior art, the serum sample classification method based on multi-semantic imbalance learning provided by the present invention has a faster recognition speed and higher accuracy. The higher accuracy enables the prediction of various indicators of the sample to meet the safety requirements given by the user, which can save a lot of manpower and material resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 is a flowchart of original image processing in the present invention;

[0041] Figure 2 This is a training flow chart of the multi-semantic imbalance model in the present invention;

[0042] Figure 3 This is a flow chart for class imbalance optimization in the present invention;

[0043] Figure 4 The flowchart of the serum sample image recognition result generation in the present invention. Implementation

[0044] The present invention is further explained below in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention. After reading the present invention, various equivalent forms of modifications to the present invention by those skilled in the art all fall within the scope defined by the claims attached to this application.

[0045] The original image processing process is as follows Figure 1As shown. First, cut out the corresponding image block according to the black line on the original image (step 10); then, use the cropping and edge detection in OpenCV to take out the image of the serum part and eliminate the influence of the background and marker occlusion (step 11); then, cut out a 32×32 square image (step 12); then, directly remove the samples that cannot be cut out of the effective area (step 13); finally, randomly shuffle all the labeled samples and divide the training set and test set roughly according to 8:2 (step 14);

[0046] The training process of multi-semantic imbalance model is as follows Figure 2 As shown. First, the training set data is preprocessed using the RandomResizedCrop method, randomly flipped left and right, and then the mean and variance of all samples in the training set are calculated and normalized (step 20); then, three deep network models are initialized (step 21), which are 4 outputs, 5 outputs and 2 outputs respectively, corresponding to the three semantics of hemolysis, lipemia and icteric blood; then, the training data is input into the network model for training (step 22); at the same time, a binary convolutional neural network is initialized to directly output normal and abnormal images (step 23), and a balanced subset of normal and abnormal categories with the same number of samples is obtained from the training data set to input into the network model, and the model is updated based on the classification cross entropy loss (step 24), which is repeated several times; finally, for model testing, the short side of the original image is first scaled to 40, and then a 32-size image is cut out from the center for prediction (step 25);

[0047] The specific process of class imbalance optimization is as follows Figure 3 As shown: First, two methods are used to evaluate the model respectively (step 30); the first method is to evaluate the three indicators separately and construct a balanced data set for each indicator (step 31), for example, 100 samples are extracted from each category and tested on the data set (step 32). Constructing a balanced data set can prevent the algorithm from being biased towards normal categories with a large number of occurrences;

[0048] The second method is joint testing:

[0049] For the samples in the test set, the results of the three indicators are measured at the same time (step 33). If all are correct, it is considered correct. If only one is wrong, it is considered a prediction error.

[0050] For the samples in the test set, predict the results of normal and abnormal binary classification;

[0051] Finally, the constructed model is subjected to a deep learning method that can cope with class imbalance (step 34).

[0052] The process of generating serum sample image recognition results is as follows Figure 4As shown: First, cut out the serum part of the sample to be identified (step 40), then scale the short side to 40, and then cut out a 32-size square image from the center (step 41); then, input the image obtained in the previous step into the four models respectively to obtain the classification results on the three indicators and the normal and abnormal binary classification results (step 42); then, judge all the classification results (step 43), if any indicator category is abnormal, the sample to be identified is judged as abnormal and needs to be further tested (step 44), otherwise the output result is normal (step 45).

[0053] Obviously, those skilled in the art should understand that the various steps of the serum sample image classification method based on multi-semantic imbalance learning of the above-mentioned embodiment of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the embodiments of the present invention are not limited to any specific combination of hardware and software.

Claims

1. A serum sample image classification method based on multi-semantic imbalance learning, characterized in that: It includes four parts: original image processing, multi-semantic imbalance and binary classification model training, category imbalance optimization, and serum sample image recognition result generation; The process of the original image processing is specifically as follows: Step 100, cutting out corresponding image blocks according to the black lines on the original serum image; Step 101, using the cropping and edge detection methods in OpenCV, extract the serum part of the original serum image to eliminate the influence of background and marker occlusion; Step 102, cutting out a square image of a set size from the image of the serum portion obtained in the previous step; Step 103: directly determining a square image with poor quality as an abnormal sample; the square image with poor quality refers to an image containing a clot or being blocked; Step 104, randomly shuffle all samples and divide them into training set and test set; The specific training process of the multi-semantic imbalance model is as follows: Step 200, preprocess the training set data using the RandomResizedCrop method, randomly flip the left and right sides, and then normalize them according to the mean and variance of all samples in the training set; Step 201, initializing three deep network models that can cope with multiple semantics, respectively coping with three different semantic classifications; Step 202, inputting training data into the network model for training; Step 203, initializing a deep network model for binary classification, which is used for binary classification of normal and abnormal images; Step 204, sampling from the training data set to obtain a subset with consistent distribution of normal and abnormal numbers, inputting the subset into the deep network model, and updating the model based on classification cross entropy loss; Step 205, testing the three multi-semantic deep network models and one binary classification deep network model, first scaling the short side of the original serum image, and then cutting out an image of a set size from the center for prediction; The specific process of class imbalance optimization is: Step 300, using two methods to evaluate the models respectively; the models are three deep network models for coping with multi-semantics and one deep network model for binary classification; Step 301, the first evaluation method: the three semantic indicators are evaluated separately, a balanced data set is constructed for each indicator; and a separate test is performed on the balanced data set corresponding to each indicator; Step 302, the second evaluation method: joint testing: For the samples in the test set, the results of the three semantic indicators are measured at the same time. The test results of the three semantic indicators must be consistent with the true labels. For the samples in the test set, the results of the normal and abnormal binary classification are predicted, and the results must be consistent with the true labels. Step 303, optimizing the constructed model using a deep learning method that addresses category imbalance; The specific process of generating serum sample image recognition results is as follows: Step 400, cutting out the serum part of the sample image to be identified, and then scaling it; Step 401, for the image cut out and scaled in the previous step, cut out a square image of a set size from the center; Step 402, input the image obtained in the previous step into four models respectively to obtain recognition values ​​of three semantic indicators and normal and abnormal binary classification results; the four models are three deep network models for coping with multi-semantics and one deep network model for binary classification; Step 403, determining whether the predicted values ​​of the three semantic indicators are normal, or determining whether the predicted values ​​of the two-class classification are normal; Step 404: if any of the predicted values ​​are abnormal, the sample to be identified is determined to be abnormal and needs to be sent for further inspection; Step 405: If the prediction indicators are all normal, the output result is normal.

2. The serum sample image classification method based on multi-semantic imbalance learning according to claim 1, characterized in that: In step 205, three multi-semantic deep network models and one binary classification deep network model are tested by first scaling the short side of the original serum image to a size of 40, and then cutting out a 32-size image from the center for prediction.

3. The serum sample image classification method based on multi-semantic imbalance learning according to claim 1, characterized in that: In step 101, the serum part in the original serum image is extracted by using the cropping and edge detection method in OpenCV.

4. The serum sample image classification method based on multi-semantic imbalance learning according to claim 1, characterized in that: The network model uses a cross entropy loss function and stochastic gradient descent for optimization. In each round of training, a solution is obtained based on the performance of the current network model to optimize the network parameters.

5. The serum sample image classification method based on multi-semantic imbalance learning according to claim 1, characterized in that: The binary classification network model initializes a linear correction layer of equal size after the linear classification layer to update the network structure of the classification model.

6. A computer device, characterized in that: The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the serum sample image classification method based on multi-semantic imbalance learning as described in any one of claims 1 to 5 is implemented.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program for executing the serum sample image classification method based on multi-semantic imbalance learning as described in any one of claims 1 to 5.