TillBeemelmanns / cityscapes-to-coco-conversion

Cityscapes to CoCo Format Conversion Tool for Mask-RCNN and Detectron

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cityscapes to CoCo Conversion Tool

This script allows to convert the Cityscapes Dataset to Mircosoft's CoCo Format. The code heavily relies on Facebook's Detection Repo and Cityscapes Scripts.

The converted annotations can be easily used for Mask-RCNN or other deep learning projects.

Folder Structure

Download the Cityscapes Dataset and organize the files in the following structure. Create an empty annotations directory.

data/
└── cityscapes
    ├── annotations
    ├── gtFine
    │   ├── test
    │   ├── train
    │   └── val
    └── leftImg8bit
        ├── test
        ├── train
        └── val
main.py
inspect_coco.py
README.md
requirements.txt

Installation

pip install -r requirements.txt 

Run

To run the conversion execute the following

python main.py --dataset cityscapes --datadir data/cityscapes --outdir data/cityscapes/annotations

In order to run the visualization of the CoCo dataset you may run

python inspect_coco.py --coco_dir data/cityscapes

Output

vis1 vis2

About

Cityscapes to CoCo Format Conversion Tool for Mask-RCNN and Detectron


Languages

Language:Python 100.0%