Unverified Commit c486bb14 authored by vfdev's avatar vfdev Committed by GitHub
Browse files

Update coco_utils.py (#7869)


Co-authored-by: default avatarNicolas Hug <nh.nicolas.hug@gmail.com>
parent 5c1e62ff
...@@ -129,7 +129,7 @@ def convert_to_coco_api(ds): ...@@ -129,7 +129,7 @@ def convert_to_coco_api(ds):
# find better way to get target # find better way to get target
# targets = ds.get_annotations(img_idx) # targets = ds.get_annotations(img_idx)
img, targets = ds[img_idx] img, targets = ds[img_idx]
image_id = targets["image_id"].item() image_id = targets["image_id"]
img_dict = {} img_dict = {}
img_dict["id"] = image_id img_dict["id"] = image_id
img_dict["height"] = img.shape[-2] img_dict["height"] = img.shape[-2]
......
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