Unverified Commit e21e4362 authored by Philip Meier's avatar Philip Meier Committed by GitHub
Browse files

unbatch image_id in CocoDetection wrapper (#7232)

parent a63046ce
......@@ -206,6 +206,10 @@ def coco_dectection_wrapper_factory(dataset):
batched_target = list_of_dicts_to_dict_of_lists(target)
image_ids = batched_target.pop("image_id")
image_id = batched_target["image_id"] = image_ids.pop()
assert all(other_image_id == image_id for other_image_id in image_ids)
spatial_size = tuple(F.get_spatial_size(image))
batched_target["boxes"] = datapoints.BoundingBox(
batched_target["bbox"],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment