WarBean/tps_stn_pytorch
PyTorch implementation of Spatial Transformer Networks with Thin Plate Spline for automatic image rectification before classification.

This repository provides a PyTorch implementation of Spatial Transformer Networks using Thin Plate Spline (TPS) transformations. The approach achieves spatial invariance by automatically rectifying distorted or transformed input images before feeding them into a classification network. The TPS transformation is particularly powerful as it can warp images in arbitrary ways. The implementation is end-to-end differentiable and can be plugged into existing architectures like AlexNet or ResNet without extra supervision, and has been applied to OCR tasks for rectifying distorted text images.