CN107145827A - Cross-camera person re-identification method based on adaptive distance metric learning - Google Patents
Cross-camera person re-identification method based on adaptive distance metric learning Download PDFInfo
- Publication number
- CN107145827A CN107145827A CN201710213901.2A CN201710213901A CN107145827A CN 107145827 A CN107145827 A CN 107145827A CN 201710213901 A CN201710213901 A CN 201710213901A CN 107145827 A CN107145827 A CN 107145827A
- Authority
- CN
- China
- Prior art keywords
- mrow
- msub
- distance metric
- training
- candidate
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 230000003044 adaptive effect Effects 0.000 title claims abstract description 22
- 238000000034 method Methods 0.000 title claims abstract description 20
- 238000012549 training Methods 0.000 claims abstract description 73
- 230000006870 function Effects 0.000 claims abstract description 52
- 239000011159 matrix material Substances 0.000 claims abstract description 38
- 239000013598 vector Substances 0.000 claims abstract description 21
- 238000012360 testing method Methods 0.000 claims abstract description 7
- 238000005457 optimization Methods 0.000 claims description 9
- 230000008569 process Effects 0.000 claims description 6
- 230000002776 aggregation Effects 0.000 claims description 3
- 238000004220 aggregation Methods 0.000 claims description 3
- 238000000354 decomposition reaction Methods 0.000 claims description 3
- 238000005259 measurement Methods 0.000 claims description 3
- 230000001133 acceleration Effects 0.000 claims 1
- 238000011160 research Methods 0.000 description 2
- 230000006399 behavior Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000002372 labelling Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/103—Static body considered as a whole, e.g. static pedestrian or occupant recognition
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2413—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
- G06F18/24133—Distances to prototypes
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Bioinformatics & Computational Biology (AREA)
- General Engineering & Computer Science (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Human Computer Interaction (AREA)
- Multimedia (AREA)
- Image Analysis (AREA)
Abstract
Description
技术领域technical field
本发明涉及一种视频图像处理技术领域的方法,具体为一种基于自适应距离度量学习的跨摄像机行人再识别方法。The invention relates to a method in the technical field of video image processing, in particular to a cross-camera pedestrian re-identification method based on adaptive distance metric learning.
背景技术Background technique
在镜头互不重叠的摄像机监控网络中对指定目标行人进行匹配识别具有广泛的应用前景,这一技术被称为跨摄像机行人再识别,它是智能监控系统中跨摄像机目标跟踪及行为分析的基础和前提条件。由于具有巨大的商业价值,因此跨摄像机行人再识别在近年来受到了广泛的关注和研究。跨摄像机行人再识别研究中的重点和难点在于摄像机之间的光照、视角差异以及行人本身的姿态变化和遮挡情况变化。除此之外,低分辨率监控视频使得人脸等信息在大多数情况下不再适用。It has broad application prospects to match and recognize designated target pedestrians in a camera surveillance network with non-overlapping lenses. This technology is called cross-camera pedestrian re-identification, which is the basis of cross-camera target tracking and behavior analysis in intelligent surveillance systems. and prerequisites. Due to its huge commercial value, cross-camera person re-identification has received extensive attention and research in recent years. The key and difficult points in cross-camera person re-identification research are the differences in lighting and viewing angles between cameras, as well as changes in the pose and occlusion of pedestrians themselves. In addition, low-resolution surveillance video makes information such as faces no longer applicable in most cases.
为了克服上述问题,很多研究者希望能设计出对跨摄像机视觉变化鲁棒性高的特征。然而,由于现实场景中摄像机间的差异存在很强的不确定性,行人的姿态也存在诸多变数,找出一个对所有这些变化鲁棒性强但又能有效分辨不同行人的特征实属困难。因此,距离度量学习被引入到跨摄像机行人再识别问题中来。具体来说,距离度量学习将已经标注的行人样本对(正样本对表示两张图片属于同一行人,负样本对表示两张图片属于不同行人)作为训练集合,通过对训练集合上样本对之间的距离进行优化,学习得到一个距离度量矩阵,可以将所有样本投影到一个新的特征空间,在这个特征空间里,正样本对之间的相互距离较小,而负样本对之间的相互距离较大。例如郑伟诗等人于2012年在《IEEETransactions on Pattern Analysis and Machine Intelligence》(国际电气与电子工程师协会模式分析与机器智能学报)发表的论文“Reidentification by relative distancecomparison”(基于相对距离比较的跨摄像机行人匹配)利用训练样本学习得到最优的概率相对距离度量标准,并用此标准来对数据库中的其它图片进行距离度量。通过把特征映射到公共空间,距离度量学习可以在一定程度上解决不同摄像机之间的差异性问题。然而,现有距离度量学习算法通常在训练过程中平等地对待所有样本,没有考虑不同样本之间的差异性。由于不同的样本在原始特征空间上具有不同的可区分性,因此对于距离度量学习的重要程度实质上是不同的。In order to overcome the above problems, many researchers hope to design features that are robust to cross-camera visual changes. However, due to the strong uncertainty in the differences between cameras in real-world scenes and the many variables in the poses of pedestrians, it is difficult to find a feature that is robust to all these changes and can effectively distinguish different pedestrians. Therefore, distance metric learning is introduced to the cross-camera person re-identification problem. Specifically, the distance metric learning uses labeled pedestrian sample pairs (positive sample pairs indicate that two pictures belong to the same pedestrian, and negative sample pairs indicate that two pictures belong to different pedestrians) as the training set. Optimize the distance, and learn a distance metric matrix, which can project all samples to a new feature space. In this feature space, the mutual distance between positive sample pairs is small, and the mutual distance between negative sample pairs is larger. For example, the paper "Reidentification by relative distance comparison" (cross-camera pedestrian matching based on relative distance comparison) published by Zheng Weishi et al. ) use the training samples to learn the optimal probability relative distance measure, and use this standard to measure the distance of other pictures in the database. By mapping features to a common space, distance metric learning can address the discrepancy between different cameras to a certain extent. However, existing distance metric learning algorithms usually treat all samples equally during training, without considering the differences between different samples. Since different samples have different discriminability on the original feature space, the importance for distance metric learning is substantially different.
发明内容Contents of the invention
针对上述现有技术的不足,本发明提供一种基于自适应距离度量学习的跨摄像机行人再识别方法,能够根据训练样本原始特征空间上的分布情况对样本进行自适应分类和加权,使得不同的样本能在距离度量学习的过程中起到不同的作用,从而训练得到判别性更强的距离度量函数。Aiming at the deficiencies of the above-mentioned prior art, the present invention provides a cross-camera pedestrian re-identification method based on adaptive distance metric learning, which can adaptively classify and weight the samples according to the distribution of the original feature space of the training samples, so that different The samples can play different roles in the process of distance metric learning, so as to train a more discriminative distance metric function.
为实现上述目的,本发明首先利用训练集中来自不同摄像机的行人图片构成样本对,为距离度量学习提供约束;然后根据训练样本在原始特征空间中的可区分性为不同的样本对自适应性地分配训练权重;接着采用加速近端梯度算法对距离度量学习的目标函数进行求解,得到马氏距离度量矩阵;最后将学习得到的距离度量矩阵代入马氏距离度量函数,并计算测试阶段行人图片特征向量之间的马氏距离,得到相似性排序结果。In order to achieve the above purpose, the present invention first uses pedestrian images from different cameras in the training set to form sample pairs to provide constraints for distance metric learning; then according to the distinguishability of training samples in the original feature space, different sample pairs are adaptively Assign training weights; then use the accelerated proximal gradient algorithm to solve the objective function of distance metric learning to obtain the Mahalanobis distance metric matrix; finally, substitute the learned distance metric matrix into the Mahalanobis distance metric function, and calculate the pedestrian image features in the test phase Mahalanobis distance between vectors to get similarity ranking results.
本发明方法通过以下具体步骤实现:The inventive method is realized through the following specific steps:
基于自适应距离度量学习的跨摄像机行人再识别方法,包括以下步骤:A cross-camera pedestrian re-identification method based on adaptive distance metric learning, including the following steps:
步骤1:输入距离度量学习的训练数据,将不同摄像机下的行人图片分别表示为查询集和候选集其中是第i张查询图片和第j张候选图片的特征向量,而和为对应行人的身份标签,n为训练阶段查询集的图片总数,m为训练阶段候选集的图片总数;Step 1: Input the training data for distance metric learning, and represent the pedestrian pictures under different cameras as query sets and the candidate set in is the feature vector of the i-th query image and the j-th candidate image, and with is the identity label of the corresponding pedestrian, n is the total number of pictures in the query set in the training phase, and m is the total number of pictures in the candidate set in the training phase;
步骤2:选取查询集中的查询图片xi和候选集中的候选图片yj构成样本对(xi,yj),为样本对分配二分类标签zij,其中当时zij=1,(xi,yj)被称为正样本对,而当时zij=-1,(xi,yj)被称为负样本对;定义任意样本对(xi,yj)之间的马氏距离度量函数为:Step 2: Select the query image x i in the query set and the candidate image y j in the candidate set to form a sample pair ( xi , y j ), and assign a binary label z ij to the sample pair, where when When z ij = 1, ( xi , y j ) is called a positive sample pair, and when When z ij = -1, ( xi , y j ) is called a negative sample pair; define the Mahalanobis distance measurement function between any sample pair ( xi , y j ) as:
其中M为马氏距离中的距离度量矩阵;Where M is the distance metric matrix in the Mahalanobis distance;
步骤3:利用Logistic损失函数为训练集中的每一样本对(xi,yj)建立距离度量学习的损失函数:Step 3: Use the Logistic loss function to establish a loss function for distance metric learning for each sample pair ( xi ,y j ) in the training set:
其中ξ为训练集中所有样本对特征向量之间的欧式距离均值,当(xi,yj)为正样本对时,损失函数约束马氏距离dM(xi,yj)小于而当(xi,yj)为负样本对时,损失函数约束马氏距离dM(xi,yj)大于 Where ξ is the mean Euclidean distance between all sample pairs in the training set. When ( xi ,y j ) is a positive sample pair, the loss function constrains the Mahalanobis distance d M ( xi ,y j ) to be less than And when ( xi ,y j ) is a negative sample pair, the loss function constrains the Mahalanobis distance d M ( xi ,y j ) to be greater than
步骤4:同时考虑训练集中所有样本对之间的损失函数约束,定义自适应距离度量学习的总体目标函数为:Step 4: Considering the loss function constraints between all sample pairs in the training set at the same time, define the overall objective function of adaptive distance metric learning as:
步骤5:根据训练样本的差异性,为不同样本对的损失函数ψ(xi,yj)分配不同的训练权重wij,使自适应距离度量学习的目标函数变为:Step 5: According to the difference of training samples, assign different training weights w ij to the loss function ψ( xi ,y j ) of different sample pairs, so that the objective function of adaptive distance metric learning becomes:
步骤6:根据目标函数,将自适应距离度量学习定义为如下优化问题:Step 6: According to the objective function, the adaptive distance metric learning is defined as the following optimization problem:
步骤7:使用加速近端梯度算法求解步骤6中的优化问题,得到对应的距离度量矩阵M;Step 7: Use the accelerated proximal gradient algorithm to solve the optimization problem in step 6, and obtain the corresponding distance metric matrix M;
步骤8:在测试阶段,对于给定的查询模板图片的特征向量xp和其它摄像机下可疑行人目标构成的候选图片的特征向量组N为测试阶段候选集的图片总数,将距离度量矩阵M代入步骤2中的马氏距离度量函数,分别计算xp与每张候选图片的特征向量之间的马氏距离并按照马氏距离大小对候选图片进行排序,使与xp马氏距离较小的候选图片排在队列的前端。Step 8: In the test phase, for a given query template picture feature vector x p and other camera suspicious pedestrian target constituted by the feature vector group of candidate pictures N is the total number of pictures in the candidate set in the test phase, and the distance metric matrix M is substituted into the Mahalanobis distance metric function in step 2 to calculate x p and the feature vector of each candidate picture Mahalanobis distance between And sort the candidate pictures according to the Mahalanobis distance, so that the candidate pictures with smaller Mahalanobis distances to x p are at the front of the queue.
进一步的:步骤5中所述的根据训练样本的差异性,为不同样本对的损失函数ψ(xi,yj)分配不同的训练权重wij,具体实现过程为:Further: according to the difference of training samples described in step 5, assign different training weights w ij to the loss function ψ( xi , y j ) of different sample pairs, the specific implementation process is:
步骤5.1:对于训练集中的查询图片的特征向量xi,计算候选集中所有候选图片特征向量与xi在欧式空间的特征距离,然后按照距离从小到大的顺序对中的图片进行排序;Step 5.1: For the feature vector x i of the query image in the training set, calculate the candidate set The characteristic distances between all candidate picture feature vectors and x i in the Euclidean space, and then in order of distance from small to large Sort the pictures in;
步骤5.2:根据步骤5.1中的排序结果,将候选集划分成对于xi的困难集合中等集合以及简单集合 Step 5.2: According to the ranking results in step 5.1, the candidate set Divide into the hard set for x i medium set and simple collections
困难集合的定义为:difficult set is defined as:
公式中,ri(yj)表示候选图片yj在步骤5.1得到的排序队列中的位置,而则表示xi在候选集中的正确匹配y+在排序队列中的位置;In the formula, r i (y j ) represents the position of the candidate picture y j in the sorting queue obtained in step 5.1, and It means that xi is in the candidate set The correct match in y + position in the sorted queue;
中等集合的定义为:medium set is defined as:
其中m为候选集中行人图片数量的总数,也即步骤5.1中排序队列的总长度;where m is the candidate set The total number of pictures of pedestrians in the middle, that is, the total length of the sorting queue in step 5.1;
简单集合的定义为:simple set is defined as:
步骤5.3:根据步骤5.2中候选集的划分结果,为样本对(xi,yj)的损失函数自适应分配训练权重wij;当(xi,yj)为正样本对时,将ψ(xi,yj)的训练权重wij设为1/N+,其中N+为训练集中正样本对的总数;而当(xi,yj)为负样本对时,通过下式定义其损失函数ψ(xi,yj)的训练权重wij:Step 5.3: According to the candidate set in step 5.2 The division result of the sample pair ( xi ,y j ) adaptively assigns the training weight w ij to the loss function of the sample pair (xi ,y j ); when ( xi ,y j ) is a positive sample pair, the training weight of ψ( xi ,y j ) The weight w ij is set to 1/N + , where N + is the total number of positive sample pairs in the training set; and when ( xi , y j ) is a negative sample pair, the loss function ψ( xi , y j ) is defined by the following formula j ) training weight w ij :
其中,N-表示训练集中权重不为零的负样本对总数,β1和β2为调节训练权重变化范围的平衡参数。Among them, N - indicates the total number of negative sample pairs whose weight is not zero in the training set, and β 1 and β 2 are balance parameters to adjust the range of training weight variation.
进一步的:步骤7中所述的使用加速近端梯度算法求解步骤6中的优化问题,得到对应的距离度量矩阵M,其具体包括以下步骤:Further: use the accelerated proximal gradient algorithm described in step 7 to solve the optimization problem in step 6, and obtain the corresponding distance metric matrix M, which specifically includes the following steps:
步骤7.1:初始化M0和M-1为单位矩阵,并对其进行迭代更新;Step 7.1: Initialize M 0 and M -1 as the identity matrix, and update it iteratively;
步骤7.2:具体地,对于第t次迭代,首先计算聚合前向矩阵St:Step 7.2: Specifically, for the tth iteration, first calculate the aggregation forward matrix S t :
其中系数在第一次迭代时被设为0;where coefficient is set to 0 on the first iteration;
步骤7.3:定义矩阵其中是距离度量学习的总体目标函数Ψ(M)在St处的梯度,ηt为迭代步长;Step 7.3: Define the matrix in is the gradient of the overall objective function Ψ(M) of distance metric learning at S t , and η t is the iteration step size;
步骤7.4:对矩阵Pt进行特征值分解,将其表示为然后对第t次迭代的距离度量矩阵M进行更新,得到迭代结果Mt:Step 7.4: Perform an eigenvalue decomposition on the matrix P t and express it as Then update the distance metric matrix M of the t-th iteration to obtain the iteration result M t :
其中用于确保距离度量矩阵Mt是半正定的;in Used to ensure that the distance metric matrix M t is positive semi-definite;
步骤7.5:重复步骤7.2至7.4,直至达到收敛条件:Step 7.5: Repeat steps 7.2 to 7.4 until the convergence condition is reached:
步骤7.6:返回收敛时的Mt作为自适应距离度量学习的训练结果M。Step 7.6: Return M t at convergence as the training result M of adaptive distance metric learning.
与现有技术相比,本发明的有益效果如下:Compared with the prior art, the beneficial effects of the present invention are as follows:
1)本发明根据训练样本在原始特征空间上的可区分性对样本对进行自适应性的分类和加权,相比于现有距离度量学习技术在训练过程中平等地对待所有训练样本,本发明能够更好地利用训练样本之间的差异性;1) The present invention performs adaptive classification and weighting on the sample pairs according to the distinguishability of the training samples in the original feature space. Compared with the existing distance metric learning technology that treats all training samples equally during the training process, the present invention Can make better use of the differences between training samples;
2)本发明通过将部分样本对的训练权重设置为零,舍去了训练集中部分原始特征空间中容易区分的负样本,不仅有效缓解了行人再识别问题中负样本对过多的问题,还减少了训练过程中的计算量;2) In the present invention, by setting the training weights of some sample pairs to zero, the negative samples that are easily distinguished in part of the original feature space in the training set are discarded, which not only effectively alleviates the problem of too many negative sample pairs in the pedestrian re-identification problem, but also Reduced computation during training;
3)本发明能够利用训练样本的标注信息,学习得到特定的马氏距离度量函数,使同一行人的图片特征距离较近,而不同行人图片的特征距离较远,有效克服了不同摄像机之间的差异对跨摄像机行人再识别的影响。3) The present invention can use the labeling information of the training samples to learn a specific Mahalanobis distance measurement function, so that the feature distances of pictures of the same pedestrian are relatively close, and the feature distances of pictures of different pedestrians are relatively far, effectively overcoming the difference between different cameras. The effect of variance on cross-camera person re-identification.
附图说明Description of drawings
图1为本发明基于自适应距离度量学习的跨摄像机行人再识别方法整体流程示意图。FIG. 1 is a schematic diagram of the overall flow of the cross-camera pedestrian re-identification method based on adaptive distance metric learning in the present invention.
具体实施方式detailed description
为了使本发明的目的、技术方案及优点更加清楚明白,下面结合附图及具体实施例,对本发明的技术方案做进一步的详细说明。In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be further described in detail below in conjunction with the drawings and specific embodiments.
以下实施例在以本发明技术方案为前提下进行实施,给出了详细的实施方式和具体的操作过程,但本发明的保护范围不限于下述的实施例。The following examples are carried out on the premise of the technical solutions of the present invention, and detailed implementation methods and specific operation processes are provided, but the protection scope of the present invention is not limited to the following examples.
实施例Example
本实施例通过将摄像机A中出现过的行人作为目标,并在与摄像机A不存在重叠视域的摄像机B中寻找与行人目标最相似的可疑行人对象,以完成跨摄像机行人再识别,在本发明的实施例中,该方法包括以下步骤:In this embodiment, the cross-camera pedestrian re-identification is completed by taking the pedestrian who has appeared in camera A as the target, and looking for the suspicious pedestrian object most similar to the pedestrian target in camera B which does not overlap with camera A. In an embodiment of the invention, the method includes the following steps:
步骤1:输入距离度量学习的训练数据,将摄像机A中出现过的行人图片集合定义为查询集而将摄像机B中出现过的行人图片集合候选集其中是第i张查询图片和第j张候选图片的特征向量,而和为对应行人的身份标签。n为训练阶段查询集的图片总数,m为训练阶段候选集的图片总数;Step 1: Input the training data for distance metric learning, and define the collection of pedestrian pictures that have appeared in camera A as the query set And the candidate set of pedestrian pictures that have appeared in camera B in is the feature vector of the i-th query image and the j-th candidate image, and with is the identity label of the corresponding pedestrian. n is the total number of pictures in the query set in the training phase, and m is the total number of pictures in the candidate set in the training phase;
步骤2:选取查询集中的查询图片xi和候选集中的候选图片yj构成样本对(xi,yj),为样本对分配二分类标签zij,其中当时zij=1,(xi,yj)被称为正样本对,而当时zij=-1,(xi,yj)被称为负样本对。定义任意样本对(xi,yj)之间的马氏距离度量函数为:Step 2: Select the query image x i in the query set and the candidate image y j in the candidate set to form a sample pair ( xi , y j ), and assign a binary label z ij to the sample pair, where when When z ij = 1, ( xi , y j ) is called a positive sample pair, and when When z ij =-1, ( xi ,y j ) is called a negative sample pair. Define the Mahalanobis distance metric function between any sample pair ( xi , y j ) as:
其中M为马氏距离中的距离度量矩阵。where M is the distance metric matrix in Mahalanobis distance.
步骤3:利用Logistic损失函数为训练集中的每一样本对(xi,yj)建立距离度量学习的损失函数:Step 3: Use the Logistic loss function to establish a loss function for distance metric learning for each sample pair ( xi ,y j ) in the training set:
其中ξ为训练集中所有样本对特征向量之间的欧式距离均值。当(xi,yj)为正样本对时,损失函数约束马氏距离dM(xi,yj)小于而当(xi,yj)为负样本对时,损失函数约束马氏距离dM(xi,yj)大于 where ξ is the mean Euclidean distance between all sample pairs in the training set. When ( xi ,y j ) is a positive sample pair, the loss function constrains the Mahalanobis distance d M ( xi ,y j ) to be less than And when ( xi ,y j ) is a negative sample pair, the loss function constrains the Mahalanobis distance d M ( xi ,y j ) to be greater than
步骤4:同时考虑训练集中所有样本对之间的损失函数约束,定义自适应距离度量学习的总体目标函数为:Step 4: Considering the loss function constraints between all sample pairs in the training set at the same time, define the overall objective function of adaptive distance metric learning as:
步骤5:根据训练样本的差异性,为不同样本对的损失函数ψ(xi,yj)分配不同的训练权重wij,使自适应距离度量学习的目标函数变为:Step 5: According to the difference of training samples, assign different training weights w ij to the loss function ψ( xi ,y j ) of different sample pairs, so that the objective function of adaptive distance metric learning becomes:
在本实施例中,步骤5所述的根据训练样本的差异性,为不同样本对的损失函数ψ(xi,yj)分配不同的训练权重wij,其具体实现过程如下:In this embodiment, according to the difference of training samples described in step 5, different training weights w ij are assigned to the loss function ψ( xi ,y j ) of different sample pairs, and the specific implementation process is as follows:
步骤5.1:对于训练集中的查询图片的特征向量xi,计算候选集中所有候选图片特征向量与xi在欧式空间的特征距离,然后按照距离从小到大的顺序对中的图片进行排序;Step 5.1: For the feature vector x i of the query image in the training set, calculate the candidate set The characteristic distances between all candidate picture feature vectors and x i in the Euclidean space, and then in order of distance from small to large Sort the pictures in;
步骤5.2:根据步骤5.1中的排序结果,将候选集划分成对于xi的困难集合中等集合以及简单集合 Step 5.2: According to the ranking results in step 5.1, the candidate set Divide into the hard set for x i medium set and simple collections
困难集合的定义为:difficult set is defined as:
公式中,ri(yj)表示候选图片yj在步骤5.1得到的排序队列中的位置,而则表示xi在候选集中的正确匹配y+在排序队列中的位置。In the formula, r i (y j ) represents the position of the candidate picture y j in the sorting queue obtained in step 5.1, and It means that xi is in the candidate set The correct match in y + position in the sorted queue.
中等集合的定义为:medium set is defined as:
其中m为候选集中行人图片数量的总数,也即步骤5.1中排序队列的总长度。where m is the candidate set The total number of pictures of pedestrians in the middle, that is, the total length of the sorting queue in step 5.1.
简单集合的定义为:simple set is defined as:
步骤5.3:根据步骤5.2中候选集的划分结果,为样本对(xi,yj)的损失函数自适应分配训练权重wij。当(xi,yj)为正样本对时,将ψ(xi,yj)的训练权重wij设为1/N+,其中N+为训练集中正样本对的总数。而当(xi,yj)为负样本对时,通过下式定义其损失函数ψ(xi,yj)的训练权重wij:Step 5.3: According to the candidate set in step 5.2 The division result of the sample pair ( xi , y j ) adaptively assigns the training weight w ij to the loss function. When ( xi ,y j ) is a positive sample pair, set the training weight w ij of ψ( xi ,y j ) to 1/N + , where N + is the total number of positive sample pairs in the training set. And when ( xi ,y j ) is a negative sample pair, the training weight w ij of its loss function ψ( xi ,y j ) is defined by the following formula:
其中,N-表示训练集中权重不为零的负样本对总数,β1和β2为调节训练权重变化范围的平衡参数,在本实施例中β1=0.75而β2=0.25。Wherein, N - represents the total number of negative sample pairs whose weight is not zero in the training set, β 1 and β 2 are balance parameters for adjusting the variation range of the training weight, and in this embodiment, β 1 =0.75 and β 2 =0.25.
步骤6:根据目标函数,将自适应距离度量学习定义为如下优化问题:Step 6: According to the objective function, the adaptive distance metric learning is defined as the following optimization problem:
步骤7:使用加速近端梯度算法求解步骤6中的优化问题,得到对应的距离度量矩阵M。Step 7: Use the accelerated proximal gradient algorithm to solve the optimization problem in step 6, and obtain the corresponding distance metric matrix M.
在本实施例中,步骤7中所述的使用加速近端梯度算法求解步骤6中的优化问题,得到对应的距离度量矩阵M,其具体实现步骤如下:In this embodiment, the accelerated proximal gradient algorithm described in step 7 is used to solve the optimization problem in step 6, and the corresponding distance metric matrix M is obtained. The specific implementation steps are as follows:
步骤7.1:初始化M0和M-1为单位矩阵,并对其进行迭代更新;Step 7.1: Initialize M 0 and M -1 as the identity matrix, and update it iteratively;
步骤7.2:具体地,对于第t次迭代,首先计算聚合前向矩阵St:Step 7.2: Specifically, for the tth iteration, first calculate the aggregation forward matrix S t :
其中系数在第一次迭代时被设为0;where coefficient is set to 0 on the first iteration;
步骤7.3:定义矩阵其中是距离度量学习的目标函数Ψ(M)在St处的梯度,ηt为迭代步长;在本实施例中,ηt在每次迭代时被初始化为28,并检查下列条件是否满足:Step 7.3: Define the Matrix in is the gradient of the objective function Ψ(M) of distance metric learning at S t , and η t is the iteration step size; in this embodiment, η t is initialized to 2 8 at each iteration, and checks whether the following conditions are satisfied :
其中<·,·>表示矩阵的内积,||·||F表示矩阵的Frobenius范数,当上式中的条件满足时,使用ηt作为迭代步长;否则用ηt/2替换ηt,直至条件满足;Where <·,·> represents the inner product of the matrix, ||·|| F represents the Frobenius norm of the matrix, when the conditions in the above formula are met, use η t as the iteration step; otherwise replace η with η t /2 t , until the condition is met;
步骤7.4:对矩阵Pt进行特征值分解,将其表示为然后对第t次迭代的距离度量矩阵M进行更新,得到迭代结果Mt:Step 7.4: Perform an eigenvalue decomposition on the matrix P t and express it as Then update the distance metric matrix M of the t-th iteration to obtain the iteration result M t :
其中用于确保距离度量矩阵Mt是半正定的;in Used to ensure that the distance metric matrix M t is positive semi-definite;
步骤7.5:重复步骤7.2至7.4,直至达到收敛条件:Step 7.5: Repeat steps 7.2 to 7.4 until the convergence condition is reached:
步骤7.6:返回收敛时的Mt作为自适应距离度量学习的训练结果M。Step 7.6: Return M t at convergence as the training result M of adaptive distance metric learning.
步骤8:在得到距离度量矩阵M之后,对于摄像机A中出现过的任意行人目标模板图片,提取其特征向量xp,同时将摄像机B中出现过的身份未知的行人图片集合定义为候选集,提取每张候选图片的特征向量,组成特征向量组N为测试阶段候选集的图片总数。将步骤7中求得的距离度量矩阵M代入步骤2中的马氏距离度量函数,分别计算xp与每张候选图片的特征向量之间的马氏距离并按照马氏距离大小对候选图片进行排序,使与xp马氏距离较小的候选图片排在队列的前端。最终,排序越靠前的候选图片越有可能是行人目标在摄像机B中的正确匹配。Step 8: After obtaining the distance metric matrix M, for any pedestrian target template picture that appeared in camera A, extract its feature vector x p , and at the same time define the set of unknown pedestrian pictures that appeared in camera B as a candidate set, Extract the feature vector of each candidate picture to form a feature vector group N is the total number of pictures in the candidate set in the test phase. Substitute the distance metric matrix M obtained in step 7 into the Mahalanobis distance metric function in step 2, and calculate x p and the feature vector of each candidate picture Mahalanobis distance between And sort the candidate pictures according to the Mahalanobis distance, so that the candidate pictures with smaller Mahalanobis distances to x p are at the front of the queue. Ultimately, the higher-ranked candidate images are more likely to be the correct match of the pedestrian object in camera B.
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention should be included in the protection of the present invention. within range.
Claims (3)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710213901.2A CN107145827A (en) | 2017-04-01 | 2017-04-01 | Cross-camera person re-identification method based on adaptive distance metric learning |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710213901.2A CN107145827A (en) | 2017-04-01 | 2017-04-01 | Cross-camera person re-identification method based on adaptive distance metric learning |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107145827A true CN107145827A (en) | 2017-09-08 |
Family
ID=59773501
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710213901.2A Pending CN107145827A (en) | 2017-04-01 | 2017-04-01 | Cross-camera person re-identification method based on adaptive distance metric learning |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107145827A (en) |
Cited By (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107563452A (en) * | 2017-09-18 | 2018-01-09 | 天津师范大学 | A kind of cross-domain ground cloud atlas sorting technique that study is estimated based on differentiation |
CN107704890A (en) * | 2017-10-27 | 2018-02-16 | 北京旷视科技有限公司 | A kind of generation method and device of four-tuple image |
CN107909049A (en) * | 2017-11-29 | 2018-04-13 | 广州大学 | Pedestrian's recognition methods again based on least square discriminant analysis distance study |
CN107944340A (en) * | 2017-10-25 | 2018-04-20 | 宁波大学 | A kind of combination is directly measured and the pedestrian of indirect measurement recognition methods again |
CN108021898A (en) * | 2017-12-14 | 2018-05-11 | 西北工业大学 | A kind of personage's recognition methods again that study is measured based on adapted distance |
CN108133230A (en) * | 2017-12-14 | 2018-06-08 | 西北工业大学 | A kind of personage's recognition methods again of object-oriented personage's distance measure study |
CN108229555A (en) * | 2017-12-29 | 2018-06-29 | 深圳云天励飞技术有限公司 | Sample weights distribution method, model training method, electronic equipment and storage medium |
CN108985168A (en) * | 2018-06-15 | 2018-12-11 | 江南大学 | A kind of video face identification method based on the study of minimum normalized cumulant |
CN109492702A (en) * | 2018-11-21 | 2019-03-19 | 中国科学院自动化研究所 | Pedestrian based on sorting measure function recognition methods, system, device again |
CN109934849A (en) * | 2019-03-08 | 2019-06-25 | 西北工业大学 | Online multi-target tracking method based on trajectory metric learning |
CN109977882A (en) * | 2019-03-29 | 2019-07-05 | 广东石油化工学院 | A kind of half coupling dictionary is to the pedestrian of study again recognition methods and system |
CN110287822A (en) * | 2019-06-10 | 2019-09-27 | 浙江大学城市学院 | A snail pest control method based on visual target detection in the cultivation of Dendrobium officinale |
CN111680697A (en) * | 2020-03-17 | 2020-09-18 | 北京大学 | Method, apparatus, electronic device and medium for realizing domain adaptation |
CN112101217A (en) * | 2020-09-15 | 2020-12-18 | 镇江启迪数字天下科技有限公司 | Pedestrian re-identification method based on semi-supervised learning |
CN112381056A (en) * | 2020-12-02 | 2021-02-19 | 山西大学 | Cross-domain pedestrian re-identification method and system fusing multiple source domains |
CN113361568A (en) * | 2021-05-18 | 2021-09-07 | 北京迈格威科技有限公司 | Target identification method, device and electronic system |
CN113536003A (en) * | 2021-06-08 | 2021-10-22 | 支付宝(杭州)信息技术有限公司 | Feature extraction model training method, image retrieval method, device and equipment |
CN115965817A (en) * | 2023-01-05 | 2023-04-14 | 北京百度网讯科技有限公司 | Training method and device of image classification model and electronic equipment |
CN116244612A (en) * | 2023-05-12 | 2023-06-09 | 国网江苏省电力有限公司信息通信分公司 | A method and device for clustering HTTP traffic based on self-learning parameter measurement |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104850857A (en) * | 2015-05-15 | 2015-08-19 | 浙江大学 | Trans-camera pedestrian target matching method based on visual space significant constraints |
-
2017
- 2017-04-01 CN CN201710213901.2A patent/CN107145827A/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104850857A (en) * | 2015-05-15 | 2015-08-19 | 浙江大学 | Trans-camera pedestrian target matching method based on visual space significant constraints |
Non-Patent Citations (1)
Title |
---|
YI XIE等: "Adaptive Metric Learning and Probe-Specific Reranking for Person Reidentification", 《IEEE SIGNAL PROCESSING LETTERS》 * |
Cited By (29)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107563452B (en) * | 2017-09-18 | 2020-03-27 | 天津师范大学 | Cross-domain foundation cloud picture classification method based on discriminant measure learning |
CN107563452A (en) * | 2017-09-18 | 2018-01-09 | 天津师范大学 | A kind of cross-domain ground cloud atlas sorting technique that study is estimated based on differentiation |
CN107944340A (en) * | 2017-10-25 | 2018-04-20 | 宁波大学 | A kind of combination is directly measured and the pedestrian of indirect measurement recognition methods again |
CN107944340B (en) * | 2017-10-25 | 2020-06-16 | 宁波大学 | Pedestrian re-identification method combining direct measurement and indirect measurement |
CN107704890A (en) * | 2017-10-27 | 2018-02-16 | 北京旷视科技有限公司 | A kind of generation method and device of four-tuple image |
CN107909049A (en) * | 2017-11-29 | 2018-04-13 | 广州大学 | Pedestrian's recognition methods again based on least square discriminant analysis distance study |
CN107909049B (en) * | 2017-11-29 | 2020-07-31 | 广州大学 | Pedestrian re-identification method based on least square discriminant analysis distance learning |
CN108021898A (en) * | 2017-12-14 | 2018-05-11 | 西北工业大学 | A kind of personage's recognition methods again that study is measured based on adapted distance |
CN108133230A (en) * | 2017-12-14 | 2018-06-08 | 西北工业大学 | A kind of personage's recognition methods again of object-oriented personage's distance measure study |
CN108229555A (en) * | 2017-12-29 | 2018-06-29 | 深圳云天励飞技术有限公司 | Sample weights distribution method, model training method, electronic equipment and storage medium |
CN108985168A (en) * | 2018-06-15 | 2018-12-11 | 江南大学 | A kind of video face identification method based on the study of minimum normalized cumulant |
CN108985168B (en) * | 2018-06-15 | 2022-05-24 | 江南大学 | A Video Face Recognition Method Based on Minimum Normalized Distance Learning |
CN109492702A (en) * | 2018-11-21 | 2019-03-19 | 中国科学院自动化研究所 | Pedestrian based on sorting measure function recognition methods, system, device again |
CN109492702B (en) * | 2018-11-21 | 2020-09-22 | 中国科学院自动化研究所 | Pedestrian re-identification method, system and device based on ranking measurement function |
CN109934849A (en) * | 2019-03-08 | 2019-06-25 | 西北工业大学 | Online multi-target tracking method based on trajectory metric learning |
CN109977882B (en) * | 2019-03-29 | 2019-12-03 | 广东石油化工学院 | A kind of half coupling dictionary is to the pedestrian of study again recognition methods and system |
CN109977882A (en) * | 2019-03-29 | 2019-07-05 | 广东石油化工学院 | A kind of half coupling dictionary is to the pedestrian of study again recognition methods and system |
CN110287822A (en) * | 2019-06-10 | 2019-09-27 | 浙江大学城市学院 | A snail pest control method based on visual target detection in the cultivation of Dendrobium officinale |
CN111680697A (en) * | 2020-03-17 | 2020-09-18 | 北京大学 | Method, apparatus, electronic device and medium for realizing domain adaptation |
CN111680697B (en) * | 2020-03-17 | 2024-03-22 | 北京大学 | Method, device, electronic equipment and medium for realizing field adaptation |
CN112101217A (en) * | 2020-09-15 | 2020-12-18 | 镇江启迪数字天下科技有限公司 | Pedestrian re-identification method based on semi-supervised learning |
CN112101217B (en) * | 2020-09-15 | 2024-04-26 | 镇江启迪数字天下科技有限公司 | Pedestrian re-identification method based on semi-supervised learning |
CN112381056A (en) * | 2020-12-02 | 2021-02-19 | 山西大学 | Cross-domain pedestrian re-identification method and system fusing multiple source domains |
CN113361568A (en) * | 2021-05-18 | 2021-09-07 | 北京迈格威科技有限公司 | Target identification method, device and electronic system |
CN113536003B (en) * | 2021-06-08 | 2024-03-12 | 支付宝(杭州)信息技术有限公司 | Feature extraction model training method, image retrieval method, device and equipment |
CN113536003A (en) * | 2021-06-08 | 2021-10-22 | 支付宝(杭州)信息技术有限公司 | Feature extraction model training method, image retrieval method, device and equipment |
CN115965817A (en) * | 2023-01-05 | 2023-04-14 | 北京百度网讯科技有限公司 | Training method and device of image classification model and electronic equipment |
CN116244612A (en) * | 2023-05-12 | 2023-06-09 | 国网江苏省电力有限公司信息通信分公司 | A method and device for clustering HTTP traffic based on self-learning parameter measurement |
CN116244612B (en) * | 2023-05-12 | 2023-08-29 | 国网江苏省电力有限公司信息通信分公司 | HTTP traffic clustering method and device based on self-learning parameter measurement |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107145827A (en) | Cross-camera person re-identification method based on adaptive distance metric learning | |
Li et al. | Triple adversarial learning and multi-view imaginative reasoning for unsupervised domain adaptation person re-identification | |
Fu et al. | Self-similarity grouping: A simple unsupervised cross domain adaptation approach for person re-identification | |
WO2022037233A1 (en) | Small sample visual target identification method based on self-supervised knowledge transfer | |
Chen et al. | Once for all: a two-flow convolutional neural network for visual tracking | |
CN109961051B (en) | A Pedestrian Re-Identification Method Based on Clustering and Block Feature Extraction | |
CN107515895B (en) | A visual target retrieval method and system based on target detection | |
CN108520530B (en) | Target tracking method based on long-time and short-time memory network | |
CN106682696B (en) | The more example detection networks and its training method refined based on online example classification device | |
CN110263697A (en) | Pedestrian based on unsupervised learning recognition methods, device and medium again | |
CN111079674B (en) | Target detection method based on global and local information fusion | |
Kuznetsova et al. | Expanding object detector's horizon: Incremental learning framework for object detection in videos | |
CN105809672B (en) | A Multi-object Collaborative Image Segmentation Method Based on Superpixels and Structural Constraints | |
Luo et al. | Deep unsupervised domain adaptation for face recognition | |
CN111832511A (en) | An Unsupervised Person Re-ID with Enhanced Sample Data | |
CN103279768B (en) | A kind of video face identification method based on incremental learning face piecemeal visual characteristic | |
CN106897390A (en) | Target precise search method based on depth measure study | |
CN109635708B (en) | Unsupervised pedestrian re-identification method based on three-data-set cross migration learning | |
CN107016689A (en) | A kind of correlation filtering of dimension self-adaption liquidates method for tracking target | |
CN107292246A (en) | Infrared human body target identification method based on HOG PCA and transfer learning | |
CN110443257B (en) | A saliency detection method based on active learning | |
CN107330397A (en) | A kind of pedestrian's recognition methods again based on large-spacing relative distance metric learning | |
Yang et al. | Larnet: Lie algebra residual network for face recognition | |
CN106096551A (en) | The method and apparatus of face part Identification | |
CN108345866B (en) | A Pedestrian Re-identification Method Based on Deep Feature Learning |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170908 |
|
RJ01 | Rejection of invention patent application after publication |