We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thanks to @AntoineSimoulin for uncovering this issue in 5321f23
old_format = tv_tensors.BoundingBoxFormat.CXCYWH new_format = tv_tensors.BoundingBoxFormat.XYXY dtype = torch.int64 fn_type = "functional" device = torch.device("cpu") # bounding_boxes = make_bounding_boxes(format=old_format, dtype=dtype, device=device) bounding_boxes = tv_tensors.BoundingBoxes([[ 5, 6, 10, 13]], format=tv_tensors.BoundingBoxFormat.CXCYWH, canvas_size=(17, 11)) if fn_type == "functional": fn = functools.partial(F.convert_bounding_box_format, new_format=new_format) else: fn = transforms.ConvertBoundingBoxFormat(format=new_format) actual = fn(bounding_boxes) expected = _reference_convert_bounding_box_format(bounding_boxes, new_format) assert_equal(actual, expected)
Gives:
BoundingBoxes([[ 0, -1, 10, 12]], format=BoundingBoxFormat.XYXY, canvas_size=(17, 11)) BoundingBoxes([[ 0, 0, 10, 12]], format=BoundingBoxFormat.XYXY, canvas_size=(17, 11))
The -1 part is clearly wrong. Maybe an easy fix is to call max(0, ...) at some point but I haven't looked into it yet.
-1
max(0, ...)
cc @vfdev-5
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Thanks to @AntoineSimoulin for uncovering this issue in 5321f23
Gives:
The
-1
part is clearly wrong. Maybe an easy fix is to callmax(0, ...)
at some point but I haven't looked into it yet.cc @vfdev-5
The text was updated successfully, but these errors were encountered: