Skip to content

luisvalesilva/digitre

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

digitre

Digitre is a machine learning application to recognize handwritten digits. Digitre is written in Python using the Flask web framework.

The front end shows an html canvas where you are asked to draw a digit. Digitre recognizes the handwritten digit using Machine Learning (ML) and outputs its prediction.

The ML model is a Convolutional Neural Network (CNN) trained on the MNIST dataset using the TFLearn software library (a high level abstraction of Google's TensorFlow).

Give it a try at digitre.technology. Update (Oct 2020): I have taken Digitre offline. You can try it locally using the instructions below.

Try it locally

Steps to download the source code and run Flask's development server locally.

  1. Clone the repo and go inside
git clone https://github.com/luisvalesilva/digitre.git
cd digitre/
  1. Create and activate a virtual environment
virtualenv venv
source venv/bin/activate

Due to some incompatibilities, I am avoiding the latest version of tensorflow (at the time of development; version 0.12) and using version 0.11 instead. The frozen state of environment packages in the requirements.txt file defaults to installation of tensorflow 0.11 for Linux (Ubuntu/Linux 64-bit, CPU only, Python 3.5).

If you're on Mac OS X, change the line referring to tensorflow at this point, in order to install the distribution for Mac OS X (CPU only, Python 3.4 or 3.5):

sed -i '12s/.*/https:\/\/storage.googleapis.com\/tensorflow\/mac\/cpu\/tensorflow-0.11.0rc1-py3-none-any.whl/' requirements.txt
  1. Install requirements (listed in frozen state of environment packages)
pip install -r requirements.txt
  1. Run app locally with Flask's development server
python digitre/digitre.py

Go to address http://127.0.0.1:5000/ on your web browser to use the app.

License

This project is licensed under the terms of the MIT license. See LICENSE file for details.