图像分割(2)
引言
1、人脸检测
特征模板内有白色和黑色两种矩形, 并定义该模板的特征值为白色矩形内的像素和减去黑色矩形内的像素和。
Haar-like特征+级联分类器
Haar-like特征
Haar-like特征模板
Haar-like模板可表示出人脸的某些特征。 例如: 中间一幅表示眼睛区域的颜色比脸颊区
域的颜色深; 右边一幅表示鼻梁两侧比鼻梁的颜色要深。
Haar-like特征的数量
Haar级联分类器
Boosting分类器示意
弱分类器和强分类器
o 一个弱学习器的要求仅仅是: 它能够以稍低于50%的错误率来区分人脸和非人脸图像。
o 训练一个弱分类器就是在当前权重分布的情况下, 确定f 的最优阈值, 使得这个弱分类器对所有训练样本的分类误差最低。
o 最后将每轮得到的最佳弱分类器按照一定方法提升(Boosting) 为强分类器。
级联分类器的检测机制
o 级联分类器中每一个强分类器都是对于“非人脸”(即负样本) 更敏感, 使得每次被强分类器拒绝的, 都几乎一定不是人脸。 经过所有强分类器考验的, 才是“人脸”。
o 一幅图像中待检测的区域很多都是负样本,只有正样本才会送到下一个强分类器进行再次检验。 这样由级联分类器在分类器的初期就抛弃了很多负样本的复杂检测。所以, 级联分类器的速度是非常快的。
2、行人检测
梯度
3、HOG+SVM
HOG
HOG:对比度归一化
HOG的步骤
SVM基本模型
松弛变量
映射到高维空间
用SVM区分行人与非行人的HOG特征
4、DPM
DPM检测流程
o 对于任意一张输入图像, 提取其DPM特征图, 然后将原始图像进行高斯金字塔上采样, 然后提取其DPM特征图。
o 对于原始图像的DPM特征图和训练好的Root filter做卷积操作, 从而得到Root filter的响应图。
o 对于2倍图像的DPM特征图, 和训练好的Part filter做卷积操作, 从而得到Part filter的响应图。
o 然后对其精细高斯金字塔的下采样操作, 这样Rootfilter的响应图和Part filter的响应图就具有相同的分辨率了。
o 然后将其进行加权平均, 得到最终的响应图。 亮度越大表示响应值越大。