Coder Social home page Coder Social logo

lslsbj89 / real-time-digit-classifier Goto Github PK

View Code? Open in Web Editor NEW

This project forked from adnaniazi/real-time-digit-classifier

0.0 1.0 0.0 4.39 MB

This GUI uses a classifier trained on MNIST dataset to classify custom hand-written images in real time. The user can use mouse input to scribble a digit; the GUI will try to classify the image as soon as the user lifts the mouse.

Batchfile 0.06% Python 99.94%

real-time-digit-classifier's Introduction

Real-time Digit Classification using TensorFlow and PyQt

This PyQt GUI uses a deep neural network classifier trained on MNIST dataset to classify custom hand-written images in real time. The user can use mouse input to scribble a digit and the GUI will try to classify the image as soon as the user lifts the mouse.

demo gif

Requirements:

  1. Python 3.5.0

  2. TensorFlow 1.1.0

  3. Scipy 0.19.0

  4. Numpy 1.12.1+mkl

  5. PyQt5

  6. skim age

How to run it?

Import all files in a project in PyCharm. Then run main.py file.

What is what?

  1. main.py: contains all the code to to load and run the trained classifier. It also contains code for the GUI itself.

  2. model*: These are all the files of the trained deep neural network. main.py loads this trained classifier at startup.

  3. my_gui.ui: If you want to make any changes in the GUI’s front end, this is the file you should edit in the PyQt designer. This file is in XML format and must be converted into Python for subsequent use in main.py file.

  4. generate_py_file_ui_file.bat and my_gui.py: Clicking the bat file will convert the my_gui.ui file into my_gui.py file. The my_gui.py file contains Python code for GUI’s front end

  5. generate_py_file_qrc_file.bat and resources.qrc file: Any icons used in the GUI must be placed in the icons folder and these icons should then be defined in the resources.qrc file. Then a Python file (resources_rc.py) must be generated by running the generate_py_file_qrc_file.bat file

  6. img.png contains the raw high-resolution image obtained from the scribble input

  7. img28_inv.png contains the a 28x28 inverted version of the original scribble image. This is used as input to the classifier to classify.

  8. pyrcc5.exe is needed to convert the resources.qrc file to resources_rc.py file when the generate_py_file_from_qrc_file.bat is run.

real-time-digit-classifier's People

Contributors

adnaniazi avatar

Watchers

James Cloos 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.