Skip to content

Commit 291d181

Browse files
committed
Added one more test case
1 parent ceb2cd9 commit 291d181

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/test_prototype_transforms_functional.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,14 +1098,17 @@ def parse_padding():
10981098
@pytest.mark.parametrize("device", cpu_and_gpu())
10991099
@pytest.mark.parametrize(
11001100
"output_size",
1101-
[(18, 18), (18, 15), (16, 19)],
1101+
[(18, 18), [18, 15], (16, 19), [12]],
11021102
)
11031103
def test_correctness_center_crop_bounding_box(device, output_size):
11041104
def _compute_expected_bbox(bbox, output_size_):
11051105
format_ = bbox.format
11061106
image_size_ = bbox.image_size
11071107
bbox = convert_bounding_box_format(bbox, format_, features.BoundingBoxFormat.XYWH)
11081108

1109+
if len(output_size_) == 1:
1110+
output_size_.append(output_size_[-1])
1111+
11091112
cy = int(round((image_size_[0] - output_size_[0]) * 0.5))
11101113
cx = int(round((image_size_[1] - output_size_[1]) * 0.5))
11111114
out_bbox = [

0 commit comments

Comments
 (0)