GithubHelp home page GithubHelp logo

cangjiebian / digit-recognition Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bikz05/digit-recognition

0.0 0.0 0.0 720 KB

Handwritten Digit Recognition using OpenCV, sklearn and Python

Python 100.00%

digit-recognition's Introduction

Digit Recognition

Handwritten Digit Recognition using OpenCV, sklearn and Python | Video

Check out the blog post here for complete notes on how the code works.

Dependencies

  1. cv2
  2. sklearn
  3. skimage
  4. numpy
  5. collections

Contents

This repository contains the following files-

  1. generateClassifier.py - Python Script to create the classifier file digits_cls.pkl.
  2. performRecognition.py - Python Script to test the classifier.
  3. digits_cls.pkl - Classifier file for digit recognition.
  4. photo_1.jpg - Test image number 1 to test the classifier
  5. photo_2.jpg - Test image numbre 2 to test the classifier

Usage

  • Clone the repository -
cd 
git clone https://github.com/bikz05/digit-recognition.git
cd digit-recognition
  • The next step is to train the classifier. To do so run the script generateClassifier.py. It will produce the classifier named digits_cls.pkl.

NOTE - I have already created the digits_cls.pkl, so this step is not necessary.

python generateClassifier.py
  • To test the classifier, run the performRecognition.py script.
python performRecognition.py -c <path to classifier file> -i <path to test image>

ex -

python performRecognition.py -c digits_cls.pkl -i photo_1.jpg

Results

Sample Image 1

Result Number 1

Sample Image 2

Result Number 2

TODO

  • Add a CNN Based approach
  • Reject bounding boxes lesser than some area
  • Look into user errors

digit-recognition's People

Contributors

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