Pedestrian attribute recognition (PAR) has received increasing attention because of its wide application in video surveillance and pedestrian analysis. Extracting robust feature representation is one of the key challenges in this task. The existing methods mainly use the convolutional neural network (CNN) as the backbone network to extract features. However, these methods mainly focus on small discriminative regions while ignoring the global perspective. To overcome these limitations, we propose a pure transformer-based multi-task PAR network named PARFormer, which includes four modules. In the feature extraction module, we build a transformer-based strong baseline for feature extraction, which achieves competitive results on several PAR benchmarks compared with the existing CNN-based baseline methods. In the feature processing module, we propose an effective data augmentation strategy named batch random mask (BRM) block to reinforce the attentive feature learning of random patches. Furthermore, we propose a multi-attribute center loss (MACL) to enhance the inter-attribute discriminability in the feature representations. In the viewpoint perception module, we explore the impact of viewpoints on pedestrian attributes, and propose a multi-view contrastive loss (MCVL) that enables the network to exploit the viewpoint information. In the attribute recognition module, we alleviate the negative-positive imbalance problem to generate the attribute predictions. The above modules interact and jointly learn a highly discriminative feature space, and supervise the generation of the final features. Extensive experimental results show that the proposed PARFormer network performs well compared to the state-of-the-art methods on several public datasets, including PETA, RAP, and PA100K. Code will be released at https://github.com/xwf199/PARFormer.
翻译:行人属性识别(PAR)因其在视频监控和行人分析中的广泛应用而备受关注。提取鲁棒的特征表示是该任务的核心挑战之一。现有方法主要采用卷积神经网络(CNN)作为骨干网络提取特征,但往往聚焦于局部判别区域,忽略了全局视角。为克服这些局限,我们提出一种纯Transformer架构的多任务PAR网络——PARFormer,该网络包含四个模块。在特征提取模块中,我们构建了基于Transformer的强基线特征提取器,与现有基于CNN的基线方法相比,在多个PAR基准上取得了具有竞争力的结果。在特征处理模块中,我们提出一种有效的数据增强策略——批量随机掩码(BRM)模块,以强化随机补丁的注意力特征学习。此外,我们提出多属性中心损失(MACL)函数,增强特征表示中属性间的可判别性。在视角感知模块中,我们探究视角对行人属性的影响,并提出多视角对比损失(MCVL)函数,使网络能够利用视角信息。在属性识别模块中,我们缓解了负样本不平衡问题以生成属性预测。上述模块相互协同,共同学习高度判别性的特征空间,并监督最终特征的生成。大量实验结果表明,在PETA、RAP和PA100K等多个公开数据集上,所提出的PARFormer网络相比现有最先进方法表现优异。代码将发布于https://github.com/xwf199/PARFormer。