class CityscapesDataset(FiftyOneDataset): (source)
Constructor: CityscapesDataset(source_dir, fine_annos, coarse_annos, person_annos)
Cityscapes is a large-scale dataset that contains a diverse set of stereo video sequences recorded in street scenes from 50 different cities, with high quality pixel-level annotations of 5,000 frames in addition to a larger set of 20,000 weakly annotated frames.
The dataset is intended for:
- Assessing the performance of vision algorithms for major tasks of semantic urban scene understanding: pixel-level, instance-level, and panoptic semantic labeling
- Supporting research that aims to exploit large volumes of (weakly) annotated data, e.g. for training deep neural networks
In order to load the Cityscapes dataset, you must download the source data manually. The directory should be organized in the following format:
source_dir/ leftImg8bit_trainvaltest.zip gtFine_trainvaltest.zip # optional gtCoarse.zip # optional gtBbox_cityPersons_trainval.zip # optional
You can register at https://www.cityscapes-dataset.com/register in order to get links to download the data.
Example usage:
import fiftyone as fo import fiftyone.zoo as foz # The path to the source files that you manually downloaded source_dir = "/path/to/dir-with-cityscapes-files" dataset = foz.load_zoo_dataset( "cityscapes", split="validation", source_dir=source_dir, ) session = fo.launch_app(dataset)
- Dataset size
- 11.80 GB
- Source
- https://www.cityscapes-dataset.com
Parameters | |
source | a directory containing the manually downloaded Cityscapes files |
fine | whether to load the fine annotations (True), or not (False), or only if the ZIP file exists (None) |
coarse | whether to load the coarse annotations (True), or not (False), or only if the ZIP file exists (None) |
person | whether to load the personn detections (True), or not (False), or only if the ZIP file exists (None) |
Method | __init__ |
Undocumented |
Instance Variable | coarse |
Undocumented |
Instance Variable | fine |
Undocumented |
Instance Variable | person |
Undocumented |
Instance Variable | source |
Undocumented |
Property | name |
The name of the dataset. |
Property | requires |
Whether this dataset requires some files to be manually downloaded by the user before the dataset can be loaded. |
Property | supported |
A tuple of supported splits for the dataset, or None if the dataset does not have splits. |
Property | tags |
A tuple of tags for the dataset. |
Method | _download |
Internal implementation of downloading the dataset and preparing it for use in the given directory. |
Inherited from ZooDataset
(via FiftyOneDataset
):
Static Method | get |
Returns the path to the ZooDatasetInfo for the dataset. |
Static Method | has |
Determines whether the directory contains ZooDatasetInfo . |
Static Method | load |
Loads the ZooDatasetInfo from the given dataset directory. |
Method | download |
Downloads the dataset and prepares it for use. |
Method | get |
Returns the directory for the given split of the dataset. |
Method | has |
Whether the dataset has the given split. |
Method | has |
Whether the dataset has the given tag. |
Property | has |
Whether the dataset has patches that may need to be applied to already downloaded files. |
Property | has |
Whether the dataset has splits. |
Property | has |
Whether the dataset has tags. |
Property | importer |
A dict of default kwargs to pass to this dataset's fiftyone.utils.data.importers.DatasetImporter . |
Property | is |
Whether the dataset is remotely-sourced. |
Property | parameters |
An optional dict of parameters describing the configuration of the zoo dataset when it was downloaded. |
Property | supports |
Whether the dataset supports downloading partial subsets of its splits. |
Method | _get |
Undocumented |
Method | _is |
Undocumented |
Method | _is |
Undocumented |
Method | _patch |
Internal method called when an already downloaded dataset may need to be patched. |
Undocumented
Whether this dataset requires some files to be manually downloaded by the user before the dataset can be loaded.
Internal implementation of downloading the dataset and preparing it for use in the given directory.
Parameters | |
dataset | the directory in which to construct the dataset. If a split is provided, this is the directory for the split |
scratch | a scratch directory to use to download and prepare any required intermediate files |
split | the split to download, or None if the dataset does not have splits |
Returns | |
tuple of |
|