Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zsdonghao/Spatial-Transformer-Nets

Spatial Transformer Nets in TensorFlow/ TensorLayer
https://github.com/zsdonghao/Spatial-Transformer-Nets

cnn deep-learning spatial-transformer-network tensorflow tensorflow-tutorials tensorlayer

Last synced: about 1 month ago
JSON representation

Spatial Transformer Nets in TensorFlow/ TensorLayer

Awesome Lists containing this project

README

        

# [MOVED TO HERE](https://github.com/tensorlayer/tensorlayer/tree/master/examples/spatial_transformer_network)

# Spatial Transformer Networks

[Spatial Transformer Networks](https://arxiv.org/abs/1506.02025) (STN) is a dynamic mechanism that produces transformations of input images (or feature maps)including scaling, cropping, rotations, as well as non-rigid deformations. This enables the network to not only select regions of an image that are most relevant (attention), but also to transform those regions to simplify recognition in the following layers.

Video for different transformation [click me](https://drive.google.com/file/d/0B1nQa_sA3W2iN3RQLXVFRkNXN0k/view).

In this repositary, we implemented a STN for [2D Affine Transformation](https://en.wikipedia.org/wiki/Affine_transformation) on MNIST dataset. We generated images with size of 40x40 from the original MNIST dataset, and distorted the images by random rotation, shifting, shearing and zoom in/out. The STN was able to learn to automatically apply transformations on distorted images via classification task.





Fig 1:Transformation





Fig 2:Network





Fig 3:Formula

## Result

After classification task, the STN is able to transform the distorted image from Fig 4 back to Fig 5.





Fig 4: Input





Fig 5: Output