Two-Stage Prompt Learning: A Unified Framework for Person ReID without Clothing Hypothesis
Authors: Yuxuan Xiao, Shanshan Zhang, Shengcai Liao, Jian Yang
Organizations: PCA Lab, School of Computer Science and Engineering, Nanjing University of Science and Technology, Nanjing 210094, China · College of Computing and Artificial Intelligence, United Arab Emirates University, Al Ain, UAE
Person re-identification (ReID) in real-world scenarios involves three clothes conditions: the same clothes (SC), changed clothes (CC), and the unknown (GEN) scenario where clothes changes are not specified. Existing methods typically train separate SC- or CC-specific models, which limits generalization across all conditions. Meanwhile, pre-trained visual-language models (VLMs) such as CLIP have shown strong generalization ability in various vision tasks, motivating recent ReID methods to incorporate textual prompts. However, to distinguish SC and CC, prior approaches rely on fixed predefined instructions, which lack learnable context embeddings in prompts and cannot effectively handle the GEN scenario. To overcome these limitations, we propose Two-Stage Prompt Learning (TSPL), a unified framework that integrates clothes-identity decoupling and scenario-aware task prompts within VLMs. In Stage 1, appearance-decomposed prompt learning disentangles clothes and identity information under frozen encoders, producing stable embeddings where clothes cues can be selectively preserved or suppressed. In Stage 2, task-aware prompt learning trains the image encoder with learnable context embeddings guided by Stage-1 representations, enabling robust adaptation across SC, CC, and GEN conditions. Extensive experiments on five benchmarks show that TSPL achieves state-of-the-art performance under all scenarios, improving mAP by up to 9.2% on LTCC (SC) and by 6.4% on VC-Clothes (GEN), respectively. The code will be released at https://github.com/YuSuen/TSPL.
Figures & tables
Fig. 1: Comparison between the traditional inference pipeline based on specific clothing hypothesis and our unified inference framework without clothing hypothesis. In traditional methods, SC and CC are treated as separate modes, requiring prior knowledge of clothes conditions; incorrect mode selection leads to degraded performance, and the GEN scenario introduces ambiguity in choosing between SC and CC models. In contrast, our method (bottom) adopts a unified pipeline, where image pairs under different clothes conditions (SC, CC, or GEN) are directly processed with a task prompt and fed into the proposed TSPL, eliminating the need for explicit mode selection and enabling robust inference across all scenarios.
Method
ID Prompt
Clothes Prompt
Task Prompt
Clothes Scenarios
CLIP-ReID [ 7 ]
Learnable (ID only)
✗ No
✗ No
SC only
Instruct-ReID [ 21 ]
✗ No
✗ No
Fixed instruction words (non-learnable)
SC + CC only
TSPL (Ours)
Learnable (ID + Clothes)
Decoupled, Learnable
✓ Learnable task prompts
SC + CC + GEN
TABLE I: Comparison between CLIP-ReID [ 7 ] , Instruct-ReID [ 21 ] , and our proposed TSPL method. TSPL integrates appearance–identity decoupling and learnable, scenario-aware task prompts, enabling robust performance across all clothing conditions.
Fig. 2: Overview of our proposed method, which consists of two stages: appearance-decomposed prompt learning and task-aware prompt learning. Stage 1: we design an appearance-decomposed prompt to separately encode clothes-relevant and identity-relevant information into distinct pseudo-word embeddings. Stage 2: we choose to either suppress or preserve clothes-relevant information based on the learned appearance-decomposed prompts according to the specific scenario, and then use the text prompts to guide customized image feature extraction. Furthermore, we introduce a task-aware prompt learning with a self-adaptive pseudo-word embedding to unify diverse feature extraction strategies within a unified framework. Note that GEN prompt is only used for inference. During inference, only the task encoder and image encoder are used to produce scenario-specific features for retrieval.
Methods
Size
PRCC
LTCC
CC
SC
GEN
CC
SC
GEN
R@1
mAP
R@1
mAP
R@1
mAP
R@1
mAP
R@1
mAP
R@1
mAP
FSAM [ 27 ]
256 × 128
54.5
-
98.8
-
-
-
38.5
16.2
-
-
73.2
35.4
AIM [ 12 ]
256 × 128
54.7
55.0
100
99.9
-
-
38.3
17.0
-
-
76.1
39.1
Instruct-ReID(STL) [ 21 ]
256 × 128
48.1
46.0
-
-
-
-
-
-
-
-
66.7
46.7
RCSANet [ 48 ]
336 × 336
50.2
48.6
100
97.2
-
-
-
-
-
-
-
-
TABLE II: Comparison on PRCC and LTCC. “*” indicates the results are reproduced using the released source codes. DIFFER † reports the performance of the same architecture as ours.
Methods
VC-Clothes
CC
SC
GEN
R@1
mAP
R@1
mAP
R@1
mAP
MDLA [ 52 ]
59.2
60.8
94.3
93.9
88.9
76.8
PCB [ 53 ]
62.0
62.2
94.7
94.3
87.7
74.6
Part-Aligned [ 54 ]
69.4
67.3
93.9
93.4
90.5
79.7
FSAM [ 27 ]
67.3
81.2
94.7
94.8
-
-
TABLE III: Comparison on VC-Clothes
Methods
LaST
DeepChange
GEN
GEN
Rank-1
mAP
Rank-1
mAP
BOT [ 4 ]
68.3
25.3
47.5
13.0
mAPLoss [ 46 ]
69.9
27.6
-
-
CAL [ 9 ]
73.7
28.2
54.0
19.0
MCSC [ 45 ]
75.4
31.0
56.9
21.5
TABLE IV: Comparison on LaST and DeepChange.
Fig. 3: Comparison of qualitative results on PRCC. Red boxes indicate mis-identifications. Compared to other methods, our TSPL performs better under both SC and CC scenarios by a unified model.
ADP
TAP
PRCC
LTCC
CC
SC
CC
SC
R@1
mAP
R@1
mAP
R@1
mAP
R@1
mAP
56.4
55.0
99.9
99.5
37.2
19.2
84.4
69.5
✓
61.1
57.2
99.5
99.5
38.8
18.1
86.3
73.0
✓
✓
67.0
60.0
100
99.5
52.0
26.3
88.2
74.2
TABLE V: Impact of dual prompts in our method TSPL.
[state]
PRCC
LTCC
CC
SC
CC
SC
R@1
mAP
R@1
mAP
R@1
mAP
R@1
mAP
changed
67.0
60.0
100
99.3
52.0
26.3
86.1
69.1
unchanged
61.4
55.6
100
99.5
48.5
24.5
88.2
74.2
TABLE VI: Sensitivity of task-aware prompt. The values with green background represent the performance of the model given correct task-aware prompt at test time.
ADP Design
PRCC
LTCC
R@1
mAP
R@1
mAP
None
57.6
46.8
40.1
18.6
Masking
64.9
57.9
48.0
24.6
Averaging
67.0
60.0
52.0
26.3
TABLE VII: Appearance-decomposed prompt design for the CC scenario. None means no operation is performed.
Fig. 4: Response maps under different clothes conditions. For the same input, our model produces distinct response maps guided by the task-aware prompt.
Fig. 5: Embedding distribution of clothes and identity learnable context vector. Please zoom in for better view.
Task Prompt
PRCC
CC
SC
GEN
R@1
mAP
R@1
mAP
R@1
mAP
Instruct-ReID’s
59.9
59.1
100
99.3
-
-
Ours
67.0
60.0
100
99.5
99.8
82.3
Task Prompt
LTCC
CC
SC
GEN
TABLE VIII: Different task prompts design. Our method covers arbitrary clothes scenarios and achieves better performance.
Sampling Rule
PRCC
LTCC
R@1
mAP
R@1
mAP
P-K [ 4 ]
56.7
56.1
39.5
22.4
M =1
63.4
57.0
45.9
23.0
M =2 (Ours)
67.0
60.0
52.0
26.3
TABLE IX: With different sampling rules for CC, introducing clothes variations allows the CC task prompt to better modulate features toward the CC, leading to improved performance.
u , v
PRCC
LTCC
CC
SC
CC
SC
R@1
mAP
R@1
mAP
R@1
mAP
R@1
mAP
1
65.8
50.8
99.9
98.2
46.4
23.2
87.8
68.3
4(Ours)
67.0
60.0
100
99.5
52.0
26.3
88.2
74.2
8
64.3
50.8
99.9
97.7
49.0
23.1
86.8
68.1
TABLE X: Analysis of the number of learnable context vectors u and v for appearance-decomposed prompt.
w
PRCC
LTCC
CC
SC
CC
SC
R@1
mAP
R@1
mAP
R@1
mAP
R@1
mAP
0
65.5
58.7
100
99.4
48.2
24.1
88.2
74.1
1
64.9
48.8
99.9
97.7
46.4
22.1
85.6
66.2
4(Ours)
67.0
60.0
100
99.5
52.0
26.3
88.2
74.2
8
63.7
45.9
99.8
96.7
46.9
22.7
87.1
67.3
TABLE XI: Analysis of the number of learnable context vectors w for task-aware prompt.
-
Market1501
MSMT17
Rank-1
mAP
Rank-1
mAP
FSAM [ 27 ]
94.6
85.6
-
-
CAL [ 9 ]
94.7
87.5
79.7
57.3
Instruct-ReID [ 21 ]
96.2
92.3
86.2
71.9
CLIP-ReID [ 7 ]
95.4
90.5
89.7
75.8
Ours
95.3
89.3
88.7
74.6
TABLE XII: Comparison on Market1501 and MSMT17.
Fig. 6: Failure cases under CC: (Case 1) similar body shapes; (Case 2) severe occlusion.