diff --git a/keras_cv/bounding_box/converters.py b/keras_cv/bounding_box/converters.py index 8923527cbf..b671b6ff22 100644 --- a/keras_cv/bounding_box/converters.py +++ b/keras_cv/bounding_box/converters.py @@ -370,7 +370,8 @@ def convert_format( `"float32"`. """ if isinstance(boxes, dict): - boxes["boxes"] = convert_format( + converted_boxes = boxes.copy() + converted_boxes["boxes"] = convert_format( boxes["boxes"], source=source, target=target, @@ -378,7 +379,7 @@ def convert_format( image_shape=image_shape, dtype=dtype, ) - return boxes + return converted_boxes if boxes.shape[-1] is not None and boxes.shape[-1] != 4: raise ValueError(