FrostImages#

class torch_uncertainty.datasets.FrostImages(transform=None, target_transform=None)[source]#

Frost corruption image dataset.

This dataset provides a small collection of frost-corrupted images that are primarily used to simulate distribution shift in vision experiments. It is typically leveraged for robustness evaluation, out-of-distribution (OOD) testing, and uncertainty estimation under image corruption.

The dataset contains five JPEG images (frost1.jpg to frost5.jpg) stored in the torch-uncertainty-assets package. No labels are provided, and each sample consists only of an image.

Parameters:
  • transform (Callable[..., Any] | None, optional) – A function/transform applied to the input image. Default: None.

  • target_transform (Callable[..., Any] | None, optional) – A function/transform applied to the target. Since no targets are provided, this argument is kept for API compatibility. Default: None.

Raises:

ImportError – If the torch-uncertainty-assets package with image support is not installed.

Note

This dataset is intended for generating controlled distribution shifts.