Cross-domain unsupervised Re-ID algorithm based on neighbor adversarial and consistency loss

目的 无监督行人重识别可缓解有监督方法中数据集标注成本高的问题，其中无监督跨域自适应是最常见的行人重识别方案。现有UDA（unsupervised domain adaptive）行人重识别方法在聚类过程中容易引入伪标签噪声，存在对相似人群区分能力差等问题。方法 针对上述问题，基于特征具有类内收敛性、类内连续性与类间外散性的特点，提出了一种基于近邻优化的跨域无监督行人重识别方法，首先采用有监督方法得到源域预训练模型，然后在目标域进行无监督训练。为增强模型对高相似度行人的辨识能力，设计了邻域对抗损失函数，任意样本与其他样本构成样本对，使类别确定性最强的一组样本对与不确定性最强的一组样本对之间进行对抗。为使类内样本特征朝着同一方向收敛，设计了特征连续性损失函数，将特征距离曲线进行中心归一化处理，在维持特征曲线固有差异的同时，拉近样本k邻近特征距离。结果 消融实验结果表明损失函数各部分的有效性，对比实验结果表明，提出方法性能较已有方法更具优势，在Market-1501（1501 identities dataset from market）和DukeMTMC-reID（multi-targetmulti-camera person re-identification dataset from Duke University）数据集上的Rank-1和平均精度均值（mean averageprecision，mAP）指标分别达到了92.8%、84.1%和83.9%、71.1%。结论 提出方法设计了邻域对抗损失与邻域连续性损失函数，增强了模型对相似人群的辨识能力，从而有效提升了行人重识别的性能。;Objective The purpose of pedestrian re-identification is to determine whether the people appearing in different camera scenes belong to the same person. This process can be regarded as a sub-problem of image retrieval and is widely used in intelligent video surveillance，criminal investigation，safety production，and other fields. Most of the pedestrian re-identification algorithms are designed with the supervised method based on known labels. These data are high expensive and are sometimes impossible to obtain. Most of the existing unsupervised pedestrian re-identification methods are based on loss functions，such as triplet loss，but have poor ability to distinguish similar identities. Compared with supervised pedestrian recognition，unsupervised pedestrian recognition technology has greater application prospects. Although the image of pedestrians is partly affected by the shooting angle，light，camera parameters，pedestrian clothing，and other factors，pedestrian features also have strong regularity，such as intra-class feature convergence，inter-class feature divergence，and intra class feature consistency. Different scenes face different data distributions，and a large domain difference can be observed in real applications. The aforementioned problems lead to performance degeneration when transfer learning the model. Due to the great differences between the source and target domain data in image acquisition conditions and application scenarios，applying the source domain training model directly to the target domain will result in poor performance. Unsupervised domain adaptive（UDA）person re-identification aims to adapt the model trained on a labeled source domain to an unlabeled target domain. For pseudo-label-based UDA methods，pseudo label noise is the main problem for model degradation，while the cross-camera problem is one of the main factors that cause this noise. Method Aiming at the poor discriminative ability of similar pedestrians caused by pseudo-label noise ，a cross-domain unsupervised pedestrian re-identification method based on neighbor optimization is proposed in this paper. To address the incorrect selection of the hardest positive and negative samples in triplet loss caused by the cross-camera problem，a camera-pseudo-label-based triplet loss is designed. Triplet-based loss does not fully explore the sample similarities within the target domain，which highly depends on the pseudo labels. To enhance the identification ability of high-similarity pedestrians，a neighborhood adversarial loss（NAL）function is designed. By constructing the sample pair between any sample and other samples，the confrontation between sample pairs of the strongest certainty and uncertainty is implemented. To make the intra-class features converge in the same direction，a neighborhood consistency loss（NCL）function is designed. The feature distance curve is processed by center normalization，and the feature distances of the k-nearest samples are narrowed while maintaining the inherent difference of the feature curve. Unlike the migration mechanism of ordinary semi-supervised learning methods， the proposed algorithm focuses on the structure and loss function of the unsupervised learning model in the target domain. First，the input target domain samples are classified based on the pre-training model，and the pseudo labels are assigned to the clustering results. Second，triple hard loss is used to control the introversion of intra-class features and the divergence of inter-class features. To enhance the ability to distinguish similar identities，this paper designs an adversarial loss function in which the group with the closer feature distance in the class antagonize with the group having a longer feature distance. Furthermore，to ensure consistency in the convergence direction of class features，the feature consistency loss function is designed to measure the continuity of various sample features in the batch group. Finally，the above three loss functions are weighted and added to form the final loss function. Result Experimental results on the Market-1501 and DukeMTMC-reID datasets show that the proposed method has certain advantages over state-of-the-art methods. Ablation experiments reveal the effectiveness of each part of the algorithm loss function. Analysis of the ablation experimental results shows that the three loss functions have certain complementarities in clustering. When considering the intra-class and interclass divergence of features，further considering the consistency of feature convergence direction can comprehensively improve the performance of the pedestrian re-recognition algorithm. Comparative experiments show that the performance of the algorithm is significantly improved compared with existing methods，while the parameter experiments highlight the influence of different super-parameter values on recognition performance. In the comparative experiments，the proposed method obviously outperforms the existing methods. Rank-1/mean average precision（mAP）achieves 92. 8%/84. 1% and 83. 9%/ 71. 1% on the Market-1501 and DukeMTMC-reID datasets，respectively. Experimental results further show that similar people are prone to be given a pseudo noise label when clustering and that the proposed method can control the label noise by using the NAL loss function. Complementary with NCL，the NAL loss function controls the consistency of features of the k-nearest samples. Under the action of the NAL and NCL loss functions，the noise is effectively controlled，and the unsupervised learning effect is improved on the target domain. Conclusion The proposed method can improve the adaptability of the network model via unsupervised training in the target domain. Through the neighbor adversarial loss and neighbor consistency loss functions，this method can easily distinguish similar people，thus effectively improving the performance and robustness of pedestrian re-identification. Ablation and comparative experiments are carried out on public datasets，and results show that the performance of this algorithm is significantly improved compared with existing methods.