Skip to content

Commit 91176e8

Browse files
authored
[proto] Updated center_crop tests (#6272)
* [proto] Added missing decorator for center_crop_segmentation_mask tests * Added center_crop_image_tensor
1 parent 6a68e5d commit 91176e8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/test_prototype_transforms_functional.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,15 @@ def perspective_segmentation_mask():
487487
)
488488

489489

490+
@register_kernel_info_from_sample_inputs_fn
491+
def center_crop_image_tensor():
492+
for image, output_size in itertools.product(
493+
make_images(sizes=((16, 16), (7, 33), (31, 9))),
494+
[[4, 3], [42, 70], [4]], # crop sizes < image sizes, crop_sizes > image sizes, single crop size
495+
):
496+
yield SampleInput(image, output_size)
497+
498+
490499
@register_kernel_info_from_sample_inputs_fn
491500
def center_crop_bounding_box():
492501
for bounding_box, output_size in itertools.product(make_bounding_boxes(), [(24, 12), [16, 18], [46, 48], [12]]):
@@ -495,6 +504,7 @@ def center_crop_bounding_box():
495504
)
496505

497506

507+
@register_kernel_info_from_sample_inputs_fn
498508
def center_crop_segmentation_mask():
499509
for mask, output_size in itertools.product(
500510
make_segmentation_masks(image_sizes=((16, 16), (7, 33), (31, 9))),

0 commit comments

Comments
 (0)