Leukocyte classification method and device

Through multi-modal intelligent recognition methods, combined with convolutional neural networks and self-attention models, the problem of low accuracy and long time consumption of white blood cell detection is solved, the accuracy and efficiency of white blood cell classification are improved, and high-precision and fast detection are provided. Test results.

CN118626974BActive Publication Date: 2024-10-18BEIJING XIAOYING TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411098786.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-12
Publication Date
2024-10-18
Estimated Expiration
2044-08-12

AI Technical Summary

Technical Problem

The accuracy of white blood cell detection in the existing technology is low and time-consuming. Especially when classifying peripheral blood white blood cells, the type and number of abnormal cells cannot be accurately identified, resulting in low reliability of the results.

Method used

Using multi-modal intelligent recognition method, through the combination of convolutional neural network and self-attention model, image and text data are obtained, the similarity of image feature vector and text feature vector is calculated, and the pre-trained classification model is used to classify white blood cells to improve detection accuracy and efficiency.

Benefits of technology

It has improved the accuracy and timeliness of white blood cell detection, reduced labor costs, can accurately identify abnormal white blood cells, avoid omissions, has high identification accuracy and good generalization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118626974B_ABST
    Figure CN118626974B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for classifying white blood cells, the method comprising: obtaining image data and text data to be identified, wherein the text data contains a category label; inputting the image data into a pre-constructed convolutional neural network to obtain an image feature vector; inputting the text data into a pre-constructed self-attention model to obtain a text feature vector; inputting the image feature vector and the text feature vector into a pre-trained classification model to obtain the similarity between the image data to be identified and the text data output by the classification model; when the maximum similarity is taken, the category label of the text data matching the image data to be identified is used as the classification result. The method solves the problems of low accuracy and long time consumption of white blood cell detection in the prior art, and improves the accuracy and timeliness of white blood cell detection.
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 in particular to a method and device for classifying leukocytes. Background Art

[0002] When performing peripheral blood leukocyte detection and classification, existing technologies use flow cytometry or manual microscopic observation. Among them, flow cytometry can roughly estimate the normal leukocyte category and indicate the existence of abnormal categories, but it cannot give the specific category and corresponding number of abnormal cells. Manual observation of peripheral blood smears with the help of a microscope is a conventional method for leukocyte detection. It is usually necessary to observe the entire blood smear under a 100x objective lens of a microscope. Generally, it is necessary to check the entire blood smear to accurately find abnormal leukocytes, which takes a long time and consumes a lot of energy for doctors. In the end, the number of cells of each category in 100-200 leukocytes is counted, and the reliability of the statistical results is low.

[0003] In view of this, a method and device for classifying leukocytes are provided to solve the problems of low accuracy and long time consumption of leukocyte detection in the prior art. Summary of the invention

[0004] The present invention provides a leukocyte classification method and device to solve the problems of low accuracy and long time consumption of leukocyte detection in the prior art, and improve the accuracy and timeliness of leukocyte detection.

[0005] The present invention provides a method for classifying leukocytes, the method comprising:

[0006] Acquire image data and text data to be identified, wherein the text data contains a category label;

[0007] Inputting the image data into a pre-built convolutional neural network to obtain an image feature vector; inputting the text data into a pre-built self-attention model to obtain a text feature vector;

[0008] Inputting the image feature vector and the text feature vector into a pre-trained classification model to obtain the similarity between the image data to be identified and the text data output by the classification model;

[0009] When the maximum similarity is taken, the category label of the text data that matches the image data to be identified is taken as the classification result;

[0010] The classification model is obtained by training using sample image data, sample text data and sample category labels.

[0011] In some embodiments, the training process of the classification model includes:

[0012] Constructing a sample data set, wherein the sample data set includes sample image data, sample text data, and sample category labels;

[0013] Inputting the image data of the sample into a pre-built detection model to obtain the position coordinates of each white blood cell in the sample, and dividing the image data of the sample into a plurality of sub-images according to the position coordinates of each white blood cell;

[0014] Performing data processing on the sub-image to obtain a feature vector of an image modality and a feature vector of a text modality of the sub-image;

