A lightweight colposcopy image classification algorithm based on EffiCervNet

Through the colposcopic image classification algorithm based on EffiCervNet, combined with EfficientNet and Cerv-MBConv modules, the problem of insufficient accuracy in colposcopic image classification is solved, and higher cervical type classification accuracy and colposcopic screening efficiency are achieved.

CN117475200BActive Publication Date: 2024-12-27CHONGQING UNIV OF TECH +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311351092.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-18
Publication Date
2024-12-27
Estimated Expiration
2043-10-18

AI Technical Summary

Technical Problem

The existing colposcopic image classification algorithms are insufficient in the speed and accuracy of cervical cancer screening, especially when the medical resources in low- and middle-income countries are limited, it is difficult to effectively screen patients in type 2 and 3 transformation areas.

Method used

A lightweight colposcopic image classification algorithm based on EffiCervNet was designed. By obtaining the cervical colposcopic image dataset for preprocessing and training, an EfficientNet classification model was constructed, and a Cerv-MBConv module was introduced into the model, combining Triplet Attention and Efficient Channel Attention, form an EffiCervNet network model, which is used to improve the classification accuracy of colposcopic images.

Benefits of technology

It improves the classification accuracy of different types of cervix under colposcopy, meets the actual medical needs, reduces model parameters, and improves the screening efficiency of colposcopy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117475200B_ABST
    Figure CN117475200B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of medical image technology, and in particular to a lightweight colposcopy image classification algorithm based on EffiCervNet. The steps are as follows: obtaining cervical colposcopy images as input training data sets; preprocessing the colposcopy image data sets in the training data sets; building a classification model based on EffiCervNet; learning and training the EfficientNet classification model; inputting the cervical colposcopy images in the training data sets into the EfficientNet classification model for training, and saving the trained model. The lightweight colposcopy image classification algorithm based on EffiCervNet provided by the present invention combines the advantages of EfficientNet's high speed and high precision, Cerv‑MBConv's ability to extract spatial features and channel features, and Triplet Attention and ECA's high feature extraction capabilities, while reducing model parameters, better classifies different types of cervix under colposcopy, has higher classification accuracy, and can better classify cervical types, meeting existing medical actual needs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of medical image technology, and in particular to a lightweight colposcopy image classification algorithm based on EffiCervNet. Background Art

[0002] Cervical cancer is a cancer that occurs in the cells of the cervix. Almost all cases of cervical cancer are caused by abnormal growth of cells in the cervical area caused by a virus called human papillomavirus (HPV). According to the global cancer statistics released by the World Health Organization (WHO) in 2018, the incidence of cervical cancer ranks 14th among all cancers, and the incidence and mortality rates among female cancers are both fourth. According to statistics from 2018, in developing countries, the incidence of cervical cancer ranks second among female tumors; nearly 320,000 people die from cervical cancer worldwide each year, of which 84% to 90% occur in low-income and middle-income countries (LMICs) such as South Africa, India and Brazil. The cause of cervical cancer is clear, and it takes several years for cervical epithelial cells to develop from the precancerous stage to invasive cervical cancer (ICC). Early prevention, early detection and early treatment can effectively block the further deterioration of precancerous lesions.

[0003] The three-step screening for cervical cancer refers to cytology screening, colposcopy, and cervical biopsy. Colposcopy refers to direct naked eye observation of the vagina and cervix for lesions under strong light through a colposcope. However, the subjectivity of colposcopists and the lack of experienced colposcopists have always been the main bottlenecks for LMICs to implement the three-step screening for cervical cancer. Although with the continuous optimization and development of computer-aided diagnosis (CAD) systems, the auxiliary diagnosis combined with artificial intelligence (AI) and colposcopy has greatly reduced the influence of subjective factors in colposcopy diagnosis, alleviated the pressure of medical treatment, improved diagnostic efficiency, and realized remote diagnosis to solve the problem of scarce medical resources, we still noticed the limitations of colposcopy in screening patients with type 2 and 3 transformation zones.

[0004] In recent years, the above problems have been improved to a certain extent with the gradual maturity and widespread application of deep learning technology, especially after Intel & MobileODT proposed a cervical classification competition for different transformation zone types on Kaggle in 2017, this problem has attracted wider attention from the academic community. However, the algorithms currently proposed still cannot meet the clinical requirements for speed and accuracy. Therefore, it is necessary to develop more advanced algorithms in the field of cervical classification to improve the effectiveness of colposcopy screening in practical applications.

