CityscapesDataLoaderOptions

Options & Configuration · AiDotNet.Data.Vision.Benchmarks

Configuration options for the Cityscapes semantic segmentation loader.

How It Works

Cityscapes is the canonical urban-driving semantic segmentation benchmark (Cordts et al. 2016). The “fine” annotations have 5,000 pixel-accurate labelled images at 2048×1024 across 50 cities. 19 evaluation classes (out of 30 source classes; 11 are reserved/ignored).

Auto-download is disabled by default — Cityscapes requires account sign-up at cityscapes-dataset.com. Download the two archives manually and extract under DataPath: leftImg8bit_trainvaltest.zip and gtFine_trainvaltest.zip.

Constructors

Constructor Summary
CityscapesDataLoaderOptions()

Properties

Property Summary
DatasetSplit Split { get; set; } Gets or sets which split of the dataset is loaded.
bool AutoDownload { get; set; } Auto-download is OFF by default — Cityscapes requires manual sign-up.
bool MapToTrainIds { get; set; } Map the 30 source classes to the 19 evaluation classes (CityscapesScripts ID2trainID).
bool Normalize { get; set; } Gets or sets whether pixel values are scaled to [0, 1].
int ImageHeight { get; set; } Gets or sets the height, in pixels, images are resized to.
int ImageWidth { get; set; } Gets or sets the width, in pixels, images are resized to.
int? MaxSamples { get; set; } Gets or sets the most samples loaded; null loads the whole split.
string DataPath { get; set; } Gets or sets the dataset root directory; null uses the default data directory for this dataset.

Methods

Method Summary
void Validate() Validates that all option values are within acceptable ranges.