DFBRFeatureExtractor¶
- class DFBRFeatureExtractor[source]¶
Feature extractor for Deep Feature based Registration (DFBR).
This class extracts features from three different layers of VGG16. These features are processed in DFBRegister class for registration of a pair of images.
Initialize
DFBRFeatureExtractor.Methods
Forward pass for feature extraction.
Register a hook.
Attributes
training- forward(x)[source]¶
Forward pass for feature extraction.
- Parameters:
x (torch.Tensor) – Batch of input images.
self (DFBRFeatureExtractor)
- Returns:
A dictionary containing the multiscale features. The expected format is {layer_name: features}.
- Return type:
- forward_hook(layer_name)[source]¶
Register a hook.
- Parameters:
layer_name (str) – User-defined name for a layer.
self (DFBRFeatureExtractor)
- Returns:
Forward hook for feature extraction.
- Return type:
hook (Callable)