[0005] Currently, Jack et al. used ResNet32 and ResNet52 with various settings. They achieved the best results using ResNet32 with data augmentation, and they achieved an accuracy of 58.8% on the public dataset released by kaggle.

[0006] On the same dataset, Aina et al. applied AlexNet and SqueezeNet and achieved accuracies of 62.6% and 63.3% respectively. They reported that SqueezeNet has great potential in achieving this target accuracy.

[0007] In another paper, Kaur et al. used pre-trained VGG16 and VGG19 and achieved 62.1% on VGG16;

[0008] To this end, we designed a lightweight colposcopy image classification algorithm based on EffiCervNet to provide another technical solution to the above technical problems. Summary of the invention

[0009] Based on this, it is necessary to provide a lightweight colposcopy image classification algorithm based on EffiCervNet to solve the technical problems raised in the above background technology.

[0010] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0011] A lightweight colposcopy image classification algorithm based on EffiCervNet, the steps are as follows:

[0012] Get cervical colposcopy images as input training data set;

[0013] Preprocessing the colposcopy image dataset in the training dataset;

[0014] Build a classification model based on EffiCervNet;

[0015] The EfficientNet classification model is trained; the cervical colposcopy images in the training data set are input into the EfficientNet classification model for training, and the trained model is saved.

[0016] As a preferred implementation of the lightweight colposcopy image classification algorithm based on EffiCervNet provided by the present invention, the input training data set adopts the public colposcopy data set of Intel&MobileODT on Kaggle.

[0017] As a preferred implementation of the lightweight colposcopy image classification algorithm based on EffiCervNet provided by the present invention, the steps of preprocessing the colposcopy image dataset in the training dataset are as follows:

[0018] Crop the image to a uniform size: Crop the dataset to a uniform size of 224×224;

[0019] Resample the data: Balance the samples of different categories by duplicating the samples of the minority category to prevent the model from focusing too much on the category with a large number of samples;

[0020] Random horizontal flip: In training mode, randomly flip the image horizontally with a probability of 0.4;

[0021] Random vertical flip: In training mode, randomly flip the image vertically with a probability of 0.4;

[0022] Random Angle Rotation: In training mode, the image is rotated at a random angle with a maximum rotation angle of 20 degrees;

[0023] Divide the dataset: Divide the dataset into training set, validation set, and test set in a ratio of 7:1.5:1.5.

[0024] As a preferred implementation of the lightweight colposcopy image classification algorithm based on EffiCervNet provided by the present invention, the steps of constructing a classification model based on EffiCervNet are as follows:

[0025] The core module of EfficientNet-B0, the mobile flip bottleneck convolution MBConv, is improved. The original Squeeze-and-Excitation attention module is replaced with Cerv-MBConv, which is a combination of Efficient Channel Attention and TripletAttention. Cerv-MBConv is fused with the original EfficientNet network model to form the EffiCervNet network model.

[0026] As a preferred implementation of the lightweight colposcopy image classification algorithm based on EffiCervNet provided by the present invention, Cerv-MBConv is fused into the original EfficientNet model to form an EffiCervNet network model, which includes 7 Cerv-MBConv stages from Stage 0 to Stage 6, 2 ordinary convolutional layers, 1 global average pooling layer and 1 classification layer, and the steps are as follows:

[0027] First, the input 224×224×3 image is subjected to a 3×3 convolution, and then passes through a batch normalization layer and a Swish activation function in sequence to output a feature map with a dimension of 112×112×32;

[0028] Stage 0: Perform Cerv-MBConv, i.e., improved mobile flip bottleneck convolution, on the 112×112×32 feature map output in the previous stage, where the Cerv-MBConv expansion ratio is 1, the depth convolution kernel size is 3×3, the hole convolution kernel size is 3×3, the step size is 1×1, and a feature map with a dimension of 112×112×16 is output;

[0029] Stage 1: Perform two Cerv-MBConv on the 112×112×16 feature map output in the previous stage. The expansion ratio of both Cerv-MBConv is 6, the depth convolution kernel size is 3×3, the hole convolution kernel size is 3×3, the step size is 2×2, and a feature map with a dimension of 56×56×24 is output;

