Loading...
Build a multi-scale feature pyramid from an image using PyTorch.
Feature pyramids enable detection of objects at different scales. Each level of the pyramid is a downsampled version of the previous level.
Construction:
Gaussian blur before downsampling prevents aliasing (Nyquist criterion).
The pyramid enables coarse-to-fine processing:
Used in SIFT, HOG, and modern CNNs (FPN - Feature Pyramid Networks).
image = 8×8 array num_levels = 3
[tensor(8,8), tensor(4,4), tensor(2,2)]
Level 0: Original 8×8 image
Level 1:
Level 2:
Each level captures features at different scales: