diff --git a/tests/trainers/test_detection.py b/tests/trainers/test_detection.py index a05e1820dbf..8a6cfdc73fd 100644 --- a/tests/trainers/test_detection.py +++ b/tests/trainers/test_detection.py @@ -45,9 +45,12 @@ def forward(self, images: Any, targets: Any = None) -> Any: else: # eval mode output = [] for i in range(batch_size): + boxes = torch.rand(10, 4) + # xmax, ymax must be larger than xmin, ymin + boxes[:, 2:] += 1 output.append( { - "boxes": torch.rand(10, 4), + "boxes": boxes, "labels": torch.randint(0, 2, (10,)), "scores": torch.rand(10), }