# Mapillary Vistas ## Format specification Mapillary Vistas dataset homepage is available [here](https://www.mapillary.com/dataset/vistas). After registration the dataset will be available for downloading. The specification for this format contains in the root directory of original dataset. Supported annotation types: - `Mask` (class, instances, panoptic) - `Polygon` Supported attributes: - `is_crowd`(boolean; on panoptic `mask`): Indicates that the annotation covers multiple instances of the same class. ## Convert Mapillary Vistas dataset Use these instructions to convert Mapillary Vistas dataset with Datumaro: ```bash datum convert --input-format mapillary_vistas --input-path ./dataset \ --output-format --output-dir ``` Use one of subformats (`mapillary_vistas_instances`, `mapillary_vistas_panoptic`), if your dataset contains both panoptic and instance masks: ```bash datum convert --input-format mapillary_vistas_instances --input-path ./dataset \ --output-format --output-dir ``` or ``` bash datum convert --input-format mapillary_vistas_panoptic --input-path ./dataset \ --output-format --output-dir ``` Extra options for converting in the Mapillary Vistas format: - `--use-original-config`: Use original `config_*.json` file for your version of Mapillary Vistas dataset. This options can helps to convert dataset, in case when you don't have `config_*.json` file, but your dataset is using original categories of Mapillary Vistas dataset. The version of dataset will be detect by the name of annotation directory in your dataset (v1.2 or v2.0). - `--keep-original-category-ids`: Add dummy label categories so that category indexes in the converted data source correspond to the category IDs in the original annotation file. Example of using extra options: ```bash datum convert --input-format mapillary_vistas --input-path ./dataset \ --output-format --output-dir \ -- --use-original-config ``` Mapillary Vistas dataset has two versions: v1.2, v2.0. They differ in the number of classes, the name of the classes, supported types of annotations, and the names of the directory with annotations. So, the directory with dataset should have one of these structures: ``` dataset ├── config_v1.2.json ├── config_v2.0.json ├── # config file with description of classes (id, color, name) │ ├── images │ │ ├── .jpg │ │ ├── .jpg │ │ ├── ... │ ├── v1.2 │ | ├── instances # directory with instance masks │ | │ ├── .png │ | │ ├── .png │ | │ ├── ... │ | ├── labels # directory with class masks │ | │ ├── .png │ | │ ├── .png │ | │ ├── ... │ | └── panoptic # directory with panoptic masks and panoptic config file │ | ├── panoptic_2018.json # description of classes and annotations │ | ├── .png │ | ├── .png │ | ├── ... │ └── v2.0 │ ├── instances # directory with instance masks │ │ ├── .png │ │ ├── .png │ │ ├── ... │ ├── labels # directory with class masks │ │ ├── .png │ │ ├── .png │ │ ├── ... │ ├── panoptic # directory with panoptic masks and panoptic config file │ │ ├── panoptic_2020.json # description of classes and annotations │ │ ├── .png │ │ ├── .png │ │ ├── ... │ └── polygons # directory with description of polygons │ ├── .json │ ├── .json │ ├── ... ├── | ├── ... ├── ... ``` To add custom classes, you can use [`dataset_meta.json`](/docs/data-formats/formats/index.rst#dataset-meta-info-file). See examples of annotation files in [test assets](https://github.com/open-edge-platform/datumaro/tree/develop/tests/assets/mapillary_vistas_dataset).