本文介绍了HOG人物检测器:背景减影图像上的假阳性检测的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开展一个需要检测场景中人物的项目。

I am working on a project which requires detection of people in a scene.

最初在原始帧上运行HOG检测器后,特定背景物体被检测为所有帧上的人物,给我3021次误报检测。

Initially after running the HOG detector on the original frames a particular background object was being detected as a person on all the frames, giving me 3021 false positive detections.

所以我采取了逻辑步骤,通过对所有帧应用背景减法器(BackgroundSubtractorMOG2)来删除静态背景。
结果框架如下所示:

So I took the logical step to remove the static background by applying a background subtracter (BackgroundSubtractorMOG2) to all the frames.The resulting frames looked like this:

然后将这些蒙版图像(使用bitwise_and)添加到原始图像,以便将白色像素替换为构成人物的像素。

Then these mask images were added (using bitwise_and) to the original image so the white pixels are replaced the pixels constituting the person.

示例:

然后我跑了这些图像上的HOG检测器给出了如下结果:

Then I ran the HOG detector on these images which gave the results like this:

正如您所看到的,由于某种原因,有很多误报检测。我认为做背景减法会比在原始图像上使用HOG给我更好的结果。

As you can see there are a lot of false positive detections for some reason. I thought doing background subtraction will give me better results than using HOG on the original images.

有人可以告诉我为什么这种方法有这么多的误报?那么可以做些什么来改善背景减影图像的检测?

Can someone please tell me why there are so many false positives in this method? And what can be done to improve the detection on background subtracted images?

推荐答案

问题在于你改变了图像的本质删除背景。因此,HOG探测器使用正常图像进行训练,没有人工黑色像素,现在你正在喂它人为改变的图像,所以它会以一种奇怪的方式执行是正常的(仍然不理解顶部的检测)虽然图像..)

The problem is that you changed the nature of your image by removing the background. So, the HOG detector was trained with normal images, without artificial black pixels, and now you are feeding it artificially altered images, so it is normal that it will perform in an weird way (still don't understand that detection at the top of the image though..)

如果你想在背景减法的顶部使用HOG探测器,你应该训练HOG分类器,其中的特征取自背景减影图像。

If you want to use HOG detector on top of the background subtraction, you should train the HOG classifier with features taken from the background subtracted images.

您可以尝试的一件事(如果这不会影响您的应用程序性能),就是在两个图像上使用HOG检测器,有背景和无背景,并接受只有在两者上都显着重叠的检测,这可能会从两个图像中消除一些误报。

One thing you can try (if this doesn't kill the performance of you application), is to use HOG detector on both images, with and without background, and accept only detections that overlap significantly on both, this may remove some false positives from both images.

PS:HOG专门设计用于通过检测强边缘和测试来处理原始图像他们反对SVM模型。通过去除背景,我们正在创建人工边缘,这有点打败了使用HOG的目的。但我认为您可以通过执行我在上一段中建议的内容来删除错误检测。

PS: HOG was specially designed to work on raw images by detecting strong edges and test them against an SVM model. By removing background, we are creating artificial edges that kinda defeat the purpose of using HOG. But I think you can use it to remove false detections by doing what I suggested in the previous paragraph.

这篇关于HOG人物检测器:背景减影图像上的假阳性检测的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 11:17