Deep Template Matching for Pedestrian Attribute Recognition with the Auxiliary Supervision of Attribute-wise Keypoints

Jiajun Zhang, Pengyuan Ren, Jianmin LiarXiv 2020

Abstract

Pedestrian Attribute Recognition (PAR) has aroused extensive attention due to its important role in video surveillance scenarios. In most cases, the existence of a particular attribute is strongly related to a partial region. Recent works design complicated modules, e.g., attention mechanism and proposal of body parts to localize the attribute corresponding region. These works further prove that localization of attribute specific regions precisely will help in improving performance. However, these part-information-based methods are still not accurate as well as increasing model complexity which makes it hard to deploy on realistic applications. In this paper, we propose a Deep Template Matching based method to capture body parts features with less computation. Further, we also proposed an auxiliary supervision method that use human pose keypoints to guide the learning toward discriminative local cues. Extensive experiments show that the proposed method outperforms and has lower computational complexity, compared with the state-of-the-art approaches on large-scale pedestrian attribute datasets, including PETA, PA-100K, RAP, and RAPv2 zs.

Introduction

Pedestrian Attribute Recognition (PAR) involves identifying traits like age, gender, clothing, and accessories from surveillance footage. This is a multi-label classification problem that is notoriously difficult due to low image resolution, occlusions, and lighting changes.

Most pedestrian attributes are inherently local: a "backpack" is located on the back, and "casual shoes" are found on the feet. While recent state-of-the-art models utilize complex attention modules or part-proposal sub-networks to localize these regions, such additions increase model size and latency, making them unsuitable for real-time surveillance. This research aims to achieve high-precision localization of these attributes using a lightweight method that maintains high inference speeds.

Methodology

The proposed framework introduces two primary components designed to improve attribute localization without increasing inference-time complexity.

Deep Template Matching (DTM)

Instead of relying on heavy attention mechanisms, the model employs $1 \times 1$ convolution kernels as "templates." These templates scan the feature map to produce heatmaps representing the confidence of an attribute's presence at specific spatial locations. This approach allows the network to focus on relevant body parts with minimal computational overhead.

Attribute-wise Keypoints (AWK) Supervision

AWK serves as an auxiliary supervision branch used exclusively during the training phase. An off-the-shelf pose estimator identifies 17 human joints (keypoints), which are then manually mapped to specific attributes (e.g., "Glasses" maps to nose/eyes/ears; "Trousers" maps to hips/knees/feet).

The proposed architecture featuring the DTM module and the auxiliary AWK supervision branch.

During training, the model is penalized if its DTM heatmaps do not align with these keypoints. Crucially, this auxiliary branch is discarded during inference, allowing the model to benefit from "knowing where to look" without any extra computational cost during deployment.

Mixed Pooling Strategy

The architecture utilizes a dual pooling approach to handle different attribute types: Global Average Pooling (GAP) is used for global attributes like age and gender, while Global Max Pooling (GMP) is applied to local attributes such as hats or shoes. This ensures the model captures the most discriminative signals for each category.

Experiments and Results

Datasets

The model was evaluated on four major benchmarks: PETA (19,000 images), PA-100K (100,000 images), RAP & RAPv2 (richly annotated with 72 attributes), and RAPv2zs (Zero-Shot), which tests generalization by ensuring no overlap of pedestrian identities between training and test sets.

Performance and Efficiency

The DTM+AWK method achieved state-of-the-art (SOTA) results across all benchmarks while remaining highly efficient. On the RAP dataset, it achieved a mean Accuracy (mA) of 82.04%, surpassing complex models like LG-Net and ALM. On the challenging RAPv2zs zero-shot dataset, the model outperformed existing methods by a significant margin (73.60% mA vs. 71.97% for the next best), demonstrating superior generalization to unseen individuals.

Qualitative comparison of attribute localization: (a) Original image, (b) Baseline, (c) DTM, and (d) DTM+AWK.

Qualitative results (Figure 1) demonstrate that the combination of DTM and AWK significantly improves the precision of attribute localization compared to baseline methods. Notably, the DTM module adds zero parameters to the backbone and only a negligible increase in GFLOPs.

Conclusion

This paper demonstrates that precise local feature extraction does not necessarily require complex architectural additions like Transformers or GCNs. Instead, better supervision during training—via Attribute-wise Keypoints—can guide simpler layers to achieve superior results. While the current manual mapping of keypoints to attributes is a limitation, the efficiency and accuracy of DTM+AWK make it a robust candidate for real-world surveillance applications. Future work may explore automated attribute-to-keypoint mapping or other forms of auxiliary supervision like pixel-wise segmentation.

Summary updated

BibTeX
@misc{zhang2020deep,
  author = {Jiajun Zhang and Pengyuan Ren and Jianmin Li},
  title = {{Deep Template Matching for Pedestrian Attribute Recognition with the Auxiliary Supervision of Attribute-wise Keypoints}},
  year = {2020},
  eprint = {2011.06798},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2011.06798},
}
Figure