【文件属性】:
文件名称:voc2coco:将VOC格式的XML转换为COCO格式的json
文件大小:260KB
文件格式:ZIP
更新时间:2021-02-06 14:30:59
converter json machine-learning tutorial computer-vision
voc2coco
这是用于将VOC格式的XML转换为COCO格式的json(例如coco_eval.json)的脚本。
为什么我们需要将VOC xmls转换为COCO格式json?
我们可以使用COCO API,这非常有用(例如,计算mAP)。
如何使用
1.制作labels.txt
如果需要制作将标签转换为ID的字典,则为labels.txt。
样本labels.txt
Label1
Label2
...
2.运行脚本
2.1用法1(使用ID列表)
$ python voc2coco.py \
--ann_dir /path/to/annotation/dir \