simple-faster-rcnn-pytorch
simple-faster-rcnn-pytorch copied to clipboard
About concatenate roi and bbox
in ProposalTargetCreator function in creator_tool.py, why do we need to concatenate ROI and bbox at the beginning? roi = np.concatenate((roi, bbox), axis=0)
the bbox is also a positive sample
in ProposalTargetCreator function in creator_tool.py, why do we need to concatenate ROI and bbox at the beginning?
roi = np.concatenate((roi, bbox), axis=0)
I'm also confused with this. So I checked the code of RBG.
# Include ground-truth boxes in the set of candidate rois
zeros = np.zeros((gt_boxes.shape[0], 1), dtype=gt_boxes.dtype)
all_rois = np.vstack(
(all_rois, np.hstack((zeros, gt_boxes[:, :-1])))
)
You can think about it as a "separate" training of rpn and classification head. Since classification head training only relies on rois from image, why can't we add ground truth boxes along with proposals from rpn as well? By doing so, we simply increase train dataset for classification head without affecting on rpn.