Handwritten Digit Recognition using OpenCV, sklearn and Python | Video
Check out the blog post here for complete notes on how the code works.
cv2
sklearn
skimage
numpy
collections
This repository contains the following files-
generateClassifier.py
- Python Script to create the classifier file digits_cls.pkl
.performRecognition.py
- Python Script to test the classifier.digits_cls.pkl
- Classifier file for digit recognition.photo_1.jpg
- Test image number 1 to test the classifierphoto_2.jpg
- Test image numbre 2 to test the classifiercd
git clone https://github.com/bikz05/digit-recognition.git
cd digit-recognition
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
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