Giter VIP home page Giter VIP logo

qr-code-decryption-with-tensorflow's Introduction

QR code decryption with tensorflow

A simple neural network that predicts the first character that is stored in a QR-code such as this:

Sample QR-code

At training time, QR codes are created randomly from alphanumeric strings of length ten (sample in the example above). The validation set also contains 5000 randomly generated QR codes.

SetUp

virtualenv -p python3 venv --no-site-packages
source venv/bin/activate
pip3 list
pip3 install -r requirements.txt

Using Python 3.5+

Training

To start the training, simply call:

python train.py

Model

Then, you can run tensorboard to view the test-set accuracy:

tensorboard --logdir /tmp/qrnet-log --reload_interval 5

Generated QR codes

QR

Results

After approximately 50.000 iterations (with 200 QR codes per batch), it reaches a test-set accuracy of over 0.999.

[1] Note that there are (2 ร— 26 + 10)^10 โ‰ˆ 10^18 possible QR codes, so chances of collisions between the training and the test set are vanishingly small.

[2] Unfortunately, the online training is rather slow. Most of the time is actually spent in the (parallelized) QR code generation.

CREDITS

Kuldeep Singh Sidhu

Github: github/singhsidhukuldeep https://github.com/singhsidhukuldeep

Website: Kuldeep Singh Sidhu (Website) http://kuldeepsinghsidhu.com

LinkedIn: Kuldeep Singh Sidhu (LinkedIn) https://www.linkedin.com/in/singhsidhukuldeep/

qr-code-decryption-with-tensorflow's People

Contributors

singhsidhukuldeep avatar

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.