由coco box 到bbox的转换如果是正框的话可以这样算: def coco_box_to_bbox(box): bbox = np.array([box[0]- box[2]/2, box[1] - box[3]/2, box[0] + box[2]/2, box[1] + box[3]/2], dtype=np.float32) ang = float(box[4]) 但是如果是旋转框的话,就不能这样算了吧?
由coco box 到bbox的转换如果是正框的话可以这样算:
def coco_box_to_bbox(box):
bbox = np.array([box[0]- box[2]/2, box[1] - box[3]/2,
box[0] + box[2]/2, box[1] + box[3]/2],
dtype=np.float32)
ang = float(box[4])
但是如果是旋转框的话,就不能这样算了吧?