关于图像背景,同时准备级联分类器的训练数据集 [英] About image backgrounds while preparing training dataset for cascaded classifier

查看:414
本文介绍了关于图像背景,同时准备级联分类器的训练数据集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个关于准备用于级联分类器的阳性样本数据集的问题,将用于对象检测。

I have a question about preparing the dataset of positive samples for a cascaded classifier that will be used for object detection.

作为阳性样本,我被给予3图片集:

As positive samples, I have been given 3 sets of images:


  1. 一组全彩色图片(大约1200x600),具有白色背景对象以不同的角度显示在每个图像中

  2. 另一组以灰度和白色背景的相同图像缩小到检测窗口大小(60x60)

  3. 另一组以灰度级和黑色背景使用相同的图片,缩小到检测窗口大小(60x60)

  1. a set of colored images in full size (about 1200x600) with a white background and with the object displayed at a different angles in each image
  2. another set with the same images in grayscale and with a white background, scaled down to the detection window size (60x60)
  3. another set with the same images in grayscale and with a black background, scaled down to the detection window size (60x60)

我的问题是在集合1中,背景应该是白色吗?是否应该是环境,该对象可能在测试数据集中找到?或者我应该有第四套图像在自然环境中吗?

My question is that in set 1, should the background really be white? Should it not instead be an environment that the object is likely to be found in in the testing dataset? Or should I have a fourth set where the images are in their natural environments? How does environment figure into the training samples?

推荐答案

背景应该是对象的典型环境,因为当你实际尝试为了检测对象,搜索窗口将总是包括一些背景。最好的方法是从自然图像中裁剪对象。

The background should be a typical environment of the object, because when you actually try to detect the objects, the search window will always include some of the background. The best thing is to crop the objects from natural images.

如果在MATLAB中使用 trainCascadeObjectDetector 甚至不必裁剪样品。它允许您为每个图像指定多个边界框。你也不必担心样本的大小,因为trainCascadeObjectDetector会为你调整大小。

If you use the trainCascadeObjectDetector function in MATLAB, you do not even have to crop the samples. It lets you specify multiple bounding boxes per image. You also do not have to worry about the size of the samples, because trainCascadeObjectDetector will resize them for you.

有一个在MATLAB文件交换上非常方便的GUI应用程序,用于在与trainCascadeObjectDetector一起使用的图像中标记感兴趣的对象。

There is a very handy GUI app on MATLAB file exchange for labeling objects of interest in images designed for use with trainCascadeObjectDetector.

编辑:其他几点。您的排除图片还应包含通常与感兴趣对象相关联的背景。以下是教程,说明如何准备训练数据以及如何设置一些参数。

Edit: couple of other points. Your negative images should also contain backgrounds typically associated with your objects of interest. Here is a tutorial that explains how to prepare training data and how to set some of the parameters.

这篇关于关于图像背景,同时准备级联分类器的训练数据集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