[0015] Calculating the similarity between the feature vector of the image modality and the feature vector of the text modality of the sub-image;

[0016] The pre-built neural network is trained according to the similarity and the category labels of the samples to obtain the classification model.

[0017] In some embodiments, data processing is performed on the sub-image to obtain a feature vector of the image modality of the sub-image, specifically including:

[0018] Perform multi-layer convolution block operations on the input sub-image to obtain a feature map of the target size;

[0019] Perform a global pooling operation on the feature map of the target size to obtain the initial feature vector of the image;

[0020] The initial feature vector of the image is mapped through a fully connected layer to obtain a feature vector of the image modality of the sub-image.

[0021] In some embodiments, data processing is performed on the sub-image to obtain a feature vector of the text modality of the sub-image, specifically including:

[0022] Embed the original text data corresponding to the sub-image into word vectors, and convert each word into a word embedding vector of a target dimension;

[0023] Inputting the word embedding vector of the complete sentence into the first-layer multi-head attention module, performing multi-head self-attention feature calculation between words, and obtaining the text initial feature vector of the sub-image;

[0024] The initial feature vector of the text is sequentially subjected to global pooling operation and mapping by a fully connected layer to obtain a feature vector of the text mode of the sub-image.

[0025] In some embodiments, the similarity between the feature vector of the image modality and the feature vector of the text modality of the sub-image is calculated using the following formula:

[0026] ;

[0027] in, is the feature vector of the image modality, is the feature vector of text mode, is the vector inner product operation.

[0028] In some embodiments, the category label includes at least the name of the single cell, the number of nuclei, and the patina color.

[0029] The present invention also provides a leukocyte classification device, comprising:

[0030] A data acquisition unit, used to acquire image data and text data to be identified, wherein the text data contains a category label;

[0031] A data processing unit, configured to input the image data into a pre-built convolutional neural network to obtain an image feature vector; and input the text data into a pre-built self-attention model to obtain a text feature vector;

[0032] A similarity calculation unit, used for inputting the image feature vector and the text feature vector into a pre-trained classification model to obtain the similarity between the image data to be identified and the text data output by the classification model;

[0033] A result generating unit, used for taking the category label of the text data matching the image data to be identified as the classification result when taking the maximum similarity value;

[0034] The classification model is obtained by training using sample image data, sample text data and sample category labels.

[0035] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described above when executing the program.

[0036] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method described above when executed by a processor.

[0037] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method described above is implemented.

[0038] The leukocyte classification method and device provided by the present invention obtain image data and text data to be identified, wherein the text data contains a category label; the image data is input into a pre-constructed convolutional neural network to obtain an image feature vector; the text data is input into a pre-constructed self-attention model to obtain a text feature vector; the image feature vector and the text feature vector are input into a pre-trained classification model to obtain the similarity between the image data to be identified and the text data output by the classification model; when the maximum similarity is taken, the category label of the text data matching the image data to be identified is used as the classification result; wherein the classification model is trained using the sample image data, the sample text data and the sample category label.

[0039] The method and device use a microscope or automatic slide scanning equipment to digitize the slide, and then use the constructed deep learning algorithm to detect white blood cells and identify specific categories in each field of view, reducing the time and labor costs of detection and identification, improving the ability to accurately identify peripheral blood white blood cells in local areas, and not missing abnormal white blood cells. The detection speed is fast, reducing labor costs, and can combine image and text two modal information to deeply mine information, with high recognition accuracy and good generalization. This solves the problem of low accuracy and long time consumption of white blood cell detection in the existing technology, and improves the accuracy and timeliness of white blood cell detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are 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.

[0041] Figure 1 This is one of the flow charts of the method for classifying leukocytes provided by the present invention;

[0042] Figure 2 is a schematic diagram of white blood cell labeling provided by the present invention;

[0043] Figure 3 This is the second flow chart of the leukocyte classification method provided by the present invention;

[0044] Figure 4 This is the third flow chart of the method for classifying white blood cells provided by the present invention;

[0045] Figure 5 This is the fourth flow chart of the leukocyte classification method provided by the present invention;

