keras-rcnn icon indicating copy to clipboard operation
keras-rcnn copied to clipboard

Add inside and outside bounding box weights

Open jhung0 opened this issue 6 years ago • 2 comments

As in https://github.com/rbgirshick/py-faster-rcnn/blob/master/lib/fast_rcnn/config.py#L120 and used in https://github.com/rbgirshick/py-faster-rcnn/blob/master/lib/rpn/proposal_target_layer.py#L64 and regression losses.

jhung0 avatar Aug 18 '17 15:08 jhung0

I never really checked what these weights do, can you explain them to me ?

hgaiser avatar Aug 18 '17 15:08 hgaiser

Inside weights seem to be for specifying anchors or rois with positive label (as opposed to 0 or -1). In the config, it seems outside weights are sample weighting (separate for RPN and RCNN).

Give the positive RPN examples weight of p * 1 / {num positives} and give negatives a weight of (1 - p). Set __C.TRAIN.RPN_POSITIVE_WEIGHT = -1.0 to use uniform example weighting. (This is used for outside weights)

jhung0 avatar Aug 18 '17 23:08 jhung0