mscoco数据解析–polygen2bbx生成矩形框
我们使用paddleseg获取目标的轮廓信息,辅助标注bbox,可以提升标注效率和精度。
coco数据格式如下:
- https://zhuanlan.zhihu.com/p/362049720
- https://tangh.github.io/articles/coco-and-cityscapes-datasets/
annotation.json的格式如下
{ “info”: […] “licenses”: […] “images”: […] “annotations”: [ ] }
解析polygen,提取有用的bbx信息
import os
import shutil
import json
import tqdm
def get_all_files(fold,suffix='.jpg'):
all_files = []
for root, dirs, files in os.walk(fold):
for