# coco_dataset_convert **Repository Path**: kongmo/coco_dataset_convert ## Basic Information - **Project Name**: coco_dataset_convert - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-08-27 - **Last Updated**: 2020-12-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # coco_dataset_convert this is a simple expamle for covert CTW dataset to coco dataset. For CTW dataset please check this link:https://ctwdataset.github.io/tutorial/1-basics.html Coco dataset is a dict contains a few keys : information, images,annotations , categories, license and so on To make your own dataset, all you need is images, annotations and categories. Step one: create a dict contains 3 keys: images, annotations and categories, each key's value is a list Step two: images(images -->list-->dict) , as i mentationed the values is a list , each element in the list is a dict which needs a few keys: height, width,file_name,id Step three: annotations (annotations -->list-->dict), anntotaions' value is also list contains dict, each dict needs such keys: area:float, iscrowd: 0 or 1, image_id:int(Corresponding to images' id),bbox: list(minx,miny,w,h) , category_id: int, id: int(unique) , segmentation:list contains list. After I have viewed coco api's code,the segmentations must contains at least 6 value in the list of list.otherwise Mask_RCNN would not count this annotations Step four: categories (categories -->list-->dict), this one is pretty easy, list contains dict, each one contains two keys, id:int ; name:w/e add_cate.py: change jsonl to json and add categories to json file convert_to_coco.py: convert CTW to coco crop_image_coco.py: separate a group of 2048*2048 images to 800*800 images So if you just want understand coco's json file, just need view the crop_image_coco.py If you wish to run the code modify the path in code , run add_cate.py->convert_to_coco.py->crop_image_coco.py