Abstract
Automatic detection of firearms is critical for security but remains challenging due to variations in shape and appearance. Generic object detectors typically use axis-aligned bounding boxes (AABB), which are inefficient for thin, elongated objects like rifles, as they include significant background noise. This paper proposes a weakly supervised Orientation Aware Object Detection (OAOD) algorithm. OAOD learns to detect oriented bounding boxes (OBB) while being trained only on AABB and a single orientation line. By employing a multi-stage scheme and orientation-invariant feature extraction, the proposed method achieves state-of-the-art performance on the new ITU Firearm (ITUF) dataset.
The Challenge: Axis-Aligned vs. Oriented Boxes
Standard object detection frameworks (e.g., YOLO, Faster R-CNN) rely on axis-aligned bounding boxes (AABB). For objects like rifles, an upright rectangle often captures only a small portion of the weapon while including a large amount of irrelevant background, such as the person holding it or the surrounding environment. This low signal-to-noise ratio hinders the network's ability to extract clean object signatures.
While Oriented Bounding Boxes (OBB) provide a much tighter fit, they are significantly more expensive to annotate. The authors address this by proposing a "weakly supervised" approach where the model is trained on AABBs and a simple orientation vector (muzzle to butt), yet it learns to predict full OBBs.
The OAOD Framework
The proposed OAOD algorithm operates in two main stages to bridge the gap between AABB training and OBB detection:
- Stage 1 (Coarse Localization): The network predicts standard AABBs and classifies the object's orientation into discrete bins, followed by a regression step to refine the angle.
- Oriented Proposal Generation (OPG): Using the predicted orientation, the system generates Oriented Region Proposals (ORP), which are rotated boxes that better encapsulate the firearm.
- Object Aligned RoI Pooling (OARoI-Pooling): This module extracts features along the rotated grid of the ORP, making the resulting features orientation-invariant. This allows the classifier to see a "standardized" view of the weapon regardless of its pose.
- Stage 2 (Refinement): The final stage uses these clean features to perform classification (Gun vs. Rifle) and further refine the oriented box coordinates.
The ITU Firearm Dataset (ITUF)
To evaluate the model, the authors introduced the ITUF dataset, a comprehensive benchmark for firearm localization:
- 10,973 images with 13,647 instances.
- Diverse environments, poses, and lighting conditions.
- Classes: 'Gun' (handguns) and 'Rifle' (long guns).
- Annotations: AABBs and orientation lines for training; OBBs for testing.
Key Results
The OAOD algorithm significantly outperforms both standard axis-aligned detectors and fully supervised oriented detectors:
- AABB Accuracy: OAOD achieved a mean Average Precision (mAP) of 88.3, compared to 79.8 for Faster R-CNN.
- OBB Accuracy: On the oriented task, OAOD reached 77.5 mAP, surpassing the fully supervised RoI-Trans model (68.5 mAP).
- Localization Precision: The model showed high stability at strict Intersection over Union (IoU) thresholds, indicating very accurate localization.
Conclusion
OAOD demonstrates that incorporating orientation information into the detection pipeline can significantly improve performance for elongated objects like firearms. By leveraging a weakly supervised approach, the framework provides the precision of oriented detection without the prohibitive cost of full OBB annotation, making it a scalable solution for real-world security applications.
Summary updated