[0030] Stage 2: Perform two Cerv-MBConvs on the 56×56×24 feature map output in the previous stage. The expansion ratio of the first Cerv-MBConv is 6, the depth convolution kernel size is 5×5, the hole convolution kernel size is 5×5, and the step size is 2×2. The kernel step size of the second Cerv-MBConv is 1×1, and a feature map with a dimension of 28×28×40 is output;

[0031] Stage 3: Perform three Cerv-MBConv on the 28×28×40 feature map output in the previous stage. The expansion ratio of the first Cerv-MBConv is 6, the depth convolution kernel size is 3×3, the hole convolution kernel size is 3×3, and the step size is 2×2. The kernel step size of the second and third Cerv-MBConv is 1×1, and a feature map with a dimension of 14×14×80 is output.

[0032] Stage 4: Perform three Cerv-MBConv on the 14×14×80 feature map output in the previous stage. The expansion ratio of the three Cerv-MBConv is 6, the depth convolution kernel size is 5×5, the hole convolution kernel size is 5×5, the step size is 1×1, and a feature map with a dimension of 14×14×112 is output;

[0033] Stage 5: Perform four Cerv-MBConv on the 14×14×112 feature map output in the previous stage. The expansion ratio of the first Cerv-MBConv is 6, the depth convolution kernel size is 5×5, the hole convolution kernel size is 5×5, and the step size is 2×2. The kernel step size of the second, third, and fourth Cerv-MBConv is 1×1, and a feature map with a dimension of 7×7×192 is output.

[0034] Stage 6: Perform a Cerv-MBConv on the 7×7×192 feature map output in the previous stage, where the expansion ratio of Cerv-MBConv is 6, the depth convolution kernel size is 3×3, the hole convolution kernel size is 3×3, the step size is 1×1, and a feature map with a dimension of 7×7×320 is output; finally, the input 7×7×320 feature image is sequentially subjected to 1×1 ordinary convolution, batch normalization, Swish activation function, global average pooling layer, fully connected layer and Softmax activation function, and the classification result is output.

[0035] As a preferred implementation of the lightweight colposcopy image classification algorithm based on EffiCervNet provided by the present invention, the EfficientNet classification model is trained; the cervical colposcopy images in the training data set are input into the EfficientNet classification model for training, and the trained model is saved, and the steps are as follows:

[0036] The batch training method is used to divide the training set and the validation set into multiple batches, where the training validation batch is set to 32; traversing all the images in the training and test sets once is considered as one iteration;

[0037] EffiCervNet is used as the basic network for training, which consists of 16 Cerv-MBConv convolution modules, 2 convolution layers, 1 global average pooling layer and 1 classification layer.

[0038] As a preferred implementation of the lightweight colposcopy image classification algorithm based on EffiCervNet provided by the present invention, EffiCervNet is used as the basic network for training, including 16 Cerv-MBConv convolution modules, 2 convolution layers, 1 global average pooling layer and 1 classification layer, and the steps are as follows:

[0039] First, a convolution kernel with a size of 3×3 and a stride of 2×2 is used to increase the dimension of the input 224×224×3 image to obtain a feature map with a dimension of 112×112×32;

[0040] Then, the Cerv-MBConv convolution operation is performed, which first undergoes a 3×3 or 5×5 depth convolution and a 3×3 or 5×5 dilated convolution with a dilation rate of 2, and then performs a complete convolution operation with different convolution kernel sizes on the input features;

[0041] Then, global average pooling is used to obtain global information, and the two fully connected layers find the weight ratios of different convolution kernels, and finally a softmax operation is performed in the channel direction;

[0042] When the same Cerv-MBConv appears, connection inactivation and skip connection operations are performed; finally, the original channel is restored through 1×1 point-by-point convolution, and the fully connected layer is used for classification.

[0043] As a preferred implementation of the lightweight colposcopy image classification algorithm based on EffiCervNet provided by the present invention, the optimal model is used to make predictions and save the results, and the results are compared, and the steps are as follows:

[0044] Input the test set to be classified, classify the cervical colposcopy images through the trained EffiCervNet classification model, and obtain the feature vector;

[0045] The input classifier is used to determine the cervical type and the probability of the colposcopy image belonging to each category is obtained. The cervical category with the largest probability value corresponds to the cervical category.

