fiftyone.utils.cityscapesΒΆ
Utilities for working with the Cityscapes dataset.
Functions:
|
Parses the Cityscapes archive(s) in the specified directory and writes the requested splits in subdirectories of |
-
fiftyone.utils.cityscapes.
parse_cityscapes_dataset
(source_dir, dataset_dir, scratch_dir, splits, fine_annos=None, coarse_annos=None, person_annos=None)ΒΆ Parses the Cityscapes archive(s) in the specified directory and writes the requested splits in subdirectories of
dataset_dir
infiftyone.types.FiftyOneDataset
format.The archives must have been manually downloaded into the directory before this method is called.
The
source_dir
should contain the following files:source_dir/ leftImg8bit_trainvaltest.zip gtFine_trainvaltest.zip # optional gtCoarse.zip # optional gtBbox_cityPersons_trainval.zip # optional
- Parameters
source_dir β the directory continaining the manually downloaded Cityscapes files
dataset_dir β the directory in which to build the output dataset
scratch_dir β a scratch directory to use for temporary files
splits β a list of splits to parse. Supported values are
(train, test, validation)
fine_annos (None) β whether to load the fine annotations (True), or not (False), or only if the ZIP file exists (None)
coarse_annos (None) β whether to load the coarse annotations (True), or not (False), or only if the ZIP file exists (None)
person_annos (None) β whether to load the personn detections (True), or not (False), or only if the ZIP file exists (None)
- Raises
OSError β if any required source files are not present