Cascade Object Detector: Unable to generate a sufficient number of negative samples

1 回表示 (過去 30 日間)
Hi, I am using the cascade object detector. I'm currently using the training image labeler to draw a bounding box around the ROI. However, when I run the command, trainCascadeObjectDetector, it only includes the positive images which I've provided in the training labeler and it will use the positive images to generate negative samples.
Also, I have this error message. "Cannot find enough samples for training."
"Unable to generate a sufficient number of negative samples for this stage. Consider reducing the number of stages, reducing the false alarm rate or adding more negative images."
May I know how do I train my negative images to include in the cascade object detector? I have my own set of negative images that I wish to include into my training sets. Thanks!

採用された回答

Dima Lisin
Dima Lisin 2015 年 12 月 1 日
Hi Leonard,
Negative images are images that do not contain the objects that you are trying to detect. They should, however, contain backgrounds that are typically associated with your objects of interest. So if you are trying to detect stop signs, the negative images should be pictures of streets and roads with no stop signs in them.
The Training Image Labeler app does not directly produce the negative images. The simplest thing is to capture of find them yourself. If that is difficult, then you can take the output of the Training Image Labeler app, and fill the regions corresponding to the bounding boxes with zeros or random noise.
  12 件のコメント
Leonard Yeo
Leonard Yeo 2015 年 12 月 11 日
Hmmm.. So I cannot combine both set of detector codes into one program to run? I have to run 2 different files separately at each time for the detection?
Dima Lisin
Dima Lisin 2015 年 12 月 11 日
You would need to train two separate detectors, and get two separate XML files. Then you would need to create two separate vision.CascadeObjectDetector objects, and run each one on your image. You can certainly have two detector objects in the same program (or function).

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by