下载MIDV500注释并将其转换为COCO实例分段格式
midv500的Python项目详细描述
下载MIDV-500数据集并将其转换为COCO实例分段格式
自动下载/解压MIDV-500和MIDV-2019数据集,并将注释转换为COCO实例分段格式。在
然后,数据集可以直接用于Yolact、Detectron型模型的训练。在
MIDV-500数据集
MIDV-500由500个视频片段组成,可用于50种不同类型的身份证件,包括17张身份证、14本护照、13张驾照和6份其他不同国家的身份证件,这些证件具有基本的真实性,可以对各种证件分析问题进行广泛的研究。此外,MIDV-2019数据集包含失真和微光图像。在
你可以在报纸上找到更多细节:
MIDV-2019: Challenges of the modern mobile-based document OCR
入门
安装
pip install midv500
用法
- 导入包:
- 下载并解压缩所需的数据集版本:
# set directory for dataset to be downloadeddataset_dir='midv500_data/'# download and unzip the base midv500 datasetdataset_name="midv500"midv500.download_dataset(dataset_dir,dataset_name)# or download and unzip the midv2019 dataset that includes low light imagesdataset_name="midv2019"midv500.download_dataset(dataset_dir,dataset_name)# or download and unzip both midv500 and midv2019 datasetsdataset_name="all"midv500.download_dataset(dataset_dir,dataset_name)
- 将下载的数据集转换为coco格式:
# set directory for coco annotations to be savedexport_dir='midv500_data/'# set the desired name of the coco file, coco file will be exported as "filename + '_coco.json'"filename='midv500'# convert midv500 annotations to coco formatmidv500.convert_to_coco(dataset_dir,export_dir,filename)
- 项目
标签: