def _filter_boxes(self, boxes, min_size):
    'Remove all boxes with any side smaller than min_size.'
    ws = ((boxes[:, :, 2] - boxes[:, :, 0]) + 1)
    hs = ((boxes[:, :, 3] - boxes[:, :, 1]) + 1)
    keep = ((ws >= min_size.view((- 1), 1).expand_as(ws)) & (hs >= min_size.view((- 1), 1).expand_as(hs)))
    return keep
Remove all boxes with any side smaller than min_size.
def _filter_boxes(self, boxes, min_size):
    
    ws = ((boxes[:, :, 2] - boxes[:, :, 0]) + 1)
    hs = ((boxes[:, :, 3] - boxes[:, :, 1]) + 1)
    keep = ((ws >= min_size.view((- 1), 1).expand_as(ws)) & (hs >= min_size.view((- 1), 1).expand_as(hs)))
    return keep