[0046] It can be seen without a doubt that the above-mentioned technical solution of the present application can definitely solve the technical problem to be solved by the present application.

[0047] At the same time, through the above technical solutions, the present invention has at least the following beneficial effects:

[0048] The present invention provides a lightweight colposcopy image classification algorithm based on EffiCervNet, which combines the advantages of EfficientNet's high speed and high precision, Cerv-MBConv's ability to extract spatial features and channel features, and Triplet Attention and ECA's high feature extraction capabilities. It can better classify different types of cervix under colposcopy while reducing model parameters, has higher classification accuracy, and can better classify cervical types, meeting existing practical medical needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.

[0050] Figure 1 It is a flow chart of the cervical colposcopy image classification method of the present invention;

[0051] Figure 2 It is a type diagram of cervical colposcope of the present invention;

[0052] Among them (a) - type 1 cervix, Figure (b) - type 2 cervix, Figure (c) - type 3 cervix;

[0053] Figure 3 It is a structural block diagram of the Cerv-MBConv module of the present invention;

[0054] Figure 4 It is a structural block diagram of the Triplet Attention mechanism of the present invention;

[0055] Figure 5 It is a structural block diagram of the Efficient Channel Attention (ECA) mechanism of the present invention;

[0056] Figure 6 It is the EffiCervNet network model of the present invention;

[0057] Figure 7 It is the test set confusion matrix of the present invention. DETAILED DESCRIPTION

[0058] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0059] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings.

[0060] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features and technical solutions in the embodiments may be combined with each other.

[0061] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0062] Reference Figure 1-Figure 7 , a lightweight colposcopy image classification algorithm based on EffiCervNet, the steps are as follows:

[0063] Training phase

[0064] Step 1: Obtain cervical colposcopy images as input training data set;

[0065] The input data uses the public colposcopy dataset of Intel & MobileODT on Kaggle, which contains a large number of normal cervical colposcopy images, which are divided into three categories according to the visibility of the transformation zone, including type 1 cervix, type 2 cervix and type 3 cervix: type 1 cervical transformation zone is completely outside the cervix and is completely visible; type 2 cervical transformation zone is partially inside the cervix, and may be partially outside the cervix, which can be completely visible with the help of tools; type 3 cervical transformation zone is partially inside the cervix, and may be partially outside the cervix, which is not completely visible with the help of tools. There are 7670 images in this dataset.

[0066] Step 2, preprocessing the colposcopy image dataset in the training dataset, including: cropping the image to a uniform size, resampling the data, randomly flipping horizontally, randomly flipping vertically, and randomly rotating the data, and dividing the dataset into a training set, a validation set, and a test set.

[0067] In order to compensate for the impact of the imbalance of samples in the Intel & Mobile ODT public colposcopy dataset on the model recognition performance and to avoid network overfitting, the present invention enhances the sample data with a small number before training. The enhancement methods used are: 1) Crop the uniform image size: Crop the dataset to a uniform image of 224×224 size; 2) Resample the data: Balance the samples of different categories by copying the samples of a few categories to prevent the model from paying too much attention to the categories with a large number. 3) Random horizontal flip: In training mode, randomly flip the image horizontally with a probability of 0.4; 4) Random vertical flip: In training mode, randomly flip the image vertically with a probability of 0.4; 5) Random angle rotation: In training mode, rotate the image at a random angle with a maximum rotation angle of 20 degrees; 6) Divide the dataset: Divide the dataset into training set, validation set and test set according to the ratio of 7:1.5:1.5.

[0068] Step 3: Build a classification model based on EffiCervNet;

[0069] 1) Build the Cerv-MBConv core module;

[0070] Improve the core module of EfficientNet, the mobile flip bottleneck convolution MBConv, and replace the original Squeeze-and-Excitation (SE) attention module with Efficient Channel Attention (ECA) and Triplet Cerv-MBConv combined with Attention, first in the MBConv module, a simple compression and excitation operation is performed on the feature map output after the convolution operation with the convolution kernel k. Cerv-MBConv replaces the compression and excitation operations with: compressing the feature map through global average pooling, redistributing weights to redistribute the importance of different channels, using activation functions to generate activation weights and apply them to feature maps, further performing global average pooling on the feature map, performing one-dimensional convolution operations on the pooling results to model the global dependency between channels, using activation functions to generate the final attention weights, and then obtaining global information through global average pooling, two fully connected layers to find the weight ratio of different convolution kernels, and finally performing softmax operations in the channel direction to form the Cerv-MBConv network structure; Cerv-MBConv is fused with the original EfficientNet model to form the EffiCervNet network model, such as Figure 3 As shown, the Cerv-MBConv network structure is as follows:

