Abstract
In X-ray security image inspection, traditional convolutional neural networks (CNNs) often require extensive datasets to achieve high performance. Capsule Networks (CapsNets) offer a promising alternative, as they are less constrained by sample size and can encode spatial information such as position, size, and rotation. This paper introduces DR-CapsNet, an improved architecture that integrates DenseNet as a feature extraction backbone and ResNet connections to mitigate overfitting. Additionally, the Convolutional Block Attention Module (CBAM) is incorporated to enhance learning and generalization. Experimental results on the GDXray dataset demonstrate that DR-CapsNet achieves 99% accuracy on small-scale data, outperforming the original CapsNet by 2%.
Introduction
Security screening at airports and transit hubs is a high-stakes environment where human fatigue and the sheer volume of luggage can lead to errors. While automated recognition technology exists, it faces two major hurdles: data scarcity and the inability to model complex spatial relationships. Traditional CNNs like ResNet or Inception require thousands of labeled images and are often "blind" to the relative positions and orientations of object parts. If a threat is disassembled or rotated, standard CNNs may fail to recognize it because they rely on scalar values rather than understanding an object's geometry.
Methodology: The DR-CapsNet Architecture
The proposed DR-CapsNet architecture builds upon the core principles of Capsule Networks. Unlike standard neurons, capsules use vectors to represent features, storing not just the presence of a feature but also its properties like position, size, and rotation angle.
To make the network more robust for X-ray imagery, three key upgrades were implemented:
- DenseNet Backbone: A simplified DenseNet is used to extract features efficiently by connecting every layer to every other layer, encouraging feature reuse.
- ResNet Connections: Residual connections are added to connect the input and output of the DenseNet blocks. This prevents overfitting and ensures stability as the network depth increases.
- CBAM (Convolutional Block Attention Module): This mechanism allows the network to focus on important spatial regions and feature channels, helping it ignore the complex, noisy backgrounds typical of X-ray scans.
Experimental Setup and Datasets
The study utilized a specialized subset of the GDXray dataset, a benchmark for non-destructive testing. The researchers created a small-scale dataset consisting of 1,000 training samples and 200 test samples, covering four threat categories: darts, blades, pistols, and daggers. Images were preprocessed into grayscale, resized to 28x28 pixels, and converted to a binary format for training.
Key Results and Discussion
DR-CapsNet was compared against several industry-standard architectures. The results on the small GDXray dataset were decisive:
- Accuracy: DR-CapsNet reached 99.00%, outperforming the original CapsNet (97.00%) and significantly beating traditional CNNs like InceptionV3 (94.50%) and ResNet18 (91.00%).
- Efficiency: Despite its architectural complexity, DR-CapsNet trained in just 70.27 seconds. While slightly slower than the original CapsNet, it was 3 to 6 times faster than traditional CNN models.
- Stability: Loss curves indicated that DR-CapsNet converged more smoothly and reached a lower final error rate than its competitors, proving the effectiveness of the hybrid DR structure.
Conclusion
DR-CapsNet demonstrates that combining the spatial awareness of Capsule Networks with the feature extraction power of DenseNet and ResNet creates a highly effective tool for security applications. By achieving 99% accuracy on a limited dataset, it provides a viable path for automated threat detection where data is scarce. Future research will explore self-attention mechanisms to further improve performance in extremely cluttered luggage environments.
Summary updated