Leukocyte morphological category identification method and device

Through the combination of semi-supervised learning method, consistency loss function and weighted cross entropy loss function, a small amount of labeled data is used to identify leukocyte morphology categories, which solves the problems of difficulty in obtaining labeled data and poor labeling accuracy in the prior art, and improves the accuracy of the identification results.

CN120219833APending Publication Date: 2025-06-27PEKING UNION MEDICAL COLLEGE HOSPITAL +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510290333.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-12
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

In the prior art, the identification of leukocyte morphology categories depends on large-scale data set annotation, which leads to difficulty in obtaining data and poor labeling accuracy, affecting the accuracy of identification results.

Method used

The semi-supervised learning method is adopted to train the model through pre-trained segmentation model and recognition model, combining the consistency loss function and the weighted cross-entropy loss function, and a small amount of labeled data is used to improve the accuracy of the recognition results.

Benefits of technology

It improves the utilization rate of labelless data and the accuracy of identification results, and solves the problems of difficulty in obtaining labeled data and poor labeling accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120219833A_ABST
    Figure CN120219833A_ABST
Patent Text Reader

Abstract

The invention provides a leukocyte morphological category identification method and device, and the method comprises the steps: obtaining a to-be-identified image which is a single-view image containing leukocytes; inputting the to-be-recognized image into a pre-trained segmentation model to obtain a sub-image output by the segmentation model; inputting the sub-image into a pre-trained recognition model to obtain a leukocyte morphological category recognition result output by the recognition model; wherein the identification model is obtained through gradient back propagation training based on a consistency loss function and a weighted cross entropy loss function, the consistency loss function acts on the unmarked image sample pair after preprocessing, and the weighted cross entropy loss function acts on the marked image sample after preprocessing. The problem that in the prior art, mark data are difficult to obtain, the marking accuracy is poor, and consequently the recognition result is inaccurate is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medical data processing, and particularly to a method and device for identifying white blood cell morphological categories. Background Art

[0002] When identifying the morphological categories of white blood cells, the prior art mainly relies on large-scale dataset annotation, and performs supervised learning training on the large-scale annotated dataset. A large amount of time is required for data collection and annotation during the data collection phase, and the time cycle of data processing is relatively long. Moreover, the dataset annotation depends on the experience of the annotators. If the quality of the dataset annotation is low, the neural network technology is extremely likely to overfit the mislabeled samples, affecting the final recognition result of the algorithm. At the same time, the raw data without annotation in the medical field is easier to obtain than the annotated data, and a large amount of unlabeled raw data cannot be utilized by the neural network technology, resulting in serious waste of these types of data.

[0003] In view of this, a method and device for identifying white blood cell morphological categories are provided to solve the problems in the prior art, such as difficult acquisition of labeled data, poor annotation accuracy, and inaccurate recognition results. Summary of the Invention

[0004] The present invention provides a method and device for identifying white blood cell morphological categories to solve the problems in the prior art, such as difficult acquisition of labeled data, poor annotation accuracy, and inaccurate recognition results, thereby improving the utilization rate of unlabeled data and the accuracy of recognition results.

[0005] The present invention provides a method for identifying white blood cell morphological categories, and the method includes:

[0006] Obtain an image to be recognized, where the image to be recognized is a single-field image containing white blood cells;

[0007] Input the image to be recognized into a pre-trained segmentation model to obtain a sub-image output by the segmentation model;

[0008] Input the sub-image into a pre-trained recognition model to obtain a recognition result of the morphological category of white blood cells output by the recognition model;

[0009] Wherein, the recognition model is trained through gradient backpropagation based on a consistency loss function and a weighted cross-entropy loss function. The consistency loss function acts on the pre-processed unlabeled image samples, and the weighted cross-entropy loss function acts on the pre-processed labeled image samples.

[0010] In some embodiments, training the pre-processed labeled image samples by using the weighted cross-entropy loss function specifically includes:

[0011] Obtain a labeled image sample;

[0012] Input the labeled image sample into a segmentation model to obtain sub-images of the labeled image sample output by the segmentation model;

[0013] Preprocess the sub-images of the labeled image sample, and input the preprocessed sub-images of the labeled image sample into a neural network for operation;