[0071] First, the feature map is upgraded by using 1×1 ordinary convolution, and then depth-wise separable convolution with a kernel size of 3×3 or 5×5 and dilated convolution with a dilation rate of 2 and a kernel size of 3×3 or 5×5 are performed to obtain two new feature maps. and The results of the two branches are then fused by element-by-element summation to obtain a new feature map χ. The new feature map χ then passes through a global average pooling layer, two fully connected layers, and a softmax operation, and then undergoes a 1×1 ordinary convolution dimensionality reduction and Dropout operation, and is finally fused with the original feature map to obtain the final feature map.

[0072] Triplet Attention consists of three parallel branches. The first two are responsible for capturing the cross-dimensional interaction between channel C and space H or W through cross-dimensional interaction, and the last branch is used to build spatial attention. Finally, the outputs of the three branches are aggregated using average. The specific method is:

[0073] (1) Z-Pool layer: Reduces a specific dimension in the tensor to 2 dimensions. The Z-Pool layer connects the average pooled features and the maximum pooled features on that dimension. This enables the layer to retain the rich representation of the actual tensor while reducing its depth to make further computations lighter. The formula is as follows:

[0074] Z-Pool(χ)=[MaxPool 0d (χ),AvgPool 0d (x)]

[0075] Where χ is the input tensor, MaxPool 0d (χ) is the maximum pooling operation on the tensor, AvgPool 0d (χ) is the average pooling operation on the tensor;

[0076] (2) The first branch: the input tensor χ∈R C×H×W After rotating 90° counterclockwise along the H axis, the shape becomes (W×H×C), and after the Z-Pool operation, it becomes (2×H×C). Then it passes through a standard convolutional layer with a kernel size of k×k, and then through a batch normalization layer to output a tensor of shape (1×H×C). The tensor is then passed through a sigmoid activation function to generate attention weights. Finally, the tensor is rotated 90° clockwise along the H axis to keep the same shape as the input, and is applied to the input χ to obtain

[0077] (3) The second branch: the input tensor χ∈R C×H×W After rotating 90° counterclockwise along the W axis, the shape becomes (H×C×W), and after the Z-Pool operation, it becomes (2×C×W). Then it passes through a standard convolutional layer with a kernel size of k×k, and then through a batch normalization layer to output a tensor of shape (1×C×W). The tensor is then passed through a sigmoid activation function to generate attention weights. Finally, the tensor is rotated 90° clockwise along the H axis to keep the same shape as the input, and is applied to the input χ to obtain

[0078] (4) The third branch: This branch establishes an interaction between the H dimension and the W dimension. After the tensor passes through the Z-Pool layer, it becomes (2×H×W), then passes through a standard convolutional layer with a kernel size of k×k, and then passes through a batch normalization layer to output a tensor of shape (1×H×W). The tensor is then passed through a sigmoid activation function to generate attention weights, which are applied to the input χ to obtain

[0079] Finally, the refined tensor generated by the three branches is Aggregate together and finally output tensor

[0080]

[0081] The structure of Efficient Channel Attention (ECA) is: Input tensor χ∈R C×H×W, after global average pooling, the shape becomes (1×1×C);

[0082] Through the one-dimensional convolution layer with adaptive convolution kernel size, the adaptive convolution kernel allows the layer with a large number of channels to have more cross-channel interactions. The calculation formula is:

[0083] k=Ψ(C)=|(log2(C)+b) / y|

[0084] Where y=2, b=1;

[0085] Finally, the weights for each channel are obtained and applied to the input tensor χ.

[0086] 2) Build the EffCervNet classification model

[0087] The Cerv-MBConv is integrated into the original EfficientNet model to form the EffiCervNet network model, which consists of 7 Cerv-MBConv stages from Stage 0 to Stage 6, 2 ordinary convolution layers, 1 global average pooling layer and 1 classification layer. It includes the following stages: first, a 3×3 convolution is performed on the input 224×224×3 image, and then a batch normalization layer and a Swish activation function are passed in sequence to output a feature map with a dimension of 112×112×32;