[0046] Figure 6This is the fifth flow chart of the method for classifying leukocytes provided by the present invention;

[0047] Figure 7 is a structural block diagram of the white blood cell classification device provided by the present invention;

[0048] Figure 8 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0050] In one embodiment, the present invention provides a method for classifying leukocytes, such as Figure 1 As shown, the method comprises the following steps:

[0051] S110: Acquire image data and text data to be identified, wherein the text data contains a category label; this embodiment adopts a multimodal intelligent recognition algorithm, wherein one modality is an image modality and the other modality is a text modality.

[0052] Therefore, in the process of data collection, it is necessary to collect image data and text data. In the process of collecting image data, in order to avoid missing abnormal white blood cells, this embodiment first takes pictures of each field of view under the blood smear under the microscope imaging equipment, and for the image boundary, the adjacent images are stitched together to seamlessly connect the boundary part to avoid missing any possible white blood cells. In the process of collecting text data, the text data is data related to the attributes of white blood cells, such as the specific name of a single cell, the number of nuclei, the color of the patina and other information. The attribute can be rewritten as the following unified text as the input of the text model, such as the following text model:

[0053] This is a xx cell with xx nuclei and xx color of patina.

[0054] After acquiring the data, the white blood cell data needs to be annotated, for example Figure 2 As shown, professional doctors use specific annotation tools to mark the location and category information of white blood cells on a single visual field map. When the annotation amount reaches a certain scale, the annotated data is divided into training set, validation set and test set according to a certain ratio to prepare data for building a neural network model.

[0055] S120: Input the image data into a pre-built convolutional neural network to obtain an image feature vector; input the text data into a pre-built self-attention model to obtain a text feature vector. The overall white blood cell recognition framework is divided into two parts, namely the white blood cell detection framework and the white blood cell classification (recognition) framework. The detection framework can be completed by any target detection or semantic segmentation algorithm, such as Yolo, Faster-RCnn, Watershed, Unet and other algorithms. The present invention focuses on the intelligent classification (recognition) part. After the large image is input into the white blood cell detection model, the position coordinates of each white blood cell are obtained, and the white blood cells are cropped according to the position coordinates to obtain a single white blood cell small image, which is used as one of the main inputs of the intelligent recognition algorithm.

[0056] S130: Inputting the image feature vector and the text feature vector into a pre-trained classification model to obtain the similarity between the image data to be identified and the text data output by the classification model; wherein the classification model is trained using the image data of the sample, the text data of the sample and the category label of the sample;

[0057] S140: When the maximum similarity value is obtained, the category label of the text data that matches the image data to be identified is used as the classification result.

[0058] In some embodiments, Figure 3 and Figure 4 As shown, the training process of the classification model includes the following steps:

[0059] S310: Construct a sample data set, wherein the sample data set includes sample image data, sample text data, and sample category labels; for example, the text data includes at least the name of a single cell, the number of nuclei, and the patina color.

[0060] S320: inputting the image data of the sample into a pre-built detection model to obtain the position coordinates of each white blood cell in the sample, and dividing the image data of the sample into a plurality of sub-images according to the position coordinates of each white blood cell;

[0061] S330: performing data processing on the sub-image to obtain a feature vector of an image modality and a feature vector of a text modality of the sub-image;

[0062] S340: Calculate the similarity between the feature vector of the image modality and the feature vector of the text modality of the sub-image;

[0063] S350: Train the pre-built neural network according to the similarity and the category label of the sample to obtain the classification model. Specifically, the similarity between the feature vector of the image modality and the feature vector of the text modality of the sub-image is calculated using the following formula:

[0064] ;

[0065] in, is the feature vector of the image modality, is the feature vector of text mode, is the vector inner product operation.

[0066] Through the above formula, we can get the similarity between the input image and different texts. In a specific usage scenario, the pattern of the text vector is "This is an xx cell, with xx nuclei and xx color of patina", and the text vector contains the category label of the image. The text with the greatest similarity is the text corresponding to the image, and the category information in the text attribute is finally output as the category of the image to obtain the prediction result of the cell category.

