Cityscapes
Last updated
Last updated
This converter allows to import images with .json
annotations in Cityscapes format.
⚠️ Note: images must have suffix _leftImg8bit
and annotations suffix _gtFine_polygons
and .json
extension. Check the example of the file structure below.
Supported image formats: .jpg
, .jpeg
, .mpo
, .bmp
, .png
, .webp
, .tiff
, .tif
, .jfif
, .avif
, .heic
, and .heif
With annotations: yes
Supported annotation file extension: .json
.
Grouped by: any structure (uploaded to a single dataset)
Example data: download ⬇️
Recommended directory structure:
In order to import custom annotations for the images, you need to provide a class_to_id.json
file. This file should contain a list with dictionaries. Each dictionary should contain information about the class with the following fields:
name
- the name of the class. It should be unique.
id
- the ID of the class. From 1 to N-1, where N is the number of classes.
color
- the color of the class in RGB format. If not specified, the color will be generated randomly
Annotation file should contain the following fields:
imgHeight
- the height of the image
imgWidth
- the width of the image
objects
- a list of dictionaries, each containing information about the object
label
- the name of the class
polygon
- a list of points that form the polygon of the object
Example of the annotation file from provided sample data: