anomalib.data.inference

Inference Dataset.

Module Contents

Classes

InferenceDataset

Inference Dataset to perform prediction.

class anomalib.data.inference.InferenceDataset(path: Union[str, pathlib.Path], pre_process: Optional[anomalib.pre_processing.PreProcessor] = None, image_size: Optional[Union[int, Tuple[int, int]]] = None, transform_config: Optional[Union[str, albumentations.Compose]] = None)[source]

Bases: torch.utils.data.dataset.Dataset

Inference Dataset to perform prediction.

__len__(self) int[source]

Get the number of images in the given path.

__getitem__(self, index: int) Any[source]

Get the image based on the index.