mmdet/datasets/pipelines/transforms.py
def _filter_box_candidates(self, bboxes, masks, labels, diffs, trunc):
        """Filter out bboxes too small after Mosaic."""
        bbox_w = bboxes[:, 2] - bboxes[:, 0]
        bbox_h = bboxes[:, 3] - bboxes[:, 1]
        valid_inds = (bbox_w > self.min_bbox_size) & \
                     (bbox_h > self.min_bbox_size)
        valid_inds = np.nonzero(valid_inds)[0]
        return bboxes[valid_inds], [masks[i] for i in valid_inds], labels[valid_inds], diffs[valid_inds], trunc[
            valid_inds]
Filter out bboxes too small after Mosaic.
Filter out bboxes too small after Mosaic.
Filter out bboxes too small after Mosaic .
def _filter_box_candidates(self, bboxes, masks, labels, diffs, trunc):
        bbox_w = bboxes[:, 2] - bboxes[:, 0]
        bbox_h = bboxes[:, 3] - bboxes[:, 1]
        valid_inds = (bbox_w > self.min_bbox_size) & \
                     (bbox_h > self.min_bbox_size)
        valid_inds = np.nonzero(valid_inds)[0]
        return bboxes[valid_inds], [masks[i] for i in valid_inds], labels[valid_inds], diffs[valid_inds], trunc[
            valid_inds]
def _filter_box_candidates ( self , bboxes , masks , labels , diffs , trunc ) : bbox_w = bboxes [ : , 2 ] - bboxes [ : , 0 ] bbox_h = bboxes [ : , 3 ] - bboxes [ : , 1 ] valid_inds = ( bbox_w > self . min_bbox_size ) & ( bbox_h > self . min_bbox_size ) valid_inds = np . nonzero ( valid_inds ) [ 0 ] return bboxes [ valid_inds ] , [ masks [ i ] for i in valid_inds ] , labels [ valid_inds ] , diffs [ valid_inds ] , trunc [ valid_inds ]
Filter out bboxes too small after Mosaic.
Filter out bboxes too small after Mosaic .
"""Filter out bboxes too small after Mosaic."""
self
bboxes
masks
labels
diffs
trunc