Journal of Frontiers of Computer Science and Technology ›› 2023, Vol. 17 ›› Issue (7): 1634-1643.DOI: 10.3778/j.issn.1673-9418.2111102

• Graphics·Image • Previous Articles     Next Articles

Channel Pruning Method for Anchor-Free Detector

RAN Mengying, YANG Wenzhu, YIN Qunjie   

  1. 1. School of Cyber Security and Computer, Hebei University, Baoding, Hebei 071002, China
    2. Hebei Machine Vision Engineering Research Center, Baoding, Hebei 071002, China
  • Online:2023-07-01 Published:2023-07-01

无锚框目标检测模型通道剪枝方法

冉梦影,杨文柱,尹群杰   

  1. 1. 河北大学 网络空间安全与计算机学院,河北 保定 071002
    2. 河北省机器视觉工程研究中心,河北 保定 071002

Abstract: Aiming at the problems of large redundant parameters, high computational cost and slow detection speed of the anchor-free detector, a channel pruning method guided by double attention modules (CPDAM) is proposed to compress the anchor-free object detectors. The performance of the channel attention and spatial attention submodules is further improved using pooling and group normalization. The improved channel attention and spatial attention submodules are fused using a channel grouping strategy and are continuously trained to generate a scale value for each channel indicating the importance of the channel on the classification task. A global scale value is calculated using the scale values and the channel pruning of the backbone network is performed based on the evaluation of channel importance by this value. The improved anchor-free object detector is experimentally validated on PASCAL VOC, ImageNet and CIFAR-100 datasets, and the experimental results show that the number of parameters of CenterNet-ResNet101 before and after pruning is decreased from 6.995×107 to 2.238×107, and the FPS is increased from 27 to 46, with only 0.6 percentage points mAP loss.

Key words: anchor-free, object detector, attention module, channel pruning

摘要: 针对无锚框目标检测模型主干网络参数冗杂度大、计算开销高以及检测速度慢等问题,提出双维度注意力引导的通道剪枝算法(CPDAM),以便对无锚框目标检测模型进行压缩。利用池化层和组归一化操作提升通道注意和空间注意子模块性能;采用通道分组策略融合改进后的通道注意和空间注意子模块,并经过不断训练,为每个通道生成一个尺度值用于表示该通道在分类任务上的重要程度;利用尺度值计算一个全局尺度值,并根据该值评估通道重要性对主干网络进行通道剪枝;在PASCAL VOC、ImageNet、CIFAR-100等常用数据集上对剪枝前后的无锚框目标检测模型进行实验验证,结果表明,在mAP仅损失0.6个百分点的前提下,剪枝前后的CenterNet-ResNet101参数量从6.995×107减少至2.238×107,FPS从27提升至46。

关键词: 无锚框, 目标检测, 注意力机制, 通道剪枝