how to train negative example in faster RCNN model

8 views (last 30 days)
Hi,
I'm working on a faster RCNN model, and I'm asking how training this model with negative examples?
can anybody help me to know that!

Answers (2)

Raunak Gupta
Raunak Gupta on 18 Mar 2020
Hi,
From negative examples I assume you mean images in dataset which doesn’t have the objects in it. So, if you are training Faster RCNN detector using trainFasterRCNNObjectDetector I would suggest including some images as follow
  1. Images which doesn’t have proper bounding boxes surrounding the object that is there is a mis match between object boundaries and actual bounding boxes.
  2. Images where object doesn’t exist but there are bounding boxes.
  3. Images where object is there but bounding boxes are not there.
I assume you may not have images satisfying above three conditions So, you can create your own dataset by labelling the images in Image Labeler App.
  8 Comments
Dominique Chabot
Dominique Chabot on 13 Aug 2020
Thank you for your further reply, Raunak.
It's good to know that you think the approach in the 2nd point is achievable, and it indeed looks like perhaps the best/easiest way to go.
I had also thought of the possibility of training the object detector on a dedicated 'background' class, and I thank you for the example of how to format the table. I feel like this approach might end up being more of a hassle than the 'whole image' classification approach, but I'll definitely give it some more thought.
Thanks again, and take care!
hammad younas
hammad younas on 27 Jan 2022
Hi there,
Training a faster R-CNN network with own defined "background class" is a big mess. It is for the reason that you are treating the background class as "object of interest" which is not your intention. Thus i would suggest NOT to use this approach as you would end up with incorrect results.
Regards

Sign in to comment.


Rus Gabriela
Rus Gabriela on 21 Dec 2021
Hi Raunak,
I have a question too.
I am really new to Matlab and AI and I want to learn a little bit about object detection. I made Object Detection Using YOLO v2 Deep Learning from examples and works fine, but I want to test this detector on a new image (not from TestData). My question is: Can I use this Detector for unlabeled pictures (not from training data or TestData) from my PC?
  2 Comments
yanqi liu
yanqi liu on 22 Dec 2021
yes,sir,may be use
[bboxes,scores] = detect(detector,Ii,'Threshold',0.15);
to detect target on new image
Rus Gabriela
Rus Gabriela on 22 Dec 2021
Thank you! I used this variable but not like this and wasn't work, but now it's fine.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!