GithubHelp home page GithubHelp logo

dedhiaparth98 / spatial-transformer-network Goto Github PK

View Code? Open in Web Editor NEW
12.0 1.0 3.0 4.67 MB

Spatial Transformer Network (STN) provides attention to a particular region to in an image, by doing transformation to the input image. The code in this repository does Affine transformation to image, but other transformation can be explored.

Home Page: https://towardsdatascience.com/implementing-spatial-transformer-network-stn-in-tensorflow-bf0dc5055cd5

Jupyter Notebook 82.81% PureBasic 17.19%
mnist affnist deep-learning computer-vision tensorflow

spatial-transformer-network's Introduction

Spatial Transformer Network

Spatial Transformer Network (STN) provides attention to a particular region to in an image, by doing transformation to the input image. The code in this repository does Affine transformation to image, but other transformation can be explored. Detailed explanation of the concept is explained in the blog post

Visualizations

You can clone the repository and directly run the Visualization-STN-MNIST.ipynb file where you will see how the STN network applies transformation to the Input image. These transformations can be not only restrcited to the first layer but could be applied to other layers as well.

Below are the visualizations when applied to the input image directly

Visualizations

Custom Training and Model Design

If you wish to train the network, then you can run the Spatial Transformer Network.ipynb. The model will generate following graph

Model Architecture

References

  1. M. Jaderberg, K. Simonyan, A. Zisserman, K. Kavukcuoglu, Spatial Transformer Networks, CVPR, 2015

  2. https://kevinzakka.github.io/2017/01/10/stn-part1/

  3. https://kevinzakka.github.io/2017/01/18/stn-part2/

spatial-transformer-network's People

Contributors

dedhiaparth98 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

spatial-transformer-network's Issues

STN is not learning rotation

This is a great project, thanks!

However, I am trying to use this to learn rotation/scale/translation invariance on the affNist-dataset.
But it seems to me like this implementation does not really learn rotation. When I take a close look at your sample image, I also do not really see any rotation applied.
image

Is there smth I can do so that the network learns rotation, as the scaling and translating work great?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.