[0088] Stage 0: Perform Cerv-MBConv, i.e., improved mobile flip bottleneck convolution, on the 112×112×32 feature map output in the previous stage, where the Cerv-MBConv expansion ratio is 1, the depth convolution kernel size is 3×3, the hole convolution kernel size is 3×3, the step size is 1×1, and a feature map with a dimension of 112×112×16 is output;

[0089] Stage 1: Perform Cerv-MBConv twice on the 112×112×16 feature map output in the previous stage, where the expansion ratio of both Cerv-MBConv is 6, the depth convolution kernel size is 3×3, the hole convolution kernel size is 3×3, the step size is 2×2, and a feature map with a dimension of 56×56×24 is output; Stage 2: Perform Cerv-MBConv twice on the 56×56×24 feature map output in the previous stage, where the expansion ratio of the first Cerv-MBConv is 6, the depth convolution kernel size is 5×5, the hole convolution kernel size is 5×5, the step size is 2×2, and the kernel step size of the second Cerv-MBConv is 1×1, and a feature map with a dimension of 28×28×40 is output;

[0090] Stage 3: Perform three Cerv-MBConv on the 28×28×40 feature map output in the previous stage. The expansion ratio of the first Cerv-MBConv is 6, the depth convolution kernel size is 3×3, the hole convolution kernel size is 3×3, and the step size is 2×2. The kernel step size of the second and third Cerv-MBConv is 1×1, and a feature map with a dimension of 14×14×80 is output.

[0091] Stage 4: Perform three Cerv-MBConv on the 14×14×80 feature map output in the previous stage. The expansion ratio of the three Cerv-MBConv is 6, the depth convolution kernel size is 5×5, the hole convolution kernel size is 5×5, the step size is 1×1, and a feature map with a dimension of 14×14×112 is output;

[0092] Stage 5: Perform four Cerv-MBConv on the 14×14×112 feature map output in the previous stage. The expansion ratio of the first Cerv-MBConv is 6, the depth convolution kernel size is 5×5, the hole convolution kernel size is 5×5, and the step size is 2×2. The kernel step size of the second, third, and fourth Cerv-MBConv is 1×1, and a feature map with a dimension of 7×7×192 is output.

[0093] Stage 6: Perform a Cerv-MBConv on the 7×7×192 feature map output in the previous stage, where the expansion ratio of Cerv-MBConv is 6, the depth convolution kernel size is 3×3, the hole convolution kernel size is 3×3, the step size is 1×1, and a feature map with a dimension of 7×7×320 is output; finally, the input 7×7×320 feature image is sequentially subjected to 1×1 ordinary convolution, batch normalization, Swish activation function, global average pooling layer, fully connected layer and Softmax activation function, and the classification result is output.

[0094] Step 4, construct the Focal Loss loss function;

[0095] Step 5: Learn and train the EfficientNet classification model; input the cervical colposcopy images in the training data set into the EfficientNet classification model for training, and save the trained model;

[0096] 1) Model parameter setting;

[0097] During the model training process, the batch training method was used to divide the training set and the validation set into multiple batches, where the training validation batch was set to 32; all the images in the training test set were traversed once as one iteration, and a total of 150 rounds of iterations were performed; the Adam optimizer was used to optimize the model, and the initial learning rate was set to 0.01. To prevent overfitting, the learning rate was set to decay to 0.1 times the original value every 30 epochs of training;

[0098] 2) Model training:

[0099] EffiCervNet is used as the basic network for training, which includes 16 Cerv-MBConv convolution modules, 2 convolution layers, 1 global average pooling layer and 1 classification layer. First, the input 224×224×3 image is dimensionalized using a convolution kernel of size 3×3 and stride 2×2 to obtain a feature map of dimension 112×112×32. Then, a Cerv-MBConv convolution operation is performed. First, a 3×3 or 5×5 depth convolution and a 3×3 or 5×5 dilated convolution with a dilation rate of 2 are performed on the input features. A complete convolution operation with different convolution kernel sizes is performed on the input features, and then global average pooling is performed to obtain global information. Two fully connected layers find the weight ratio of different convolution kernels, and finally a softmax operation is performed in the channel direction. When the same Cerv-MBConv appears, connection inactivation and skip connection operations are performed. Finally, a 1×1 point-by-point convolution is performed to restore the original channel, and a fully connected layer is used for classification.

[0100] Testing phase:

[0101] Step 6: Use the optimal model to make predictions and save the results for comparison. Input the test set to be classified, classify the cervical colposcopy images through the trained EffiCervNet classification model, obtain the feature vector, input the classifier to determine the cervical type, and obtain the probability of the colposcopy image in each category. The one with the largest probability value is the corresponding cervical category.

[0102] In Table 1, we designed a set of comparative experiments to compare the effectiveness of the baseline EfficientNet-B0 model and the improved EffiCervNet. The experimental results show that the improved EffiCervNet reduces the number of parameters by about 13.8% compared with the baseline EfficientNet-B0, improves the accuracy by 6.45%, and improves the F1-Score by 0.094.

[0103] Table 1 Comparative experimental results of the baseline EfficientNet-B0 model and the improved EffiCervNet

[0104]

[0105] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the present invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.

Claims

1. A lightweight colposcopy image classification algorithm based on EffiCervNet, characterized in that: Here are the steps: Get cervical colposcopy images as input training data set; Preprocessing the colposcopy image dataset in the training dataset; Build a classification model based on EffiCervNet; The EfficientNet classification model is trained; the cervical colposcopy images in the training data set are input into the EfficientNet classification model for training, and the trained model is saved; The steps of constructing the classification model based on EffiCervNet are as follows: Improve the core module of EfficientNet-B0, the mobile flip bottleneck convolution MBConv, replace the original Squeeze-and-Excitation attention module with Cerv-MBConv, which is a combination of Efficient Channel Attention and TripletAttention, and fuse Cerv-MBConv with the original EfficientNet network model to form the EffiCervNet network model; First, in the MBConv module, a simple compression and excitation operation is performed on the feature map output after the convolution operation with the convolution kernel k; Cerv-MBConv replaces the compression and excitation operations with: compressing the feature map through global average pooling, redistributing weights to redistribute the importance of different channels, using activation functions to generate activation weights applied to feature maps, further performing global average pooling on feature maps, performing one-dimensional convolution operations on pooling results to model global dependencies between channels, and using activation functions to generate final attention weights; Then, global average pooling is used to obtain global information, and two fully connected layers are used to find the weight ratios of different convolution kernels. Finally, a softmax operation is performed in the channel direction to form Cerv-MBConv.

2. A lightweight colposcopy image classification algorithm based on EffiCervNet according to claim 1, characterized in that: The input training data set adopts the public colposcopy data set of Intel & MobileODT on Kaggle.

3. A lightweight colposcopy image classification algorithm based on EffiCervNet according to claim 1, characterized in that: The steps of preprocessing the colposcopy image data set in the training data set are as follows: Crop the image to a uniform size: Crop the dataset to a uniform size of 224×224; Resample the data: Balance the samples of different categories by duplicating the samples of the minority category to prevent the model from focusing too much on the category with a large number of samples; Random horizontal flip: In training mode, randomly flip the image horizontally with a probability of 0.4; Random vertical flip: In training mode, randomly flip the image vertically with a probability of 0.4; Random Angle Rotation: In training mode, the image is rotated at a random angle with a maximum rotation angle of 20 degrees; Divide the dataset: Divide the dataset into training set, validation set, and test set in a ratio of 7:1.5:1.

5.