[0067] In step S130, Figure 5 As shown in the figure, the overall classification model consists of two parts. The first part inputs the image modality, and the model is built by a convolutional neural network. The second part inputs the text modality, and the model is built by a self-attention module. The image data in the image modality must correspond one-to-one with the text data in the corresponding text modality. When optimizing the model, the features generated in the image modality and the features generated in the corresponding text modality should be as close as possible. Deeply explore the correspondence between images and texts.

[0068] In step S230, the sub-image is subjected to data processing to obtain a feature vector of the image modality of the sub-image, specifically including:

[0069] Perform multi-layer convolution block operations on the input sub-image to obtain a feature map of the target size;

[0070] Perform a global pooling operation on the feature map of the target size to obtain the initial feature vector of the image;

[0071] The initial feature vector of the image is mapped through a fully connected layer to obtain a feature vector of the image modality of the sub-image.

[0072] Specifically, for the image modality, first, perform a convolution block operation on the 224×224 image (each convolution block contains three convolution layers) to obtain a feature map of 112×112. Perform the same convolution block operation on the feature map to obtain a feature map of 56×56. Perform a convolution block operation on the feature map again to obtain a feature map of 28×28. Perform convolution block operations in sequence according to the above rules until a feature map of 7×7 is obtained. Perform a global pooling operation on the 7×7 feature map to obtain a feature vector of 2048 dimensions. Map the feature vector through a fully connected layer to obtain a feature vector of 128 dimensions, which is used for similarity calculation with the text modality feature vector.

[0073] In step S230, the sub-image is subjected to data processing to obtain a feature vector of the text mode of the sub-image, specifically including:

[0074] Embed the original text data corresponding to the sub-image into word vectors, and convert each word into a word embedding vector of a target dimension;

[0075] Inputting the word embedding vector of the complete sentence into the first-layer multi-head attention module, performing multi-head self-attention feature calculation between words, and obtaining the text initial feature vector of the sub-image;

[0076] The initial feature vector of the text is sequentially subjected to global pooling operation and mapping by a fully connected layer to obtain a feature vector of the text mode of the sub-image.

[0077] Specifically, for the text modality, first, embed the original text data into word vectors, and convert each word into a 512-dimensional word embedding vector. Each sentence contains up to 256 words, and sentences with less than 256 words are padded with spaces. Then, the word embedding vector of the complete sentence is input into the first-layer multi-head attention module, and multi-head self-attention features between words are calculated to obtain a feature map of size 16×16×512. The feature map is input into the second-layer multi-head self-attention module. Multi-head self-attention calculation is performed between words to obtain a feature map of size 16×16×512. Repeat the above operation three times to finally obtain a feature map of size 16×16×512. The feature map is globally pooled to obtain a feature vector of size 512. The feature vector is mapped through a fully connected layer to obtain a feature vector of size 128. The feature vector is used for similarity calculation with the image modality feature vector.

[0078] For ease of understanding, the following briefly describes the trial process of the white blood cell classification method provided by the present invention by taking a specific usage scenario as an example.

[0079] like Figure 6As shown, the acquired image is input into the convolutional neural network to obtain the feature vector corresponding to the image. At the same time, the text obtained from the text tag library is input into the self-attention model to obtain the feature vector corresponding to the text. The similarity of the two feature vectors is calculated, and the label contained in the article corresponding to the maximum similarity is used as the output category, and the number of categories is counted.

[0080] In the above specific embodiment, the white blood cell classification method provided by the present invention obtains image data and text data to be identified, wherein the text data contains a category label; the image data is input into a pre-constructed convolutional neural network to obtain an image feature vector; the text data is input into a pre-constructed self-attention model to obtain a text feature vector; the image feature vector and the text feature vector are input into a pre-trained classification model to obtain the similarity between the image data to be identified and the text data output by the classification model; when the maximum similarity is taken, the category label of the text data matching the image data to be identified is used as the classification result; wherein the classification model is trained using the image data of the sample, the text data of the sample and the category label of the sample.

[0081] This method uses a microscope or automatic slide scanning equipment to digitize the slide, and then uses the constructed deep learning algorithm to detect and identify specific categories of white blood cells in each field of view, reducing the time and labor costs of detection and identification, improving the ability to accurately identify peripheral blood white blood cells in local areas, and not missing abnormal white blood cells. It also has a fast detection speed, reduces labor costs, and can combine image and text two modal information to deeply mine information, with high recognition accuracy and good generalization. This solves the problem of low accuracy and long time consumption of white blood cell detection in the existing technology, and improves the accuracy and timeliness of white blood cell detection.

[0082] In addition to the above method, the present invention also provides a leukocyte classification device, such as Figure 7 As shown, the device comprises:

[0083] A data acquisition unit 710 is used to acquire image data and text data to be identified, wherein the text data contains a category label;

[0084] The data processing unit 720 is used to input the image data into a pre-built convolutional neural network to obtain an image feature vector; input the text data into a pre-built self-attention model to obtain a text feature vector;

[0085] A similarity calculation unit 730 is used to input the image feature vector and the text feature vector into a pre-trained classification model to obtain the similarity between the image data to be identified and the text data output by the classification model;

[0086] A result generating unit 740 is used to take the category label of the text data that matches the image data to be identified as the classification result when taking the maximum similarity value;

[0087] The classification model is obtained by training using sample image data, sample text data and sample category labels.

[0088] In some embodiments, the training process of the classification model includes:

[0089] Constructing a sample data set, wherein the sample data set includes sample image data, sample text data, and sample category labels;

[0090] Inputting the image data of the sample into a pre-built detection model to obtain the position coordinates of each white blood cell in the sample, and dividing the image data of the sample into a plurality of sub-images according to the position coordinates of each white blood cell;

[0091] Performing data processing on the sub-image to obtain a feature vector of an image modality and a feature vector of a text modality of the sub-image;

[0092] Calculating the similarity between the feature vector of the image modality and the feature vector of the text modality of the sub-image;

[0093] The pre-built neural network is trained according to the similarity and the category labels of the samples to obtain the classification model.

[0094] In some embodiments, data processing is performed on the sub-image to obtain a feature vector of the image modality of the sub-image, specifically including:

[0095] Perform multi-layer convolution block operations on the input sub-image to obtain a feature map of the target size;

[0096] Perform a global pooling operation on the feature map of the target size to obtain the initial feature vector of the image;

[0097] The initial feature vector of the image is mapped through a fully connected layer to obtain a feature vector of the image modality of the sub-image.

[0098] In some embodiments, data processing is performed on the sub-image to obtain a feature vector of the text modality of the sub-image, specifically including:

[0099] Embed the original text data corresponding to the sub-image into word vectors, and convert each word into a word embedding vector of a target dimension;

[0100] Inputting the word embedding vector of the complete sentence into the first-layer multi-head attention module, performing multi-head self-attention feature calculation between words, and obtaining the text initial feature vector of the sub-image;

[0101] The initial feature vector of the text is sequentially subjected to global pooling operation and mapping by a fully connected layer to obtain a feature vector of the text mode of the sub-image.

[0102] In some embodiments, the similarity between the feature vector of the image modality and the feature vector of the text modality of the sub-image is calculated using the following formula:

[0103] ;

[0104] in, is the feature vector of the image modality, is the feature vector of text mode, is the vector inner product operation.

[0105] In some embodiments, the category label includes at least the name of the single cell, the number of nuclei, and the patina color.

[0106] In the above specific embodiment, the white blood cell classification device provided by the present invention obtains image data and text data to be identified, wherein the text data contains a category label; the image data is input into a pre-constructed convolutional neural network to obtain an image feature vector; the text data is input into a pre-constructed self-attention model to obtain a text feature vector; the image feature vector and the text feature vector are input into a pre-trained classification model to obtain the similarity between the image data to be identified and the text data output by the classification model; when the maximum similarity is taken, the category label of the text data matching the image data to be identified is used as the classification result; wherein the classification model is trained using the image data of the sample, the text data of the sample and the category label of the sample.

