def filter_boxes(boxes, min_size):
    """
    filter small boxes.
    :param boxes: [N, 4* num_classes]
    :param min_size:
    :return: keep:
    """
    ws = boxes[:, 2] - boxes[:, 0] + 1
    hs = boxes[:, 3] - boxes[:, 1] + 1
    keep = np.where((ws >= min_size) & (hs >= min_size))[0]
    return keep

    filter small boxes.
    :param boxes: [N, 4* num_classes]
    :param min_size:
    :return: keep:
    
lib/bbox/bbox_transform.py