| In clinical practice,Helicobacter Pylori(HP)infection is often determined by examining endoscopic images of the stomach,but this requires a high level of skill and can be misdiagnosed.Recently,convolutional neural networks have been used to classify endoscopic gastric images.However,models with better performance often come with large parameters and computations that are difficult to deploy in physician-assisted diagnostic devices with limited resources.In view of the above problems,this paper aims at the recognition of Helicobacter pylori infection in gastric endoscopic images,based on the lightweight convolutional neural network design and network pruning methods,and focuses on achieving a classification model with balanced performance and scale.The main work of the paper is as follows:(1)For the existing ResNet18 and MobileNet V3,two lightweight models based on Structural Re-parameterization method: Rep ResNet18 and Rep MobileNet V3 are proposed for the classification of HP endoscopic images.In the proposed Rep ResNet18 and Rep MobileNet V3,the features are extracted mainly using depthwise separable convolution,which effectively reduces the number of model parameters,and additional 1 × 1 depth convolution branch and identity branch are introduced for them to enhance the model feature extraction ability.In addition,for the trained Rep ResNet18 and Rep MobileNet V3,the parameters in the added branches are fused with the main branch using the structural reparameterization method,which further reduces the number of model parameters.The classification results on gastric endoscopic images show that Rep ResNet18 achieves 0.3% increase in both Accuracy and AUC,while Params and FLOPs are reduced by more than 83%;Rep MobileNet V3 achieves 0.5% increase in Accuracy and 0.1% increase in AUC,while Params are reduced by 0.05 M and FLOPs were reduced by 10 M.(2)A hybrid pruning method combining convolutional kernel pruning and weight pruning is proposed.The sparsity of the model increases gradually with the number of iterations during pruning,and a fine-tuning is performed after each pruning,which reduces the problem of rapid degradation of model accuracy caused by previous one shot pruning.The hybrid pruning first uses the geometric median pruning method to remove the convolutional kernels near the geometric center in the convolutional layer,and then uses the weight-based pruning method to set the less important parameters to zero.To verify the effectiveness and generalization of the proposed method,we perform hybrid pruning on the public medical image Path MNIST for VGG16,and the result shows that the method can achieve a high model compression ratio without large accuracy loss in each metric.(3)A hybrid pruning method based on removing residuals is proposed.To solve the problems of slowed inference and unfriendly pruning caused by the residual blocks in ResNet,the RM operation is used to equivalently convert it to a single path structure without residuals,and then prune it with hybrid pruning method.The classification results on gastric endoscopic images show that ResNet18 using hybrid pruning can achieve 0.2% increase in Accuracy and 0.1% increase in AUC,while Params and FLOPs are reduced by 48% and the sparsity of weights reaches 40%.The method proposed in this paper can identify H.pylori infection in gastric endoscopic images and provides effective solutions for deploying large-scale convolutional neural networks in medical-aided diagnosis devices with limited resources. |