本文介绍了Haar级联进行人员检测的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在我学校的一个项目上进行工作,以检测教室里有多少学生.就像这张照片一样.

I am working on a project in my school to detect how many students are in the classroom. Like in this picture.

我一直试图在opencv中使用Haar Cascade进行面部检测来检测人,但是结果非常糟糕.像这样:

I have been trying to use Haar Cascade in opencv for face detection to detect people, but the result is very bad. Like this:

我在教室里拍了数千张照片,然后人工剪裁了照片.大约有4000个阳性样品和12000个阴性样品.我想知道我做错了什么?裁切图像时,是否应该仅裁切这样的头部?还是喜欢这样的身体?

I took thousands of pictures in classroom, and cropped the picture with people manually. There are about 4000 positive samples and 12000 negative samples. I was wondering what did I do wrong?When I crop the image, should I only crop only head like this?Or like this with body?

我认为我有足够的训练样本,并且我按照这篇文章的确切步骤进行操作: http://note.sonots.com/SciSoftware/haartraining.html#v6f077ba这应该工作.还是我应该使用其他算法,例如HOG或SVM.任何建议对我来说都是很好的,我已经陷在这个问题上几个月了,没有任何线索.非常感谢!

I think I had enough training samples, and I follow the exact procedure with this post:http://note.sonots.com/SciSoftware/haartraining.html#v6f077bawhich should be working.Or should I use a different algorithm like HOG or SVM. Any suggestion would be great for me, I have been stuck in this for months and don't have any clue. Thanks a lot!

推荐答案

Haar对人脸更好.支持SVM的猪是人类检测的经典之作,关于它们的信息和博客很多,训练分类器并不难.对于您的场景,我认为头和肩膀"比仅头一个"更好.但是您的多视图样本会增加难度.面对凸轮会更好.如果您总是有更多的假阳性警报,请添加更多的硬性阴性样本.本文可能会帮助您: http://irip.buaa.edu.cn/~zxzhang/papers /icip2009-1.pdf

Haar is better for human face. Hog with SVM is classic for human detection and there've been lots of source and blogs about them, it's not hard to train a classifier. For your scene, I think 'head and shoulder' is better than 'head alone'. But your multi-view samples increase the difficulty. A facing cam would be better. Add more hard neg samples if you always have much more false positive alarms.This paper may help:http://irip.buaa.edu.cn/~zxzhang/papers/icip2009-1.pdf

这篇关于Haar级联进行人员检测的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-24 07:53