[0014] Activate the result obtained after the operation to obtain the predicted probability value that the labeled image sample belongs to the target category;

[0015] Use the predicted probability value and the true value to calculate the loss value to obtain the loss calculation result of the weighted cross-entropy loss function, and perform gradient update by backpropagation.

[0016] In some embodiments, preprocessing the sub-images of the labeled image sample specifically includes:

[0017] Perform data augmentation on the sub-images of the labeled image sample to obtain augmented sub-images;

[0018] Perform rotation, flipping, scaling, and random erasing processing on the augmented sub-images.

[0019] In some embodiments, training the unlabeled image sample after preprocessing using the consistency loss function specifically includes:

[0020] Obtain an unlabeled image sample;

[0021] Input the unlabeled image sample into a segmentation model to obtain sub-images of the unlabeled image sample output by the segmentation model;

[0022] Preprocess the sub-images of the unlabeled image sample twice to obtain a first sub-image and a second sub-image;

[0023] Input the first sub-image into a neural network for operation to obtain a first predicted probability value, and input the second sub-image into a neural network for operation to obtain a second predicted probability value;

[0024] Based on the principle of entropy minimization, calculate the function value of the consistency loss function of the first predicted probability value and the second predicted probability value.

[0025] In some embodiments, preprocessing the sub-images of the unlabeled image sample to obtain a first sub-image specifically includes:

[0026] Perform image color adjustment, rotation, and flipping on the sub-images of the data-augmented unlabeled image sample to obtain the first sub-image.

[0027] In some embodiments, the sub-images of the unlabeled image samples are pre-processed to obtain second sub-images, specifically including:

[0028] Performing image color adjustment, image stretching transformation, foreground region random cropping, and random erasing processing on the sub-images of the data-augmented unlabeled image samples to obtain the second sub-images.

[0029] The present invention also provides a leukocyte morphology category recognition device, which includes:

[0030] An image acquisition unit for acquiring an image to be recognized, where the image to be recognized is a single-field image containing leukocytes;

[0031] An image segmentation unit for inputting the image to be recognized into a pre-trained segmentation model to obtain sub-images output by the segmentation model;

[0032] A result generation unit for inputting the sub-images into a pre-trained recognition model to obtain a recognition result of the leukocyte morphology category output by the recognition model;

[0033] Among them, the recognition model is obtained through gradient backpropagation based on a consistency loss function and a weighted cross-entropy loss function. The consistency loss function acts on the pre-processed unlabeled image sample pairs, and the weighted cross-entropy loss function acts on the pre-processed labeled image samples.

[0034] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the above-described method is implemented.

[0035] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above-described method is implemented.

[0036] The present invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, the above-described method is implemented.

[0037] The white blood cell morphological category recognition method and device provided by the present invention obtain an image to be recognized, where the image to be recognized is a single-field image containing white blood cells; input the image to be recognized into a pre-trained segmentation model to obtain a sub-image output by the segmentation model; input the sub-image into a pre-trained recognition model, and the recognition result of the white blood cell morphological category output by the recognition model can be obtained; wherein, the recognition model is trained by gradient backpropagation based on a consistency loss function and a weighted cross-entropy loss function, the consistency loss function acts on pre-processed unlabeled image samples, and the weighted cross-entropy loss function acts on pre-processed labeled image samples. The method and device provided by the present invention use the semi-supervised learning method, and only need to label a small number of pictures to realize model training, solve the problems of difficult acquisition of labeled data and poor labeling accuracy in the prior art, resulting in inaccurate recognition results, thereby improving the utilization rate of unlabeled data and the accuracy of recognition results. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0039] Figure 1 is one of the flowcharts of the white blood cell morphological category recognition method provided by the present invention;

[0040] Figure 2 is an example of the network architecture diagram of the segmentation model provided by the present invention;

[0041] Figure 3 is the second flowchart of the white blood cell morphological category recognition method provided by the present invention;

[0042] Figure 4 is the third flowchart of the white blood cell morphological category recognition method provided by the present invention;

[0043] Figure 5 is the fourth flowchart of the white blood cell morphological category recognition method provided by the present invention;

