Abstract
The escalating threat of weapon-related violence necessitates automated detection systems capable of pixel-level precision for accurate threat assessment in real-time security applications. Traditional weapon detection approaches rely on object detection frameworks that provide only coarse bounding box localizations, lacking the fine-grained segmentation required for comprehensive threat analysis. Furthermore, existing semantic segmentation models either sacrifice accuracy for computational efficiency or require excessive computational resources incompatible with edge deployment scenarios. This paper presents ArmFormer, a lightweight transformer-based semantic segmentation framework that strategically integrates Convolutional Block Attention Module (CBAM) with MixVisionTransformer architecture to achieve superior accuracy while maintaining computational efficiency suitable for resource-constrained edge devices. Our approach combines CBAM-enhanced encoder backbone with attention-integrated hamburger decoder to enable multi-class weapon segmentation across five categories: handgun, rifle, knife, revolver, and human. Comprehensive experiments demonstrate that ArmFormer achieves state-of-the-art performance with 80.64% mIoU and 89.13% mFscore while maintaining real-time inference at 82.26 FPS. With only 4.886G FLOPs and 3.66M parameters, ArmFormer outperforms heavyweight models requiring up to 48x more computation, establishing it as the optimal solution for deployment on portable security cameras, surveillance drones, and embedded AI accelerators in distributed security infrastructure.
Abstract (translated)
武器暴力威胁的不断升级要求具备像素级精度的自动化检测系统,以实现实时安全应用中的准确威胁评估。传统武器检测方法依赖于仅提供粗略边界框定位的对象检测框架,缺乏全面威胁分析所需的精细分割能力。此外,现有的语义分割模型要么为了计算效率牺牲准确性,要么需要过多的计算资源,不适合边缘部署场景。本文介绍了ArmFormer,这是一种基于轻量级变压器架构的语义分割框架,通过战略性地将卷积块注意力模块(CBAM)与MixVisionTransformer架构结合使用,在保持计算效率的同时实现卓越的准确度。我们的方法结合了增强编码器骨干网和集成注意力的汉堡解码器,以实现五类武器(手枪、步枪、刀具、左轮手枪和人类)的多类别分割。全面的实验表明,ArmFormer在80.64%的mIoU和89.13%的mFscore下取得了最先进的性能,并且能够在实时推理中维持每秒82.26帧的速度。仅需4.886G FLOPs和3.66M参数的情况下,ArmFormer优于需要多达48倍计算量的大模型,成为便携式安全摄像头、监控无人机以及分布式安全保障基础设施中的嵌入式AI加速器部署的理想解决方案。
URL
https://arxiv.org/abs/2510.16854