## 1 Introduction
The YOLO series target detection algorithms are single-stage detectors with very good performance. Moreover, compared to the two-stage algorithms, the YOLO algorithms can achieve a better balance [10]. Currently, some researchers are devoted to the study of target algorithms for detecting contrabands in terahertz images. [PERSON] et al. [18] proposed an improved SSD algorithm to improve the accuracy and speed of detecting concealed objects in terahertz images. The ResNet-50 network was used to replace the original VGGNet-16 network in SSD for feature extraction to overcome the problem of feature degradation, and then the feature fusion module fused deep and shallow features together to construct features rich in semantic information, which is conducive to the improvement of detection accuracy of small targets. [PERSON] et al. [19] introduced the idea of transfer learning based on the retinanet algorithm to improve the recognition accuracy of defects in terahertz images. Considering the small proportion of the object that needs to be detected in a terahertz image, a differential evolutionary search algorithm was used for optimisation, and the detection accuracy was further improved. [PERSON] et al. [20] combined the spatial distance lattice of the geometric transformation matrix and designed a multi-scale filtering and geometric (MSFG)enhancement method to improve the detection accuracy of CNNs for passive terahertz images. This method was combined with the improved YOLOv5 to verify its detection accuracy with passive terahertz images. Although the above methods have been effective in terahertz image detection, there are many types of hidden objects, the size of the items to be detected in the terahertz image varies greatly, and the texture features are limited, so finding out how to use the limited features in low-resolution terahertz images to detect contrabands quickly and accurately is still a difficult task in terahertz image detection. Aiming at the above problems, we carry out the following work: (1) We take multi-category concealed objects hidden in packages in a contraband detection scene as the research object, and we acquire the terahertz image data of concealed objects. (2) In order to verify the impact of image processing methods on the target detection results, the acquired original terahertz image is pre-processed using three methods: non-local mean filtering, wavelet transform, and histogram equalisation on the original terahertz images. Further, the detection results of the target detection algorithm YOLOv7 on the processed image are recorded. (3) In order to meet the requirements of accuracy and the real-time detection of dangerous goods, the new version of the YOLO series algorithm, YOLOv7 is used as the base network, which is a single-stage detection algorithm with advantages of both high speed and accuracy over its predecessor. At present, YOLOv7 (as the base model) has contributed less improvements for the characteristics of terahertz images, and it still needs to be specially designed to apply to the detection of hidden objects in terahertz images. Firstly, to meet the real-time demand of the dangerous goods' detection scene, based on the MobileNext network [21], the SPD_Mobile network is designed to replace the original backbone of the YOLOv7 network. In addition, the insufficient feature extraction ability of the MobileNext network for smaller targets, space-to-depth convolution (SPD_Conv) module [22] is introduced to reduce the omission of small object brought by the original convolution module with a stride of 2, and to reduce the computational and parametric quantities of the model without sacrificing too much on the premise of accuracy.