Feature extraction & (pre-trained) backbones¶
Several models will use a pre-trained model to extract feature maps from its internal submodules – the backbone.
All the pre-trained backbones come from the package PyTorch Image Models (timm) and are wrapped by the class FeatureExtractor.
For an introduction to timm, please check the Getting Started with PyTorch Image Models (timm): A Practitioner’s Guide, in particular the introduction about models and the section about feature extraction.
Papers With Code has an interface to easily browse models available in timm: https://paperswithcode.com/lib/timm
You can also find them with the python package function timm.list_models(“resnet*”, pretrained=True)
The backbone can be set in the config file, two examples below.
Anomalib < v.0.4.0
model: name: cflow backbone: wide_resnet50_2 pre_trained: true
Anomalib > v.0.4.0 Beta - Subject to Change
model: class_path: anomalib.models.Cflow init_args: backbone: wide_resnet50_2 pre_trained: true