coco dataset class 가져오기

Published onesixx on

import json
# !w g e t http://images.cocodataset.org/annotations/annotations_trainval2017.zip
# !unzip annotations_trainval2017.zip
with open('./annotations/instances_train2017.json', 'r') as f:
    data = json.load(f)
categories = data['categories']
category_list = []
for category in categories:
    category_list.append({'name': category['name'], 'id': category['id']})
# print(category_list)
classes = category_list
Categories: DeepLearning

onesixx

Blog Owner

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x