[0044] Figure 6 is the structural schematic diagram of the white blood cell morphological category recognition device provided by the present invention;

[0045] Figure 7 is the structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0046] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present invention without creative efforts shall fall within the protection scope of the present invention.

[0047] To solve the problems existing in the prior art, the present invention provides a method for identifying leukocyte morphological categories, which is used to analyze the specific morphological stages of leukocytes. Unlabeled images in the medical field are easily obtained. The method provided by the present invention is based on semi-supervised learning and only requires a small amount of labeled data to achieve the same results as supervised learning with a large amount of labeled data. By combining the supervised learning part and the unsupervised learning part, and using cross-entropy loss and consistency loss to efficiently train the neural network, the problems of difficult acquisition of labeled samples in the medical field and high requirements for the experience of labeling personnel are effectively alleviated. The recognition effect of deep learning technology in the case of less labeled data is greatly improved, providing accurate data support for the subsequent clinical application stage.

[0048] In a specific embodiment, the present invention provides a method for identifying leukocyte morphological categories, as Figure 1 shown, the method includes the following steps:

[0049] S110: Obtain an image to be recognized, where the image to be recognized is a single-field image containing leukocytes. In a specific usage scenario, a microscope can be used to collect leukocyte images under the microscope in real time. That is to say, first, each field of view is photographed and collected under a microscopic imaging device to generate a single-field image containing several leukocytes.

[0050] S120: Input the image to be recognized into a pre-trained segmentation model to obtain a sub-image output by the segmentation model. Image segmentation can be implemented using various models. Before segmentation, it is necessary to first label the position information of leukocytes. Only the position information of leukocytes in the single-field image is labeled by trained leukocyte labeling personnel with a small amount of labeling. The labeled data is divided into a training set and a test set according to a certain ratio to prepare data for constructing a leukocyte segmentation model. The single-field image is input into the segmentation model to obtain a sub-image containing a single leukocyte, and this sub-image containing a single leukocyte is used as the input of the subsequent recognition model. That is to say, the image segmentation stage of leukocytes can be implemented using any cell segmentation algorithm to form a sub-image after leukocyte segmentation. For example, using Figure 2The segmentation model shown. At this stage, a single-field image of 1024*1920 is input into the segmentation model. Feature extraction is performed through the backbone network, and the extracted features are input into the upsampling layer for upsampling processing to obtain the upsampled features. The upsampled features are respectively input into the fully connected layer and the Mask layer to obtain the sub-images of individual white blood cells, and the individual sub-images are saved as the input of the recognition model.

[0051] S130: Input the sub-image into a pre-trained recognition model to obtain the recognition result of the white blood cell morphology category output by the recognition model; wherein, the recognition model is trained through gradient backpropagation based on the consistency loss function and the weighted cross-entropy loss function. The consistency loss function acts on the pre-processed unlabeled image samples, and the weighted cross-entropy loss function acts on the pre-processed labeled image samples.

[0052] That is to say, using the trained segmentation model and recognition model, during the process of recognizing the image to be recognized, input a single-field image containing white blood cells. First, input it into the segmentation algorithm to obtain the sub-images of the single field of white blood cells; input the segmented sub-images into the recognition model to obtain the recognition result, which is the analysis result of the white blood cell morphology, and count the specific number of each type of white blood cell and output it.

[0053] In some embodiments, the weighted cross-entropy loss function is used to train the pre-processed labeled image samples. As Figure 3 shown, it specifically includes the following steps:

[0054] S310: Obtain labeled image samples;

[0055] S320: Input the labeled image samples into the segmentation model to obtain the sub-images of the labeled image samples output by the segmentation model;

[0056] Steps S310 and S320 are to perform morphological annotation on white blood cells. Specifically, professional doctors use specific annotation tools to annotate the position and category information of white blood cells on the single-field image. After a small amount of annotation, the white blood cells are cropped on the single-field image according to the annotation results, and the cropped annotated images are divided into a training set and a test set according to a certain ratio to prepare data for constructing a neural network model for morphological analysis (classification).

[0057] S330: Pre-process the sub-images of the labeled image samples and input the pre-processed sub-images of the labeled image samples into the neural network for operation; during pre-processing, first perform data augmentation on the sub-images of the labeled image samples to obtain the enhanced images; then perform rotation, flipping, maximization, and random erasing processing on the enhanced images.

