class_docstr: STFPM: Student-Teacher Feature Pyramid Matching for Unsupervised Anomaly Detection.
  
  Args:
      layers (list[str]): Layers used for feature extraction
      input_size (tuple[int, int]): Input size for the model.
      backbone (str, optional): Pre-trained model backbone. Defaults to "resnet18".
code: def __init__(
      self,
      layers: list[str],
      input_size: tuple[int, int],
      backbone: str = "resnet18",
  ) -> None:
      super().__init__()
      self.tiler: Tiler | None = None
  
      self.backbone = backbone
      self.teacher_model = FeatureExtractor(
          backbone=self.backbone, pre_trained=True, layers=layers
      )
      self.student_model = FeatureExtractor(
          backbone=self.backbone,
          pre_trained=False,
          layers=layers,
          requires_grad=True,
      )
  
      # teacher model is fixed
      for parameters in self.teacher_model.parameters():
          parameters.requires_grad = False
  
      self.anomaly_map_generator = AnomalyMapGenerator(
          image_size=input_size
      )
  
file_path: anomalib/src/anomalib/models/stfpm/torch_model.py
imports: from __future__ import annotations
  from torch import Tensor, nn
  from anomalib.models.components import FeatureExtractor
  from anomalib.models.stfpm.anomaly_map import AnomalyMapGenerator
  from anomalib.pre_processing import Tiler
label_desc: Use image node_id 1 to create a new STFPMModel object from inherited base classes: nn with example: obj = STFPMModel(layers, input_size, backbone)