RW-DETR: a multi-domain fusion transformer for real-time weapon detection in public security
摘要
Real-time and accurate detection of dangerous weapons is crucial for preventing violent crimes and maintaining social stability. Although significant progress has been made in deep learning-based weapon detection, these methods still face considerable challenges in multi-source complex scenarios. Traditional models often suffer from inefficient feature utilization, poor decoupling of weapon subclasses, and inadequate feature fusion under domain shifts. Such domain shift problems lead to significant performance decline in complex environments. To address these limitations, this paper proposes the Ubiquitous Arms Incidents (UAI) dataset and RW-DETR, a weapon detection framework based on a multi-domain fusion transformer. By leveraging multi-source scenario styles, UAI enhances data diversity and effectively mitigates the data domain shift. RW-DETR employs an Efficient Dynamic Gated Backbone (EDG-Backbone), combined with conditional positional encoding and a dynamic focus mechanism, to enhance feature capture in key domains. To enhance fine-grained feature discrimination in weapon subclasses, we propose the Aurora PrismFormer Layer (APFL), which leverages lightweight linear mapping and bipolar filtering to precisely differentiate subtle inter-class variations. Furthermore, we propose a progressive contextual reshaping fusion mechanism that utilizes flexible multi-scale feature interactions to significantly enhance adaptability to targets of varying scales. Experimental results demonstrate that RW-DETR achieves 84.6% AP