Abstract:
Objective Rising public security demands drive comprehensive safety protection systems for transportation hubs, mass assembly venues and critical infrastructure. X-ray imaging dominates security inspection devices for its intuitive visual output and convenient deployment. Simultaneous screening of massive baggage images imposes stringent requirements on inspectors’ reading speed and identification accuracy. Traditional manual visual inspection of contraband suffers high labor costs and limited throughput, visual fatigue of human operators further leads to frequent missed detections and false judgments, which brings potential hidden risks to public safety. AI-based automatic contraband recognition enables intelligent, automated security inspection upgrades, delivering prominent practical and economic engineering value for large-scale, continuous real-world security screening. Convolutional neural networks (CNNs) break prior technical limits of hand-crafted feature algorithms and become mainstream visual detection frameworks via automatic image feature extraction. Equipped with multi-scale feature fusion and lightweight inference, CNNs serve as baseline architectures for X-ray baggage object detection, with numerous detection models deployed on commercial X-ray security scanners. Nevertheless, X-ray baggage images are inherently disturbed by projection superposition, object occlusion and complex background clutter, which pose great challenges for practical detection tasks. Existing methods exhibit critical defects under complex real-scene imaging interference, categorized into three core issues. First, prevailing detection models contain redundant structures and high computational overhead, failing to meet real-time inference constraints on resource-limited edge inspection devices. Second, dense overlapping objects inside luggage severely obscure contraband outlines and degrade the network’s boundary discrimination capability for occluded targets. Third, contraband objects span wide size ranges from tiny sharp tools to large prohibited articles, and flawed multi-scale fusion modules weaken detection performance across all object scales, especially for small heavily-occluded contraband instances.
Methods A modified YOLO detection model named adaptive multi-scale X-ray algorithm (AMX-YOLO) is proposed to address drawbacks of existing detection models in X-ray contraband inspection, including object occlusion, cluttered projection superposition and large-scale variation of prohibited items. Three core innovations are listed as follows. 1) A multi-scale edge aware module (MSEAM) is proposed. Parallel multi-scale feature extraction branches are constructed to strengthen target edge feature extraction. Raw local detail features are fused simultaneously. The module enhances model perception and extraction of target edge information and mitigates blurred edges and missing features under complex scenes, thus alleviating false-positive and missed detections for overlapping contraband. 2) An enhanced nearest neighbor interpolation (ENNI) module and a lightweight enhanced convolution (LEConv) module are embedded into the model neck. ENNI optimizes upsampling via weight normalization constraints to achieve precise alignment of multi-scale features. LEConv adopts dual-branch structures to extract distinct texture features. It improves feature extraction quality while maintaining lightweight model properties without introducing excessive computational burden for edge-end deployment. 3) An unified SepConv detection head (USDH) module is designed. Lightweight convolution weights are shared across all scale layers to drastically reduce model parameters and computational costs. Independent batch normalization (BN) layers are assigned to each scale layer to preserve multi-scale adaptive feature representation for targets of different sizes. The module balances model lightweight level and detection accuracy.
Results and Discussions Comparative experiments of the proposed AMX-YOLO were conducted on a balanced X-ray security inspection dataset. Its generalization ability was further evaluated on the OPIXray and CLCXray datasets, and its cross-dataset effectiveness was validated on an infrared gas leakage dataset. The model achieves 93.87% mAP@50 on the Balanced X-ray Security Dataset. The value exceeds YOLOv11s by 1.88%. Its computational cost drops by 25%, and parameter quantity decreases by 11.97%. The model balances detection accuracy and model size. Moreover, AMX-YOLO obtains the best results on the OPIXray, CLCXray, and infrared gas leakage datasets, exhibiting excellent cross-scenario capability.
Conclusions AMX-YOLO is proposed to address complex backgrounds, mutual object occlusion and drastic scale variation in contraband detection from X-ray security images. MSEAM is designed first to enhance the extraction of object edge contours degraded by X-ray projection superposition via multi-scale pooling, edge enhancement and dual-domain selection mechanism, which suppress pseudo-edge interference induced by stacked overlapping objects. Hierarchical feature extraction and local convolutions extract and integrate multi-level image details completely. ENNI and LEConv modules are embedded into the model neck for feature fusion to mitigate feature misalignment and insufficient context capturing during multi-scale feature aggregation. ENNI applies weighted nearest-neighbor interpolation for efficient upsampling and restricts feature amplitudes via fixed weight constraints so as to stabilize feature distribution and balance high-level semantic information and low-level spatial details. LEConv adopts grouped convolutions to capture multi-receptive-field features with maintained lightweight computational cost. The two modules jointly boost feature representation and fusion capacity. USDH is finally designed as a new prediction head tailored for X-ray contraband detection. Shared convolution weights cut model parameters and computation overhead, combining lightweight architecture with high detection accuracy while adopting branch-independent batch normalization to preserve multi-scale adaptive characterization ability. Experimental results confirm AMX-YOLO outperforms YOLOv11s baseline and delivers strong generalization performance.