import base64 import json import os import os.path as osp import numpy as np import PIL.Image from labelme import utils if __name__ == '__main__': pngs_path = "outputlabel" if not osp.exists(pngs_path): os.mkdir(pngs_path) classes = ["_background_", "person", "cat", "tv", "train", "bird", "boat", "airpline", "sheep"] color_map = { 0: (0, 0, 0), # _background_ 1: (255, 0, 0), # person 2: (0, 255, 0), # cat 3: (0, 0, 255), # tv 4: (255, 255, 0), # train 5: (255, 0, 255), # bird 6: (0, 255, 255), # boat 7: (128, 0, 0), # airpline 8: (0, 128, 0) # sheep } count = os.listdir("label") for i in range(0, len(count)): path = os.path.join("label", count[i]) if os.path.isfile(path) and path.endswith('json'):
11-02
5143
10-10
5688
10-08
118
10-03
537
09-25