Balanced X-ray Security Dataset and Enhanced YOLO for Contraband Detection.
Songlin Zhang, Dingju Zhu, KaiLeung Yung, Andrew W H Ip
Abstract
Open AccessTo address critical challenges in X-ray contraband detection-including severe class imbalance in existing datasets, scarcity of high-quality annotated data, and poor model adaptability to complex scenarios-this study first constructs a balanced X-ray contraband detection dataset. Derived from the SIXray and PIDray datasets, the balanced dataset comprises 13,728 images covering 12 different contraband categories. To resolve class imbalance, a Class-Specific Augmentation Framework (CSAF) with four physical transformations and random undersampling are adopted, ensuring approximately 1,500 samples per category for uniform class distribution. Two improved models (ASEA-Net and CSEC-Net) based on YOLOv11s are proposed for lightweight and high-precision contraband detection tasks. Experiments on the balanced dataset show that ASEA-Net achieves 95.78% accuracy and 93.55% mAP@50, outperforming YOLOv11s by 1.46% and 1.37% respectively with 13.37% fewer parameters; CSEC-Net reduces parameters by 39.91% and FLOPs by 40.38% compared to YOLOv11s, enabling deployment on resource-constrained edge devices. Both models exhibit strong performance in complex scenarios, validating the value of the balanced dataset and the effectiveness of the proposed models for X-ray contraband detection.