A cell pathology image anomaly detection method based on improved YOLOv5 and EfficientNet

By dividing the anomaly detection task into localization and classification stages, and using improved YOLOv5 and EfficientNet models, the problems of missed detection and high training cost in anomaly detection in cell smears are solved, and efficient anomaly detection in cytopathological images is achieved.

CN115937188BActive Publication Date: 2025-11-25HOHAI UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211710730.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-29
Publication Date
2025-11-25
Estimated Expiration
2042-12-29

AI Technical Summary

Technical Problem

Existing deep learning-based methods for detecting abnormalities in cytopathological images suffer from problems such as missed detections and difficulty in processing cell clusters in cell smears, and the training cost is high.

Method used

The anomaly detection task is divided into two stages: anomaly localization and anomaly classification. An improved YOLOv5 model is used for localization, and an improved EfficientNet model is used for classification, handling abnormal cells and cell clusters respectively.

Benefits of technology

It improves the recall and accuracy of anomaly detection, reduces the cost and difficulty of model training, and reduces missed detections.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115937188B_ABST
    Figure CN115937188B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on improved YOLOv5 and EfficientNet's cell pathology image anomaly detection method, comprising: obtaining the digital scanning image of cell smear as original input image;With overlap, the original input image is cropped as cropped image;Using improved YOLOv5 model detects all abnormal cells and abnormal cell clusters in cropped image and obtains its position and size information;Using this position and size information, the abnormal cell and abnormal cell cluster target image are cropped from cropped image, and the target image is cropped and filled;Using improved EfficientNet model classifies target image, obtains its classification result;Summarize target image classification result and its position and size information as anomaly detection final result is shown on original input image.The application divides into positioning and classification task, and can effectively improve the detection accuracy of abnormal complete rate.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of cell pathology image anomaly detection, and particularly relates to a cell pathology image anomaly detection method based on an improved YOLOv5 and EfficientNet. BACKGROUND

[0002] The cell pathology examination is a currently diagnosis significant examination method. A smear is made from the collected exfoliated cell preservative, and a pathologist with rich experience observes the smear under an electron microscope or views a full field picture obtained by using a digital pathology slide scanner, discovers pathological cells by analyzing cell morphological structure, and makes a corresponding diagnosis on the patient's condition in combination with cytological pathology knowledge.

[0003] Currently, the smear reading work of cell smears is mainly completed by manual work, but manual reading has limitations in early detection of abnormal cells. On the one hand, screening a small number of pathological cells or cancer cells from hundreds of thousands of cells is a labor-intensive work for pathologists, which is easy to cause misdiagnosis and has a high false negative rate. On the other hand, the training cost of professionals is high, and they are usually concentrated in large and medium-sized hospitals in cities, and it is difficult to popularize to underdeveloped areas. The computer automatic recognition of cell smears can solve the problems of high false negative rate of traditional manual screening method and lack of pathologists in some areas. By combining image processing, pattern recognition and computer vision with cytological diagnosis knowledge, the automatic reading system quantitatively analyzes the cell morphology of the digital scanned image of the cell smear, determines the suspicious field or lists the abnormal cells to assist the doctor in judgment.

[0004] The cell pathology image anomaly detection technology, in the past, a large number of studies have focused on the automatic recognition of cells. Initially, it was mainly a traditional step-by-step method based on image segmentation, feature extraction and classification. Later, with the development of deep learning, the image segmentation method was replaced by semantic segmentation and instance segmentation, and the steps of feature extraction and image classification can be integrated into a classification network. The addition of deep learning has greatly improved the accuracy of recognition.