[0058] S340: Activate the result obtained after the operation to obtain the predicted probability value that the labeled image sample belongs to the target category;

[0059] S350: Based on the weighted cross - entropy loss function, use the predicted probability value and the true value to calculate the loss function to obtain the value of the weighted cross - entropy loss function.

[0060] Semi - supervised learning for white blood cell morphology analysis can effectively alleviate the problem of data annotation. Only a small amount of labeled data is required to achieve the same result as supervised learning with a large amount of labeled data. Therefore, for labeled image samples, a supervised learning algorithm is adopted. In this embodiment, as Figure 5 shown, the supervised learning part adopts a traditional supervised learning method. First, pre - process the sub - images of individual white blood cells to obtain normalized white blood cell sub - images. Send the normalized sub - images into a neural network for operation, activate the result of the operation through softmax to obtain the probability that the cell belongs to a certain class, and use the predicted probability value and the true value of the cell to calculate the loss function. The loss function adopts the cross - entropy loss function, that is:

[0061]

[0062] Among them, represents the cross - entropy loss function, N represents the total number of samples, represents the true label of a single sample, represents the prediction result of the neural network.

[0063] Usually, in the data collection stage, due to the distribution limitation of clinical samples, the collected data is usually in an extremely unbalanced state. Based on this, this embodiment suppresses data imbalance by weighting the loss function, that is:

[0064]

[0065] Among them, l represents the weighted loss function, f y represents the logit value predicted by the model, Π y represents the weight value introduced for each category, and L is the total number of categories.

[0066] In some embodiments, the unlabeled image samples after pre - processing are trained using the consistency loss function. As Figure 4 shown, it specifically includes the following steps:

[0067] S410: Obtain unlabeled image samples;

[0068] S420: Input the unlabeled image sample into the segmentation model to obtain sub-images of the unlabeled image sample output by the segmentation model;

[0069] S430: Preprocess the sub-images of the unlabeled image sample twice to obtain a first sub-image and a second sub-image;

[0070] S440: Input the first sub-image into the neural network for calculation to obtain a first predicted probability value, and input the second sub-image into the neural network for calculation to obtain a second predicted probability value;

[0071] S450: Calculate the function value of the consistency loss function of the first predicted probability value and the second predicted probability value based on the principle of entropy minimization.

[0072] Among them, preprocessing the sub-images of the unlabeled image sample to obtain a first sub-image specifically includes:

[0073] Perform image color adjustment, rotation, and flipping on the sub-images of the data-augmented unlabeled image sample to obtain the first sub-image.

[0074] Among them, preprocessing the sub-images of the unlabeled image sample to obtain a second sub-image specifically includes:

[0075] Perform image color adjustment, image stretching transformation, foreground region random cropping, and random erasing processing on the sub-images of the data-augmented unlabeled image sample to obtain the second sub-image.

[0076] The unlabeled image adopts an unsupervised learning algorithm with a loss function based on the consistency principle. In the field of medical data, there is a large amount of unlabeled data. In order to utilize such unlabeled data to assist in training with labeled data. Please continue to refer to Figure 5 , first, preprocess the unlabeled white blood cell sub-images to obtain copy 1 (i.e., the first sub-image) and copy 2 (i.e., the second sub-image) after processing the sub-images, and then send the two obtained copies into the neural network for prediction respectively to obtain the probability distributions predicted by the network respectively, hoping that the two probability distributions are as close as possible.

[0077] Specifically, in the image preprocessing stage, for the sub-images obtained after white blood cell segmentation, the core idea of the unsupervised part is the 'prediction consistency principle', that is, for the sub-images obtained after segmentation of the same white blood cell, perform data augmentation on them to different degrees, and send the augmented samples into the neural network for classification, hoping that the classification results obtained from the two samples are the same, that is, the distributions of the outputs of the network for different augmentations of the same sample are the same.

