Object detection dataset conversion scripts
-
PASCAL VOC => YOLO: voc2yolo.py
-
YOLO => PASCAL VOC: yolo2voc.py
-
PASCAL VOC => COCO: voc2coco.py
-
COCO => PASCAL VOC
Use
utils_cv.detection.data.coco2voc
to complete this conversion. The process is listed below:- Install Microsoft utils_cv package:
pip install git+https://github.com/microsoft/ComputerVision.git@master#egg=utils_cv
- Import fumction:
from utils_cv.detection.data import coco2voc
- Function Signature:
Signature: coco2voc( anno_path: str, output_dir: str, anno_type: str = 'instance', download_images: bool = False, ) -> None Docstring: Convert COCO annotation (single .json file) to Pascal VOC annotations (multiple .xml files). Args: anno_path: path to coco-formated .json annotation file output_dir: root output directory anno_type: "instance" for rectangle annotation, or "keypoint" for keypoint annotation. download_images: if true then download images from their urls.
- Install Microsoft utils_cv package:
-
PASCAL VOC => CSV: voc2csv.py
-
PASCAL VOC => TXT: voc2txt.py
-
PASCAL VOC dataset information: voc_dataset_information.py
-
PASCAL VOC Augmentation: voc_augument.py
-
YOLO Augmentation: yolo_augument.py
-
Rename file names: rename_files.py
-
Generate VOC/ImageSets/Main/trainval.txt(train.txt,val.txt,test.txt): voc_gen_trainval_test.py
-
Cluster anchors used in YOLO series: anchor-cluster.py