## 1 Introduction  
At present, the number of global Internet users has exceeded 5.16 billion, equivalent to 64.4% of the world's total population. The huge Internet system has accelerated the spread of bad information and increased its impact. Violent images and pornographic images are the most common forms of bad information on the Internet. Violent images are generally referred to as images that contain violence, gore, cruelty, horror, abuse, death, etc. Such images may cause panic, disgust, pain, sadness, anger, and other undesirable emotions, which will have a negative impact on an individual's psychological, emotional, and spiritual health [1]. Pornographic images are images that depict or show sexual acts, sexual organs, or the exposure of sexual organs. Such images usually invoke strong sexual suggestions or sexual stimulation, which can easily arouse people's sexual impulses and curiosity [2]. Bad images not only have a negative impact on individuals' psychology and emotions but may also have a negative impact on social order and morality. The identification and detection of bad images is of great significance to purifying cyberspace, ensuring cyberspace security, and improving governments' digital governance capabilities. In recent years, artificial intelligence technology has ushered in a period of vigorous development, and significant progress has been made in using artificial intelligence technology to identify bad images. Early research on bad images mostly focused on machine learning methods. Pornographic-image-recognition-based machine learning uses the proportion of exposed skin [3; 4; 5; 6] in an image and the special shapes and textures [7; 8; 9] of human private parts as the basis for recognition. The main research object of violent-image-recognition-based machine learning is bloody images. In this approach, large red areas [10] that may appear in an image are used for recognition. The method based on machine learning takes the special features of bad images as the basis for recognition, but these special features are not unique to bad images, so the recognition accuracy of these methods is not ideal. Deep learning has achieved remarkable results in the field of computer vision. Thanks to the powerful feature extraction ability of deep neural networks, they can discover high-dimensional structural information [11] within data. Deep learning has achieved success in the fields of classification [12; 13], object detection [14; 15], image retrieval [16], etc. Pornographic image recognition schemes based on deep learning and violent image recognition mostly use deep network structures [17] or deep residual structures [18] for feature extraction. However, these complex neural network architectures bring a lot of inference time overhead. In the current high-speed and wide-coverage computer network environment, it is difficult to effectively suppress the spread of bad images and reduce the harm they cause. In order to deal with the above limitations, this paper proposes an efficient bad image classification method (RepVGG-SimAM). In this method, the RepVGG model is used as the backbone neural network, and the SimAM attention mechanism is added to the backbone network. The neural network model uses the residual structure in the training phase to improve the feature extraction ability of the network, and it also prevents the occurrence of training overfitting. In the inference stage, the multi-branch residual structure is transformed into a single-channel model using structural reparameterization technology, which improves the speed of inference. The network model can not only achieve deep feature extraction but also meet the needs of high-speed inference. The main contributions of this paper are as follows:  
* An efficient bad image recognition method is proposed. This method separates training process from inference process and achieves both powerful feature extraction and inference speed.