Unverified Commit e13da8b8 authored by rvandeghen's avatar rvandeghen Committed by GitHub
Browse files

Avoid inplace modification of target boxes in detection references (#5289)



@datumbox
Co-authored-by: default avatarVasilis Vryniotis <datumbox@users.noreply.github.com>
parent 11d903ec
......@@ -156,7 +156,7 @@ def convert_to_coco_api(ds):
img_dict["height"] = img.shape[-2]
img_dict["width"] = img.shape[-1]
dataset["images"].append(img_dict)
bboxes = targets["boxes"]
bboxes = targets["boxes"].clone()
bboxes[:, 2:] -= bboxes[:, :2]
bboxes = bboxes.tolist()
labels = targets["labels"].tolist()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment