fast-rcnn
fast-rcnn copied to clipboard
How to use negative examples when training
Hi, I tried training on INRIA Person, but it does not contain annotation files for negative examples, thus I just set the objs in _load_pascal_annotation to be empty? Is that okay? Thanks!
Hi @zeyuanxy, thanks a lot for your very helpful INRIA example and your detailed recipe. I now can learn on positive examples (i.e. having images with annotations of bboxes and classes), but I am still failing to include negative examples (i.e. when there are no annotations). How have you managed to include those when learning INRIA? Setting the objs in _load_pascal_annotation to be empty as you suggest / ask results in python variables boxes, gt_classes etc to be arrays of shape (0,4) which gives problems when later in create_roidb_from_box_list the overlaps are calculated between those arrays and region proposals from selective search. What am I missing? Thanks so much!
Hi @revilokeb , I am sorry that I did not include negative examples because I do not know how to make it and that was why I made this issue. Maybe @rbgirshick will help me and you.
Hi. Is there an update on this? I understood that F-R-CNN picked negative examples from the selective search boxes that have overlap with the ground-truth smaller than the threshold specified in the F-R-CNN config. Is that correct?
I also had such a problem. I have spent a long time to change a few codes in the lib/dataset/*.py to distinguish if there exist ground-truth boxes or not. But still got wrong in /lib/roi_data_layer/minibatch.py, it seems I need do more changes. It is very frunstrating ...... @rbgirshick
I have the same questions. I also change some code in the lib/dataset, and when the image is a negative sample, I just put the RoIs form the selective search included in the roidb. But when I start to train, it will aborted (core dumped), and the information is "F0326 10:14:48.913087 3132 roi_pooling_layer.cu:91] Check failed: error == cudaSuccess (9 vs. 0) invalid configuration argument"
Please see https://github.com/rbgirshick/fast-rcnn/pull/102
NB by default none of the ROIs in negative image will be used, however you can set TRAIN.BG_THRESH_LO to 0.0.