samkit-jain / handwriting-recognition Goto Github PK
View Code? Open in Web Editor NEWSoftware to recognize handwriting
License: Apache License 2.0
Software to recognize handwriting
License: Apache License 2.0
Hello Sir,
in letter_recognition.py it is predicting letter "l" for every letter drawn. Help me with this.
For making the fs2 directory, I have used the images in NIST dataset (using images from train folder given for each character in NIST dataset) from the link you have provided earlier in another issue.
References #6
I'm running this program on windows, and I'm encountering this issue when I run the dataset.py file.
Setting up EMNIST dataset
Downloading file from https://www.itl.nist.gov/iaui/vip/cs_links/EMNIST/gzip.zip and saving to D:\Coding\Python\Handwriting-Recognition-master\Python\download\gzip.zip
Extracting D:\Coding\Python\Handwriting-Recognition-master\Python\download\gzip.zip
Extracting D:\Coding\Python\Handwriting-Recognition-master\Python\download\gzip\emnist-balanced-train-images-idx3-ubyte.gz
Extracting D:\Coding\Python\Handwriting-Recognition-master\Python\download\gzip\emnist-balanced-train-labels-idx1-ubyte.gz
Extracting D:\Coding\Python\Handwriting-Recognition-master\Python\download\gzip\emnist-balanced-test-images-idx3-ubyte.gz
Extracting D:\Coding\Python\Handwriting-Recognition-master\Python\download\gzip\emnist-balanced-test-labels-idx1-ubyte.gz
Converting D:\Coding\Python\Handwriting-Recognition-master\Python\download\gzip\emnist-balanced-train-images-idx3-ubyte to image files
Traceback (most recent call last):
File "D:/Coding/Python/Handwriting-Recognition-master/Python/dataset.py", line 221, in <module>
creator.create()
File "D:/Coding/Python/Handwriting-Recognition-master/Python/dataset.py", line 95, in create
label_mapping=label_mapping
File "D:/Coding/Python/Handwriting-Recognition-master/Python/dataset.py", line 177, in idx_to_image
image_dest = tempfile.mkstemp(dir=label_folder, suffix='.png')[1]
File "C:\Users\hsjee\AppData\Local\Programs\Python\Python37\lib\tempfile.py", line 340, in mkstemp
return _mkstemp_inner(dir, prefix, suffix, flags, output_type)
File "C:\Users\hsjee\AppData\Local\Programs\Python\Python37\lib\tempfile.py", line 258, in _mkstemp_inner
fd = _os.open(file, flags, 0o600)
OSError: [Errno 24] Too many open files: 'D:\\Coding\\Python\\Handwriting-Recognition-master\\Python\\data\\n\\tmp9gd3zyow.png'
Process finished with exit code 1
Hi, I'm using pytesseract to recognize the characters in the jpeg file for a scanned file. But for manually entered text, pytesseract is very bad. How can I use your code for my image file? @samkit-jain
helllo , please share fs2 dir
Enter choice - 1
1
<1> Calculate accuracy
<2> Recognize letter
<3> Train again
Exit
Enter choice - 2
Traceback (most recent call last):
File "", line 164, in
recognise_letter()
File "", line 115, in recognise_letter
letter_loc = get_image_src()
File "E:\Shezartech\OCR\English\Handwriting-Recognition-master\Python\painte.py", line 71, in get_image_src
init_set()
File "E:\Shezartech\OCR\English\Handwriting-Recognition-master\Python\painte.py", line 37, in init_set
w = Canvas(master, width=canvas_width, height=canvas_height + 20)
NameError: name 'Canvas' is not defined
I am primarily interested in the exact data you used to train the letters recognition. I am aware you used data from https://www.nist.gov/srd/nist-special-database-19 but can you point me
from tkinter import *
tk = Tk()
canvas = canvas(tk, width=500, height= 400)
tk.title("drawing")
canvas.pack()
canvas.mainloop()
please find the issue why it shows the name error :
canvas is not defined.
FileNotFoundError: [Errno 2] No such file or directory: 'classifier_knn165.pickle'
Enter choice - 2
Traceback (most recent call last):
File "", line 164, in
recognise_letter()
File "", line 136, in recognise_letter
plt.title('letter is ' + clf.predict([gray_letter])[0])
File "C:\Users\DELL\Anaconda3\lib\site-packages\sklearn\neighbors\classification.py", line 145, in predict
neigh_dist, neigh_ind = self.kneighbors(X)
File "C:\Users\DELL\Anaconda3\lib\site-packages\sklearn\neighbors\base.py", line 347, in kneighbors
(train_size, n_neighbors)
ValueError: Expected n_neighbors <= n_samples, but n_samples = 1, n_neighbors = 165
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.