[0078] Based on this, in this embodiment, the unlabeled white blood cell sub-images are first preprocessed. First, the contrast, brightness, and color of the white blood cell sub-images are randomly enhanced, and then they are rotated clockwise by 90 degrees to obtain the first sub-image corresponding to the enhanced copy 1. At the same time, the white blood cell sub-images are stretched again, and significant changes in contrast, brightness, and color are made, and operations such as random cropping, random erasing, and magnification of the foreground area of the image are performed to obtain the second sub-image corresponding to the enhanced copy 2.

[0079] In the process of constructing the loss function based on the consistency principle, for the enhanced first sub-image, since the enhancement amplitude is weak, it is considered that its prediction result is consistent with the result of the original image. Therefore, the prediction distribution of the first sub-image is used as the true label distribution of the original image. For the second sub-image, although significant data augmentation has been performed, the second sub-image essentially belongs to the same category as the original image. So, it is hoped that the result predicted by the second sub-image is similar to the result obtained from the original image, and the result obtained from the original image is similar to the prediction distribution of the first sub-image. Therefore, it is hoped that the result obtained from the second sub-image is as close as possible to the prediction distribution of the first sub-image. To measure the closeness of the two prediction distributions, this embodiment uses the KL divergence to quantify the closeness of the two distributions, that is:

[0080] D KL (p||q) = E p [log p(x i ) - log q(x i )]

[0081] In the formula, D KL represents the KL divergence, and E p represents the expectation under the distribution p. p and q respectively represent two different distributions.

[0082] It is hoped that the KL divergence of the two distributions is as small as possible. At this time, the KL divergence of the two distributions constrains the feature extraction process of the neural network, and can also be regarded as a new regularization method.

[0083] Finally, the entropy of the output distribution of the network is maximized. When the neural network is trained, the unlabeled data and the labeled data share the same set of parameters. The distribution of the output of the unlabeled data will affect the optimization of the parameters of the labeled data. Since the neural network is prone to overconfidence during prediction and has a very high confidence in the predicted category, the entropy of the prediction result for a certain cell is extremely small, causing the prediction result of the network to tend to a certain category. However, since the specific category of the unlabeled sample is unknown, if the prediction result of the neural network tends to a certain category and this category is misrecognized by the neural network, the recognition result of the unlabeled part will have a negative impact on the overall recognition result of the network. Moreover, it is only hoped that the unlabeled part satisfies the consistency principle, and there is no need to overly concern about its specific category. Therefore, it is desired that for the unlabeled data, the prediction distribution of the neural network is more uniform and does not overly tend to a specific category. So, before calculating the loss function, the entropy of the prediction distribution of the neural network on the unlabeled data is maximized, making the neural network no longer overly tend to a specific category on the unlabeled data.

[0084]

[0085] Among them, H(X) represents the entropy of the random variable X, and p i represents the prediction distribution of the neural network.

[0086] It is desired to maximize the above formula so that the distribution output by the neural network on the unlabeled data is as close as possible to the uniform distribution, minimizing the negative impact on the optimization of the labeled data parameters.

[0087] In the above specific implementation manner, the method for identifying the leukocyte morphology category provided by the present invention includes obtaining an image to be recognized, where the image to be recognized is a single-field image containing leukocytes; inputting the image to be recognized into a pre-trained segmentation model to obtain a sub-image output by the segmentation model; and inputting the sub-image into a pre-trained recognition model to obtain the recognition result of the leukocyte morphology category output by the recognition model. Among them, the recognition model is obtained through gradient backpropagation based on the consistency loss function and the weighted cross-entropy loss function. The consistency loss function acts on the pre-processed unlabeled image samples, and the weighted cross-entropy loss function acts on the pre-processed labeled image samples. The method provided by the present invention uses a semi-supervised learning algorithm, and only requires a small amount of image annotation to achieve model training, solving the problems in the prior art such as difficult acquisition of labeled data and poor annotation accuracy resulting in inaccurate recognition results, thereby improving the utilization rate of unlabeled data and the accuracy of recognition results.

[0088] In addition to the above method, the present invention also provides a device for identifying the leukocyte morphology category, as Figure 6As shown, the device includes:

[0089] An image acquisition unit 610, configured to acquire an image to be recognized, where the image to be recognized is a single-field image containing white blood cells;

[0090] An image segmentation unit 620, configured to input the image to be recognized into a pre-trained segmentation model to obtain a sub-image output by the segmentation model;

