(img_root, img_dict)
| 107 | logger.info("Loaded {} images in the LVIS format from {}".format(len(imgs_anns), json_file)) |
| 108 | |
| 109 | def get_file_name(img_root, img_dict): |
| 110 | # Determine the path including the split folder ("train2017", "val2017", "test2017") from |
| 111 | # the coco_url field. Example: |
| 112 | # 'coco_url': 'http://images.cocodataset.org/train2017/000000155379.jpg' |
| 113 | split_folder, file_name = img_dict["coco_url"].split("/")[-2:] |
| 114 | return os.path.join(img_root + split_folder, file_name) |
| 115 | |
| 116 | dataset_dicts = [] |
| 117 |