simple-faster-rcnn-pytorch icon indicating copy to clipboard operation
simple-faster-rcnn-pytorch copied to clipboard

About concatenate roi and bbox

Open txytju opened this issue 6 years ago • 3 comments

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)

txytju avatar Jun 19 '18 02:06 txytju

the bbox is also a positive sample

Kyle1993 avatar Aug 31 '18 15:08 Kyle1993

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])))
        )

douyh avatar Nov 19 '18 09:11 douyh

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.

m-evdokimov avatar Aug 08 '23 08:08 m-evdokimov