TL;DR
Training deep learning models to spot weapons in X-ray baggage scans is severely bottlenecked by the rarity of real-world threat images. This paper evaluates a "Threat Image Projection" (TIP) pipeline that synthetically blends isolated weapons into benign baggage scans, finding that while synthetic training provides a highly viable, annotation-free alternative (achieving 0.78 mAP vs. 0.88 mAP on real data), significant domain shift challenges remain.
What Problem Does This Paper Address?
Automated prohibited item detection using Convolutional Neural Networks (CNNs) holds massive promise for airport and border security. However, training these models requires a vast amount of labeled data. In the real world, actual instances of passengers carrying firearms or knives are thankfully rare, making it incredibly difficult to collect a large, diverse dataset of real threats.
While standard data augmentation techniques like flipping or scaling help, they don't introduce new object variations or complex occlusions. To bypass this data bottleneck, researchers have turned to synthetic data generation. This paper explicitly investigates the performance gap when a CNN is trained on real-world X-ray imagery versus synthetically composited imagery.
Methods
The authors implement a Threat Image Projection (TIP) pipeline to generate realistic, synthetic X-ray images. The pipeline consists of three main stages:
- Threat Signature Transformation: Isolated images of prohibited items (cleared of their backgrounds via simple thresholding) are randomly rotated to introduce pose variety.
- Insertion Position Determination: To ensure the weapon is placed realistically inside a bag, the algorithm applies a sequence of morphological operations—binarization, dilation, hole filling, and erosion—to identify the largest connected foreground region of a benign baggage scan.
- Image Compositing: The transformed weapon is blended into the bag using an alpha-blending technique ($\alpha = 0.9$). Crucially, they calculate a dynamic contrast threshold ($T$) based on the average intensity of the bag region to prevent the inserted weapon from looking unnaturally bright or floating artificially on top of other items.
The generated datasets are evaluated using two prominent object detection frameworks: Faster R-CNN and RetinaNet, using both ResNet50 and ResNet101 backbones.
Datasets
The study utilizes three primary dataset configurations based on the Durham Dataset Full Three-class (Dbf3), focusing on three metallic item classes: Firearms, Firearm Parts, and Knives.
Dbf3Real: Contains 7,603 real X-ray images generated from a dual-energy X-ray scanner (3,192 firearms, 1,204 firearm parts, and 3,207 knives).Dbf3SC(Synthetically Composited): Generated by taking 3,366 benign baggage images and projecting 123 unique, isolated prohibited items into them using the TIP pipeline.Dbf3Real+SC: A hybrid dataset combining equal parts real and synthetic imagery to test if mixing data distributions improves generalization.
Key Insights and Ideas
- The Asset Diversity Bottleneck: The synthetic dataset achieved respectable performance but suffered from a 10% mAP drop compared to real data. The authors traced this "domain shift" not to the blending quality, but to a lack of asset diversity—the synthetic pipeline only had 123 unique weapon profiles to pull from, leading the network to overfit to those specific shapes.
- Counter-Intuitive Mixing Results: Intuitively, adding synthetic data to real data should act as a regularizer. Surprisingly, training on
Dbf3Real+SCactually decreased performance (0.81 mAP) compared to training on pure real data (0.88 mAP). Without explicit domain adaptation techniques, mixing the distinct data distributions confused the model. - Asymmetric Generalization: Models trained on real data generalized remarkably well when tested on synthetic data (~0.91 mAP). However, models trained on synthetic data struggled when transitioning to real data, particularly on highly variable items like knives.
Key Results
All models were evaluated on a test set of real X-ray security imagery:
- The Benchmark (Real $\rightarrow$ Real): The Faster R-CNN with a ResNet101 backbone trained on real imagery achieved the highest overall performance with a 0.88 mAP.
- The Synthetic Alternative (Synthetic $\rightarrow$ Real): The same architecture trained purely on synthetic images (
Dbf3SC) achieved 0.78 mAP. Given that this data requires zero manual annotation of complex scenes, it represents a highly promising baseline. - Class-Level Performance: Firearm detection was highly robust across both training methods (0.91 AP for real vs. 0.86 AP for synthetic). However, Knives saw a massive performance drop (0.85 AP down to 0.66 AP) because real-world knives vary wildly in shape, style, and material compared to the limited synthetic examples.
Limitations and Future Work
The primary limitation of this approach is the domain shift caused by the limited variety of the source threat items. If a specific style of knife or firearm part wasn't in the 123 isolated source images, the synthetically trained model struggled to recognize it in a real bag.
To overcome this, the authors point to two future directions:
- GAN-Powered Asset Generation: Using Generative Adversarial Networks (GANs) to generate a massive, diverse library of isolated threat items before passing them to the TIP pipeline.
- Explicit Domain Adaptation: Implementing unsupervised domain adaptation algorithms during training to help the network mathematically bridge the gap between synthetic textures and real-world X-ray physics.
Summary updated