X-safe: an X-ray security detection method based on incremental Kernel aggregation, hierarchical co-optimization and task-aligned labeling
摘要
X-ray security inspection images often suffer from low texture, small object scale, and severe occlusion, which lead to missed detections of prohibited items such as metal knives. Existing detectors, including YOLO-based methods, still have difficulty transferring the strong performance achieved on natural-light images to complex X-ray screening scenarios. This paper introduces a one-stage framework, X-Safe, to achieve systematic improvement through a three-level collaborative optimization strategy. First, a Large-Kernel Efficient Layer Aggregation Network with Attention (LKNA) is designed for backbone feature extraction. By progressively enlarging the convolutional kernels and integrating coordinate attention with global attention mechanisms, LKNA expands the effective receptive field and strengthens global shape representation. Second, a Lightweight Integrated Feature Fusion from Backbone into Neck (IFFBN) mechanism is proposed. Through multi-level feature alignment, adaptive gating fusion, and cross-scale feature injection, IFFBN compensates for small-target details that are weakened during multi-scale feature transmission. Third, a Task Alignment for Simplified Optimal Transport Assignment (TATA) strategy is incorporated. It combines optimal-transport-based dynamic matching with task-aligned classification-regression supervision, improving positive-sample assignment while maintaining linear complexity O(NM). X-Safe achieves 93.1% mAP50 on OPIXray, improving the YOLOv7(SimOTA) baseline by 9.4%. On CLCXray, X-Safe attains 85.1% mAP50, outperforming YOLOv7(SimOTA), YOLOv9-m, and YOLOv11-m by 1.5, 0.4, and 0.5%, respectively. Under a unified ablation protocol on OPIXray, removing LKNA, IFFBN, or TATA from the complete model reduces mAP50 by 2.7, 0.8, and 1.3%, respectively; in addition, within the complete framework, the progressive