Spatial Transformer Networks - rugbyprof/5443-Data-Mining GitHub Wiki
What is Spatial Transformer Network?
Spatial Transformer Network (STN) is a differentiable module that can be inserted anywhere in ConvNet(CNN's) architecture to increase its geometric invariance. It effectively gives the network the ability to spatially transform (Operations Such as Scaling, Rotation) feature maps at no extra data or supervision cost.
Reference:https://github.com/kevinzakka/spatial-transformer-network
The layer is composed of 3 elements:
1.The localization network takes the original image as an input and outputs the parameters of the transformation we want to apply.
2.The grid generator generates a grid of coordinates in the input image corresponding to each pixel from the output image.
3.The sampler generates the output image using the grid given by the grid generator.