CityscapesDataLoader<T>

Models & Types · AiDotNet.Data.Vision.Benchmarks

Loads the Cityscapes semantic-segmentation dataset (Cordts et al. 2016).

Inheritance: DataLoaderBase<T> → InputOutputDataLoaderBase<T, Tensor<T>, Tensor<T>> → CityscapesDataLoader<T>

How It Works

Expects the canonical extracted layout (after manually downloading both archives from cityscapes-dataset.com — sign-up required, no auto-download):

Output shape: features Tensor[N, H, W, 3] (resized RGB image, normalized to [0, 1]); labels Tensor[N, H, W] (integer class IDs per pixel — the standard semantic-seg label format used by PyTorch / TF / SegFormer / DeepLab loss heads). With MapToTrainIds (default) source IDs 0..33 are remapped to the 19 evaluation classes; “ignore” pixels get sentinel value 255.

Constructors

Constructor Summary
CityscapesDataLoader(CityscapesDataLoaderOptions options)

Properties

Property Summary
int FeatureCount { get; }
int OutputDimension { get; }
int TotalCount { get; }
string Description { get; }
string Name { get; }

Methods

Method Summary
ValueTuple<IInputOutputDataLoader<T, Tensor<T>, Tensor<T>>, IInputOutputDataLoader<T, Tensor<T>, Tensor<T>>, IInputOutputDataLoader<T, Tensor<T>, Tensor<T>>> Split(double trainRatio, double validationRatio, int? seed)

Fields

Field Summary
int IgnoreLabel Sentinel ID for “ignore” pixels (background, out-of-eval classes).
int NumEvalClasses Number of evaluation classes when MapToTrainIds is true.