All Projects → sharkdp → qrnet

sharkdp / qrnet

Licence: other
A neural network that decrypts QR codes

Programming Languages

python
139335 projects - #7 most used programming language

QRNet

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 (00bLF6qvQF in the example above). The validation set also contains 5000 randomly generated QR codes [1].

Training

To start the training, simply call:

python train.py

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

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

Results

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

Footnotes

[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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].