... { ... "boxes": torch.tensor([ ... [296.55, 93.96, 314.97, 152.79], ... [298.55, 98.96, 314.97, 151.79]]), ... "labels": torch.tensor([4, 5]), ... } ... ] >>> target = [ ... { ... "boxes": torch.tensor([ ... [300.00, 100.00, 315.00, 150.00], ... [300.00, 100.00, 315.00, 150.00] ... ]), ... "labels": torch.tensor([4, 5]), ... } ... ] >>> metric = IntersectionOverUnion(class_metrics=True) >>> metric(preds, target) {'iou': tensor(0.7756), 'iou/cl_4': tensor(0.6898), 'iou/cl_5': tensor(0.8614)} Raises: ModuleNotFoundError: If torchvision is not installed with version 0.8.0 or newer. FÚ