diff --git a/references/detection/coco_utils.py b/references/detection/coco_utils.py
index <HASH>..<HASH> 100644
--- a/references/detection/coco_utils.py
+++ b/references/detection/coco_utils.py
@@ -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()
Avoid inplace modification of target boxes in detection references (#<I>)

@datumbox