[0107] The device uses a microscope or automatic slide scanning equipment to digitize the slide, and then uses the constructed deep learning algorithm to detect and identify specific categories of white blood cells in each field of view, reducing the time and labor costs of detection and identification, improving the ability to accurately identify peripheral blood white blood cells in local areas, and not missing abnormal white blood cells. It has a fast detection speed, reduces labor costs, and can combine image and text two modal information to deeply mine information, with high recognition accuracy and good generalization. This solves the problem of low accuracy and long time consumption of white blood cell detection in the existing technology, and improves the accuracy and timeliness of white blood cell detection.

[0108] Figure 8 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 8As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute the above method.

[0109] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

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

[0111] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0112] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for 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.

[0113] 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 it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for classifying leukocytes, characterized in that: The method comprises: Acquire image data and text data to be identified, wherein the text data contains a category label; Inputting the image data into a pre-built convolutional neural network to obtain an image feature vector; inputting the text data into a pre-built self-attention model to obtain a text feature vector; Inputting the image feature vector and the text feature vector into a pre-trained classification model to obtain the similarity between the image data to be identified and the text data output by the classification model; When the maximum similarity is taken, the category label of the text data that matches the image data to be identified is taken as the classification result; The classification model is obtained by training using sample image data, sample text data and sample category labels; The training process of the classification model includes: Constructing a sample data set, wherein the sample data set includes sample image data, sample text data, and sample category labels; Inputting the image data of the sample into a pre-built detection model to obtain the position coordinates of each white blood cell in the sample, and dividing the image data of the sample into a plurality of sub-images according to the position coordinates of each white blood cell; Performing data processing on the sub-image to obtain a feature vector of an image modality and a feature vector of a text modality of the sub-image; Calculating the similarity between the feature vector of the image modality and the feature vector of the text modality of the sub-image; Training a pre-built neural network according to the similarity and the category labels of the samples to obtain the classification model; The sub-image is subjected to data processing to obtain a feature vector of the image modality of the sub-image, specifically comprising: Perform multi-layer convolution block operations on the input sub-image to obtain a feature map of the target size; Perform global pooling operation on the feature map of the target size to obtain the initial feature vector of the image; Mapping the initial feature vector of the image through a fully connected layer to obtain a feature vector of the image modality of the sub-image; The sub-image is subjected to data processing to obtain a feature vector of the text mode of the sub-image, specifically including: Embed the original text data corresponding to the sub-image into word vectors, and convert each word into a word embedding vector of a target dimension; Inputting the word embedding vector of the complete sentence into the first-layer multi-head attention module, performing multi-head self-attention feature calculation between words, and obtaining the text initial feature vector of the sub-image; The initial feature vector of the text is sequentially subjected to global pooling operation and mapping by a fully connected layer to obtain a feature vector of the text mode of the sub-image; The similarity between the feature vector of the image modality and the feature vector of the text modality of the sub-image is calculated using the following formula: ; in, is the feature vector of the image modality, is the feature vector of text mode, is the vector inner product operation; The category label at least includes the name of the single cell, the number of nuclei and the patina color.

2. A leukocyte classification device for implementing the method according to claim 1, characterized in that: The device comprises: A data acquisition unit, used to acquire image data and text data to be identified, wherein the text data contains a category label; A data processing unit, configured to input the image data into a pre-built convolutional neural network to obtain an image feature vector; and input the text data into a pre-built self-attention model to obtain a text feature vector; A similarity calculation unit, used for inputting the image feature vector and the text feature vector into a pre-trained classification model to obtain the similarity between the image data to be identified and the text data output by the classification model; A result generating unit, used for taking the category label of the text data matching the image data to be identified as the classification result when taking the maximum similarity value; The classification model is obtained by training using sample image data, sample text data and sample category labels.

3. An electronic 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 method according to claim 1 is implemented.

4. 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 claim 1 is implemented.

5. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to claim 1 is implemented.

Citation Information

Patent Citations

  • Image-text matching method and device

    CN112749291A

  • Image fine granularity identification method and device, storage medium and computer equipment

    CN116664857A

  • Cell morphology identification method and device based on multi-modal fusion

    CN117115817A

  • Image processing method and device, storage medium and electronic equipment

    CN117540221A

  • Blood smear full-view intelligent analysis method, and blood cell segmentation model and recognition model construction method

    US20220343623A1