-
Notifications
You must be signed in to change notification settings - Fork 332
Closed
Labels
Description
In the following lines I have noticed that the bounding boxes are converted in place. I am not sure why we return the dictionary again. This does not raise a bug, but breaks the mental model of inplace and out of place changes.
keras-cv/keras_cv/bounding_box/converters.py
Lines 372 to 381 in 925d99d
if isinstance(boxes, dict): | |
boxes["boxes"] = convert_format( | |
boxes["boxes"], | |
source=source, | |
target=target, | |
images=images, | |
image_shape=image_shape, | |
dtype=dtype, | |
) | |
return boxes |
It would rather be useful to create a new dictionary and return the converted bbox where the original is kept as is.
If that is a good change, I would like to contribute to this (will be a quick fix)