[0005] The existing deep learning-based auxiliary reading algorithm is mainly divided into two categories: one based on target detection and the other based on semantic segmentation and image classification. The algorithm based on target detection has lower requirements for training sample labels and faster detection speed, but it is easy to miss detection and difficult to handle cell clusters. The algorithm based on semantic segmentation and image classification has high requirements for training sample labeling and slow detection speed, but semantic segmentation can remove background noise, segment individual cells and then classify them, which theoretically has high accuracy, but depends on the segmentation accuracy. Therefore, the above two methods both focus on single cell structure, but due to the existence of a large number of cell clusters in the cell smear, it is difficult to segment or detect individual cells from the cell smear, which undoubtedly increases the difficulty of anomaly detection. SUMMARY

[0006] The present application aims to overcome the defects of the prior art and provide a cell pathology image anomaly detection method based on improved YOLOv5 and EfficientNet, which divides the anomaly detection into two stages of anomaly positioning and anomaly classification, wherein the improved YOLOv5 model is used for detecting all abnormal cells and abnormal cell clusters in the cropped image in the anomaly positioning stage to obtain the position and size information of the abnormal cells and abnormal cell clusters; the improved EfficientNet model is used for classifying the abnormal cell and abnormal cell cluster target images in the anomaly classification stage to obtain the classification results of the abnormal cell and abnormal cell cluster target images. The present application is simple and easy to operate, and can effectively improve the full search rate and detection accuracy.

[0007] To solve the above technical problems, the present application adopts the following technical solutions.

[0008] A cell pathology image anomaly detection method based on improved YOLOv5 and EfficientNet, which divides the anomaly detection into two stages of anomaly positioning and anomaly classification, wherein the improved YOLOv5 model is used in the anomaly positioning stage, and the improved EfficientNet model is used in the anomaly classification stage, comprising the following steps:

[0009] Step 1, obtaining a digital scanned image of a cell smear as an original input image;

[0010] Step 2, cropping the original input image with overlap as a cropped image;

[0011] Step 3, using the improved YOLOv5 model to detect all abnormal cells and abnormal cell clusters in the cropped image to obtain the position and size information of the abnormal cells and abnormal cell clusters;

[0012] Step 4, using the position and size information of the abnormal cells and abnormal cell clusters to crop the abnormal cell and abnormal cell cluster target images from the cropped image, and performing cropping and padding processing on the abnormal cell and abnormal cell cluster target images;

[0013] Step 5, using the improved EfficientNet model to classify the abnormal cell and abnormal cell cluster target images to obtain the classification results of the abnormal cell and abnormal cell cluster target images;

[0014] Step 6, summarizing the classification results of the abnormal cell and cell cluster target images and the position and size information of the abnormal cells and cell clusters as the final anomaly detection results and displaying them on the original input image.

[0015] Specifically, the cropped original input image with overlap in step 2 as the cropped image comprises:

[0016] 2-1. The original input image is cropped using the method with an overlap of 64 pixels and a cropped image size of 640x640 pixels, and the cropped image size less than 640x640 pixels is zero-padded to 640x640 pixels;

[0017] 2-2. The overlap of 64 pixels during cropping allows most cells to be completely present in a cropped image, and the size of 640x640 pixels is the expected input size of the improved YOLOv5 model, which meets the model design.

[0018] Specifically, in step 3, the improved YOLOv5 model is used to detect all abnormal cells and abnormal cell clusters in the cropped image, and the position and size information of the abnormal cells and abnormal cell clusters are obtained, including:

[0019] 3-1. Training the improved YOLOv5 model requires labeling all abnormal cells and abnormal cell clusters in the data set with YOLO format, without subdividing the specific types of abnormalities, and marking them as positive;

[0020] 3-2. The improved YOLOv5 model removes the classification task and only performs target positioning and foreground-background differentiation. The improved loss function consists of positioning loss and confidence loss, and the classification loss of the original YOLOv5 model is removed. At the same time, due to the reduction of model output, the improved YOLOv5 model shrinks the width coefficient to 0.75 of the original YOLOv5 model, i.e. reduces the feature channel number of each layer of the network, to speed up model inference and reduce memory occupation;