[0091] A result generation unit 630, configured to input the sub-image into a pre-trained recognition model to obtain a recognition result of the morphological category of white blood cells output by the recognition model;

[0092] Wherein, the recognition model is obtained by gradient backpropagation based on a consistency loss function and a weighted cross-entropy loss function. The consistency loss function acts on pre-processed unlabeled image samples, and the weighted cross-entropy loss function acts on pre-processed labeled image samples.

[0093] In some embodiments, the pre-processed labeled image samples are trained using the weighted cross-entropy loss function. Specifically, it includes:

[0094] Obtain labeled image samples;

[0095] Input the labeled image samples into the segmentation model to obtain sub-images of the labeled image samples output by the segmentation model;

[0096] Pre-process the sub-images of the labeled image samples, and input the pre-processed sub-images of the labeled image samples into a neural network for calculation;

[0097] Activate the result obtained after the calculation to obtain a predicted probability value that the labeled image sample belongs to the target category;

[0098] Calculate a loss value using the predicted probability value and the true value to obtain the loss calculation result of the weighted cross-entropy loss function, and perform gradient update by backpropagation.

[0099] In some embodiments, pre-processing the sub-images of the labeled image samples specifically includes:

[0100] Perform data augmentation on the sub-images of the labeled image samples to obtain enhanced sub-images;

[0101] Perform rotation, flipping, scaling, and random erasing processing on the enhanced sub-images.

[0102] In some embodiments, training the pre-processed unlabeled image samples using the consistency loss function specifically includes:

[0103] Obtain an unlabeled image sample;

[0104] Input the unlabeled image sample into a segmentation model to obtain sub-images of the unlabeled image sample output by the segmentation model;

[0105] Preprocess the sub-images of the unlabeled image sample twice to obtain a first sub-image and a second sub-image;

[0106] Input the first sub-image into a neural network for operation to obtain a first prediction probability value, and input the second sub-image into the neural network for operation to obtain a second prediction probability value;

[0107] Based on the principle of entropy minimization, calculate the function value of the consistency loss function of the first prediction probability value and the second prediction probability value.

[0108] In some embodiments, preprocessing the sub-images of the unlabeled image sample to obtain a first sub-image specifically includes:

[0109] Perform image color adjustment, rotation, and flipping on the sub-images of the unlabeled image sample after data augmentation to obtain the first sub-image.

[0110] In some embodiments, preprocessing the sub-images of the unlabeled image sample to obtain a second sub-image specifically includes:

[0111] Perform image color adjustment, image stretching transformation, foreground region random cropping, and random erasing processing on the sub-images of the unlabeled image sample after data augmentation to obtain the second sub-image.

[0112] In the above specific implementation manner, the leukocyte morphology category recognition device provided by the present invention obtains a to-be-recognized image, where the to-be-recognized image is a single-field image containing leukocytes; inputs the to-be-recognized image into a pre-trained segmentation model to obtain sub-images output by the segmentation model; and inputs the sub-images into a pre-trained recognition model, and then the recognition result of the leukocyte morphology category output by the recognition model can be obtained. Among them, the recognition model is obtained through gradient backpropagation based on a consistency loss function and a weighted cross-entropy loss function. The consistency loss function acts on the preprocessed pair of unlabeled image samples, and the weighted cross-entropy loss function acts on the preprocessed labeled image samples. The device provided by the present invention uses a semi-supervised learning algorithm, and only needs to label a small number of pictures to achieve model training, solves the problems of difficult acquisition of labeled data and poor labeling accuracy in the prior art, resulting in inaccurate recognition results, and thus improves the utilization rate of unlabeled data and the accuracy of recognition results.

[0113] Figure 7 Illustrates a schematic physical structure diagram of an electronic device, such asFigure 7 As shown, the electronic device may include: a processor 710, a communications interface 720, a memory 730, and a communication bus 740. Among them, the processor 710, the communications interface 720, and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logical instructions in the memory 730 to execute the above method.

[0114] In addition, when the logical instructions in the above-mentioned memory 730 are implemented in the form of software functional units and sold or used as independent products, they may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, may be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes.

[0115] On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the above method.

