包括的处理:
- 将 ground truth boxes 加入 roidb
- 添加 proposals 文件中给定的 proposals..., w, h) 转化为 (x1, y1, x2, y2)
x1, y1, x2, y2 = box_utils.xywh_to_xyxy(obj['bbox'])...x1, y1, x2, y2 = box_utils.clip_xyxy_to_image(x1, y1, x2, y2, height, width )
# 确保标注 bboxes...if obj['area'] > 0 and x2 > x1 and y2 > y1:
obj['clean_bbox'] = [x1, y1, x2, y2]...assert entry['id'] == proposals[id_field][i]
# 去除重复 boxes 和非常小的 boxes,并取 top k.