Pathological cell classification method based on multi-attention fusion and high-precision segmentation network
Through the combination of multi-attention fusion mechanism and high-precision segmentation network, the problem of insufficient attention and large amount of calculation in key areas in pathological cell image classification is solved, and higher classification accuracy and less amount of calculation is achieved.
Patent Information
- Application Number
- CN202211710618.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-29
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2042-12-29
AI Technical Summary
In the existing medical image classification methods of pathological cell, the network model does not pay enough attention to the key areas of pathological cell images, resulting in a low classification accuracy, large calculation amount and great noise impact.
A multi-attention fusion mechanism is adopted, combining spatial attention and channel attention, and the regional characteristics of pathological cells are extracted through a high-precision segmentation network, and the training of the focus loss function is optimized to reduce the calculation amount and improve classification accuracy.
It improves the accuracy of pathological cell classification, reduces the amount of calculation and reduces noise interference, and solves the problem of insufficient attention to key areas in the existing technology.
Smart Images

Figure CN115810191B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of digital image processing and medical intersection technology, and specifically relates to a pathological cell classification method based on multi-attention fusion and high-precision segmentation network. Background Art
[0002] With the advancement of science and technology, cancer is no longer an incurable disease. The cure rate for early-stage cancer exceeds 90%, while the cure rate for late-stage cancer is only around 10%. Therefore, early cancer screening is crucial for cancer prevention and treatment. The Pap smear test is a common and effective method for cancer screening. A professional physician observes the cell morphology in the Pap smear under a microscope, classifying each cell and determining whether the sample is cancerous. Manual classification of pathological cells is costly and often subject to subjective bias, affecting screening accuracy. Therefore, research and development of automated classification technology for pathological cell medical images is of great significance.
[0003] There are currently some methods for classifying pathological cell medical images, including those based on context modeling, those based on graph convolutional neural networks, and so on. Chinese patent application (CN112200253A) "Cervical cell image classification method based on SENet" uses SENet to classify cervical pathological cell medical images. This method has the following main disadvantages: (1) SENet uses a channel attention mechanism and only calculates channel weights without calculating spatial weights. Therefore, the network model in this method does not pay enough attention to the key areas of the pathological cell medical image, resulting in the network model being unable to fully extract cell features and poor accuracy in cell classification; (2) This method sends the global features extracted from the entire cell image by the network model to the classifier for classification. Not only is the computational complexity large, but the global features often contain some noise that does not belong to the cells, which affects the accuracy of the model classification. Summary of the Invention
[0004] The purpose of the present invention is to overcome the defects of the prior art and provide a pathological cell classification method based on multi-attention fusion and high-precision segmentation network. The fusion of spatial attention and channel attention enables the model to learn the channel weights and spatial weights in the cell image. At the same time, the high-precision segmentation network is used to extract the features of the pathological cell area in the image for classification, which can effectively reduce the amount of calculation and the influence of noise.
[0005] In order to solve the above technical problems, the present invention adopts the following technical solutions.
[0006] A pathological cell classification method based on a multi-attention fusion mechanism and a high-precision segmentation network includes the following steps:
[0007] Step 1: Collection and preprocessing of pathological cell medical images;
[0008] Step 2: Construct a multi-attention fusion module, including constructing a compression excitation module to enable the network model to learn the relationship between different channels; constructing a spatial attention module to help the network model identify key feature areas in cell images;
[0009] Step 3: Build a high-precision segmentation network and generate regions of interest on pathological cell medical images through the high-precision segmentation network;
[0010] Step 4: Build a deep network model based on multi-attention fusion and high-precision segmentation network. The deep network model includes a multi-attention fusion module and a high-precision segmentation network module. Use pre-processed pathological cell medical images to train the deep network model to obtain the deep network model with the highest accuracy in pathological cell classification.
[0011] Step 5: The pathological cell medical image to be detected is fed into the deep network model optimized in step 4 to obtain the classification results of the pathological cell samples.
[0012] Specifically, the step 1 process includes:
[0013] Step 1.1. Microscopic images of Pap smears prepared from pathological cells were collected. A professional physician classified the pathological cells in each medical image into the following categories: cells with a high nuclear-cytoplasmic ratio morphologically meeting HSIL criteria, abnormal keratinized cells in HSIL or SCC, abnormal naked nuclei in HSIL or SCC, koilocytes, non-koilocytes morphologically meeting LSIL criteria, abnormal glandular cells, abnormal metaplastic cells, normal naked nuclei, normal mid- and epidermal cells, pathogenic microbial cells, normal parabasal cells, typical squamous metaplasia, and typical keratinization.
[0014] Step 1.2. Perform image enhancement on the collected pathological cell medical images, including random angle rotation, flipping, cropping, displacement, and scaling, to enrich the obtained pathological cell medical image dataset;
[0015] Step 1.3. Use the labelme annotation tool to annotate each pathological cell medical image, including the classification label and cell outline coordinates of the pathological cells in the pathological cell medical image.
[0016] Specifically, the step 2 includes:
[0017] Step 2.1. Construct a compression excitation module, including:
[0018] Compression: Global average pooling is performed on the pathological cell medical image. After the compression operation, the size of the pathological cell medical image is compressed from H×W×C to 1×1×C, aggregating cross-space features. Among them, H represents the height of the pathological cell medical image, W represents the width of the pathological cell medical image, and C represents the number of channels of the pathological cell medical image. The calculation formula of the compression operation is:
[0019]
[0020] where u c (i, j) represents the pixel value of different channels at the position (i, j) of the pathological cell medical image;
[0021] Stimulation: Learn the weights of each channel of pathological cell medical images, which includes two fully connected layers and ultimately outputs a 1×1×C vector. The calculation formula for the stimulation operation is:
[0022] S=F ex (z,W)=σ(g(z,w))=σ(W2δ(W1z)) (2)
[0023] Where σ represents the sigmoid activation function, δ represents the ReLu function; W1 refers to the weight parameter of the first fully connected layer, and W2 refers to the weight parameter of the second fully connected layer;
[0024] Scale: Multiply the weight of each channel learned in the excitation operation by the original feature. The calculation formula of the scale operation is:
[0025] u ′ c (i,j)=S×u c (i,j) (3)
[0026] where u c is the pathological cell medical image input into the Scale operation formula, u ′ c Represents the pathological cell medical image output by the Scale operation formula;
[0027] Step 2.2. Construct the spatial attention module: First, use the global average pooling method to aggregate the channel features of the pathological cell medical image, and perform global average pooling along the channel direction. The formula is:
[0028]
[0029] Where x(i,j) represents the feature of point (i,j) on the pathological cell medical image;
[0030] Then use a 1×1 convolution to learn the weight G of the attention map, which is calculated as follows:
[0031] u=F Conv =Mx(i, j) (5)
[0032] Where M is the weight matrix learned by 1×1 convolution;
[0033] Finally, perform the Scale operation, and the calculation formula is:
[0034] u ′ c (i,j)=G×u c (i,j) (6).
[0035] Specifically, the step 3 includes:
[0036] Generate multiple rectangular anchor boxes at each pixel point on the pathological cell medical image. The anchor boxes are selected in three sizes and three different aspect ratios, for a total of nine anchor boxes. Perform classification and offset regression tasks on each anchor box. The anchor box classification task uses the binary cross entropy loss function:
[0037] L cls (p,y)=-y log(p)-(1-y)log(1-p) (7)
[0038] Where y is the true value and p is the predicted value;
[0039] The loss function used for anchor box offset regression is:
[0040]
[0041] where y ′ is the predicted value, δ is a constant, and its value can be determined according to the situation;
[0042] The weighted sum of the loss function used for the anchor box classification task and the loss function used for the anchor box offset is used as the overall loss function:
[0043]
[0044] i is the index of each anchor box; α is a constant determined according to the situation, which is used to control the proportion of the loss of the anchor box classification task in the total loss; p * , t * Represent the true value, p and t represent the predicted value respectively; N cls Indicates the number of anchor boxes;
[0045] The position and size of the proposed box are calculated using the anchor box offset obtained by anchor box regression, and then the intersection-over-union ratio of the proposed box and the ground-truth box is calculated. The formula is:
[0046]
[0047] Among them, F IoU Represents the intersection-and-union ratio of the proposed box and the true box, A represents the area of the true box, and B represents the area of the proposed box. The classification score and the intersection-and-union ratio obtained from the anchor box classification task are weighted and summed. The calculation formula is:
[0048] Ts=F cls +λF IoU (11)
[0049] Among them, Ts represents the fusion score, F cls represents the classification score, and λ is a coefficient that can be learned by the model to measure the weight of the intersection-over-union ratio in the fusion score;
[0050] The non-maximum suppression algorithm is used to process the fusion score and filter out the most appropriate suggestion box.
[0051] Specifically, the step 4 includes:
[0052] Step 4.1. Add a multi-attention fusion module to the ResNet18 network. This network model is based on the ResNet18 network, which has five stages: the first stage is a 7×7 convolution, and the fourth stage consists of residual blocks. The compressed excitation module and the spatial attention module are embedded in series in the second to fourth stages of the ResNet18 network. The ResNet18 network finally outputs the feature map extracted from the pathological cell medical image.
[0053] Step 4.2. Feed the feature map into a high-precision segmentation network to obtain the region of interest (ROI), i.e., the anchor box containing the pathological cells. Based on the feature map obtained in step 4.1 and the anchor box obtained previously, the features contained in the ROI are obtained and, after pooling, fed into the classifier for classification.
[0054] Step 4.3. Divide the preprocessed pathological cell medical images into training and test sets at an 8:2 ratio. The training set is fed into the previously constructed network model for training. The loss function used in the training process is the focal loss function, which is:
[0055]
[0056] Among them, FL represents the focal loss function value, represents the predicted value, p represents the true value, and γ is a weight, the optimal value of which needs to be confirmed through experiments;
[0057] After the training is completed, the network model is tested with the test set, and the model with the highest average accuracy is selected as the optimal pathological cell medical image classification model.
[0058] Specifically, the step 5 includes:
[0059] Step 5.1. Feed the pathological cell medical image to be tested into the network model optimized in Step 4 to obtain the classification result of the network model for the sample to be tested;
[0060] Step 5.2. Determine the classification results: If the classification result is one of the following: cells with a high nuclear-cytoplasmic ratio that meet HSIL criteria, abnormal keratinized cells in HSIL or SCC, abnormal naked nuclei in HSIL or SCC, koiled cells, non-koiled cells that meet LSIL criteria, abnormal glandular cells, or abnormal metaplastic cells, the sample is considered positive for cancer. If the classification result is one of the following: normal naked nuclei, normal mid- and epidermal cells, pathogenic microbial cells, normal parabasal cells, normal endocervical cells, or typical parakeratosis, the sample is considered negative for cancer.
[0061] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0062] 1. The present invention introduces a multi-attention mechanism. The present invention adopts a channel attention mechanism to enable the network model to learn the weights between different channels, and adopts a spatial attention mechanism to enable the network model to learn the weights of different regions of the cell image. By fusing the two attention mechanisms, the network model can better extract key features in the cell image, which is conducive to the classification task and improves the classification accuracy.
[0063] 2. The present invention uses a high-precision segmentation network. On the basis of the traditional region proposal network, it adds a module that merges the classification score and the intersection-and-union ratio, and uses the non-maximum suppression algorithm to process the fusion score to obtain the most appropriate suggestion box. The traditional region proposal network uses the non-maximum suppression algorithm to process the single variable of the classification score and then screen the most appropriate suggestion box. The high-precision segmentation network in the present invention uses the non-maximum suppression algorithm to process the classification score and the intersection-and-union ratio fusion variable, so that the algorithm not only pays attention to whether the classification of the suggestion box is correct, but also tries to meet a higher intersection-and-union ratio as much as possible, thereby overcoming the problem of poor intersection-and-union ratio of the suggestion box obtained by the traditional region proposal network, making the model more accurate in locating the region of interest, so that the features of the region of interest can be accurately extracted for classification, which can effectively reduce the amount of calculation and eliminate noise interference outside the region of interest, thereby improving the classification accuracy.
[0064] 3. This paper introduces the focal loss function, which adds a pre-term to the cross-entropy function. This function can increase the weight of a small number of samples in the dataset in the overall loss function. Compared to the cross-entropy function, the focal loss function can effectively address the problem of imbalanced training sample categories during model training by increasing the weight of a small number of samples in the loss function. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 The figure is a flow chart of a method according to an embodiment of the present invention.
[0066] Figure 2 This is a structural diagram of a compression excitation module in the prior art.
[0067] Figure 3 This is a structural diagram of a spatial attention module in the existing technology.
[0068] Figure 4 This is a high-precision segmentation network structure diagram of an embodiment of the present invention. DETAILED DESCRIPTION
[0069] The present invention discloses a pathological cell classification method based on multi-attention fusion and a high-precision segmentation network. The method comprises: collecting a dataset of Pap smear medical images made with pathological cells; establishing a multi-attention fusion module to learn the weights between different channels and spatial region weights of the medical images; establishing a high-precision segmentation network module to extract features of the pathological cell regions in the medical images; constructing a deep network model based on the multi-attention fusion module and the high-precision segmentation network; and using the trained deep network model with optimal parameters to classify pathological cells and thereby determine whether the cell samples in the medical images have become cancerous. This method not only requires less computational effort but also significantly improves the accuracy of pathological cell classification.
[0070] The present invention will be further described in detail below with reference to the accompanying drawings.
[0071] Figure 1 This is a flow chart of a pathological cell classification method based on a multi-attention fusion mechanism and a high-precision segmentation network provided by the present invention. Figure 1 As shown, the method of this embodiment includes the following steps:
[0072] Step 1: Collection and preprocessing of pathological cell medical images. The process includes:
[0073] Step 1.1. Microscopic images of Pap smears prepared with pathological cells were collected. A professional physician classified the pathological cells in each image into 13 categories: cells with a high nuclear-to-cytoplasmic ratio morphology meeting HSIL criteria, abnormal keratinized cells in HSIL or SCC, abnormal naked nuclei in HSIL or SCC, koilocytes, non-koilocytes morphologically meeting LSIL criteria, abnormal glandular cells, abnormal metaplastic cells, normal naked nuclei, normal mid- and epidermal cells, pathogenic microbial cells, normal parabasal cells, typical squamous metaplasia, and typical parakeratosis;
[0074] Step 1.2. Perform image enhancement on the collected pathological cell medical images, including random angle rotation, flipping, cropping, displacement, and scaling, to enrich the obtained pathological cell medical image dataset;
[0075] Step 1.3. Use the labelme annotation tool to annotate each pathological cell medical image, including the classification label and cell outline coordinates of the pathological cells in the pathological cell medical image.
[0076] Step 2: Construct a multi-attention fusion module, including constructing a compression excitation module to enable the network model to learn the relationship between different channels of pathological cell medical images; constructing a spatial attention module to help the network model identify key feature areas in pathological cell medical images. Specifically:
[0077] Step 2.1. Construct a compression-excitation module. The compression-excitation module can learn the relationship between different channels of pathological cell medical images. The function of the compression-excitation module is achieved through three steps: compression, excitation, and scaling.
[0078] The compression operation performs global average pooling on the pathological cell medical image. After the compression operation, the size of the pathological cell medical image is compressed from H×W×C to 1×1×C, aggregating cross-space features. Where H represents the height of the pathological cell medical image, W represents the width of the pathological cell medical image, and C represents the number of channels of the pathological cell medical image. The calculation formula of the compression operation is:
[0079]
[0080] where u c (i, j) represents the pixel value of different channels of the pathological cell medical image at position (i, j).
[0081] The excitation operation learns the weight of each channel of the pathological cell medical image, which contains two fully connected layers and ultimately outputs a 1×1×C vector. The calculation formula of the excitation operation is:
[0082] S=F ex (z,W)=σ(g(z,w))=σ(W2δ(W1z)) (2)
[0083] Where σ represents the sigmoid activation function, δ represents the ReLu function, W1 refers to the weight parameter of the first fully connected layer, and c2 refers to the weight parameter of the second fully connected layer.
[0084] The scale operation multiplies the weight of each channel learned in the excitation operation by the original feature. The calculation formula of the scale operation is:
[0085] u ′c (i,j)=S×u c (i,j) (3)
[0086] where u c is the pathological cell medical image input into the Scale operation formula, u ′ c Represents the pathological cell medical image output by the Scale operation formula;
[0087] Step 2.2. Construct the spatial attention module. First, use the global average pooling method to aggregate the channel features of the pathological cell medical image. The global average pooling formula along the channel direction is:
[0088]
[0089] Where x(i,j) represents the feature of point (i,j) on the pathological cell medical image.
[0090] Then a 1×1 convolution is used to learn the weight G of the attention map, which is calculated as:
[0091] G=F Conv =Mx(i,j) (5)
[0092] Where M is the weight matrix learned by the 1×1 convolution.
[0093] Finally, perform the Scale operation, and the calculation formula is:
[0094] u′ c (i,j)=u×u c (i,j) (6)
[0095] Step 3: Build a high-precision segmentation network to generate regions of interest on pathological cell medical images through the high-precision segmentation network to facilitate the next classification task. Specifically:
[0096] Multiple rectangular anchor boxes are generated for each pixel in the pathological cell medical image. The anchor boxes are selected in three sizes and three different aspect ratios, for a total of nine anchor boxes. Each anchor box is then classified and subjected to offset regression. The anchor box classification task uses the binary cross entropy loss function:
[0097] L cls (p,y)=-y log(p)-(1-y)log(1-p) (7)
[0098] Where y is the true value and p is the predicted value.
[0099] The loss function used for anchor box offset regression is:
[0100]
[0101] where y ′ is the predicted value, δ is a constant, and its value can be determined according to the situation.
[0102] The weighted sum of the loss function used for the anchor box classification task and the loss function used for the anchor box offset is used as the overall loss function:
[0103]
[0104] i is the index of each anchor box; α is a constant determined according to the situation, which is used to control the proportion of the loss of the classification task in the total loss; p * , t * Represent the true value, p and t represent the predicted value respectively; N cls Indicates the number of anchor boxes.
[0105] The anchor box offset obtained by anchor box regression can be used to calculate the position and size of the proposed box, and then the intersection-over-union ratio of the proposed box and the ground-truth box can be calculated. The calculation formula is:
[0106]
[0107] Among them, F IoU It represents the intersection-over-union ratio of the proposed box and the true box, A represents the area of the true box, and B represents the area of the proposed box.
[0108] The classification score and intersection-union ratio obtained from the classification task are weighted and summed up. The calculation formula is:
[0109] Ts=F cls +λF IoU (11)
[0110] Among them, Ts represents the fusion score, F cls represents the classification score, and λ is a coefficient that can be learned by the model to measure the weight of the intersection-over-union ratio in the fusion score.
[0111] The non-maximum suppression algorithm is used to process the fusion score and filter out the most appropriate suggestion box.
[0112] The high-precision segmentation network used in the present invention is based on the traditional region proposal network, and a module for merging the classification score and the intersection-and-union ratio is added. The fusion score is processed using the non-maximum suppression algorithm to obtain the most appropriate suggestion box. The traditional region proposal network uses the non-maximum suppression algorithm to process the single variable of the classification score and then screen the most appropriate suggestion box. The high-precision segmentation network in the present invention uses the non-maximum suppression algorithm to process the classification score and the intersection-and-union ratio fusion variable, so that the algorithm not only pays attention to whether the classification of the suggestion box is correct, but also tries to meet a higher intersection-and-union ratio as much as possible, thereby overcoming the problem of poor intersection-and-union ratio of the suggestion box obtained by the traditional region proposal network, making the model more accurate in locating the region of interest, so that the features of the region of interest can be accurately extracted for classification, which can effectively reduce the amount of calculation and eliminate noise interference outside the region of interest, thereby improving the classification accuracy.
[0113] Step 4: Build a deep network model based on multi-attention fusion and high-precision segmentation network, and use pre-processed pathological cell medical images to train the deep network model to obtain the deep network model with the highest pathological cell classification accuracy. Specifically:
[0114] Step 4.1. Add a multi-attention fusion module to the ResNet18 network. This network model is based on the ResNet18 network, which has five stages. The first stage is a 7×7 convolution, and the next four stages consist of residual blocks. The compressed excitation module and the spatial attention module are embedded in series in the second to fourth stages of the ResNet18 network. The feature extraction part of this network model ultimately outputs a feature map extracted from the pathological cell medical image.
[0115] Step 4.2: Feed the feature map into the high-precision segmentation network to obtain the region of interest (ROI), i.e., the anchor box containing the pathological cells. Based on the feature map obtained in step 4.1 and the anchor box obtained previously, the features contained in the ROI are pooled and fed into the classifier for classification.
[0116] Step 4.3. Divide the dataset obtained in step 1 into a training set and a test set with a ratio of 8:2. The training set is fed into the previously constructed network model for training. The loss function used in the training process is the focal loss function, which is calculated as follows:
[0117]
[0118] Where FL represents the focal loss function value, Represents the predicted value, p represents the true value, and γ is a weight, the optimal value of which needs to be confirmed through experiments.
[0119] The focal loss function adds a pre-term to the traditional cross-entropy function, which increases the weight of a small number of examples in the dataset in the overall loss function. Compared to the cross-entropy function, the focal loss function effectively addresses the problem of imbalanced training sample categories during model training by increasing the weight of a small number of examples in the loss function.
[0120] After the training is completed, the network model is tested with the test set, and the model with the highest average accuracy is selected as the optimal network model.
[0121] Step 5: Send the pathological cell medical image to be detected into the network model optimized in step 4 to obtain the classification results of the pathological cell samples. Specifically:
[0122] Step 5.1. The pathological cell medical image to be detected is fed into the network model optimized in step 4 to obtain the classification result of the pathological cell medical image by the network model.
[0123] Step 5.2. Determine the classification results. If the classification results include cells with a high nuclear-cytoplasmic ratio that meet HSIL criteria, abnormal keratinized cells in HSIL or SCC, abnormal naked nuclei in HSIL or SCC, koilocytes, non-koiled cells that meet LSIL criteria, abnormal glandular cells, or abnormal metaplastic cells, the sample is considered positive for cancer. If the classification results include normal naked nuclei, normal mid- and epidermal cells, pathogenic microbial cells, normal parabasal cells, normal endocervical cells, or typical parakeratosis, the sample is considered negative for cancer.
Claims
1. A pathological cell classification method based on multi-attention fusion mechanism and high-precision segmentation network, characterized in that: The following steps are involved: Step 1: Collection and preprocessing of pathological cell medical images; Step 2: Construct a multi-attention fusion module, including constructing a compression excitation module, so that the network model can learn the relationship between different channels; Construct a spatial attention module to help the network model identify key feature areas in cell images; Step 3: Build a high-precision segmentation network and generate regions of interest on pathological cell medical images through the high-precision segmentation network; Step 4: Build a deep network model based on multi-attention fusion and high-precision segmentation network. The deep network model includes a multi-attention fusion module and a high-precision segmentation network module. Use pre-processed pathological cell medical images to train the deep network model to obtain the deep network model with the highest accuracy in pathological cell classification. Step 5: The pathological cell medical image to be detected is fed into the deep network model optimized in step 4 to obtain the classification results of the pathological cell sample; The step 3 is specifically as follows: Generate multiple rectangular anchor boxes at each pixel point on the pathological cell medical image. The anchor boxes are selected in three sizes and three different aspect ratios, for a total of nine anchor boxes. Perform classification and offset regression tasks on each anchor box. The anchor box classification task uses the binary cross entropy loss function: L cls (p, y)=-ylog(p)-(1-y)log(1-p) Where y is the true value and p is the predicted value; The loss function used for anchor box offset regression is: Where y′ is the predicted value, and δ is a constant whose value can be determined according to the situation; The weighted sum of the loss function used for the anchor box classification task and the loss function used for the anchor box offset is used as the overall loss function: i is the index of each anchor box; α is a constant determined according to the situation, which is used to control the proportion of the loss of the anchor box classification task in the total loss; p i *, t i * indicates predicted value, p i , t i Represent the true value respectively; N cls Indicates the number of anchor boxes; The position and size of the proposed box are calculated using the anchor box offset obtained by anchor box regression, and then the intersection-over-union ratio of the proposed box and the ground-truth box is calculated. The formula is: Among them, F IoU It represents the intersection-over-union ratio of the proposed box and the true box, A represents the area of the true box, and B represents the area of the proposed box; The classification score and intersection-over-union ratio obtained from the anchor box classification task are weighted and summed up. The calculation formula is: Ts=F cls +λF IoU Among them, Ts represents the fusion score, F cls represents the classification score, and λ is a coefficient that can be learned by the model to measure the weight of the intersection-over-union ratio in the fusion score; The non-maximum suppression algorithm is used to process the fusion score and filter out the most appropriate suggestion box.
2. A pathological cell classification method based on a multi-attention fusion mechanism and a high-precision segmentation network according to claim 1, characterized in that: The step 1 process includes: Step 1.
1. Microscopic images of Pap smears prepared from pathological cells were collected. A professional physician classified the pathological cells in each medical image into the following categories: cells with a high nuclear-cytoplasmic ratio morphologically meeting HSIL criteria, abnormal keratinized cells in HSIL or SCC, abnormal naked nuclei in HSIL or SCC, koilocytes, non-koilocytes morphologically meeting LSIL criteria, abnormal glandular cells, abnormal metaplastic cells, normal naked nuclei, normal mid- and epidermal cells, pathogenic microbial cells, normal parabasal cells, typical squamous metaplasia, and typical keratinization. Step 1.
2. Perform image enhancement on the collected pathological cell medical images, including random angle rotation, flipping, cropping, displacement, and scaling, to enrich the obtained pathological cell medical image dataset; Step 1.
3. Use the labelme annotation tool to annotate each pathological cell medical image, including the classification label and cell outline coordinates of the pathological cells in the pathological cell medical image.
3. The pathological cell classification method based on multi-attention fusion mechanism and high-precision segmentation network according to claim 1 is characterized in that: The step 2 is specifically as follows: Step 2.
1. Construct a compression excitation module, including: Compression: Global average pooling is performed on the pathological cell medical image. After the compression operation, the size of the pathological cell medical image is compressed from H×W×C to 1×1×C, aggregating cross-space features. Among them, H represents the height of the pathological cell medical image, W represents the width of the pathological cell medical image, and C represents the number of channels of the pathological cell medical image. The calculation formula of the compression operation is: where u c (i, j) represents the pixel values of different channels at position (i, j) of the pathological cell medical image; Stimulation: Learn the weights of each channel of pathological cell medical images, which includes two fully connected layers and ultimately outputs a 1×1×C vector. The calculation formula for the stimulation operation is: S=F ex (z, W)=σ(g(z, w))=σ(W2δ(W1z)) Where σ represents the sigmoid activation function, δ represents the ReLu function; W1 refers to the weight parameter of the first fully connected layer, and W2 refers to the weight parameter of the second fully connected layer; Scale: Multiply the weight of each channel learned in the excitation operation by the original feature. The calculation formula of the scale operation is: u′ c (i,j)=S×u c (i,j) where u c is the pathological cell medical image input into the Scale operation formula, u′ c Represents the pathological cell medical image output by the Scale operation formula; Step 2.
2. Construct the spatial attention module: First, use the global average pooling method to aggregate the channel features of the pathological cell medical image, and perform global average pooling along the channel direction. The formula is: Where x(i, j) represents the feature of point (i, j) on the pathological cell medical image; Then use a 1×1 convolution to learn the weight G of the attention map, which is calculated as follows: G=F Conv =Mx(i,j) Where M is the weight matrix learned by 1×1 convolution; Finally, perform the Scale operation, and the calculation formula is: u′ c (i,j)=G×u c (i,j)。 4. The pathological cell classification method based on a multi-attention fusion mechanism and a high-precision segmentation network according to claim 1, characterized in that: The step 4 includes: Step 4.
1. Add a multi-attention fusion module to the ResNet18 network. This network model is based on the ResNet18 network, which has five stages: the first stage is a 7×7 convolution, and the fourth stage consists of residual blocks. The compressed excitation module and the spatial attention module are embedded in series in the second to fourth stages of the ResNet18 network. The ResNet18 network finally outputs the feature map extracted from the pathological cell medical image. Step 4.
2. Feed the feature map into a high-precision segmentation network to obtain the region of interest (ROI), i.e., the anchor box containing the pathological cells. Based on the feature map obtained in step 4.1 and the anchor box obtained previously, the features contained in the ROI are obtained and, after pooling, fed into the classifier for classification. Step 4.
3. Divide the preprocessed pathological cell medical images into training and test sets at an 8:2 ratio. The training set is fed into the previously constructed network model for training. The loss function used in the training process is the focal loss function, which is: FL=-(1-p * ×p) γ log(p * ) Among them, FL represents the focal loss function value, p* represents the predicted value, p represents the true value, and γ is a weight, the optimal value of which needs to be confirmed through experiments; After the training is completed, the network model is tested with the test set, and the model with the highest average accuracy is selected as the optimal pathological cell medical image classification model.
5. The pathological cell classification method based on multi-attention fusion mechanism and high-precision segmentation network according to claim 1 is characterized in that: The step 5 is specifically as follows: Step 5.
1. Feed the pathological cell medical image to be tested into the network model optimized in Step 4 to obtain the classification result of the network model for the sample to be tested; Step 5.
2. Determine the classification results: If the classification result is one of the following: cells with a high nuclear-cytoplasmic ratio that meet HSIL criteria, abnormal keratinized cells in HSIL or SCC, abnormal naked nuclei in HSIL or SCC, koiled cells, non-koiled cells that meet LSIL criteria, abnormal glandular cells, or abnormal metaplastic cells, the sample is considered positive for cancer. If the classification result is one of the following: normal naked nuclei, normal mid- and epidermal cells, pathogenic microbial cells, normal parabasal cells, normal endocervical cells, or typical parakeratosis, the sample is considered negative for cancer.
Citation Information
Patent Citations
Senet-based cervical cell image classification method
CN112200253A
IMS-based multifunctional network system and disaster tolerance method thereof
CN107454104A
Premature infant retinopathy automatic partition recognition method based on attention mechanism and deep supervision strategy
CN112308830A