[0116] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative labor.

[0117] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solution, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0118] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for identifying leukocyte morphology, characterized in that: The method comprises: Acquiring an image to be identified, wherein the image to be identified is a single-field image containing white blood cells; Inputting the image to be recognized into a pre-trained segmentation model to obtain a sub-image output by the segmentation model; Inputting the sub-image into a pre-trained recognition model to obtain a recognition result of the leukocyte morphology category output by the recognition model; Among them, the recognition model is obtained through gradient back propagation training based on the consistency loss function and the weighted cross entropy loss function, the consistency loss function acts on the preprocessed unlabeled image sample pairs, and the weighted cross entropy loss function acts on the preprocessed labeled image samples.

2. The method for identifying the leukocyte morphology according to claim 1, characterized in that: The weighted cross entropy loss function is used to train the preprocessed labeled image samples, specifically including: Get labeled image samples; Inputting the labeled image sample into a segmentation model to obtain a sub-image of the labeled image sample output by the segmentation model; Preprocessing the sub-images of the labeled image samples, and inputting the preprocessed sub-images of the labeled image samples into the neural network for operation; The result obtained after the operation is activated to obtain the predicted probability value of the labeled image sample belonging to the target category; The predicted probability value and the true value are used to calculate the loss value to obtain the loss calculation result of the weighted cross entropy loss function, and the gradient is updated by back propagation.

3. The method for identifying the leukocyte morphology according to claim 2, characterized in that: The sub-images with labeled image samples are preprocessed, including: Performing data enhancement on the sub-image of the labeled image sample to obtain an enhanced sub-image; The enhanced sub-image can be rotated, flipped, scaled and erased at any time.

4. The method for identifying the leukocyte morphology according to claim 1, characterized in that: The preprocessed unlabeled image samples are trained using the consistency loss function, specifically including: Get unlabeled image samples; Inputting the unlabeled image sample into a segmentation model to obtain a sub-image of the unlabeled image sample output by the segmentation model; Preprocessing the sub-image of the unlabeled image sample twice to obtain a first sub-image and a second sub-image; Inputting the first sub-image into a neural network for calculation to obtain a first prediction probability value, and inputting the second sub-image into a neural network for calculation to obtain a second prediction probability value; Based on the entropy minimization principle, the function value of the consistency loss function of the first predicted probability value and the second predicted probability value is calculated.

5. The method for identifying the leukocyte morphology according to claim 4, characterized in that: The sub-image of the unlabeled image sample is preprocessed to obtain a first sub-image, specifically including: The sub-image of the unlabeled image sample after data enhancement is subjected to image color adjustment, rotation and flipping to obtain the first sub-image.

6. The method for identifying the leukocyte morphology according to claim 4, characterized in that: The sub-image of the unlabeled image sample is preprocessed to obtain a second sub-image, specifically including: The sub-image of the unlabeled image sample after data enhancement is subjected to image color adjustment, image stretching transformation, random cropping and random erasing of the foreground area to obtain the second sub-image.

7. A device for identifying leukocyte morphology, characterized in that: The device comprises: An image acquisition unit, used for acquiring an image to be identified, wherein the image to be identified is a single-field image containing white blood cells; An image segmentation unit, used for inputting the image to be recognized into a pre-trained segmentation model to obtain a sub-image output by the segmentation model; A result generating unit, used for inputting the sub-image into a pre-trained recognition model to obtain a recognition result of the leukocyte morphology category output by the recognition model; Among them, the recognition model is obtained through gradient back propagation training based on the consistency loss function and the weighted cross entropy loss function, the consistency loss function acts on the preprocessed unlabeled image sample pairs, and the weighted cross entropy loss function acts on the preprocessed labeled image samples.

8. An electronic device comprising 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 method according to any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Deconvolution guided semi-supervised plant leaf disease identification and segmentation method

    CN112036335A

  • Leukocyte classified counting method based on small sample semi-supervised learning

    CN112801212A

  • Semi-supervised leukocyte image classification method based on consistency regularization

    CN114972311A

  • Colposcope image segmentation model construction method, image classification method and device

    CN118334336A

  • Mask R-CNN surface crack identification method combined with semi-supervised model

    CN118675048A