├── ccpd_annotations.json ├── ccpd_to_coco.py ├── ccpd_to_coco_raw.py ├── data ├── 01-0_1-249&528_393&586-392&584_249&586_250&530_393&528-0_0_25_27_7_26_29-131-21.jpg ├── 01-0_2-383&467_527&525-524&525_383&523_386&467_527&469-0_0_15_26_24_25_23-58-32.jpg ├── 01-0_5-267&511_411&569-411&568_273&569_267&512_405&511-0_0_27_31_32_23_24-128-43.jpg ├── 01-2_1-267&333_411&391-411&384_268&391_267&340_410&333-0_0_30_7_26_30_32-124-25.jpg ├── 01-2_1-268&502_412&560-411&560_268&554_269&502_412&508-0_0_22_29_26_25_7-122-36.jpg ├── 01-3_10-239&501_383&559-383&559_245&551_239&501_377&509-0_0_7_2_32_26_25-53-7.jpg ├── 04-20_48-240&477_472&621-472&621_278&548_240&477_434&550-0_12_20_13_32_32_32-77-90.jpg ├── 05-16_17-176&448_416&622-415&549_176&622_177&521_416&448-10_1_31_18_19_31_26-146-41.jpg └── 05-17_15-146&426_386&600-383&600_146&527_149&426_386&499-16_2_32_30_25_29_6-99-16.jpg ├── lable_result.png ├── make_seg_mask.py ├── make_seg_mask_raw.py ├── map ├── 01-0_1-249&528_393&586-392&584_249&586_250&530_393&528-0_0_25_27_7_26_29-131-21.png ├── 01-0_2-383&467_527&525-524&525_383&523_386&467_527&469-0_0_15_26_24_25_23-58-32.png ├── 01-0_5-267&511_411&569-411&568_273&569_267&512_405&511-0_0_27_31_32_23_24-128-43.png ├── 01-2_1-267&333_411&391-411&384_268&391_267&340_410&333-0_0_30_7_26_30_32-124-25.png ├── 01-2_1-268&502_412&560-411&560_268&554_269&502_412&508-0_0_22_29_26_25_7-122-36.png ├── 01-3_10-239&501_383&559-383&559_245&551_239&501_377&509-0_0_7_2_32_26_25-53-7.png ├── 04-20_48-240&477_472&621-472&621_278&548_240&477_434&550-0_12_20_13_32_32_32-77-90.png ├── 05-16_17-176&448_416&622-415&549_176&622_177&521_416&448-10_1_31_18_19_31_26-146-41.png └── 05-17_15-146&426_386&600-383&600_146&527_149&426_386&499-16_2_32_30_25_29_6-99-16.png ├── pycococreatortools ├── __init__.py ├── __pycache__ │ ├── __init__.cpython-36.pyc │ └── pycococreatortools.cpython-36.pyc └── pycococreatortools.py ├── readme.md └── stuffthingmaps └── train2017 ├── 01-0_1-249&528_393&586-392&584_249&586_250&530_393&528-0_0_25_27_7_26_29-131-21.png ├── 01-0_2-383&467_527&525-524&525_383&523_386&467_527&469-0_0_15_26_24_25_23-58-32.png ├── 01-0_5-267&511_411&569-411&568_273&569_267&512_405&511-0_0_27_31_32_23_24-128-43.png ├── 01-2_1-267&333_411&391-411&384_268&391_267&340_410&333-0_0_30_7_26_30_32-124-25.png ├── 01-2_1-268&502_412&560-411&560_268&554_269&502_412&508-0_0_22_29_26_25_7-122-36.png ├── 01-3_10-239&501_383&559-383&559_245&551_239&501_377&509-0_0_7_2_32_26_25-53-7.png ├── 04-20_48-240&477_472&621-472&621_278&548_240&477_434&550-0_12_20_13_32_32_32-77-90.png ├── 05-16_17-176&448_416&622-415&549_176&622_177&521_416&448-10_1_31_18_19_31_26-146-41.png └── 05-17_15-146&426_386&600-383&600_146&527_149&426_386&499-16_2_32_30_25_29_6-99-16.png /ccpd_annotations.json: -------------------------------------------------------------------------------- 1 | {"info": {"description": "CCPD Dataset in COCO Format", "url": "", "version": "0.1.0", "year": 2019, "contributor": "Tristan, Onlyyou intern", "date_created": "2019-10-20 11:02:16.308059"}, "licenses": [{"id": 1, "name": "ALL RIGHTS RESERVED", "url": ""}], "categories": [{"id": 1, "name": "license plate", "supercategory": "shape"}, {"id": 2, "name": "background", "supercategory": "shape"}], "images": [{"id": 1, "file_name": "05-17_15-146&426_386&600-383&600_146&527_149&426_386&499-16_2_32_30_25_29_6-99-16.jpg", "width": 720, "height": 1160, "date_captured": "2019-10-20 11:02:16.307361", "license": 1, "coco_url": "", "flickr_url": ""}, {"id": 2, "file_name": "05-16_17-176&448_416&622-415&549_176&622_177&521_416&448-10_1_31_18_19_31_26-146-41.jpg", "width": 720, "height": 1160, "date_captured": "2019-10-20 11:02:16.307361", "license": 1, "coco_url": "", "flickr_url": ""}, {"id": 3, "file_name": "04-20_48-240&477_472&621-472&621_278&548_240&477_434&550-0_12_20_13_32_32_32-77-90.jpg", "width": 720, "height": 1160, "date_captured": "2019-10-20 11:02:16.307361", "license": 1, "coco_url": "", "flickr_url": ""}, {"id": 4, "file_name": "01-3_10-239&501_383&559-383&559_245&551_239&501_377&509-0_0_7_2_32_26_25-53-7.jpg", "width": 720, "height": 1160, "date_captured": "2019-10-20 11:02:16.307361", "license": 1, "coco_url": "", "flickr_url": ""}, {"id": 5, "file_name": "01-2_1-268&502_412&560-411&560_268&554_269&502_412&508-0_0_22_29_26_25_7-122-36.jpg", "width": 720, "height": 1160, "date_captured": "2019-10-20 11:02:16.307361", "license": 1, "coco_url": "", "flickr_url": ""}, {"id": 6, "file_name": "01-2_1-267&333_411&391-411&384_268&391_267&340_410&333-0_0_30_7_26_30_32-124-25.jpg", "width": 720, "height": 1160, "date_captured": "2019-10-20 11:02:16.307361", "license": 1, "coco_url": "", "flickr_url": ""}, {"id": 7, "file_name": "01-0_5-267&511_411&569-411&568_273&569_267&512_405&511-0_0_27_31_32_23_24-128-43.jpg", "width": 720, "height": 1160, "date_captured": "2019-10-20 11:02:16.307361", "license": 1, "coco_url": "", "flickr_url": ""}, {"id": 8, "file_name": "01-0_2-383&467_527&525-524&525_383&523_386&467_527&469-0_0_15_26_24_25_23-58-32.jpg", "width": 720, "height": 1160, "date_captured": "2019-10-20 11:02:16.307361", "license": 1, "coco_url": "", "flickr_url": ""}, {"id": 9, "file_name": "01-0_1-249&528_393&586-392&584_249&586_250&530_393&528-0_0_25_27_7_26_29-131-21.jpg", "width": 720, "height": 1160, "date_captured": "2019-10-20 11:02:16.307361", "license": 1, "coco_url": "", "flickr_url": ""}], "annotations": [{"id": 1, "image_id": 1, "category_id": 1, "iscrowd": 0, "area": 24156.0, "bbox": [146.0, 426.0, 240.0, 174.0], "segmentation": [[383.0, 600.0], [146.0, 527.0], [149.0, 426.0], [386.0, 499.0]], "width": 720, "height": 1160}, {"id": 1, "image_id": 2, "category_id": 1, "iscrowd": 0, "area": 24066.0, "bbox": [176.0, 448.0, 240.0, 174.0], "segmentation": [[415.0, 549.0], [176.0, 622.0], [177.0, 521.0], [416.0, 448.0]], "width": 720, "height": 1160}, {"id": 1, "image_id": 3, "category_id": 1, "iscrowd": 0, "area": 11000.0, "bbox": [240.0, 477.0, 232.0, 144.0], "segmentation": [[472.0, 621.0], [278.0, 548.0], [240.0, 477.0], [434.0, 550.0]], "width": 720, "height": 1160}, {"id": 1, "image_id": 4, "category_id": 1, "iscrowd": 0, "area": 6852.0, "bbox": [239.0, 501.0, 144.0, 58.0], "segmentation": [[383.0, 559.0], [245.0, 551.0], [239.0, 501.0], [377.0, 509.0]], "width": 720, "height": 1160}, {"id": 1, "image_id": 5, "category_id": 1, "iscrowd": 0, "area": 7442.0, "bbox": [268.0, 502.0, 144.0, 58.0], "segmentation": [[411.0, 560.0], [268.0, 554.0], [269.0, 502.0], [412.0, 508.0]], "width": 720, "height": 1160}, {"id": 1, "image_id": 6, "category_id": 1, "iscrowd": 0, "area": 7300.0, "bbox": [267.0, 333.0, 144.0, 58.0], "segmentation": [[411.0, 384.0], [268.0, 391.0], [267.0, 340.0], [410.0, 333.0]], "width": 720, "height": 1160}, {"id": 1, "image_id": 7, "category_id": 1, "iscrowd": 0, "area": 7872.0, "bbox": [267.0, 511.0, 144.0, 58.0], "segmentation": [[411.0, 568.0], [273.0, 569.0], [267.0, 512.0], [405.0, 511.0]], "width": 720, "height": 1160}, {"id": 1, "image_id": 8, "category_id": 1, "iscrowd": 0, "area": 7902.0, "bbox": [383.0, 467.0, 144.0, 58.0], "segmentation": [[524.0, 525.0], [383.0, 523.0], [386.0, 467.0], [527.0, 469.0]], "width": 720, "height": 1160}, {"id": 1, "image_id": 9, "category_id": 1, "iscrowd": 0, "area": 8006.0, "bbox": [249.0, 528.0, 144.0, 58.0], "segmentation": [[392.0, 584.0], [249.0, 586.0], [250.0, 530.0], [393.0, 528.0]], "width": 720, "height": 1160}]} -------------------------------------------------------------------------------- /ccpd_to_coco.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*-# 2 | #------------------------------------------------------------------------------- 3 | # Name: ccpd_to_coco_raw.py 4 | # Author: wdf 5 | # Date: 2019/10/18 6 | # IDE: PyCharm 7 | # Description: 把ccod车牌检测数据集转化为coco格式(bbox、mask、stuffthingmaps) 8 | # Usage: 9 | # python ccpd_to_coco_raw.py --data "./data" 10 | #------------------------------------------------------------------------------- 11 | 12 | import datetime 13 | import json 14 | import cv2 15 | from random import randint 16 | import numpy as np 17 | from pathlib import Path 18 | from PIL import Image 19 | 20 | from multiprocessing import pool 21 | from pycococreatortools import pycococreatortools 22 | 23 | import os 24 | file_path = os.getcwd() + '/map/' # 在当前目录下新建map文件夹,用于存储map中间结果图 25 | if not os.path.exists(file_path): 26 | os.mkdir(file_path) 27 | 28 | import argparse 29 | 30 | parser = argparse.ArgumentParser() 31 | ## 从命令行指定kjdz文件夹 32 | '''目录树如下 33 | |- KJDZ 34 | |-- IMAGES 35 | |---- *.jpg 36 | |-- ANNOTATIONS 37 | |---- *.txt 38 | ''' 39 | parser.add_argument("--data", 40 | default=None, 41 | type=str, 42 | required=True, 43 | help="The input data dir. Should contain all the images") 44 | 45 | args = parser.parse_args() 46 | 47 | IMAGE_DIR = Path(args.data) 48 | 49 | 50 | INFO = { 51 | "description": "CCPD Dataset in COCO Format", 52 | "url": "", 53 | "version": "0.1.0", 54 | "year": 2019, 55 | "contributor": "Tristan, Onlyyou intern", 56 | "date_created": datetime.datetime.utcnow().isoformat(' ') # 显示此刻时间,格式:'2019-04-30 02:17:49.040415' 57 | } 58 | 59 | LICENSES = [ 60 | { 61 | "id": 1, 62 | "name": "ALL RIGHTS RESERVED", 63 | "url": "" 64 | } 65 | ] 66 | # 初始化类别(背景) 67 | CATEGORIES = [ 68 | { 69 | 'id': 1, 70 | 'name': 'license plate', 71 | 'supercategory': 'shape', 72 | }, 73 | { 74 | 'id': 2, 75 | 'name': 'background', 76 | 'supercategory': 'shape', 77 | } 78 | ] 79 | 80 | 81 | # 根据车牌的四个角点绘制精确的segmentation map 82 | def make_seg_mask(map, segmentions,color=(0,255,0)): 83 | c = np.array([[segmentions]], dtype=np.int32) 84 | cv2.fillPoly(map, c, color) 85 | 86 | def random_color(class_id): 87 | '''预定义12种颜色,基本涵盖kjdz所有label类型 88 | 颜色对照网址:https://tool.oschina.net/commons?type=3''' 89 | colorArr = [(255,0,0), # 红色 90 | (255,255,0), # 黄色 91 | (0, 255, 0), # 绿色 92 | (0,0,255), # 蓝色 93 | (160, 32, 240), # 紫色 94 | (165, 42, 42), # 棕色 95 | (238, 201, 0), # gold 96 | (255, 110, 180), # HotPink1 97 | (139, 0 ,0), #DarkRed 98 | (0 ,139 ,139),#DarkCyan 99 | (139, 0 ,139),# DarkMagenta 100 | (0 ,0 ,139) # dark blue 101 | ] 102 | if class_id < 11: 103 | return colorArr[class_id] 104 | else: # 如有特殊情况,类别数超过12,则随机返回一个颜色 105 | rm_col = (randint(0,255),randint(0,255),randint(0,255)) 106 | return rm_col 107 | 108 | # 获取 bounding-box, segmentation 信息 109 | # 输入:image path 110 | # 返回: 111 | # bounding box 112 | # four locations 113 | 114 | def get_info(im_file): 115 | img_name = str(im_file) 116 | lbl = img_name.split('/')[-1].rsplit('.', 1)[0].split('-')[-3] # label: '16_2_32_30_25_29_6' 117 | iname = img_name.rsplit('/', 1)[-1].rsplit('.', 1)[0].split('-') 118 | [leftUp, rightDown] = [[float(eel) for eel in el.split('&')] for el in iname[2].split('_')] # bounding box 119 | height = rightDown[1]-leftUp[1] 120 | width = rightDown[0]-leftUp[0] 121 | left = leftUp[0] 122 | top = leftUp[1] 123 | segmentation = [[float(eel) for eel in el.split('&')] for el in iname[3].split('_')] # four vertices locations 124 | 125 | return [left, top, width, height], segmentation 126 | 127 | 128 | # 计算任意多边形的面积,顶点按照顺时针或者逆时针方向排列 129 | def compute_polygon_area(points): 130 | point_num = len(points) 131 | if(point_num < 3): 132 | return 0.0 133 | s = points[0][1] * (points[point_num-1][0] - points[1][0]) 134 | #for i in range(point_num): # (int i = 1 i < point_num ++i): 135 | for i in range(1, point_num): 136 | s += points[i][1] * (points[i-1][0] - points[(i+1)%point_num][0]) 137 | return abs(s/2.0) 138 | 139 | 140 | def main(): 141 | # coco lable文件(如training2017.json)需要存储的信息 142 | coco_output = { 143 | "info": INFO, 144 | "licenses": LICENSES, 145 | "categories": CATEGORIES, 146 | "images": [], 147 | "annotations": [] 148 | } 149 | 150 | # 初始化id(以后依次加一) 151 | image_id = 1 152 | annotation_id = 1 153 | 154 | # 加载图片信息 155 | im_files = [f for f in IMAGE_DIR.iterdir()] 156 | im_files.sort(key=lambda f: f.stem,reverse=True) # 排序,防止顺序错乱、数据和标签不对应 157 | # print("im-length:",len(im_files),"\n im_files:",im_files) 158 | 159 | myPool = pool.Pool(processes=4) # 并行化处理 160 | 161 | for im_file in im_files: 162 | # 写入图片信息(id、图片名、图片大小),其中id从1开始 163 | image = Image.open(im_file) 164 | im_info = pycococreatortools.create_image_info( image_id, im_file.name, image.size) # 图片信息 165 | coco_output['images'].append(im_info) # 存储图片信息(id、图片名、大小) 166 | 167 | 168 | annotation_info_list = [] # 存储标注信息 169 | 170 | # 用于制作stuff-thing map 171 | img_cv = cv2.imread(str(im_file)) #调用opencv读取,方便后面使用opencv绘制mask、保存结果 172 | rectangle = np.zeros(img_cv.shape[0:3], dtype="uint8") # 新建空白图像 173 | # 使用白色填充图片区域,默认为0-黑色,255-白色 174 | rectangle.fill(125) # 125 灰色 175 | 176 | # 处理label信息, 包括左上角、右下角、四个角点(用于分割) 177 | bounding_box, segmentation = get_info(im_file) 178 | class_id = 1 # id 为数字形式,如 1,此时是list形式,后续需要转换 # 指定为1,因为只有”是车牌“这一类 179 | 180 | # 显示日志 181 | print(bounding_box, segmentation) 182 | 183 | # 制作stuff-thing map 184 | color = random_color(class_id) # 得到当前类别的颜色,保证每幅图像里每一类的颜色都相同 185 | make_seg_mask(rectangle,segmentation, color) 186 | 187 | # area = bounding_box[-1] * bounding_box[-2] # 当前bounding-box的面积,宽×高 188 | area = compute_polygon_area(segmentation) # 当前segmentation的面积(比bounding box更精确) 189 | 190 | myPool.apply_async(func=pycococreatortools.mask_create_annotation_info, 191 | args=(annotation_id, image_id, class_id, area,image.size, bounding_box,segmentation), 192 | callback=annotation_info_list.append) 193 | # an_infos = pycococreatortools.mask_create_annotation_info(annotation_id=annotation_id, image_id=image_id, 194 | # category_id=class_id, area=area, 195 | # image_size=image.size, bounding_box=bounding_box, 196 | # segmentation=segmentation) 197 | # annotation_info_list.append(an_infos) 198 | cv2.imwrite(file_path+str(im_file.stem)+".png",rectangle) 199 | 200 | 201 | 202 | # 上面得到单张图片的所有bounding-box信息,接下来每单张图片存储一次 203 | for annotation_info in annotation_info_list: 204 | if annotation_info is not None: 205 | coco_output['annotations'].append(annotation_info) 206 | image_id += 1 207 | 208 | 209 | myPool.close() 210 | myPool.join() 211 | # 保存成json格式 212 | print("[INFO] Storing annotations json file...") 213 | output_json = Path(f'ccpd_annotations.json') 214 | with output_json.open('w', encoding='utf-8') as f: 215 | json.dump(coco_output, f) 216 | print("[INFO] Annotations JSON file saved in:", str(output_json)) 217 | 218 | 219 | if __name__ == "__main__": 220 | main() 221 | -------------------------------------------------------------------------------- /ccpd_to_coco_raw.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*-# 2 | #------------------------------------------------------------------------------- 3 | # Name: ccpd_to_coco.py 4 | # Author: wdf 5 | # Date: 2019/10/18 6 | # IDE: PyCharm 7 | # Description: 把ccod车牌检测数据集转化为coco格式(bbox、mask、stuffthingmaps) 8 | # Usage: 9 | # python ccpd_to_coco.py --data "./data" 10 | #------------------------------------------------------------------------------- 11 | 12 | import datetime 13 | import json 14 | import cv2 15 | from random import randint 16 | import numpy as np 17 | from pathlib import Path 18 | from PIL import Image 19 | 20 | from multiprocessing import pool 21 | from pycococreatortools import pycococreatortools 22 | 23 | import os 24 | file_path = os.getcwd() + '/map/' # 在当前目录下新建map文件夹,用于存储map中间结果图 25 | if not os.path.exists(file_path): 26 | os.mkdir(file_path) 27 | 28 | import argparse 29 | parser = argparse.ArgumentParser() 30 | ## 从命令行指定kjdz文件夹 31 | '''目录树如下 32 | |- KJDZ 33 | |-- IMAGES 34 | |---- *.jpg 35 | |-- ANNOTATIONS 36 | |---- *.txt 37 | ''' 38 | parser.add_argument("--data", 39 | default=None, 40 | type=str, 41 | required=True, 42 | help="The input data dir. Should contain all the images") 43 | 44 | args = parser.parse_args() 45 | 46 | IMAGE_DIR = Path(args.data) 47 | 48 | 49 | INFO = { 50 | "description": "CCPD Dataset in COCO Format", 51 | "url": "", 52 | "version": "0.1.0", 53 | "year": 2019, 54 | "contributor": "Tristan, Onlyyou intern", 55 | "date_created": datetime.datetime.utcnow().isoformat(' ') # 显示此刻时间,格式:'2019-04-30 02:17:49.040415' 56 | } 57 | 58 | LICENSES = [ 59 | { 60 | "id": 1, 61 | "name": "ALL RIGHTS RESERVED", 62 | "url": "" 63 | } 64 | ] 65 | # 初始化类别(背景) 66 | CATEGORIES = [ 67 | { 68 | 'id': 1, 69 | 'name': 'license plate', 70 | 'supercategory': 'shape', 71 | }, 72 | { 73 | 'id': 2, 74 | 'name': 'background', 75 | 'supercategory': 'shape', 76 | } 77 | ] 78 | 79 | 80 | # 根据车牌的四个角点绘制精确的segmentation map 81 | def make_seg_mask(map, segmentions,color=(0,255,0)): 82 | c = np.array([[segmentions]], dtype=np.int32) 83 | cv2.fillPoly(map, c, color) 84 | 85 | def random_color(class_id): 86 | '''预定义12种颜色,基本涵盖kjdz所有label类型 87 | 颜色对照网址:https://tool.oschina.net/commons?type=3''' 88 | colorArr = [(255,0,0), # 红色 89 | (255,255,0), # 黄色 90 | (0, 255, 0), # 绿色 91 | (0,0,255), # 蓝色 92 | (160, 32, 240), # 紫色 93 | (165, 42, 42), # 棕色 94 | (238, 201, 0), # gold 95 | (255, 110, 180), # HotPink1 96 | (139, 0 ,0), #DarkRed 97 | (0 ,139 ,139),#DarkCyan 98 | (139, 0 ,139),# DarkMagenta 99 | (0 ,0 ,139) # dark blue 100 | ] 101 | if class_id < 11: 102 | return colorArr[class_id] 103 | else: # 如有特殊情况,类别数超过12,则随机返回一个颜色 104 | rm_col = (randint(0,255),randint(0,255),randint(0,255)) 105 | return rm_col 106 | 107 | # 获取 bounding-box, segmentation 信息 108 | # 输入:image path 109 | # 返回: 110 | # bounding box 111 | # four locations 112 | 113 | def get_info(im_file): 114 | img_name = str(im_file) 115 | lbl = img_name.split('/')[-1].rsplit('.', 1)[0].split('-')[-3] # label: '16_2_32_30_25_29_6' 116 | iname = img_name.rsplit('/', 1)[-1].rsplit('.', 1)[0].split('-') 117 | [leftUp, rightDown] = [[float(eel) for eel in el.split('&')] for el in iname[2].split('_')] # bounding box 118 | height = rightDown[1]-leftUp[1] 119 | width = rightDown[0]-leftUp[0] 120 | left = leftUp[0] 121 | top = leftUp[1] 122 | segmentation = [[float(eel) for eel in el.split('&')] for el in iname[3].split('_')] # four vertices locations 123 | 124 | return [left, top, width, height], segmentation 125 | 126 | 127 | # 计算任意多边形的面积,顶点按照顺时针或者逆时针方向排列 128 | def compute_polygon_area(points): 129 | point_num = len(points) 130 | if(point_num < 3): 131 | return 0.0 132 | s = points[0][1] * (points[point_num-1][0] - points[1][0]) 133 | #for i in range(point_num): # (int i = 1 i < point_num ++i): 134 | for i in range(1, point_num): 135 | s += points[i][1] * (points[i-1][0] - points[(i+1)%point_num][0]) 136 | return abs(s/2.0) 137 | 138 | 139 | def main(): 140 | # coco lable文件(如training2017.json)需要存储的信息 141 | coco_output = { 142 | "info": INFO, 143 | "licenses": LICENSES, 144 | "categories": CATEGORIES, 145 | "images": [], 146 | "annotations": [] 147 | } 148 | 149 | # 初始化id(以后依次加一) 150 | image_id = 1 151 | annotation_id = 1 152 | 153 | # 加载图片信息 154 | im_files = [f for f in IMAGE_DIR.iterdir()] 155 | im_files.sort(key=lambda f: f.stem,reverse=True) # 排序,防止顺序错乱、数据和标签不对应 156 | # print("im-length:",len(im_files),"\n im_files:",im_files) 157 | 158 | 159 | for im_file in im_files: 160 | # 写入图片信息(id、图片名、图片大小),其中id从1开始 161 | image = Image.open(im_file) 162 | im_info = pycococreatortools.create_image_info( image_id, im_file.name, image.size) # 图片信息 163 | coco_output['images'].append(im_info) # 存储图片信息(id、图片名、大小) 164 | 165 | 166 | myPool = pool.Pool(processes=16) # 并行化处理 167 | annotation_info_list = [] # 存储标注信息 168 | 169 | # 用于制作stuff-thing map 170 | img_cv = cv2.imread(str(im_file)) #调用opencv读取,方便后面使用opencv绘制mask、保存结果 171 | rectangle = np.zeros(img_cv.shape[0:3], dtype="uint8") # 新建空白图像 172 | # 使用白色填充图片区域,默认为0-黑色,255-白色 173 | rectangle.fill(125) # 125 灰色 174 | 175 | # 处理label信息, 包括左上角、右下角、四个角点(用于分割) 176 | bounding_box, segmentation = get_info(im_file) 177 | class_id = 1 # id 为数字形式,如 1,此时是list形式,后续需要转换 # 指定为1,因为只有”是车牌“这一类 178 | 179 | # 显示日志 180 | print(bounding_box, segmentation) 181 | 182 | # 制作stuff-thing map 183 | color = random_color(class_id) # 得到当前类别的颜色,保证每幅图像里每一类的颜色都相同 184 | make_seg_mask(rectangle,segmentation, color) 185 | 186 | # area = bounding_box[-1] * bounding_box[-2] # 当前bounding-box的面积,宽×高 187 | area = compute_polygon_area(segmentation) # 当前segmentation的面积(比bounding box更精确) 188 | 189 | an_infos = pycococreatortools.mask_create_annotation_info(annotation_id=annotation_id, image_id=image_id, 190 | category_id=class_id, area=area, 191 | image_size=image.size, bounding_box=bounding_box, 192 | segmentation=segmentation) 193 | annotation_info_list.append(an_infos) 194 | cv2.imwrite(file_path+str(im_file.stem)+".png",rectangle) 195 | 196 | myPool.close() 197 | myPool.join() 198 | 199 | # 上面得到单张图片的所有bounding-box信息,接下来每单张图片存储一次 200 | for annotation_info in annotation_info_list: 201 | if annotation_info is not None: 202 | coco_output['annotations'].append(annotation_info) 203 | image_id += 1 204 | 205 | # 保存成json格式 206 | print("[INFO] Storing annotations json file...") 207 | output_json = Path(f'ccpd_annotations.json') 208 | with output_json.open('w', encoding='utf-8') as f: 209 | json.dump(coco_output, f) 210 | print("[INFO] Annotations JSON file saved in:", str(output_json)) 211 | 212 | 213 | if __name__ == "__main__": 214 | main() 215 | -------------------------------------------------------------------------------- /data/01-0_1-249&528_393&586-392&584_249&586_250&530_393&528-0_0_25_27_7_26_29-131-21.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weidafeng/CCPD2COCO/5c3092e459a626f5fc4278b7e73ddccc26919c98/data/01-0_1-249&528_393&586-392&584_249&586_250&530_393&528-0_0_25_27_7_26_29-131-21.jpg -------------------------------------------------------------------------------- /data/01-0_2-383&467_527&525-524&525_383&523_386&467_527&469-0_0_15_26_24_25_23-58-32.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weidafeng/CCPD2COCO/5c3092e459a626f5fc4278b7e73ddccc26919c98/data/01-0_2-383&467_527&525-524&525_383&523_386&467_527&469-0_0_15_26_24_25_23-58-32.jpg -------------------------------------------------------------------------------- /data/01-0_5-267&511_411&569-411&568_273&569_267&512_405&511-0_0_27_31_32_23_24-128-43.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weidafeng/CCPD2COCO/5c3092e459a626f5fc4278b7e73ddccc26919c98/data/01-0_5-267&511_411&569-411&568_273&569_267&512_405&511-0_0_27_31_32_23_24-128-43.jpg -------------------------------------------------------------------------------- /data/01-2_1-267&333_411&391-411&384_268&391_267&340_410&333-0_0_30_7_26_30_32-124-25.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weidafeng/CCPD2COCO/5c3092e459a626f5fc4278b7e73ddccc26919c98/data/01-2_1-267&333_411&391-411&384_268&391_267&340_410&333-0_0_30_7_26_30_32-124-25.jpg -------------------------------------------------------------------------------- /data/01-2_1-268&502_412&560-411&560_268&554_269&502_412&508-0_0_22_29_26_25_7-122-36.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weidafeng/CCPD2COCO/5c3092e459a626f5fc4278b7e73ddccc26919c98/data/01-2_1-268&502_412&560-411&560_268&554_269&502_412&508-0_0_22_29_26_25_7-122-36.jpg -------------------------------------------------------------------------------- /data/01-3_10-239&501_383&559-383&559_245&551_239&501_377&509-0_0_7_2_32_26_25-53-7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weidafeng/CCPD2COCO/5c3092e459a626f5fc4278b7e73ddccc26919c98/data/01-3_10-239&501_383&559-383&559_245&551_239&501_377&509-0_0_7_2_32_26_25-53-7.jpg -------------------------------------------------------------------------------- /data/04-20_48-240&477_472&621-472&621_278&548_240&477_434&550-0_12_20_13_32_32_32-77-90.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weidafeng/CCPD2COCO/5c3092e459a626f5fc4278b7e73ddccc26919c98/data/04-20_48-240&477_472&621-472&621_278&548_240&477_434&550-0_12_20_13_32_32_32-77-90.jpg -------------------------------------------------------------------------------- /data/05-16_17-176&448_416&622-415&549_176&622_177&521_416&448-10_1_31_18_19_31_26-146-41.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weidafeng/CCPD2COCO/5c3092e459a626f5fc4278b7e73ddccc26919c98/data/05-16_17-176&448_416&622-415&549_176&622_177&521_416&448-10_1_31_18_19_31_26-146-41.jpg -------------------------------------------------------------------------------- /data/05-17_15-146&426_386&600-383&600_146&527_149&426_386&499-16_2_32_30_25_29_6-99-16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weidafeng/CCPD2COCO/5c3092e459a626f5fc4278b7e73ddccc26919c98/data/05-17_15-146&426_386&600-383&600_146&527_149&426_386&499-16_2_32_30_25_29_6-99-16.jpg -------------------------------------------------------------------------------- /lable_result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weidafeng/CCPD2COCO/5c3092e459a626f5fc4278b7e73ddccc26919c98/lable_result.png -------------------------------------------------------------------------------- /make_seg_mask.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*-# 2 | #------------------------------------------------------------------------------- 3 | # Name: make_seg_mask.py 4 | # Author: wdf 5 | # Date: 2019/10/20 6 | # IDE: PyCharm 7 | # Parameters: 8 | # @param: 9 | # @param: 10 | # Return: 11 | # 12 | # Description: 为ccpd数据集制作segmentation mask 13 | # Usage: python make_seg_mask.py 14 | #------------------------------------------------------------------------------- 15 | 16 | 17 | import cv2 18 | from pathlib import Path 19 | import progressbar 20 | from multiprocessing import pool 21 | 22 | import os 23 | stuffmap_file_path = os.getcwd() + '/stuffthingmaps/train2017/' # 在当前目录下新建文件夹,用于存储map中间结果图 24 | if not os.path.exists(stuffmap_file_path): 25 | os.makedirs(stuffmap_file_path) # 多层目录 26 | 27 | IMAGE_DIR = Path("./map/") # 要处理的map图片目录 28 | im_files = [f for f in IMAGE_DIR.iterdir()] 29 | 30 | # 进度条 31 | w = progressbar.widgets 32 | widgets = ['Progress: ', w.Percentage(), ' ', w.Bar('#'), ' ', w.Timer(), 33 | ' ', w.ETA(), ' ', w.FileTransferSpeed()] 34 | progress = progressbar.ProgressBar(widgets=widgets) 35 | 36 | 37 | def write_image(im_file): 38 | img_cv = cv2.imread(str(im_file),0) 39 | cv2.imwrite(stuffmap_file_path + str(im_file.stem)+".png", img_cv) 40 | 41 | myPool = pool.Pool(processes=4) # 并行化处理 42 | for im_file in progress(im_files): 43 | myPool.apply_async(func=write_image,args=(im_file,)) 44 | myPool.close() 45 | myPool.join() 46 | -------------------------------------------------------------------------------- /make_seg_mask_raw.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*-# 2 | #------------------------------------------------------------------------------- 3 | # Name: make_seg_mask.py 4 | # Author: wdf 5 | # Date: 2019/10/20 6 | # IDE: PyCharm 7 | # Parameters: 8 | # @param: 9 | # @param: 10 | # Return: 11 | # 12 | # Description: 为ccpd数据集制作segmentation mask 13 | # Usage: python make_seg_mask.py 14 | #------------------------------------------------------------------------------- 15 | 16 | 17 | import cv2 18 | from pathlib import Path 19 | import progressbar 20 | from multiprocessing import pool 21 | 22 | import os 23 | stuffmap_file_path = os.getcwd() + '/stuffthingmaps/train2017/' # 在当前目录下新建文件夹,用于存储map中间结果图 24 | if not os.path.exists(stuffmap_file_path): 25 | os.makedirs(stuffmap_file_path) # 多层目录 26 | 27 | IMAGE_DIR = Path("./map/") # 要处理的map图片目录 28 | im_files = [f for f in IMAGE_DIR.iterdir()] 29 | 30 | # 进度条 31 | w = progressbar.widgets 32 | widgets = ['Progress: ', w.Percentage(), ' ', w.Bar('#'), ' ', w.Timer(), 33 | ' ', w.ETA(), ' ', w.FileTransferSpeed()] 34 | progress = progressbar.ProgressBar(widgets=widgets) 35 | 36 | myPool = pool.Pool(processes=16) # 并行化处理 37 | for im_file in progress(im_files): 38 | img_cv = cv2.imread(str(im_file),0) 39 | cv2.imwrite(stuffmap_file_path + str(im_file.stem)+".png", img_cv) 40 | myPool.close() 41 | myPool.join() 42 | -------------------------------------------------------------------------------- /map/01-0_1-249&528_393&586-392&584_249&586_250&530_393&528-0_0_25_27_7_26_29-131-21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weidafeng/CCPD2COCO/5c3092e459a626f5fc4278b7e73ddccc26919c98/map/01-0_1-249&528_393&586-392&584_249&586_250&530_393&528-0_0_25_27_7_26_29-131-21.png -------------------------------------------------------------------------------- /map/01-0_2-383&467_527&525-524&525_383&523_386&467_527&469-0_0_15_26_24_25_23-58-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weidafeng/CCPD2COCO/5c3092e459a626f5fc4278b7e73ddccc26919c98/map/01-0_2-383&467_527&525-524&525_383&523_386&467_527&469-0_0_15_26_24_25_23-58-32.png -------------------------------------------------------------------------------- /map/01-0_5-267&511_411&569-411&568_273&569_267&512_405&511-0_0_27_31_32_23_24-128-43.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weidafeng/CCPD2COCO/5c3092e459a626f5fc4278b7e73ddccc26919c98/map/01-0_5-267&511_411&569-411&568_273&569_267&512_405&511-0_0_27_31_32_23_24-128-43.png -------------------------------------------------------------------------------- /map/01-2_1-267&333_411&391-411&384_268&391_267&340_410&333-0_0_30_7_26_30_32-124-25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weidafeng/CCPD2COCO/5c3092e459a626f5fc4278b7e73ddccc26919c98/map/01-2_1-267&333_411&391-411&384_268&391_267&340_410&333-0_0_30_7_26_30_32-124-25.png -------------------------------------------------------------------------------- /map/01-2_1-268&502_412&560-411&560_268&554_269&502_412&508-0_0_22_29_26_25_7-122-36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weidafeng/CCPD2COCO/5c3092e459a626f5fc4278b7e73ddccc26919c98/map/01-2_1-268&502_412&560-411&560_268&554_269&502_412&508-0_0_22_29_26_25_7-122-36.png -------------------------------------------------------------------------------- /map/01-3_10-239&501_383&559-383&559_245&551_239&501_377&509-0_0_7_2_32_26_25-53-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weidafeng/CCPD2COCO/5c3092e459a626f5fc4278b7e73ddccc26919c98/map/01-3_10-239&501_383&559-383&559_245&551_239&501_377&509-0_0_7_2_32_26_25-53-7.png -------------------------------------------------------------------------------- /map/04-20_48-240&477_472&621-472&621_278&548_240&477_434&550-0_12_20_13_32_32_32-77-90.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weidafeng/CCPD2COCO/5c3092e459a626f5fc4278b7e73ddccc26919c98/map/04-20_48-240&477_472&621-472&621_278&548_240&477_434&550-0_12_20_13_32_32_32-77-90.png -------------------------------------------------------------------------------- /map/05-16_17-176&448_416&622-415&549_176&622_177&521_416&448-10_1_31_18_19_31_26-146-41.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weidafeng/CCPD2COCO/5c3092e459a626f5fc4278b7e73ddccc26919c98/map/05-16_17-176&448_416&622-415&549_176&622_177&521_416&448-10_1_31_18_19_31_26-146-41.png -------------------------------------------------------------------------------- /map/05-17_15-146&426_386&600-383&600_146&527_149&426_386&499-16_2_32_30_25_29_6-99-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weidafeng/CCPD2COCO/5c3092e459a626f5fc4278b7e73ddccc26919c98/map/05-17_15-146&426_386&600-383&600_146&527_149&426_386&499-16_2_32_30_25_29_6-99-16.png -------------------------------------------------------------------------------- /pycococreatortools/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weidafeng/CCPD2COCO/5c3092e459a626f5fc4278b7e73ddccc26919c98/pycococreatortools/__init__.py -------------------------------------------------------------------------------- /pycococreatortools/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weidafeng/CCPD2COCO/5c3092e459a626f5fc4278b7e73ddccc26919c98/pycococreatortools/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /pycococreatortools/__pycache__/pycococreatortools.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weidafeng/CCPD2COCO/5c3092e459a626f5fc4278b7e73ddccc26919c98/pycococreatortools/__pycache__/pycococreatortools.cpython-36.pyc -------------------------------------------------------------------------------- /pycococreatortools/pycococreatortools.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import re 5 | import datetime 6 | import numpy as np 7 | from itertools import groupby 8 | from skimage import measure 9 | from PIL import Image 10 | from pycocotools import mask 11 | 12 | convert = lambda text: int(text) if text.isdigit() else text.lower() 13 | natrual_key = lambda key: [ convert(c) for c in re.split('([0-9]+)', key) ] 14 | 15 | def resize_binary_mask(array, new_size): 16 | ''' 从[0,1】 resize成【0,255】 17 | :param array: 18 | :param new_size: 19 | :return: 20 | ''' 21 | image = Image.fromarray(array.astype(np.uint8)*255) 22 | image = image.resize(new_size) 23 | return np.asarray(image).astype(np.bool_) 24 | 25 | def close_contour(contour): 26 | if not np.array_equal(contour[0], contour[-1]): 27 | contour = np.vstack((contour, contour[0])) 28 | return contour 29 | 30 | def binary_mask_to_rle(binary_mask): 31 | rle = {'counts': [], 'size': list(binary_mask.shape)} 32 | counts = rle.get('counts') 33 | for i, (value, elements) in enumerate(groupby(binary_mask.ravel(order='F'))): 34 | if i == 0 and value == 1: 35 | counts.append(0) 36 | counts.append(len(list(elements))) 37 | 38 | return rle 39 | 40 | def binary_mask_to_polygon(binary_mask, tolerance=0): 41 | """Converts a binary mask to COCO polygon representation 42 | Args: 43 | binary_mask: a 2D binary numpy array where '1's represent the object 44 | tolerance: Maximum distance from original points of polygon to approximated 45 | polygonal chain. If tolerance is 0, the original coordinate array is returned. 46 | """ 47 | polygons = [] 48 | # pad mask to close contours of shapes which start and end at an edge 49 | padded_binary_mask = np.pad(binary_mask, pad_width=1, mode='constant', constant_values=0) 50 | contours = measure.find_contours(padded_binary_mask, 0.5) 51 | contours = np.subtract(contours, 1) 52 | for contour in contours: 53 | contour = close_contour(contour) 54 | contour = measure.approximate_polygon(contour, tolerance) 55 | if len(contour) < 3: 56 | continue 57 | contour = np.flip(contour, axis=1) 58 | segmentation = contour.ravel().tolist() 59 | # after padding and subtracting 1 we may get -0.5 points in our segmentation 60 | segmentation = [0 if i < 0 else i for i in segmentation] 61 | polygons.append(segmentation) 62 | 63 | return polygons 64 | 65 | def create_image_info(image_id, file_name, image_size, 66 | date_captured=datetime.datetime.utcnow().isoformat(' '), 67 | license_id=1, coco_url="", flickr_url=""): 68 | image_info = { 69 | "id": image_id, 70 | "file_name": file_name, 71 | "width": image_size[0], 72 | "height": image_size[1], 73 | "date_captured": date_captured, 74 | "license": license_id, 75 | "coco_url": coco_url, 76 | "flickr_url": flickr_url 77 | } 78 | 79 | return image_info 80 | 81 | # 汇总 mask、bounding-box等信息 82 | def mask_create_annotation_info(annotation_id, image_id, area, category_id, image_size=None, bounding_box=None,segmentation= None): 83 | annotation_info = { 84 | "id": annotation_id, 85 | "image_id": image_id, 86 | "category_id": category_id, 87 | "iscrowd": 0, # 0或1,指定为0,表示“单个的对象(不存在多个对象重叠)”.只要是iscrowd=0那么segmentation就是polygon格式 88 | "area": area, # area是area of encoded masks,是标注区域的面积。如果是矩形框,那就是高乘宽; 浮点数,需大于0,因icdar数据没有segmentation,所以本项人为指定为10 89 | "bbox": bounding_box, 90 | "segmentation": segmentation, #polygon格式.这些数按照相邻的顺序两两组成一个点的xy坐标,如果有n个数(必定是偶数),那么就是n/2个点坐标。 91 | # 注意这里,必须是list 包含list,底层的list中必须有至少6个元素,否则coco api会过滤掉这个annotations,也就是说你必须用至少三个点来表达一块。 92 | # 外层的list的长度取决于一个完整的物体是否被分割成了数块,比如一个物体苹果没有任何的遮挡,则外部的List长度就为1 93 | # 按照给出各个坐标的顺序描点(顺时针、逆时针都行),eg: 94 | # gemfield_polygons1 = [[0,0,10,0,10,20,0,10]] # 逆时针 95 | # gemfield_polygons2 = [[0,0,0,10,10,20,10,0]] # 顺时针 96 | # gemfield_polygons3 = [[10,0,0,10,0,0,10,20]] # 注意次序,此时不是四边形,而是两个三角形 97 | 98 | "width": image_size[0], 99 | "height": image_size[1], 100 | } 101 | 102 | return annotation_info 103 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Convert CCPD to COCO 2 | 3 | # 目录树: 4 | 1. data文件夹-存放ccpd车牌图片 5 | 2. pycococreatools文件夹-coco官方utils 6 | 3. ccpd_to_coco.py文件-转换代码 7 | 4. make_seg_mask.py文件-生成segmentation map文件的代码 8 | 5. convert_ccpd_to_coco.sh文件,一步到位 9 | 10 | # 运行: 11 | ```python 12 | python ccpd_to_coco.py --data data (生成json文件,包括bounding box、mask) 13 | 14 | python make_seg_mask.py (生成segmentation map) 15 | ``` 16 | 17 | 或者一步到位: 18 | 19 | ```bash 20 | 21 | ** bash convert_ccpd_to_coco.sh data ** 22 | ``` 23 | 24 | # 说明: 25 | 把ccpd车牌检测数据集转化为coco格式; 26 | 转换字段包括: 27 | 1. bounding box(左上角、右下角) 28 | 2. segmentation box (车牌的四个角点,同时更新了segmentation面积的计算公式) 29 | 3. segmentation map (车牌的四个角点形成的平行四边形,比bounding box更精确) 30 | 4. label(两类:是否为车牌) 31 | 32 | # 参考: 33 | [CCPD: Chinese City Parking Dataset](https://github.com/detectRecog/CCPD) 34 | 35 | -------------------------------------------------------------------------------- /stuffthingmaps/train2017/01-0_1-249&528_393&586-392&584_249&586_250&530_393&528-0_0_25_27_7_26_29-131-21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weidafeng/CCPD2COCO/5c3092e459a626f5fc4278b7e73ddccc26919c98/stuffthingmaps/train2017/01-0_1-249&528_393&586-392&584_249&586_250&530_393&528-0_0_25_27_7_26_29-131-21.png -------------------------------------------------------------------------------- /stuffthingmaps/train2017/01-0_2-383&467_527&525-524&525_383&523_386&467_527&469-0_0_15_26_24_25_23-58-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weidafeng/CCPD2COCO/5c3092e459a626f5fc4278b7e73ddccc26919c98/stuffthingmaps/train2017/01-0_2-383&467_527&525-524&525_383&523_386&467_527&469-0_0_15_26_24_25_23-58-32.png -------------------------------------------------------------------------------- /stuffthingmaps/train2017/01-0_5-267&511_411&569-411&568_273&569_267&512_405&511-0_0_27_31_32_23_24-128-43.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weidafeng/CCPD2COCO/5c3092e459a626f5fc4278b7e73ddccc26919c98/stuffthingmaps/train2017/01-0_5-267&511_411&569-411&568_273&569_267&512_405&511-0_0_27_31_32_23_24-128-43.png -------------------------------------------------------------------------------- /stuffthingmaps/train2017/01-2_1-267&333_411&391-411&384_268&391_267&340_410&333-0_0_30_7_26_30_32-124-25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weidafeng/CCPD2COCO/5c3092e459a626f5fc4278b7e73ddccc26919c98/stuffthingmaps/train2017/01-2_1-267&333_411&391-411&384_268&391_267&340_410&333-0_0_30_7_26_30_32-124-25.png -------------------------------------------------------------------------------- /stuffthingmaps/train2017/01-2_1-268&502_412&560-411&560_268&554_269&502_412&508-0_0_22_29_26_25_7-122-36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weidafeng/CCPD2COCO/5c3092e459a626f5fc4278b7e73ddccc26919c98/stuffthingmaps/train2017/01-2_1-268&502_412&560-411&560_268&554_269&502_412&508-0_0_22_29_26_25_7-122-36.png -------------------------------------------------------------------------------- /stuffthingmaps/train2017/01-3_10-239&501_383&559-383&559_245&551_239&501_377&509-0_0_7_2_32_26_25-53-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weidafeng/CCPD2COCO/5c3092e459a626f5fc4278b7e73ddccc26919c98/stuffthingmaps/train2017/01-3_10-239&501_383&559-383&559_245&551_239&501_377&509-0_0_7_2_32_26_25-53-7.png -------------------------------------------------------------------------------- /stuffthingmaps/train2017/04-20_48-240&477_472&621-472&621_278&548_240&477_434&550-0_12_20_13_32_32_32-77-90.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weidafeng/CCPD2COCO/5c3092e459a626f5fc4278b7e73ddccc26919c98/stuffthingmaps/train2017/04-20_48-240&477_472&621-472&621_278&548_240&477_434&550-0_12_20_13_32_32_32-77-90.png -------------------------------------------------------------------------------- /stuffthingmaps/train2017/05-16_17-176&448_416&622-415&549_176&622_177&521_416&448-10_1_31_18_19_31_26-146-41.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weidafeng/CCPD2COCO/5c3092e459a626f5fc4278b7e73ddccc26919c98/stuffthingmaps/train2017/05-16_17-176&448_416&622-415&549_176&622_177&521_416&448-10_1_31_18_19_31_26-146-41.png -------------------------------------------------------------------------------- /stuffthingmaps/train2017/05-17_15-146&426_386&600-383&600_146&527_149&426_386&499-16_2_32_30_25_29_6-99-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weidafeng/CCPD2COCO/5c3092e459a626f5fc4278b7e73ddccc26919c98/stuffthingmaps/train2017/05-17_15-146&426_386&600-383&600_146&527_149&426_386&499-16_2_32_30_25_29_6-99-16.png --------------------------------------------------------------------------------