# PMG--Pyramidal Multi-Granular Matching for Text-Based Person Re-Identification
## 4 Experiment Details
### Experiment Setup
#### 4.1.3 Implementation Details  
In our experiments, the representation dimension of the feature space \(P\) is set to 1024 following [7], in which an ablation experiment has been conducted on CUHK-PEDES for the best setting of \(P\). As to the dimension of embedded word vectors \(c\), we maintain the existing setting of WAM [13] to ensure consistency by keeping \(c\) at 768. The Natural Language ToolKit (NLTK) is employed to extract the noun phrases from each query sentence by syntactic analysis, word segmentation, and part-of-speech tagging. The number of phrases \(n\) is kept flexible with an upper bound of 26 based on the length of query sentences. A pretrained BERT language model [28] with initialized fixed parameters is also used to handle the textual input. For fair comparisons with previous works, we choose the pretrained ResNet-50 as our visual CNN backbone, whose parameters are initialized with weights pretrained on the ImageNet classification task. All input images are resized to \(384\times 128\times 3\) resolution, and random horizontal flipping is applied for data augmentation before feeding into the backbone [12,13], and we extract the feature maps before the average pooling layer of ResNet-50, whose size is \(24\times 8\times 2048\). An Adaptive Moment Estimation (ADAM) optimizer is also utilized to optimize the learning strategy of PMG, with a training batch size of 64, which is a moderate batch size adapted to the processing capability of our hardware platform and widely employed by many research works. In training Stage-I, the learning rate is set to \(1\times 10^{-3}\) for an iteration of 10 epochs with all parameters in the visual backbone fixed. And then in Stage-II, the learning rate is first initialized to \(2\times 10^{-4}\) and PMG is further trained for 50 epochs. The  
Figure 4: Examples of Top-5 text-based person Re-ID results by PMG. Given a query sentence, all images in the dataset are sorted based on their similarities to the query, and then the five images with the highest similarities are picked out as candidates. Images of the corresponding person contained in the candidates are marked by green rectangles. Figure 6: Graphical comparison with SOTA on RSTPReid. The data in the graph is consistent with those presented in Table 6. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Method** & **Top-1** & **Top-5** & **Top-10** \\ \hline ING-Net [29] & 37.60 & 61.15 & 73.55 \\ AMEN [36] & 38.45 & 62.40 & 73.80 \\ DSSL [27] & 39.05 & 62.60 & 73.95 \\ CAIBC [9] & 47.35 & 69.55 & 79.00 \\ \hline
**PMG (ours)** & **46.60** & **70.85** & **79.55** \\
**PMG + BERT (ours)** & **48.85** & **72.65** & **81.30** \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Comparison with SOTA on RSTPReid. As shown in Table 5 and Figure 5, the PMG model outperforms other methods by considerable margins in terms of Top-1, Top-5, and Top-10 metrics. For instance, compared with SSAN, which is the SOTA method using both global and local features, PMG+BERT(ours) gains 3.22%, 3.04%, and 2.39% performance improvement in terms of Top-1, Top-5, and Top-10 metrics, respectively. This is a significant performance gain in text-based person Re-ID which has reached a technological bottleneck in terms of performance improvement in the past few years and indicates the effectiveness of our proposed method on the CUHK-PEDES dataset. Instead of utilizing methods that optimize the cross-modal matching from various aspects, such as network architecture, local representation extraction, loss function, and aiding discriminative information, PMG employs a simple coarse-to-fine pyramidal matching method to extract local visual and textual features with different granularities, thus to suppress feature variances and lead to more robust representation and better cross-modal matching accuracy.