# PVTReID: A Quick Person Reidentification-Based Pyramid Vision Transformer
## 1 Introduction  
In recent years, more and more attention is being paid to the public safety; in this context, it is very important to improve person retrieval ability. Person re-identification (ReID) is a technology for searching for specific people from images captured by different cameras. It can complement face recognition technology and meet the needs of current intelligent monitoring. In addition to being used for tracking the whereabouts of criminal suspects on monitoring networks, ReID can be used for tracking in smart devices. Due to the influence of visual factors such as lighting, posture, occlusion, and resolution [1] and non-visual factors such as camera angle [2] and perspective, ReID faces many challenges in practical applications. Extracting robust and discriminative person features is an important research part of ReID, which has long been dominated by CNN-based ReID [3; 4; 5; 6]. In practical application, the effects of objective causes such as background interference, person blockage, and posture misalignment make it difficult for global feature to meet the requirements of person retrieval. The common practice of CNN-based ReID is to combine local feature extraction to obtain fine-grained features to make up for the shortcomings of global features. With the development of vision attention, the application of attention to ReID [7; 8; 9] has become popular. With the vast success of ViT [10] in the field of computer vision, a number of scholars have started to explore the application of ViT to the ReID task [11] by extracting global features through a Transformer. In reviewing CNN-based methods and ViT-based ReID, we discovered three significant matters which are not well solved in ReID. First, the inference speed is slow. MostCNN-based ReID methods combine local features to enhance its fine-grained ability to identify people; however, these additional structures greatly increase model complexity and consumption of computational resources [1]. Due to the large amount of computing resources required by Transformer, ViT-based ReID has slow feature extraction speed. Second, as ViT is designed for image classification tasks, the network needs to use a class token for classification to reduce preferences for specific image patches. Because it learns the information of image patches, it is overly reliant on global information, resulting in reduced usage of local features and decreased fine-grained identification ability [12]. Third, ViT uses position encoding to process spatial information. Position encoding corresponds to the input image size and resolution. Thus, position embedding requires retraining when dealing with images of different resolutions. In order to solve the above problems, we present an ReID method using a Pyramid Vision Transformer (PVT)-based method. PVT [13] has achieved high accuracy on image classification tasks as well as on other downstream tasks. PVT uses a pyramidal feature structure [14] and zero padding [15] to solve the above-mentioned problems. First, unlike ViT, PVT uses a pyramid structure, which greatly reduces resource consumption and boosts the efficiency of feature extraction. Second, instead of using additional tokens as output vectors for feature extraction, PVT aggregates all local features trained by the Transformer to obtain a global feature representation. Through this operation, PVT increases the dependence of output features on local features while reducing model complexity and computational consumption and improving model training and inference efficiency. Third, PVT does not use absolute position encoding to represent the position information of image patches. Instead, it introduces zero-padding position encoding to learn position information and uses depth-wise convolution [16] to model position information. In summary, PVT has great advantages; however, it needs to be modified in order to adapt to the unique challenges present in ReID, such as occlusion, pose changes, and camera changes.