[0021] 3-3. The network structure of YOLOv5 can be divided into BackBone, Neck and Prediction three modules, the output of Neck module is subjected to Conv operation of Prediction module to obtain the required channel number: na x (nc + 5), where na is the number of anchor boxes, nc is the number of classification categories, and the other 5 channels predict the width, height, center point coordinates and foreground confidence of the anchor box; the output channel number of the Prediction module Conv operation of the improved YOLOv5 model is: na x 5, and the classification prediction part is removed;

[0022] 3-4. The improved YOLOv5 model detects cell clusters as a whole, rather than detecting individual abnormal cells. Due to the high overlap of cells in cell clusters, it is difficult to detect individual cells, so it is detected as a whole, so that only the abnormality of the cell cluster is concerned, and the composition of the cell is not concerned, so as to reduce the detection difficulty.

[0023] Specifically, in step 4, the position and size information of the abnormal cells and abnormal cell clusters are used to crop the abnormal cell and abnormal cell cluster target images from the cropped images, and the abnormal cell and abnormal cell cluster target images are cropped and padded, including:

[0024] 4-1. Classify the abnormal cell and abnormal cell cluster target images according to their size into large target images and small target images, and the classification basis is the input size 224x224 pixels of the improved EfficientNet model;

[0025] 4-2. Crop the large target images with overlap, the overlap size is 64 pixels, and the size after cropping is 224x224 pixels. The cropped images that are less than 224x224 pixels are zero-padded to 224x224 pixels.

[0026] 4-3. Zero-pad the small target images to 224x224 pixels.

[0027] 4-4. The results obtained in step 3 are cells or cell clusters, and the size of the cell clusters is generally much larger than the expected input of the classification network, so it needs to be cropped with overlap.

[0028] Specifically, in step 5, the improved EfficientNet model is used to classify the abnormal cell and abnormal cell cluster target images, and the classification results of the abnormal cell and abnormal cell cluster target images are obtained, including:

[0029] 5-1. The main component MBConv module of the original EfficientNet model uses Depwise Conv, which includes a group of 3x3 deep convolution and multiple groups of 1x1 standard convolution, reducing the parameter quantity and FLOPs; the improved EfficientNet model replaces the Depwise Conv in the latter half of the MBConv module with 3x3 standard convolution to improve the model training speed;

[0030] 5-2. The SE module in the original EfficientNet model mainly calculates the channel attention according to the maximum pooling of each channel of the input. The improved EfficientNet model replaces the SE module in the MBConv module in the last 1 / 4 of the model with a CBAM attention module for feature enhancement. The CBAM attention module includes a CBAM channel attention module and a CBAM spatial attention module. The CBAM channel attention module adds consideration of average pooling compared to the SE module. The calculation method and mode of the CBAM channel attention module are similar to those of the SE module. In addition, the CBAM spatial attention module first calculates the average pooling and maximum pooling values at the same position between channels, and then uses convolution to obtain the spatial attention score. After calculation by the Sigmoid function, the original channel is multiplied to strengthen or weaken the spatial region features.

[0031] 5-3. The CBAM attention module extracts the input features in two steps, as shown in equations (1) and (2):

[0032] Mc(F) = σ(MLP(AvgPool(F)) + MLP(MaxPool(F))) (1)

