Bone marrow cell fine-grained classification method, system, computer device and storage medium
By using multi-branch networks and dilated convolution mechanisms in the fine-grained classification of bone marrow cells, different receptive field characteristics are obtained and accurate bone marrow cell body positioning frames are generated, which solves the problems of low positioning accuracy and efficiency in the existing technology and improves bone marrow Accuracy and fine-grainedness of cell classification.
Patent Information
- Application Number
- CN202210168782.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-23
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2042-02-23
AI Technical Summary
Existing fine-grained classification methods of bone marrow cells have problems such as easy loss of position information, low efficiency and background noise interference when locating significant areas or main areas, resulting in low classification accuracy.
A multi-branch network based on attention subject positioning and area amplification is used to obtain the characteristics of different receptive fields through multiple convolutional layers with different hole rates, and the subject positioning module and spatial pyramid pooling module are used to generate accurate bone marrow cell subject positioning frames , combining the shared parameters of the original branch and the main branch to improve the classification effect.
It effectively solves the problem of easy loss of location information and background interference, improves the accuracy and efficiency of fine-grained classification of bone marrow cells, and achieves more detailed feature information acquisition and classification results.
Smart Images

Figure CN114580510B
Abstract
Description
Technical Field
[0001] The present invention relates to a method, system, computer equipment and storage medium for fine-grained classification of bone marrow cells, and belongs to the field of computer vision. Background Art
[0002] At present, with the development of deep learning, more and more researchers are applying deep learning to the field of medical processing. However, in the problem of bone marrow cell classification, most researchers regard it as a coarse-grained classification task and still use general deep networks to classify bone marrow cells. However, this method has very limited effect on the task of bone marrow cell classification, so a more targeted design is needed. Nowadays, fine-grained classification tasks have made good progress on other data sets (such as birds, cars, and airplanes), but there is a lack of relevant solutions on bone marrow cell data sets.
[0003] The scheme based on first positioning and then classification is a commonly used scheme in fine-grained classification tasks. Studies have shown that when humans understand a scene, they usually go through three stages: salient area activation, interest area selection, and fixation on interest areas. This scheme is inspired by human visual understanding. The general strategy is to improve the accuracy of fine-grained classification by locating salient areas or main areas and focusing on the information of salient areas or main areas. At present, there have been many effective attempts in this direction. The key lies in how to accurately locate salient areas or main areas with rich information. The main methods include two: a. Use additional subject bounding boxes or component labels to train the network for positioning, and then extract the features of salient areas or main areas. However, additional label annotation requires a lot of manpower and is unrealistic on large-scale data sets; b. Only use the category label of the image to locate the discriminant area or main area with rich information through weak supervision positioning, and improve the classification accuracy through detailed learning of the discriminant area or main area. The existing research methods related to weak supervision positioning in fine-grained classification have the following three limitations:
[0004] (1) Using the deepest features of the network to locate the salient area or the main area, but this method is prone to losing position information: The deepest features of the network often contain a lot of semantic information related to the category, and have a good understanding of the image as a whole, from which the salient area or the main area of the image can be located, but the features at this level have a low resolution. Therefore, the obtained position information is often not accurate enough and is easily lost;
[0005] (2) The positioning methods based on weak supervision are either too complex, inefficient, or easily disturbed by background noise, resulting in poor positioning results: RA-CNN recursively learns salient areas, trains an attention network after each branch to learn the positioning of the coordinate frame, and designs a slightly complex cropping method for gradient transfer; MGE-CNN uses the Grad-CAM method to obtain the key components that the classifier pays attention to, thereby obtaining the salient areas of the image. These positioning methods are too complex and inefficient. At the same time, most of this work uses the smallest rectangular box covering the entire discrimination area or the main area for cropping. This method is easily disturbed by background noise, resulting in poor positioning results;
[0006] (3) Using multiple branches to learn images of different scales, all parameter weights are shared between multiple branches, branches affect each other, and network accuracy decreases: MMAL-Net uses three branches to train images of three scales: original images, main images, and component images. Parameters are shared among the three branches, so it is impossible to learn the features of different scales; WS-DAN also uses the same network to train original images, images after attention enhancement, and images after attention cropping, with limited accuracy. Summary of the invention
[0007] In view of this, the present invention provides a method, system, computer device and storage medium for fine-grained classification of bone marrow cells. The attention subject positioning branch proposed in the present invention uses multiple convolutional layers with different voiding rates to obtain the features of different receptive fields, thereby obtaining more detailed bone marrow cell feature information; in addition, the multi-branch classification network based on attention subject positioning and regional amplification constructed therein realizes the mutual combination and mutual promotion between branches, thereby improving the effect of fine-grained classification of bone marrow cells.
[0008] The first object of the present invention is to provide a method for fine-grained classification of bone marrow cells.
[0009] The second object of the present invention is to provide a fine-grained classification system for bone marrow cells.
[0010] A third object of the present invention is to provide a computer device.
[0011] A fourth object of the present invention is to provide a storage medium.
[0012] The first object of the present invention can be achieved by adopting the following technical solutions:
[0013] A method for fine-grained classification of bone marrow cells, comprising:
[0014] Acquire a bone marrow cell image dataset;
[0015] Constructing a first bone marrow cell fine-grained classification network, wherein the first bone marrow cell fine-grained classification network uses a residual network as a backbone network, including an original branch, a main branch, and an attention main body positioning branch;
[0016] Using a bone marrow cell image dataset to train a first bone marrow cell fine-grained classification network, to obtain a second bone marrow cell fine-grained classification network;
[0017] Acquire an image of bone marrow cells to be classified;
[0018] The bone marrow cell image to be classified is input into the second bone marrow cell fine-grained classification network to achieve bone marrow cell fine-grained classification.
[0019] Furthermore, the residual network includes five convolutional layer groups, a global pooling layer, a fully connected layer and a Softmax layer;
[0020] The original branch and the main branch respectively use the residual network and share parameter weights of the first convolutional layer group, the second convolutional layer group, the third convolutional layer group and the fourth convolutional layer group;
[0021] The attention subject localization branch is connected after the fourth convolution layer group of the original branch, and includes a subject localization module, a spatial pyramid pooling module based on dilated convolution, and a corresponding classifier;
[0022] The main body positioning module is used to generate a bone marrow cell main body positioning frame;
[0023] The spatial pyramid pooling module based on dilated convolution is used to obtain features of different scales through multiple convolutional layers with different dilation rates.
[0024] Furthermore, the features of different scales are obtained by using multiple convolutional layers with different dilation rates, as follows:
[0025] The input features are subjected to five different calculations to obtain five new features. The first one is a convolution layer with a convolution kernel of 1, the second, third, and fourth ones are convolution layers with a convolution kernel of 3 and different dilation rates, and the fifth one is a global average pooling layer.
[0026] The dimensionality reduction method is used to limit the number of output channels, and the features obtained from these five paths are combined in a feature aggregation manner, and then passed through a convolution layer with a convolution kernel of 1 to obtain multi-scale features.
[0027] Furthermore, the generation of the main bone marrow cell positioning frame is as follows:
[0028] Performing average pooling on the features output by the spatial pyramid pooling module in the channel dimension to obtain a self-attention map;
[0029] Take the average of the self-attention map and use the average as the threshold;
[0030] According to the threshold, the self-attention map is judged to obtain a saliency map;
[0031] In the saliency map, select the largest connected region;
[0032] Obtain the coordinates of the minimum rectangular frame surrounding the maximum connected area, thereby obtaining the main body positioning frame of the bone marrow cells;
[0033] The self-attention map is averaged and the average value is used as the threshold, as shown in the following formula:
[0034]
[0035] Among them, H and W represent the height and width of the feature map respectively, M att represents the self-attention map, Indicates the threshold value;
[0036] According to the threshold, the self-attention map is judged to obtain a saliency map, as shown in the following formula:
[0037]
[0038] Among them, I mask represents the saliency map, M att represents the self-attention map, Indicates the threshold value.
[0039] Furthermore, the first bone marrow cell fine-grained classification network is trained using the bone marrow cell image dataset to obtain the second bone marrow cell fine-grained classification network, as follows:
[0040] Divide the bone marrow cell image data set to obtain a bone marrow cell image training set;
[0041] Preprocess the bone marrow cell image training set;
[0042] Initializing the first bone marrow cell fine-grained classification network using pre-trained parameters, and setting corresponding network parameters and training parameters;
[0043] The preprocessed bone marrow cell image training set is input into the first bone marrow cell fine-grained classification network, and the cross entropy loss function is used for calculation, and the stochastic gradient descent method is used to jointly train multiple branches of the first bone marrow cell fine-grained classification network to obtain the second bone marrow cell fine-grained classification network;
[0044] The cross entropy loss function is calculated as follows:
[0045]
[0046] Among them, N is the number of samples, C is the number of categories, and y is the true label, encoded in the form of a one-hot vector. is the true probability of the cth category of the nth vector, is the predicted probability of the cth category of the nth vector.
[0047] Furthermore, the bone marrow cell image to be classified is input into the second bone marrow cell fine-grained classification network to achieve bone marrow cell fine-grained classification, as follows:
[0048] Perform size processing on the bone marrow cell images to be classified;
[0049] The size-processed bone marrow cell image to be classified is input into the second bone marrow cell fine-grained classification network to obtain classification probability distribution results of three branches;
[0050] Make a comprehensive decision on the classification probability distribution results of the three branches to obtain the final category prediction result;
[0051] Based on the final category prediction results, fine-grained classification of bone marrow cells is achieved.
[0052] Furthermore, the classification probability distribution results of the three branches are comprehensively decided to obtain the final category prediction result, which is as follows:
[0053] The classification probability distribution results of the three branches are averaged, and the category with the highest classification probability is taken as the final category prediction result.
[0054] The second object of the present invention can be achieved by adopting the following technical solutions:
[0055] A bone marrow cell fine-grained classification system, the system comprising:
[0056] A first acquisition unit is used to acquire a bone marrow cell image dataset;
[0057] A construction unit is used to construct a first bone marrow cell fine-grained classification network, wherein the first bone marrow cell fine-grained classification network uses a residual network as a backbone network, including an original branch, a main branch, and an attention main positioning branch;
[0058] A training unit, used to train the first bone marrow cell fine-grained classification network using the bone marrow cell image data set to obtain a second bone marrow cell fine-grained classification network;
[0059] A second acquisition unit is used to acquire an image of bone marrow cells to be classified;
[0060] The classification unit is used to input the bone marrow cell image to be classified into the second bone marrow cell fine-grained classification network to achieve bone marrow cell fine-grained classification.
[0061] The third object of the present invention can be achieved by adopting the following technical solutions:
[0062] A computer device comprises a processor and a memory for storing a program executable by the processor. When the processor executes the program stored in the memory, the above-mentioned method for fine-grained classification of bone marrow cells is implemented.
[0063] The fourth object of the present invention can be achieved by adopting the following technical solutions:
[0064] A storage medium stores a program, and when the program is executed by a processor, the above-mentioned bone marrow cell fine-grained classification method is implemented.
[0065] The present invention has the following beneficial effects compared with the prior art:
[0066] (1) The present invention constructs a multi-branch network based on attention subject positioning and region amplification, which includes an original branch, a main branch, and an attention subject positioning branch. The original branch and the main branch share some information, so that different branches can learn both common features and their own features, and then the branches can promote and improve each other, thereby improving the level of fine-grained classification of bone marrow cells.
[0067] (2) The present invention introduces a dilated convolution mechanism in the attention subject localization branch, constructs a spatial pyramid pooling module with multiple dilated convolution layers with different dilation rates, and uses multiple dilated convolution layers with different dilation rates to obtain features of different receptive fields. At the same time, the corresponding classifier is used to guide the features to obtain bone marrow cell category information, thereby obtaining more detailed bone marrow cell feature information.
[0068] (3) The present invention uses the high-resolution features of the middle layer to obtain the main frame positioning of the bone marrow cells, which effectively solves the problem of easy loss of position information; at the same time, the main positioning module uses a method based on connected areas, which can effectively reduce the interference of the background area. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.
[0070] Figure 1 This is a flow chart of the method for fine-grained classification of bone marrow cells according to Example 1 of the present invention.
[0071] Figure 2This is a structural diagram of a multi-branch classification network based on attention subject positioning and region magnification according to Example 1 of the present invention.
[0072] Figure 3 This is a structural diagram of a spatial pyramid pooling module based on dilated convolution according to Example 1 of the present invention.
[0073] Figure 4 This is a flow chart of generating a bone marrow cell main body positioning frame according to Example 1 of the present invention.
[0074] Figure 5 This is a flow chart of the bone marrow cell fine-grained classification system of Example 2 of the present invention.
[0075] Figure 6 This is a structural block diagram of a computer device according to Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0076] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0077] Embodiment 1:
[0078] like Figure 1 As shown, this embodiment provides a method for fine-grained classification of bone marrow cells, the method comprising the following steps:
[0079] S101. Acquire a bone marrow cell image dataset.
[0080] In this embodiment, a plurality of bone marrow cell images are acquired as a bone marrow cell image dataset.
[0081] In order to keep the training and test data as identically distributed as possible, this embodiment uses a stratified sampling method to divide the bone marrow cell image dataset, randomly selects 80% of the images from each type of bone marrow cell image dataset to form a bone marrow cell image training set, and the remaining 20% of the images are used as a bone marrow cell image verification set; the images in the bone marrow cell image training set are training images, and the images in the bone marrow cell image verification set are verification images.
[0082] S102. Construct a first bone marrow cell fine-grained classification network.
[0083] like Figure 2As shown, the first bone marrow cell fine-grained classification network constructed in this embodiment is a multi-branch classification network based on attention subject positioning and regional amplification, including an original branch, a main branch and an attention subject positioning branch, and uses the residual network ResNet-50 structure as the backbone network, specifically: both the original branch and the main branch use the residual network ResNet-50 structure; wherein the residual network ResNet-50 structure includes five convolutional layer groups (block0, block1, block2, block3, block4), a global pooling layer, a fully connected layer and a Softmax layer.
[0084] In this embodiment, block0, block1, block2, block3 and block4 respectively represent the first convolutional layer group, the second convolutional layer group, the third convolutional layer group, the fourth convolutional layer group and the fifth convolutional layer group.
[0085] The original branch and the main branch in this embodiment share the parameter weights of the first four convolutional layer groups (i.e., share the parameter weights of the first convolutional layer group, the second convolutional layer group, the third convolutional layer group, and the fourth convolutional layer group), so that different branches can learn both common features and features of their respective scales.
[0086] The original branch and the main branch in this embodiment can be used to process images of different scales. The input size of the residual network ResNet-50 in this embodiment is set to 3*224*224.
[0087] The attention subject localization branch in this embodiment is connected to block3 of the original branch, which includes a subject localization module (MRL), a spatial pyramid pooling module (ASPP) based on void convolution, and a corresponding classifier.
[0088] The structure of the attention subject positioning branch in this embodiment is as follows:
[0089] In this embodiment, the first feature is an input feature, and the second feature is a multi-scale feature.
[0090] The main attention branch is derived from the fourth convolutional layer group (block3) in the original branch. The feature size obtained by the fourth convolutional layer group is C*H*W, where C is the number of channels, H is the height of the feature map, and W is the width of the feature map; the first feature F obtained by this convolutional layer group locate After passing through the ASPP module, the data are sent to the classifier and the MRL module respectively. The classifier and the ASPP module cooperate to generate features (second features) containing rich category information, and the MRL module uses the second features to generate an accurate bone marrow cell main body positioning frame.
[0091] Furthermore, the ASPP module structure is as follows Figure 3 As shown, the classifier cooperates with the ASPP module to generate the second feature, as follows:
[0092] The first feature F locate After inputting the ASPP module, five new features are obtained through five different calculations. The first one is a convolution layer with a convolution kernel of 1, the second, third and fourth ones are convolution layers with a convolution kernel of 3 and different void ratios, and the fifth one is a global average pooling layer. Here, in order to reduce the amount of calculation, the dimensionality reduction method is adopted to limit the number of output channels to 256, and the features obtained from these five paths are combined in a feature aggregation manner, and then passed through a convolution layer with a convolution kernel of 1 to obtain the second feature F. aspp ; Second feature F aspp Used for subsequent localization of the main area of bone marrow cells.
[0093] The ASPP module in this embodiment uses multiple convolutional layers with different void rates to obtain features of different receptive fields, and the classifier of the branch where it is located guides the features to obtain category-related information.
[0094] Furthermore, the MRL module structure is as follows Figure 4 As shown in the figure, it is used to generate an accurate bone marrow cell main body positioning frame. The specific steps are as follows:
[0095] a. For the second feature F aspp Perform average pooling on the channel dimension to obtain the self-attention map M att ;
[0096] b. Self-attention map F att Take the average and use it as the threshold:
[0097]
[0098] Among them, H and W represent the height and width of the feature map respectively;
[0099] c. According to the threshold To M att Make a judgment to obtain the significant map I mask :
[0100]
[0101] d. In the salient image I mask Select the largest connected region O largest ;
[0102] e. Get the largest connected area O largest The minimum rectangular frame coordinates (x top_left ,y top_left ) and (x bottom_right ,y bottom_right), and use it as the coordinates of the upper left point and lower right point of the main body positioning frame of the bone marrow cells, thereby generating the main body positioning frame of the bone marrow cells. At the same time, the classifier of this branch can be used to assist the fine-grained classification of bone marrow cells.
[0103] This embodiment uses the high-resolution features of the middle layer to obtain the main frame positioning of the bone marrow cells, which effectively solves the problem of easy loss of position information; at the same time, the main positioning module uses a method based on connected areas, which can effectively reduce the interference of the background area.
[0104] S103. Using the bone marrow cell image dataset, the first bone marrow cell fine-grained classification network is trained to obtain a second bone marrow cell fine-grained classification network.
[0105] The specific steps of training the first bone marrow cell fine-grained classification network in this embodiment are as follows:
[0106] (1) Network initialization: In the first bone marrow cell fine-grained classification network, the pre-trained parameters on ImageNet are imported into the residual network, and the parameters of the remaining network structures are randomly initialized;
[0107] (2) Setting network parameters: In the ASPP module, the dilation rates of the three dilated convolutional layers are set to 2, 3, and 4 respectively, and the number of output channels is set to 256;
[0108] (3) Setting training parameters: Stochastic gradient descent optimization was used, with a weight decay coefficient of 1e-4, a momentum of 0.9, and a minimum batch size of 64. The initial learning rate was set to 5e-3, and a fixed step size decay method was used, decaying to 1 / 5 of the original value at the 25th, 40th, and 45th epochs.
[0109] (4) Preprocessing the training images: Preprocess the training images in the bone marrow cell image training set by randomly cropping the input training images to 224*224, and then perform online data enhancement on the cropped training images by three methods: random vertical flipping, random rotation, and color jittering;
[0110] (5) Train the network: Figure 2 The first bone marrow cell fine-grained classification network shown in FIG. 1 is iteratively trained, specifically: first, the preprocessed training image I origin It is sent to the first part of the original branch, that is, after passing through the first four convolutional layers of the residual network, the first feature F is obtained. locate ; Then the first feature F locate Send it to the second part of the original branch to get the first classification result p of the original branch ori , and the first feature F locateIt is sent to the attention subject positioning branch, where it is enhanced by the ASPP module to obtain the second feature F aspp ; Then the second feature F aspp Send it to the classifier of the attention subject positioning branch to obtain the second classification result p att , while the second feature F aspp The training image is sent to a subject positioning module to obtain the subject frame of the bone marrow cells in the training image; the training image is cropped using the subject frame and enlarged to a certain size to obtain the subject image I object , and the subject image I object Send it to the main branch and get the third classification result p obj ; The cross entropy loss function is calculated for the classifiers of the three branches, and then gradient backpropagation is performed to update the network parameters until the loss gradually decreases to convergence, and finally a classification network with better bone marrow cell classification effect is obtained, that is, the second bone marrow cell fine-grained classification network.
[0111] The calculation formula of the cross entropy loss function in this embodiment is as follows:
[0112]
[0113] Among them, N is the number of samples, C is the number of categories, and y is the true label, encoded in the form of a one-hot vector. is the true probability of the cth category of the nth vector, is the predicted probability of the cth category of the nth vector.
[0114] In this embodiment, the first bone marrow cell fine-grained classification network refers to an untrained multi-branch classification network based on attention subject positioning and regional enlargement; the second bone marrow cell fine-grained classification network refers to a trained multi-branch classification network based on attention subject positioning and regional enlargement.
[0115] S104, obtaining an image of bone marrow cells to be classified.
[0116] In this embodiment, a verification image in a verification set of bone marrow cell images is selected as the bone marrow cell image to be classified.
[0117] S105 , inputting the to-be-classified bone marrow cell image into a second bone marrow cell fine-grained classification network to implement bone marrow cell fine-grained classification.
[0118] (1) Read the verification image in the bone marrow cell image verification set and convert the size of the read verification image to 224*224;
[0119] (2) Inputting the size-processed verification image into the second bone marrow cell fine-grained classification network for calculation to obtain the classification probability distribution results of the three branches;
[0120] (3) The classification probability distribution results of the three branches are averaged, and the category with the highest classification probability is taken as the final category prediction result, thereby achieving fine-grained classification of bone marrow cells.
[0121] The method provided in this embodiment achieves a classification accuracy of 88.89% on a database of fine-grained classification of bone marrow cells, which is 1.82% higher than the result of training using only the ResNet-50 structure and cross entropy loss. It can be seen that the method provided in this embodiment can achieve a higher accuracy in bone marrow cell classification.
[0122] Those skilled in the art will appreciate that all or part of the steps in the above-mentioned embodiment method may be implemented by instructing related hardware through a program, and the corresponding program may be stored in a computer-readable storage medium.
[0123] It should be noted that although the method operations of the above embodiments are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. On the contrary, the steps depicted can be performed in a different order. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step, and / or one step can be decomposed into multiple steps.
[0124] Embodiment 2:
[0125] like Figure 5 As shown, this embodiment provides a fine-grained classification system for bone marrow cells, which includes a first acquisition unit 501, a construction unit 502, a training unit 503, a second acquisition unit 504 and a classification unit 505. The specific functions of each unit are as follows:
[0126] A first acquisition unit 501 is used to acquire a bone marrow cell image dataset;
[0127] A construction unit 502 is used to construct a first bone marrow cell fine-grained classification network, wherein the first bone marrow cell fine-grained classification network uses a residual network as a backbone network, including an original branch, a main branch, and an attention main positioning branch;
[0128] A training unit 503 is used to train the first bone marrow cell fine-grained classification network using the bone marrow cell image data set to obtain a second bone marrow cell fine-grained classification network;
[0129] The second acquisition unit 504 is used to acquire the image of the bone marrow cells to be classified;
[0130] The classification unit 505 is used to input the bone marrow cell image to be classified into the second bone marrow cell fine-grained classification network to achieve bone marrow cell fine-grained classification.
[0131] The specific implementation of each unit in this embodiment can refer to the above-mentioned embodiment 1, and will not be described one by one here; it should be noted that the system provided in this embodiment is only illustrated by the division of the above-mentioned functional units. In actual applications, the above-mentioned functions can be assigned to different functional units as needed, that is, the internal structure can be divided into different functional units to complete all or part of the functions described above.
[0132] Embodiment 3:
[0133] like Figure 6 As shown, this embodiment provides a computer device, which includes a processor 602, a memory, an input device 603, a display device 604 and a network interface 605 connected through a system bus 601. Among them, the processor 602 is used to provide computing and control capabilities, and the memory includes a non-volatile storage medium 606 and an internal memory 607. The non-volatile storage medium 606 stores an operating system, a computer program and a database. The internal memory 607 provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium 606. When the computer program is executed by the processor 602, the bone marrow cell fine-grained classification method of the above-mentioned embodiment 1 is implemented as follows:
[0134] Acquire a bone marrow cell image dataset;
[0135] Constructing a first bone marrow cell fine-grained classification network, wherein the first bone marrow cell fine-grained classification network uses a residual network as a backbone network, including an original branch, a main branch, and an attention main body positioning branch;
[0136] Using a bone marrow cell image dataset to train a first bone marrow cell fine-grained classification network, to obtain a second bone marrow cell fine-grained classification network;
[0137] Acquire an image of bone marrow cells to be classified;
[0138] The bone marrow cell image to be classified is input into the second bone marrow cell fine-grained classification network to achieve bone marrow cell fine-grained classification.
[0139] Embodiment 4:
[0140] This embodiment provides a storage medium, which is a computer-readable storage medium, storing a computer program. When the computer program is executed by a processor, the method for fine-grained classification of bone marrow cells in the above embodiment 1 is implemented as follows:
[0141] Acquire a bone marrow cell image dataset;
[0142] Constructing a first bone marrow cell fine-grained classification network, wherein the first bone marrow cell fine-grained classification network uses a residual network as a backbone network, including an original branch, a main branch, and an attention main body positioning branch;
[0143] Using a bone marrow cell image dataset to train a first bone marrow cell fine-grained classification network, to obtain a second bone marrow cell fine-grained classification network;
[0144] Acquire an image of bone marrow cells to be classified;
[0145] The bone marrow cell image to be classified is input into the second bone marrow cell fine-grained classification network to achieve bone marrow cell fine-grained classification.
[0146] It should be noted that the computer-readable storage medium of the present embodiment may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0147] In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device, or device. In this embodiment, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable storage medium other than a computer-readable storage medium, which may send, propagate, or transmit a program used by or in combination with an instruction execution system, device, or device. The computer program contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0148] The computer readable storage medium can be written in one or more programming languages or a combination thereof to execute the computer program of the present embodiment, and the programming language includes an object-oriented programming language, such as Java, Python, C++, and also includes a conventional procedural programming language, such as C language or a similar programming language. The program can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).
[0149] In summary, the attention subject localization branch proposed in the present invention uses multiple convolutional layers with different voiding rates to obtain the features of different receptive fields, thereby obtaining more detailed bone marrow cell feature information; in addition, the multi-branch classification network based on attention subject localization and regional magnification realizes the mutual combination and mutual promotion between branches, thereby improving the effect of fine-grained classification of bone marrow cells.
[0150] The above is only a preferred embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical solution and inventive concept of the present invention within the scope disclosed by the present invention, which shall fall within the protection scope of the present invention.
Claims
1. A method for fine-grained classification of bone marrow cells, characterized in that: The method comprises: Acquire a bone marrow cell image dataset; Constructing a first bone marrow cell fine-grained classification network, wherein the first bone marrow cell fine-grained classification network uses a residual network as a backbone network, including an original branch, a main branch, and an attention main body positioning branch; Using a bone marrow cell image dataset to train a first bone marrow cell fine-grained classification network, to obtain a second bone marrow cell fine-grained classification network; Acquire an image of bone marrow cells to be classified; Inputting the bone marrow cell image to be classified into the second bone marrow cell fine-grained classification network to achieve bone marrow cell fine-grained classification; The residual network includes five convolutional layer groups, a global pooling layer, a fully connected layer and a Softmax layer; The original branch and the main branch respectively use the residual network and share parameter weights of the first convolutional layer group, the second convolutional layer group, the third convolutional layer group and the fourth convolutional layer group; The attention subject localization branch is connected after the fourth convolution layer group of the original branch, and includes a subject localization module, a spatial pyramid pooling module based on dilated convolution, and a corresponding classifier; The main body positioning module is used to generate a bone marrow cell main body positioning frame; The spatial pyramid pooling module based on dilated convolution is used to obtain features of different scales through multiple convolutional layers with different dilation rates; The generating bone marrow cell main body positioning frame is as follows: Performing average pooling on the features output by the spatial pyramid pooling module in the channel dimension to obtain a self-attention map; Take the average of the self-attention map and use the average as the threshold; According to the threshold, the self-attention map is judged to obtain a saliency map; In the saliency map, select the largest connected region; Obtain the coordinates of the minimum rectangular frame surrounding the maximum connected area, thereby obtaining the main body positioning frame of the bone marrow cells; The self-attention map is averaged and the average value is used as the threshold, as shown in the following formula: Among them, H and W represent the height and width of the feature map respectively, and M att represents the self-attention map, Indicates the threshold value; According to the threshold, the self-attention map is judged to obtain a saliency map, as shown in the following formula: Among them, I mask represents the saliency map, M att represents the self-attention map, Indicates the threshold value.
2. The method for fine-grained classification of bone marrow cells according to claim 1, characterized in that: The features of different scales are obtained by using multiple convolutional layers with different dilation rates, as follows: The input features are subjected to five different calculations to obtain five new features. The first one is a convolution layer with a convolution kernel of 1, the second, third, and fourth ones are convolution layers with a convolution kernel of 3 and different dilation rates, and the fifth one is a global average pooling layer. The dimensionality reduction method is used to limit the number of output channels, and the features obtained from these five paths are combined in a feature aggregation manner, and then passed through a convolution layer with a convolution kernel of 1 to obtain multi-scale features.
3. The method for fine-grained classification of bone marrow cells according to claim 1, characterized in that: The first bone marrow cell fine-grained classification network is trained using the bone marrow cell image dataset to obtain the second bone marrow cell fine-grained classification network, as follows: Divide the bone marrow cell image data set to obtain a bone marrow cell image training set; Preprocess the bone marrow cell image training set; Initializing the first bone marrow cell fine-grained classification network using pre-trained parameters, and setting corresponding network parameters and training parameters; The preprocessed bone marrow cell image training set is input into the first bone marrow cell fine-grained classification network, and the cross entropy loss function is used for calculation, and the stochastic gradient descent method is used to jointly train multiple branches of the first bone marrow cell fine-grained classification network to obtain the second bone marrow cell fine-grained classification network; The cross entropy loss function is calculated as follows: Among them, N is the number of samples, C is the number of categories, and y is the true label, encoded in the form of a one-hot vector. is the true probability of the cth category of the nth vector, is the predicted probability of the cth category of the nth vector.
4. The method for fine-grained classification of bone marrow cells according to claim 1, characterized in that: The bone marrow cell image to be classified is input into the second bone marrow cell fine-grained classification network to achieve bone marrow cell fine-grained classification, specifically as follows: Perform size processing on the bone marrow cell images to be classified; The size-processed bone marrow cell image to be classified is input into the second bone marrow cell fine-grained classification network to obtain classification probability distribution results of three branches; Make a comprehensive decision on the classification probability distribution results of the three branches to obtain the final category prediction result; Based on the final category prediction results, fine-grained classification of bone marrow cells is achieved.
5. The method for fine-grained classification of bone marrow cells according to claim 4, characterized in that: The classification probability distribution results of the three branches are comprehensively decided to obtain the final category prediction result, which is as follows: The classification probability distribution results of the three branches are averaged, and the category with the highest classification probability is taken as the final category prediction result.
6. A fine-grained classification system for bone marrow cells, characterized in that: The system comprises: A first acquisition unit is used to acquire a bone marrow cell image dataset; A construction unit is used to construct a first bone marrow cell fine-grained classification network, wherein the first bone marrow cell fine-grained classification network uses a residual network as a backbone network, including an original branch, a main branch, and an attention main positioning branch; A training unit, used to train the first bone marrow cell fine-grained classification network using the bone marrow cell image data set to obtain a second bone marrow cell fine-grained classification network; A second acquisition unit is used to acquire an image of bone marrow cells to be classified; A classification unit, used for inputting the bone marrow cell image to be classified into a second bone marrow cell fine-grained classification network to achieve bone marrow cell fine-grained classification; The residual network includes five convolutional layer groups, a global pooling layer, a fully connected layer and a Softmax layer; The original branch and the main branch respectively use the residual network and share parameter weights of the first convolutional layer group, the second convolutional layer group, the third convolutional layer group and the fourth convolutional layer group; The attention subject localization branch is connected after the fourth convolution layer group of the original branch, and includes a subject localization module, a spatial pyramid pooling module based on dilated convolution, and a corresponding classifier; The main body positioning module is used to generate a bone marrow cell main body positioning frame; The spatial pyramid pooling module based on dilated convolution is used to obtain features of different scales through multiple convolutional layers with different dilation rates; The generating bone marrow cell main body positioning frame is as follows: Performing average pooling on the features output by the spatial pyramid pooling module in the channel dimension to obtain a self-attention map; Take the average of the self-attention map and use the average as the threshold; According to the threshold, the self-attention map is judged to obtain a saliency map; In the saliency map, select the largest connected region; Obtain the coordinates of the minimum rectangular frame surrounding the maximum connected area, thereby obtaining the main body positioning frame of the bone marrow cells; The self-attention map is averaged and the average value is used as the threshold, as shown in the following formula: Among them, H and W represent the height and width of the feature map respectively, and M att represents the self-attention map, Indicates the threshold value; According to the threshold, the self-attention map is judged to obtain a saliency map, as shown in the following formula: Among them, I mask represents the saliency map, M att represents the self-attention map, Indicates the threshold value.
7. A computer device comprising a processor and a memory for storing a program executable by the processor, characterized in that: When the processor executes the program stored in the memory, the bone marrow cell fine-grained classification method according to any one of claims 1 to 5 is implemented.
8. A storage medium storing a program, wherein when the program is executed by a processor, the method for fine-grained classification of bone marrow cells according to any one of claims 1 to 5 is implemented.