4. The lightweight colposcopy image classification algorithm based on EffiCervNet according to claim 1, characterized in that: Cerv-MBConv is integrated into the original EfficientNet model to form the EffiCervNet network model, which consists of 7 Cerv-MBConv stages from Stage 0 to Stage 6, 2 ordinary convolutional layers, 1 global average pooling layer and 1 classification layer. The steps are as follows: First, the input 224×224×3 image is subjected to a 3×3 convolution, and then passes through a batch normalization layer and a Swish activation function in sequence to output a feature map with a dimension of 112×112×32; Stage 0: Perform Cerv-MBConv, i.e., improved mobile flip bottleneck convolution, on the 112×112×32 feature map output in the previous stage, where the Cerv-MBConv expansion ratio is 1, the depth convolution kernel size is 3×3, the hole convolution kernel size is 3×3, the step size is 1×1, and a feature map with a dimension of 112×112×16 is output; Stage 1: Perform two Cerv-MBConv on the 112×112×16 feature map output in the previous stage. The expansion ratio of both Cerv-MBConv is 6, the depth convolution kernel size is 3×3, the hole convolution kernel size is 3×3, the step size is 2×2, and a feature map with a dimension of 56×56×24 is output; Stage 2: Perform two Cerv-MBConvs on the 56×56×24 feature map output in the previous stage. The expansion ratio of the first Cerv-MBConv is 6, the depth convolution kernel size is 5×5, the hole convolution kernel size is 5×5, and the step size is 2×2. The kernel step size of the second Cerv-MBConv is 1×1, and a feature map with a dimension of 28×28×40 is output; Stage 3: Perform three Cerv-MBConv on the 28×28×40 feature map output in the previous stage. The expansion ratio of the first Cerv-MBConv is 6, the depth convolution kernel size is 3×3, the hole convolution kernel size is 3×3, and the step size is 2×2. The kernel step size of the second and third Cerv-MBConv is 1×1, and a feature map with a dimension of 14×14×80 is output. Stage 4: Perform three Cerv-MBConv on the 14×14×80 feature map output in the previous stage. The expansion ratio of the three Cerv-MBConv is 6, the depth convolution kernel size is 5×5, the hole convolution kernel size is 5×5, the step size is 1×1, and a feature map with a dimension of 14×14×112 is output; Stage 5: Perform four Cerv-MBConv on the 14×14×112 feature map output in the previous stage. The expansion ratio of the first Cerv-MBConv is 6, the depth convolution kernel size is 5×5, the hole convolution kernel size is 5×5, and the step size is 2×2. The kernel step size of the second, third, and fourth Cerv-MBConv is 1×1, and a feature map with a dimension of 7×7×192 is output. Stage 6: Perform a Cerv-MBConv on the 7×7×192 feature map output in the previous stage, where the expansion ratio of Cerv-MBConv is 6, the depth convolution kernel size is 3×3, the hole convolution kernel size is 3×3, the step size is 1×1, and a feature map with a dimension of 7×7×320 is output; finally, the input 7×7×320 feature image is sequentially subjected to 1×1 ordinary convolution, batch normalization, Swish activation function, global average pooling layer, fully connected layer and Softmax activation function, and the classification result is output.

5. The lightweight colposcopy image classification algorithm based on EffiCervNet according to claim 1, characterized in that: The EfficientNet classification model is trained; the cervical colposcopy images in the training data set are input into the EfficientNet classification model for training, and the trained model is saved. The steps are as follows: The batch training method is used to divide the training set and the validation set into multiple batches, where the training validation batch is set to 32; traversing all the images in the training and test sets once is considered as one iteration; EffiCervNet is used as the basic network for training, which consists of 16 Cerv-MBConv convolution modules, 2 convolution layers, 1 global average pooling layer and 1 classification layer.

6. The lightweight colposcopy image classification algorithm based on EffiCervNet according to claim 5, characterized in that: EffiCervNet is used as the basic network for training, which consists of 16 Cerv-MBConv convolution modules, 2 convolution layers, 1 global average pooling layer and 1 classification layer. The steps are as follows: First, a convolution kernel with a size of 3×3 and a stride of 2×2 is used to increase the dimension of the input 224×224×3 image to obtain a feature map with a dimension of 112×112×32; Then, the Cerv-MBConv convolution operation is performed, which first undergoes a 3×3 or 5×5 depth convolution and a 3×3 or 5×5 dilated convolution with a dilation rate of 2, and then performs a complete convolution operation with different convolution kernel sizes on the input features; Then, global average pooling is used to obtain global information, and the two fully connected layers find the weight ratios of different convolution kernels, and finally a softmax operation is performed in the channel direction; When the same Cerv-MBConv appears, connection inactivation and skip connection operations are performed; finally, the original channel is restored through 1×1 point-by-point convolution, and the fully connected layer is used for classification.

7. The lightweight colposcopy image classification algorithm based on EffiCervNet according to claim 1, characterized in that: Use the optimal model to make predictions and save the results, and compare the results. The steps are as follows: Input the test set to be classified, classify the cervical colposcopy images through the trained EffiCervNet classification model, and obtain the feature vector; The input classifier is used to determine the cervical type and the probability of the colposcopy image belonging to each category is obtained. The cervical category with the largest probability value corresponds to the cervical category.