[0033] Ms(F) = σ(f 7×7 ([AvgPool(Mc(F)); MaxPool(Mc(F))]) (2)

[0034] where AvgPool is the average pooling layer, MaxPool is the maximum pooling layer, MLP is two layers of neurons, f 7×7 is a 7x7 convolution, and F is the input feature.

[0035] Specifically, in step 6, the classification results of the abnormal cell and cell cluster target image and the position and size information of the abnormal cell and cell cluster are summarized as the final result of the abnormal detection and displayed on the original input image, including:

[0036] 6-1. The classification results of the abnormal cell and cell cluster target image output by the improved EfficientNet model include ASC-US, LSIL, ASC-H, HSIL, and negative 5 categories. Negative refers to cells and cell clusters that are detected as positive by the improved YOLOv5 but classified as negative by the improved EfficientNet model. To prevent false negatives in the classification results of the improved EfficientNet model, it is also necessary to label them out.

[0037] 6-2. The positions of the abnormal cells and cell clusters output by the improved YOLOv5 model are relative to the positions of the cropped images, and need to be mapped to the original input image according to the positions of the cropped images in the original input image;

[0038] 6-2. The classification results given by the improved EfficientNet model and the position information of the abnormal cells and cell clusters relative to the original input image given by the improved YOLOv5 model are used as the final results of the abnormal detection, and different colors are used to draw rectangular frames in the original input image to mark the abnormal cells and abnormal cell clusters.

[0039] Compared with the prior art, the present application has the following advantages and beneficial effects:

[0040] 1. As described in step 3, the present application processes the cell cluster as a whole, and gives a balanced cost and effect of cell cluster processing by cropping and classifying the detected cell cluster, so that the abnormal detection task focuses on abnormalities rather than individual cell structures.

[0041] 2. As described in steps 3, 4 and 5, the present application changes the target detection task into two stages, the first stage for target positioning and the second stage for target classification, wherein the positioning stage does not need to perform classification, only needs to distinguish between foreground and background, so that the model focuses on the accuracy of positioning, and the second stage uses a special classification network, which can effectively improve the abnormal detection rate and accuracy, and is less likely to miss detection.

[0042] 3. As described in step 5, the present application replaces the DepwiseConv in the MBConv module in the second half of the EfficientNet model with a standard convolution, which can significantly reduce the time required for model training, and the increase in the number of parameters can also improve the model ability to a certain extent.

[0043] 4. As described in step 5, the present application replaces the SE module in the MBConv module in the last 1 / 4 component of the EfficientNet model with a CBAM attention module, which adds a spatial attention module compared to the SE module, and at the same time strengthens the channel attention module, and the introduction of the deep model can improve the recall rate of classification. BRIEF DESCRIPTION OF DRAWINGS

[0044] Figure 1 is a flowchart of an embodiment method of the present application.

[0045] Figure 2 is a schematic diagram of the labels required for training the improved YOLOv5 model.

[0046] Figure 3 is a structure diagram of the prior art YOLOv5.

[0047] Figure 4 Figure 1 is a structural diagram of improved YOLOv5 which is an embodiment of the present application.

[0048] Figure 5 Figure 2 is a structural diagram of MBConv module in EfficientNet which is an embodiment of the present application.

[0049] Figure 6 Figure 3 is a schematic diagram of Depwise Conv in MBConv which is an embodiment of the present application.

[0050] Figure 7 Figure 4 is a schematic diagram of standard convolution which is an embodiment of the present application.

[0051] Figure 8 Figure 5 is a schematic diagram of SE module in MBConv which is an embodiment of the present application.

[0052] Figure 9 Figure 6 is a structural diagram of CBAM module which is an embodiment of the present application. DETAILED DESCRIPTION

[0053] Cell pathology image abnormality detection technology can assist doctors in diagnosis and improve the efficiency and accuracy of cell smear reading. Deep learning-based cell pathology image abnormality detection technology mainly includes multi-stage methods based on semantic segmentation and classification and methods based on target detection. The main limitation of the former is that model training requires costly pixel-level labels, and the limitation of the latter is that it is easy to miss abnormal cells and difficult to process cell clusters. The above methods have obvious defects in actual practice. In view of the above problems, the present application proposes a cell pathology image abnormality detection method based on improved YOLOv5 and EfficientNet. The present application divides the detection task into positioning and classification tasks, improves the cohesion of module functions, reduces the difficulty of a single task, improves the recall rate of abnormal cell detection, and at the same time includes the positioning, segmentation and classification of cell clusters, solving the problem of difficult cell cluster processing. The cell positioning stage uses an improved YOLOv5 model, and the cell classification stage uses an improved EfficientNet model. The present application is further described below in conjunction with the drawings.

[0054] As shown in Figure 1 Figure 1, a cell pathology image abnormality detection method based on improved YOLOv5 and EfficientNet, the method divides the abnormality detection into two stages of abnormality positioning and abnormality classification, wherein the abnormality positioning stage uses an improved YOLOv5 model, and the abnormality classification stage uses an improved EfficientNet model, including the following steps:

[0055] Step 1, obtain a digital scanned image of the cell smear as the original input image;

[0056] Step 2, crop the original input image with overlap as the cropped image;

[0057] 2-1. The original input image is cropped using the method of 64-pixel overlap, and the cropped image size is 640x640 pixels. The cropped image size less than 640x640 pixels is zero-padded to 640x640 pixels;

[0058] 2-2. The original size of the digital image of cytopathology is about 40000 pixels, which is much larger than the expected input size of the convolutional neural network model. Although the fully convolutional neural network does not theoretically limit the size of the input image, an excessively large input may cause memory allocation failure and other problems. Therefore, the original input needs to be cropped. Considering the integrity of cropping, a 64-pixel overlap can ensure that most cells are at least fully present in a cropped image. The size of 640x640 pixels is the expected input size of the improved YOLOv5 model, and an input of this size or around it meets the model design.

[0059] Step 3, use the improved YOLOv5 model to detect all abnormal cells and abnormal cell clusters in the cropped image, and obtain the position and size information of the abnormal cells and abnormal cell clusters;

[0060] 3-1. As shown in Figure 2 , training the improved YOLOv5 model requires labeling all abnormal cells and abnormal cell clusters in the dataset with YOLO format labels. The specific types of abnormalities are not subdivided, and all are labeled as positive;

[0061] 3-2. As shown in Figure 3 , 4 , the original YOLOv5 model includes confidence loss, positioning loss, and classification loss. The improved YOLOv5 model removes the classification task and only performs target positioning and foreground-background differentiation. The improved loss function consists of positioning loss and confidence loss, and the classification loss of the original YOLOv5 model is removed. At the same time, due to the reduction in model output, the improved YOLOv5 model shrinks the width coefficient to 0.75 of the original YOLOv5 model, i.e. reduces the number of feature channels in each layer of the network, to speed up model inference and reduce memory usage;

[0062] 3-3. As shown in Figure 3As shown in the figure, the network structure of the original YOLOv5 model can be divided into three modules: BackBone, Neck and Prediction. The output of the Neck module is subjected to Conv operation of the Prediction module to obtain the required channel number for detection: na×(nc+5), where na is the number of anchor boxes, nc is the number of classification categories, and the other 5 channels are used to predict the width and height of the anchor box, the center point coordinates and the foreground confidence. As shown in the figure, Figure 4 As shown in the figure, the output channel number of the Prediction module Conv operation of the improved YOLOv5 model is: na×5, and the category prediction part is removed;

[0063] 3-4. The improved YOLOv5 model detects cell clusters as a whole, rather than detecting individual abnormal cells. Since the cell overlap in a cell cluster is high, it is difficult to detect individual cells, so it is detected as a whole, so that only the abnormality of the cell cluster is concerned, and the cell composition is not concerned, so as to reduce the detection difficulty.

[0064] Step 4, using the position and size information of abnormal cells and abnormal cell clusters, crop the abnormal cell and abnormal cell cluster target image from the cropped image, and perform cropping and padding processing on the abnormal cell and abnormal cell cluster target image;

[0065] 4-1. According to the size of the abnormal cell and abnormal cell cluster target image, it is classified into large target image and small target image, and the classification basis is the input size of the improved EfficientNet model, which is 224×224 pixels;

[0066] 4-2. The large target image is cropped with an overlap of 64 pixels, and the size after cropping is 224×224 pixels. The cropped image that is less than 224×224 pixels is zero-padded to 224×224 pixels.

[0067] 4-3. The small target image is zero-padded to 224×224 pixels.

[0068] 4-4. The result obtained in step 3 is a cell or a cell cluster. The size of the cell cluster is generally much larger than the expected input of the classification network, so it needs to be cropped. The overlap is considered for the same reason as step 2.

[0069] Step 5, using the improved EfficientNet model to classify the abnormal cell and abnormal cell cluster target image, and obtaining the classification result of the abnormal cell and abnormal cell cluster target image;

[0070] 5-1. As shown in the figure, the main component MBConv module of the original EfficientNet model uses Depwise Conv, and the output of the Depwise Conv is subjected to Conv operation of the Global Average Pooling layer to obtain the classification result of the target image. Figure 5 As shown in the figure, the main component MBConv module of the original EfficientNet model uses Depwise Conv, and the output of the Depwise Conv is subjected to Conv operation of the Global Average Pooling layer to obtain the classification result of the target image.Figure 6 As shown, Depwise Conv includes a set of 3×3 depthwise convolutions and multiple sets of 1×1 standard convolutions, reducing the number of parameters and FLOPs, but it fails to fully utilize the parallel performance of the GPU. The two-step computation actually slows down its training speed. Figure 7 As shown, the improved EfficientNet model replaces the Depwise Conv in the MBConv module of the second half of the model with a 3×3 standard convolution to improve the training speed of the model.

[0071] 5-2. For example Figure 8 As shown, the SE module in the main component MBConv of the original EfficientNet model calculates channel attention based on the max pooling of each input channel, such as... Figure 9 As shown, the improved EfficientNet model replaces the SE module in the last quarter of the main component MBConv with the CBAM attention module for feature enhancement. The CBAM attention module includes the CBAM channel attention module and the CBAM spatial attention module. Compared with the SE module, the CBAM channel attention module adds consideration of average pooling. The calculation method and function of the CBAM channel attention module are similar to those of the SE module, but the addition of average pooling allows the CBAM channel attention score calculation to be based on more channel features, thereby improving the model's capabilities. In addition, the CBAM spatial attention module also calculates spatial attention through cross-channel pooling and convolution to enhance the feature width and height dimensions. The CBAM spatial attention module first calculates the average pooling and max pooling values ​​at the same position between channels, then uses convolution to obtain the spatial attention score, calculates it through the Sigmoid function, and multiplies it with the original channel to strengthen or weaken the features of some regions in space.

[0072] 5-3. The CBAM attention module extracts input features in two steps, as shown in formulas (1) and (2):

[0073] M c (F)=σ(MLP(AvgPool(F))+MLP(MaxPool(F))) (1)

[0074] M s (F)=σ(f 7×7 ([AvgPool(M c (F)); MaxPool(M c (F))])) (2)

[0075] Where AvgPool is the average pooling layer, MaxPool is the max pooling layer, and MLP is a two-layer neuron system. 7×7For 7x7 convolution, F is the input feature. The CBAM module first performs inter-channel attention operation on the input to enhance inter-channel features, and then performs spatial attention operation on all channels to enhance or spatially different regions of the features, so as to train the model to enhance effective features and suppress ineffective features, so as to concentrate the model operation in effective features as soon as possible, thereby improving the ability of the model.

[0076] Step 6, the classification results of abnormal cells and cell cluster target images and the position and size information of abnormal cells and cell clusters are summarized as the final results of abnormal detection and displayed on the original input image:

[0077] 6-1. The classification results of abnormal cells and cell cluster target images output by the improved EfficientNet model include 5 categories of ASC-US, LSIL, ASC-H, HSIL and negative, wherein negative refers to cells and cell clusters that are positive detected by the improved YOLOv5 but classified as negative by the improved EfficientNet model, in order to prevent false negatives of the classification results of the improved EfficientNet model, it is also necessary to mark them out;

[0078] 6-2. The position of abnormal cells and cell clusters output by the improved YOLOv5 model is relative to the position of the cropped image, which needs to be mapped to the original input image according to the position of the cropped image in the original input image;

[0079] 6-2. The classification results given by the improved EfficientNet model and the position information of abnormal cells and cell clusters relative to the original input image given by the improved YOLOv5 model are summarized as the final results of abnormal detection, and different colors are used to draw rectangular frames in the original input image to mark abnormal cells and abnormal cell clusters.

Claims

1. A method for detecting abnormalities in cytopathological images based on improved YOLOv5 and EfficientNet, characterized in that, This method divides anomaly detection into two stages: anomaly localization and anomaly classification. The anomaly localization stage uses an improved YOLOv5 model, and the anomaly classification stage uses an improved EfficientNet model. The method includes the following steps: Step 1: Obtain digital scan images of cell smears as the raw input images; Step 2: Cropping the original input image with overlap as the cropped image; Step 3: Use the improved YOLOv5 model to detect all abnormal cells and abnormal cell clusters in the cropped image, and obtain the location and size information of abnormal cells and abnormal cell clusters. Specifically, the YOLOv5 network structure can be divided into three modules: BackBone, Neck, and Prediction. The output of the Neck module is processed by the Prediction module's Conv operation to obtain the number of channels required for detection: na×(nc + 5), where na is the number of anchor boxes, nc is the number of classification categories, and the other 5 channels predict the width and height of the anchor boxes, the center point coordinates, and the foreground confidence, respectively. The output channel number of the Prediction module's Conv operation in the improved YOLOv5 model is na×5, removing the category prediction part. Step 4: Using the location and size information of abnormal cells and abnormal cell clusters, crop out the target images of abnormal cells and abnormal cell clusters from the cropped image, and perform cropping and filling processing on the target images of abnormal cells and abnormal cell clusters. Step 5: Use the improved EfficientNet model to classify the target images of abnormal cells and abnormal cell clusters, obtaining the classification results of the target images of abnormal cells and abnormal cell clusters, which include: The original EfficientNet model's main component, the MBConv module, used Depwise Conv, which consisted of a set of 3×3 depthwise convolutions and multiple sets of 1×1 standard convolutions, reducing the number of parameters and FLOPs. The improved EfficientNet model replaced the Depwise Conv in the latter half of the MBConv module with 3×3 standard convolutions to improve the model's training speed. The original EfficientNet model's main component, MBConv, uses the SE module to calculate channel attention based on the max pooling of each input channel. The improved EfficientNet model replaces the SE module in the latter quarter of the main MBConv module with the CBAM attention module for feature enhancement. The CBAM attention module includes both CBAM channel attention and CBAM spatial attention modules. Compared to the SE module, the CBAM channel attention module adds consideration of average pooling, while its calculation and operation are similar to the SE module. Furthermore, the CBAM spatial attention module first calculates the average pooling and max pooling values ​​at the same position between channels, then uses convolution to obtain the spatial attention score, calculates it using the sigmoid function, and multiplies it with the original channels to strengthen or weaken features in certain spatial regions. Step 6: Summarize the classification results of abnormal cells and cell clusters in the target image, and display the location and size information of abnormal cells and cell clusters as the final anomaly detection results on the original input image.

2. The method for detecting abnormalities in cytopathological images based on improved YOLOv5 and EfficientNet according to claim 1, characterized in that, The process of cropping the original input image with overlap as the cropped image in step 2 includes: 2-1. Cropping the original input image using a method with an overlap of 64 pixels and a cropped image size of 640×640 pixels, and zero-padding the cropped image to 640×640 pixels for images smaller than 640×640 pixels. 2-2. Overlapping by 64 pixels during cropping ensures that most cells appear completely in a cropped image. The 640×640 pixel size is the expected input size of the improved YOLOv5 model.

3. The method for detecting abnormalities in cytopathological images based on improved YOLOv5 and EfficientNet according to claim 1, characterized in that, In step 3, the improved YOLOv5 model is used to detect all abnormal cells and abnormal cell clusters in the cropped image, obtaining information on the location and size of abnormal cells and abnormal cell clusters, including: 3-1. Training the improved YOLOv5 model requires labeling all abnormal cells and abnormal cell clusters in the dataset with YOLO format labels, without further subdividing the specific types of abnormalities, and marking them all as positive; 3-2. The improved YOLOv5 model removes the classification task and only performs target localization and foreground / background differentiation. The improved loss function consists of localization loss and confidence loss, eliminating the classification loss of the original YOLOv5 model. At the same time, due to the reduction in model output, the improved YOLOv5 model shrinks the width coefficient to 0.75 of the original YOLOv5 model, which reduces the number of feature channels in each layer of the network to accelerate model inference and reduce memory usage. 3-3. The improved YOLOv5 model detects cell clusters as a whole, rather than detecting individual abnormal cells within them. Because the cells in a cell cluster have a high degree of overlap, it is difficult to detect individual cells. Therefore, it detects them as a whole, focusing only on whether the cell cluster is abnormal or not, rather than on its cellular composition, thus reducing the difficulty of detection.

4. The method for detecting abnormalities in cytopathological images based on improved YOLOv5 and EfficientNet according to claim 1, characterized in that, In step 4, the process of using the location and size information of abnormal cells and abnormal cell clusters to crop the target images of abnormal cells and abnormal cell clusters from the cropped image, and then performing cropping and filling processing on the target images of abnormal cells and abnormal cell clusters, includes: 4-1. Classify the target images of abnormal cells and abnormal cell clusters into large target images and small target images based on their size, using the input size of 224×224 pixels of the improved EfficientNet model as the classification criterion. 4-2. Cropping large target images with overlap of 64 pixels results in a cropped size of 224×224 pixels. Cropping images smaller than 224×224 pixels are zero-padding to a size of 224×224 pixels. 4-3. Zero-padding small target images to a size of 224×224 pixels; 4-4. The results obtained in step 3 are cells or cell clusters. The size of the cell clusters is generally much larger than the expected input of the classification network, so it is necessary to perform overlapping cropping.

5. The method for detecting abnormalities in cytopathological images based on improved YOLOv5 and EfficientNet according to claim 1, characterized in that, In step 5, the improved EfficientNet model is used to classify the target images of abnormal cells and abnormal cell clusters to obtain the classification results of the target images of abnormal cells and abnormal cell clusters, including: The CBAM attention module extracts input features in two steps, as shown in formulas (1) and (2): (1) (2) Where AvgPool is the average pooling layer, MaxPool is the max pooling layer, and MLP consists of two layers of neurons. It is a 7×7 convolution, and F is the input feature.

6. The method for detecting abnormalities in cytopathological images based on improved YOLOv5 and EfficientNet according to claim 1, characterized in that, In step 6, the summarized classification results of abnormal cells and cell clusters, along with the location and size information of abnormal cells and cell clusters, are displayed on the original input image as the final anomaly detection result, including: 6-1. The improved EfficientNet model outputs five categories for classifying abnormal cells and cell clusters in target images: ASC-US, LSIL, ASC-H, HSIL, and negative. Negative refers to cells and cell clusters that are detected as positive by the improved YOLOv5 model but are classified as negative by the improved EfficientNet model. To prevent false negatives from the improved EfficientNet model, these should also be labeled. 6-2. The positions of abnormal cells and cell clusters output by the improved YOLOv5 model are relative to the positions in the cropped image. They need to be mapped back to the original input image based on the positions of the cropped image in the original input image. 6-3. The improved EfficientNet model provides classification results, and the improved YOLOv5 model provides positional information of abnormal cells and cell clusters relative to the original input image as the final result of anomaly detection. Different colors are used to draw rectangles in the original input image to mark abnormal cells and abnormal cell clusters.

Citation Information

Patent Citations

  • Abnormal cell detection method based on introduction of attention mechanism

    CN113838008A

  • Result-oriented cell image high-definition identification marking method

    CN115100151A