硕士学位论文
基于机器学习的行人重识别算法研究
RESEARCH ON PEDESTRIAN
RECOGNITION ALGORITHM BASED ON
MACHINE LEARNING
薛超杰
哈尔滨工业大学
2020 年 6 月
国内图书分类号:TP393.0
国际图书分类号:004.7
学校代码:10213
密级:公开
理学硕士学位论文
基于机器学习的行人重识别算法研究
硕 士 研 究 生 : 薛超杰
导
师 : 张达治 副教授
申 请 学 位: 理学硕士
学 科 、 专 业 : 计算数学
所 在 单 位 : 数学学院
答 辩 日 期 : 2020 年 6 月
授予学位单 位: 哈尔滨工业大学
Classified Index: TP393.0
U.D.C: 004.7
Dissertation for the Master Degree in Science
RESEARCH ON PEDESTRIAN
RECOGNITION ALGORITHM BASED ON
MACHINE LEARNING
Xue Chaojie
A. Prof. Zhang Dazhi
Candidate:
Supervisor:
Academic Degree Applied for: Master of Science
Speciality:
Affiliation:
Date of Defence:
Degree-Conferring-Institution: Harbin Institute of Technology
Computational Mathematics
School of Mathematics
June, 2020
摘 要
随着智慧城市的建设,世界各地的城市都安装了大量高清监控摄像头,产生
了大量的监控视频,以及公共安全的需求日益增加,促使了行人重识别技术的发
展。本论文主要研究基于重排序的算法和基于视频序列的算法。
针对基于重排序的行人重识别研究,首先,本文基于 k-倒排编码算法模型,
为解决遮挡问题,提高行人重识别模型的泛化能力,本研究使用随机消除做数据
增强。并且对特征提取骨干网络的 ResNet-50 做了改进,提升了特征提取的丰富
度。在网络架构中的池化层,同时使用平均池化和最大池化,从而同时保留全局
和局部信息。
其次,为了使行人重识别研究更接近实际应用场景,本文还研究了基于视频
序列的行人重识别。为了提高性能、缓解梯度爆炸问题,本研究使用了一种预热
策略来训练网络。为弥补三元组损失的缺陷,使类内更加紧凑,本研究引入了中
心缺失,同时为每个类的深层特征学习出一个中心,惩罚深层特征与对应的类中
心之间的距离。
最后,在实验部分,本文对基于重排序的行人重识别在两个数据集 Market-
1501、Duke-MTMC 上做了对比实验,并分别在 ResNet50 和 DenseNet 两个网络
架构上对比网络改进带来的性能提升。在 Mars 数据集上对基于视频序列的行人
重识别设计了对比实验。实验结果证明模型算法的改进所带来的性能提升是显著
的。
关键词:行人重识别;特征提取;卷积神经网络;机器学习
1
Abstract
With the construction of smart cities, a large number of high-definition surveillance
cameras have been installed in cities around the world, which has generated a large
number of surveillance videos, and the increasing demand for public safety has
promoted the development of pedestrian re-identification technology. This paper mainly
studies algorithms based on re-ranking and video sequence.
For pedestrian re-identification research based on re-ranking, first, this paper is
based on the k-inverted coding algorithm model. In order to solve the occlusion
problem and improve the generalization ability of the pedestrian re-recognition model,
this study uses random elimination for data enhancement. And the ResNet-50 feature
extraction backbone network has been improved to enhance the richness of feature
extraction. In the pooling layer of the network architecture, average pooling and
maximum pooling are used at the same time, thereby retaining both global and local
information.
Secondly, in order to make pedestrian re-identification research closer to practical
application scenarios, this paper also studies pedestrian re-identification based on video
sequences. In order to improve performance and alleviate the gradient explosion
problem, this study uses a warm-up strategy to train the network. In order to make up
for the loss of triples and make the class more compact, this study introduces center loss,
and at the same time learns a center for the deep features of each class, penalizing the
distance between the deep features and the corresponding class center.
Finally, in the experimental part, this paper conducted a comparative experiment
on pedestrian re-identification based on reordering on two datasets Market-1501, Duke-
MTMC, and compared the network improvements on ResNet50 and DenseNet
respectively. Performance improvement. Pedestrians re-identification based on video
sequences on the Mars data set through comparative experiments. Experimental results
prove that the performance improvement brought by the improvement of the model
algorithm is significant.
Keywords: Pedestrain Re-Identification;Feature Extraction;Convolutional Neural
Networks;Machine Learning
2
目录
摘 要..........................................................................................................................1
Abstract........................................................................................................................ 2
第 1 章 绪 论............................................................................................................5
1.1 课题研究的背景和意义........................................................................................5
1.1.1 课题的来源.....................................................................................................5
1.1.2 课题背景及研究的目的和意义.....................................................................6
1.2 行人重识别的国内外研究现状和分析................................................................6
1.2.1 相关研究工作.................................................................................................7
1.2.2 存在的问题.....................................................................................................9
1.3 课题的主要研究内容..........................................................................................10
1.4 内容安排..............................................................................................................11
第 2 章 基于重排序的行人重识别研究..................................................................12
2.1 网络骨干模型分析..............................................................................................12
2.1.1 ResNet............................................................................................................12
2.1.2 DenseNet........................................................................................................13
2.2 k-倒排编码的行人重识别方法研究................................................................... 14
2.2.1 k-倒排编码.................................................................................................... 14
2.2.2 杰卡德距离...................................................................................................15
2.3 随机擦除..............................................................................................................17
2.4 k-倒排编码网络架构改进................................................................................... 19
2.5 本章小结..............................................................................................................20
第 3 章 基于视频序列的行人重识别研究..............................................................21
3.1 时空高效的非局部视频注意网络......................................................................21
3.1.1 限制随机抽样...............................................................................................21
3.1.2 非局部注意层...............................................................................................22
3.2 Warmup 学习速率................................................................................................22
3.3 损失函数结构设计..............................................................................................23
3.4 本章小结..............................................................................................................25
第 4 章 实验结果与分析..........................................................................................26
4.1 行人重识别常用数据集......................................................................................26
4.2 行人重识别常用性能评价指标..........................................................................27
4.3 基于重排序的行人重识别实验..........................................................................27
3
4.4 基于视频序列的行人重识别实验......................................................................32
4.5 本章小结..............................................................................................................33
结 论....................................................................................................................
35
参考文献....................................................................................................................36
哈尔滨工业大学学位论文原创性声明和使用权限................................................39
致 谢........................................................................................................................40
4
第 1 章 绪 论
行人重识别(Person Re-Identification,Re-ID)是计算机视觉中的一项具有挑
战性的课题。通常,行人重识别可以被看做一个检索问题进行解决。给定一个需
查询的行人图像,行人重识别的任务在于希望在搜索库中搜索包含相同行人的图
像,其中也包括跨相机模式下[1]。
1.1 课题研究的背景和意义
在现代计算机视觉研究中,行人重识别的任务是:在视频监控中,当有待查
找的行人时,行人重识别实现在不同相机中观察到该人。这项任务的出现主要是
因为,公共安全的需求日益增加;大学校园、主题公园、街道、医院、公司、大
型广场、体育场馆以及超市等人群较密集且容易发生公共安全事件的场所,分布
着广泛的大型监控网络。这两种原因使得在跨摄像机情况下查找特定行人,所需
花费的人力、物力和时间成本是非常高的。因此研究行人重识别具有很实际的应
用,能大量降低人力、物力,使公共场所更加智能现代化、安全化。
1.1.1 课题的来源
随着智慧城市的建设,世界各地的城市甚至中国农村都安装了大量高清监控
摄像头,产生了大量的监控视频。虽然当前人脸识别技术非常成熟,也已经应用
到机场、火车站等公共场所,但由于摄像头安装的角度问题、光线问题以及分辨
率低的问题,使得获得的人脸图像质量比较低,无法通过人脸识别技术进行检测
和识别,这时候行人重识别技术会成为人脸识别技术的一个辅助替代。因此,行
人重识别技术应运而生,这是智能监控系统建设中所需要解决的关键技术。
从技术上讲,一个实例行人重识别系统可以分解为三个算法模块,即行人检
测、行人跟踪和行人检索。前两个算法模块已经是比较成熟的计算机视觉领域,
因此大多数行人重识别工作集中于最后一个模块,即行人检索。在本研究中,如
果未指定,则行人重识别指的是行人检索模块。从实际应用上讲,行人重识别可
分为六大步骤:获取视频数据、抽帧、行人检测、特征提取、匹配与检测。流程
如图 1.1 所示。具体操作为,从特定场所获取监控视频,然后按照根据需求对这
些监控视频进行抽帧,形成图像数据集。随后使用行人目标检测技术对图像数据
集进行行人检测,并且把检测裁剪出来的行人图像缩放到固定尺寸。最后再对行
5