Git Product home page Git Product logo

zishansami102 / cnn-from-scratch Goto Github PK

View Code? Open in Web Editor NEW
267.0 267.0 79.0 47.12 MB

A scratch implementation of Convolutional Neural Network in Python using only numpy and validated over CIFAR-10 & MNIST Dataset

Home Page: http://cnndigits.pythonanywhere.com/

License: GNU General Public License v3.0

Python 70.13% JavaScript 6.72% HTML 23.11% Procfile 0.05%
cnn-from-scratch convolutional-neural-networks deep-learning digit-recognition mnist object-detection python

cnn-from-scratch's People

Contributors

aashish-ak avatar adityasoni19031997 avatar sanskar107 avatar zishansami102 avatar

Stargazers

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

Watchers

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

cnn-from-scratch's Issues

Add : Flask API for Digit Recognizer

Description:

An API which receives image as input and gives digit prediction and its probability for that image as output(from functions available in 'convnet.py' file).
Use 'app.py' file to start from.
[read the README for more details]

How to handle non-numeric?

I have a question, how to handle non-number prediction?

I tried your Demo and when I wrote C, it was predicted as 5 and when I wrote A, it gave 2.

How to extend the NN so that it can make an output "Unknown" / "Not in the list"?

UnicodeDecodeError when running app.py

I am using Python 3.7 on MacOS.
I trained the CNN with the MNIST db and tried running app.py
While it starts and I can access it from 127.0.0.1:5000, as soon as I draw a digit and press Predict I get the following console output.


  • Serving Flask app "app" (lazy loading)
  • Environment: production
    WARNING: Do not use the development server in a production environment.
    Use a production WSGI server instead.
  • Debug mode: on
  • Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
  • Restarting with stat
  • Debugger is active!
  • Debugger PIN: 162-250-119
    127.0.0.1 - - [25/Aug/2018 00:29:18] "GET / HTTP/1.1" 200 -
    127.0.0.1 - - [25/Aug/2018 00:29:18] "GET /static/style/drawingboard.min.css HTTP/1.1" 200 -
    127.0.0.1 - - [25/Aug/2018 00:29:18] "GET /static/style/application2.min.css HTTP/1.1" 200 -
    127.0.0.1 - - [25/Aug/2018 00:29:18] "GET /static/style/drawingBoard.min.js HTTP/1.1" 200 -
    127.0.0.1 - - [25/Aug/2018 00:29:18] "GET /static/style/hermiteResize.js HTTP/1.1" 200 -
    127.0.0.1 - - [25/Aug/2018 00:29:23] "POST /digit_process HTTP/1.1" 500 -
    Traceback (most recent call last):
    File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2309, in call
    return self.wsgi_app(environ, start_response)
    File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2295, in wsgi_app
    response = self.handle_exception(e)
    File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1741, in handle_exception
    reraise(exc_type, exc_value, tb)
    File "/usr/local/lib/python3.7/site-packages/flask/_compat.py", line 35, in reraise
    raise value
    File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
    File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
    File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
    File "/usr/local/lib/python3.7/site-packages/flask/_compat.py", line 35, in reraise
    raise value
    File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
    File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functionsrule.endpoint
    File "/Users/dennisfurrer/Desktop/CNN-from-Scratch/app.py", line 23, in digit_process
    out = pickle.load(pickle_in)
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xca in position 0: ordinal not in range(128)

How to use GPU's?

How to enable training on GPU's ?
Any pointers in that direction?

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.