arXiv:2610.33639cs.CVOct 2026

Manuscript Offprint

arXiv:2610.33639

UniQuery: Unifying Vision Models with a Joint Query Head for Cross-Domain Pedestrian Attribute Recognition

Nguyen Dang Duy Tan, Linh T. T. Tran, Huynh Nguyen Phat, Vo Thanh Nguyen

Abstract

Pedestrian Attribute Recognition (PAR) predicts semantic attributes of individuals, such as gender, age, clothing and accessories, and its descriptions support attribute-based person retrieval and person re-identification. However, accurately recognizing fine-grained attributes across domains remains challenging due to occlusion, appearance variations, and shifts in image distributions. Ensembles of independently trained foundation encoders combine their logits with fixed fusion weights, so every attribute uses the same mix and the encoders are never trained together. We propose UniQuery, which instead jointly fine-tunes DINOv3 [28] and CLIP [23] for attribute-specific fusion. It combines two query heads, one for each encoder, with a joint query head whose attribute queries attend to tokens from both encoders, and the prediction is the average of the logits of the three query heads. We evaluate UniQuery on the benchmark of the UPAR Challenge 2027 at the WACV 2027 Real-World Surveillance workshop, where models are trained on PA100k [21], PETA [8] and Market-1501 [40] with a shared set of attributes. In leave-one-dataset-out experiments, UniQuery outperforms the independent ensemble in Challenge_Avg on both held-out datasets. Ablations show that learning fusion over independently trained encoders does not improve upon logit averaging in the mean over the two held-out datasets, while freezing the encoders lowers the Challenge_Avg of UniQuery. On the hidden test set of the benchmark, UniQuery achieves a Challenge_Avg of 0.8001.

1. Introduction

Pedestrian analysis plays an important role in intelligent video surveillance and online retail applications. A key task, Pedestrian Attribute Recognition (PAR), predicts semantic attributes of individuals from images, providing interpretable descriptions that support attribute-based person retrieval and person re-identification. Despite recent progress, robust recognition remains challenging due to occlusion, low image resolution, label imbalance, and variations in appearance and imaging conditions [18, 29, 41]. Recognition becomes harder still on a camera that was never seen in training, because resolution, viewpoint and lighting change, and each training dataset labels attributes by its own rules [29].

Foundation encoders pretrained on large and varied image collections [23, 28] are a natural starting point for this shift. They are usually adapted to downstream tasks by fine-tuning one encoder with a small head, or by averaging the predictions of several independently trained models [16]. Earlier UPAR entries include a Swin-B encoder with a three-branch head that uses graph convolution and Transformer modules [6], and an EfficientNetV2-L with one threshold tuned for each attribute on validation data [7]. C 2^{2}T-Net instead trains two encoders together and merges them into one vector shared by all attributes [2]. An average of independently fine-tuned encoders uses the same mix for every attribute, and its encoders are never trained together.

In this paper, we propose UniQuery (Fig. 1), which jointly fine-tunes DINOv3 and CLIP and gives each encoder its own query head. Alongside these two query heads, a joint query head combines features from both encoders through one query per attribute, so that each attribute can draw different information from the two encoders. At inference, we average the logits of the three query heads. To evaluate rigorously how effective the method is, we build an evaluation protocol on the UPAR Challenge 2027 benchmark, in which every design choice is tested on a dataset held out from training. The main contributions of this paper are below.

• We propose UniQuery, which fine-tunes DINOv3 and CLIP together and lets one query per attribute decide how

Figure

Figure 1. UniQuery on one PETA image. Striped parts with a lock are frozen, light tints mark trained parts, gray boxes are operations without parameters, and token cells are colored by the PCA of the patch tokens. In the text-score branch, P is the pretrained CLIP projection, e the projected and normalized CLS token, wkw_k the vector of the sentence for attribute k minus that of a person, and δk\delta_k and bkb_k are learned. In training, each query head has its own loss with the shift s (Eq. (1)). At inference, the logits of the three query heads are averaged and compared with a threshold of 0.5. The final model, trained on the training and validation splits, saw this image in training.

to mix the two encoders. It outperforms an ensemble of independently fine-tuned encoders trained with the same loss on both held-out datasets, and it is also above the ensemble on the hidden test set, by a small margin. The gain needs the joint query head, because when it is removed at inference, the average of the other two query heads does not beat the ensemble in the two-fold mean (Tabs. 1 and 5).

• We show that, in our experiments, the mix needs to be learned together with fine-tuning the encoders. Fusion heads trained on top of independently fine-tuned encoders do not beat a plain logit average in the mean over the two held-out datasets, and with frozen encoders UniQuery falls below a single fine-tuned DINOv3 (Tabs. 3 and 4).

• We analyze how the joint query head mixes the encoders. Each of its attention heads reads almost only the tokens of one encoder, and the number of attention heads given to DINOv3 or CLIP changes with the attribute. For most attributes, the joint query head is more accurate than the average of the two single-encoder query heads, and for attributes other than colors it often matches or beats the better one (Figs. 4 and 5).

References (39)