There was an error while loading. Please reload this page.
1 parent a63046c commit e21e436Copy full SHA for e21e436
torchvision/prototype/datapoints/_dataset_wrapper.py
@@ -206,6 +206,10 @@ def wrapper(sample):
206
207
batched_target = list_of_dicts_to_dict_of_lists(target)
208
209
+ image_ids = batched_target.pop("image_id")
210
+ image_id = batched_target["image_id"] = image_ids.pop()
211
+ assert all(other_image_id == image_id for other_image_id in image_ids)
212
+
213
spatial_size = tuple(F.get_spatial_size(image))
214
batched_target["boxes"] = datapoints.BoundingBox(
215
batched_target["bbox"],
0 commit comments