coco dataset class 가져오기

Published by 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
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x