anomalib.models.stfpm.lightning_model

STFPM: Student-Teacher Feature Pyramid Matching for Unsupervised Anomaly Detection.

https://arxiv.org/abs/2103.04257

Module Contents

Classes

StfpmLightning

PL Lightning Module for the STFPM algorithm.

class anomalib.models.stfpm.lightning_model.StfpmLightning(hparams: Union[omegaconf.DictConfig, omegaconf.ListConfig])[source]

Bases: Stfpm

PL Lightning Module for the STFPM algorithm.

Parameters

hparams (Union[DictConfig, ListConfig]) – Model params

configure_callbacks(self)[source]

Configure model-specific callbacks.

Note

This method is used for the existing CLI. When PL CLI is introduced, configure callback method will be

deprecated, and callbacks will be configured from either config.yaml file or from CLI.

configure_optimizers(self) torch.optim.Optimizer[source]

Configures optimizers for each decoder.

Note

This method is used for the existing CLI. When PL CLI is introduced, configure optimizers method will be

deprecated, and optimizers will be configured from either config.yaml file or from CLI.

Returns

Adam optimizer for each decoder

Return type

Optimizer