bikz05 / digit-recognition Goto Github PK
View Code? Open in Web Editor NEWHandwritten Digit Recognition using OpenCV, sklearn and Python
Handwritten Digit Recognition using OpenCV, sklearn and Python
Python 2.7.12
OpenCV 3.4.0
python performRecognition.py -c digits_cls.pkl -i photo_1.jpg
Traceback (most recent call last):
File "performRecognition.py", line 52, in
roi_hog_fd = pp.transform(np.array([roi_hog_fd], 'float64'))
File "/usr/lib/python2.7/dist-packages/sklearn/preprocessing/data.py", line 638, in transform
check_is_fitted(self, 'scale_')
File "/usr/lib/python2.7/dist-packages/sklearn/utils/validation.py", line 678, in check_is_fitted
raise NotFittedError(msg % {'name': type(estimator).name})
sklearn.utils.validation.NotFittedError: This StandardScaler instance is not fitted yet. Call 'fit' with appropriate arguments before using this method.
Pls help me to fix this error
Hi, I am getting the following error when I tried to run performRecognition.py
I am a noob to Python and OpenCV, please help.
Traceback (most recent call last):
File "C:/Users/User/Downloads/digitRecognition/performRecognition.py", line 24, in
rects = [cv2.boundingRect(ctr) for ctr in ctrs]
TypeError: points is not a numpy array, neither a scalar
Process finished with exit code 1
hi
i change jpg to png file
and then an error occurred
C:\Users\Andy\Downloads\digit-recognition-master\digit-recognition-master>python performRecognition.py -c digits_cls3.pkl -i test.png
OpenCV Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in cv::resize, file D:\Build\OpenCV\opencv-3.2.0\modules\imgproc\src\imgwarp.cpp, line 3492
Traceback (most recent call last):
File "performRecognition.py", line 46, in
roi = cv2.resize(roi, (28, 28), interpolation=cv2.INTER_AREA)
cv2.error: D:\Build\OpenCV\opencv-3.2.0\modules\imgproc\src\imgwarp.cpp:3492: error: (-215) ssize.width > 0 && ssize.height > 0 in function cv::resize
Traceback (most recent call last):
File "generateClassifier.py", line 13, in
dataset = datasets.fetch_mldata("MNIST Original")
File "/usr/lib/python2.7/dist-packages/sklearn/datasets/mldata.py", line 142, in fetch_mldata
mldata_url = urlopen(urlname)
File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 435, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 473, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 500: Internal Server Error
why don`t you make it clear the python version?
When I try to test the classifier, run the performRecognition.py
script, I faced this problem, and I have no idea how to deal with that. I tried to run it in python 2 and python 3, it all has problems, hope someone can help me, thank you!
pi@raspberrypi:~/digit-recognition $ python performRecognition.py -c digits_cls.pkl -i photo_1.jpg
Traceback (most recent call last):
File "performRecognition.py", line 51, in
nbr = clf.predict(roi_hog_fd)
File "/usr/lib/python2.7/dist-packages/sklearn/linear_model/base.py", line 228, in predict
return self.classes_[indices]
File "/usr/lib/python2.7/dist-packages/sklearn/svm/base.py", line 709, in classes_
return self.enc.classes
AttributeError: 'LinearSVC' object has no attribute '_enc'
I am getting this error
"You may be trying to read with python 3 a joblib pickle generated with python 2. This feature is not supported by joblib"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.