Detection of Prohibited Items Based upon X-ray Images and Improved YOLOv7

Safety inspection nowadays is an effective means to safeguard public security, which mainly relies on professional security personnel to carry out inspections. In order to detect automatically contraband in X-ray images, a new prohibited item detection method on the strength of the modified YOLOv7 algorithm is present. The spatial attention constructed by large kernel attention was introduced into the lower layer of the YOLOv7 backbone network to extract the remote dependence information and texture information of the lower layer feature map. The proposed method was tested on public X-ray data set for a safety inspection, and the result showed that the improved means can advance the detection accuracy of the model.