My teacher has asked me to do word and text line projects and just reading tutorials and code is a bit overwhelming for me. Is there any relevant references so that I can understand the structure of the model and how the algorithms are implemented, I would appreciate if you can give me an answer.
Thanks a lot for this video! Really appreciate your effort and time in making this video and documentation. Will your code helps in converting a handwritten paragraph from an image into a text output?
It can't work with full paragraph, it's challenging task. You need to use opencv to separate each paragraph line, this would be easier to train and would work better
Hi, I have watched full series thanks for the good work. Can the model.h5 for the hand written word converted to tflite? I want try the possibility to use this as a ocr for mobile devices
Hello, is there any relevant paper reference for word recognition and text line recognition, I would like to know more about the principle of their implementation.
In which format labels should be there for a custom image dataset for hcr and image hai only single character in it , labels format by I mean the content in the label file with respect to image.
I have to build this project but Real time like by using a camera which reads the text and recognizes it real time so can you guide me aur is there anywhere you know i can get the tutorial for this project? Thankyou
Is it possible to implement or create an Android application that can recognize handwriting and give a percentage feedback on how accurate the handwritten letter is?
In which Python library is the function "ModelConfigs()". When executing the command "configs = ModelConfigs()" I get the error message "NameError: name 'ModelConfigs' is not defined". Thanks.
hey sir, thanks for the video, is very helpful. im having some troubles: words = open(stow.join(dataset_path, "words.txt"), "r").readlines() FileNotFoundError: [Errno 2] No such file or directory: 'Datasets/IAM_Words/words.txt' aparently, the dataset was to be one file txt with the words, but after extract i have a lot of folders and inside them the txt files.
Excuse me sir I am doing a project which is to recognize just letters not words and also a pen or pencil drawn line on paper... Plz plz help me sir I need a dataset first
Hey , can you please help me? I have problem on this step model.fit( train_dataset, validation_data=val_dataset, epochs=configs.train_epochs, callbacks=[earlystopper, checkpoint, trainLogger, reduceLROnPlat, tb_callback, model2onnx], workers=configs.train_workers ) It's seems that fit() method is not able to handle the train_data_provider and val_data_provider inputs correctly.
I can't tell you, there is no error no nothing. Next time write issue on github. How I can be sure that you feed data provider to fit function not a simple list of data?
@@PyLessons hey can you help with this import? Help on package mltu: NAME mltu PACKAGE CONTENTS augmentors callbacks configs dataProvider inferenceModel losses metrics model_utils preprocessors transformers VERSION 0.1.5 FILE /usr/local/lib/python3.9/dist-packages/mltu/__init__.py from mltu.utils.text_utils import ctc_decoder, get_cer No module named 'mltu.utils'
NEED HELP! I am making a website where user can upload a pdf but I want that pdf to upload only if that pdf has images of only HANDWRITTEN text. Thank you for reading.
Sir when i am trying to load this model after saving it as .h5 file using model.save() and it is showing error unknown ctc loss function used when i try to load the model can anyone help me with that
Ayush Nauriyal After loading the model i performed the prediction on the image img_path = '/content/a01-000u-s01-02.png' import numpy as np import cv2 img = cv2.imread(img_path) img2 = cv2.resize(img, (1408, 96)) img2 = np.expand_dims(img2, axis = 0) img2.shape predic = model.predict(img2) predic after doing this i am getting the prediction like this array([[[1.2415222e-09, 7.0665460e-11, 1.3446735e-09, ..., 4.2244028e-11, 4.6788357e-10, 9.9999982e-01], [9.2563290e-11, 3.5853189e-12, 1.3980632e-09, ..., 1.8043905e-12, 4.3966573e-11, 9.9999994e-01], [9.2093624e-11, 8.1774344e-13, 6.3274475e-10, ..., 2.2918776e-13, 1.6017824e-11, 9.9999994e-01], ..., [1.4345783e-10, 3.5449276e-12, 7.9118561e-09, ..., 7.7375151e-13, 1.8447799e-11, 9.9999994e-01], [1.9966975e-10, 2.5930644e-12, 6.7138979e-09, ..., 9.9339905e-13, 1.3786991e-11, 9.9999994e-01], [2.6358316e-09, 7.7780477e-11, 3.4101092e-07, ..., 1.6719615e-11, 3.1711211e-10, 9.9999934e-01]]], dtype=float32) how do i get it converted to text form ?
hello sir, im getting the following error Traceback (most recent call last): File "d:\Ram ew project fy\mltu-main\Tutorials\03_handwriting_recognition\train.py", line 74, in configs.save() File "C:\Python310\lib\site-packages\mltu\configs.py", line 16, in save stow.mkdir(self.model_path) File "C:\Python310\lib\site-packages\stow\stateless.py", line 199, in mkdir return manager.mkdir(relpath,*args, **kwargs) File "C:\Python310\lib\site-packages\stow\manager\manager.py", line 866, in mkdir return self.put(directory, path, overwrite=overwrite) File "C:\Python310\lib\site-packages\stow\manager\manager.py", line 638, in put source = self._findArtefact(self.abspath(source)) File "C:\Python310\lib\site-packages\stow\manager\manager.py", line 215, in _findArtefact return manager[self.abspath(source)] File "C:\Python310\lib\site-packages\stow\manager\manager.py", line 71, in __getitem__ return self._loadArtefact(path) File "C:\Python310\lib\site-packages\stow\manager\manager.py", line 188, in _loadArtefact raise exceptions.ArtefactNotFound("Couldn't locate artefact {}".format(managerPath)) stow.exceptions.ArtefactNotFound: Couldn't locate artefact /Users/USER/AppData/Local/Temp/tmptvef7ore . can you please help me
@@pritamdas2232 Ok, it seems it doesn't work anymore, download from official link fki.tic.heia-fr.ch/databases/download-the-iam-handwriting-database I need to find another working link...
Sir how can I solve this error please reply it's very urgent image = cv2.resize(image, self.input_shape[:2][::-1]) cv2.error: OpenCV(4.6.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src esize.cpp:4052: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'
Hey Can I pls get your contact? I need your help to make the project run 'cause I've tried so hard but sill encountering mistakes...it's really an emergency and hopefully to get a feedback,thanks
you are a life saver I had a project about this that had his deadline moved to 3 weeks earlier and that tutorial really helped
Nice, great that I could save your time!
bro can you help me ? i getting errors
hii can u help to designn custom ocr
could you help me how i can create with my own image datasets for ocr creation
thank you sir ill will use it for project
Your welcome, for sure use it!
My teacher has asked me to do word and text line projects and just reading tutorials and code is a bit overwhelming for me. Is there any relevant references so that I can understand the structure of the model and how the algorithms are implemented, I would appreciate if you can give me an answer.
how much time it took you to train dataset
thanks for video is it possible to use this model without doing the training process? thanks
Main tutorial purpose to show how to train such model, but yes you can use it if it’s enough to you
Thanks a lot for this video! Really appreciate your effort and time in making this video and documentation. Will your code helps in converting a handwritten paragraph from an image into a text output?
It can't work with full paragraph, it's challenging task. You need to use opencv to separate each paragraph line, this would be easier to train and would work better
@@PyLessons can it work for hand written text on a form with multiple lines? or a table?
@@boitumelorethabile4102 did you finish it ? I am trying to work full paragraph. but it doesnt work
Hi,
I have watched full series thanks for the good work. Can the model.h5 for the hand written word converted to tflite? I want try the possibility to use this as a ocr for mobile devices
Yes, absolutely. I haven't tried but you should be good with it
Hello, is there any relevant paper reference for word recognition and text line recognition, I would like to know more about the principle of their implementation.
Can we send a sentence in the form of an image to get the predictions?
yes we can, that's what about my next tutorial will be
In which format labels should be there for a custom image dataset for hcr and image hai only single character in it , labels format by I mean the content in the label file with respect to image.
Hello sir! This model will be work on current version of Python and Tensorflow?i am using version 3.11
I haven't tested it with python 3.11 and and latest TensorFlow, but as I know it may be not compatible with latest version of TensorFlow
i installed everything correctly but i get errors on importing anything from mltu.tensorflow or mltu.annotations. Is there a fix?
Hey, thanks. I created mltu 1.1.8 versiopn, that should solve your issues, try it out :)
Thank you, Sir! Your work is truly amazing! Can I use it in my project?
Thanks, yes you can :)
Hi Sir, thanks for the video. However, will this works on table like handwritten docs? let me know if any tutorial you are planning for...
You need to separate each sentence, otherwise it may not or it would be really hard to train
I have to build this project but Real time like by using a camera which reads the text and recognizes it real time so can you guide me aur is there anywhere you know i can get the tutorial for this project? Thankyou
Usually you won't get exact tutorial to your need, you have this my tutorial, that should help you a lot!
I couldn't find documentation for dataprovider in tensorflow. Could you help me?
Hey, you need to check tf.keras.utils.Sequence object
@@PyLessons thank you
When i pass whole image. Can it detecr all the text in one shot
Yes, that's what it does when we use CTC loss
Is it possible to use this kind of model for a lengthy hand written text like a paragraph? Or is there any issue?
this solution is not the best for paragraphs, this might be too hard, best I can recommend you to extract each line of paragtaph
@@PyLessons Thanks
please help
when i try to open the database website, it never opens.
i really need the database
very good
Thank you! Cheers!
Can i use this code for tamil text recognition
Thank you for the great tutorial. What Python version is used. I have 3.11.4, it is not very happy with this.
Hey, right now, I recommend using 3.10, on the next release I'll check why it's not happy with 3.11 :D
Thanks.@@PyLessons
@@HRaf-v3q I agree with you. When I use python 3.11 it doesnt work
Is it possible to implement or create an Android application that can recognize handwriting and give a percentage feedback on how accurate the handwritten letter is?
Yes, it is but it's not as straightforward as you may think :)
hey, thx so much
You're welcome!
can i done this project on google collab?
Yes, you can do this in google collab
hi sorry how do i test this model on my own images
In which Python library is the function "ModelConfigs()". When executing the command "configs = ModelConfigs()" I get the error message "NameError: name 'ModelConfigs' is not defined". Thanks.
"ModelConfigs" is an object, that you must import
hey sir, thanks for the video, is very helpful. im having some troubles: words = open(stow.join(dataset_path, "words.txt"), "r").readlines()
FileNotFoundError: [Errno 2] No such file or directory: 'Datasets/IAM_Words/words.txt'
aparently, the dataset was to be one file txt with the words, but after extract i have a lot of folders and inside them the txt files.
have u resolved this error?same error i am also getting
Can you please tell me how can we take input from our side after training the model with datasets ??
There is an example where I do so with test data after training, simply replace it with your files
I registered for IAM db so I can download data. How long does it take for them to email me back? Thanks for the video! Subbed!
Usually you dont need to wait for email back, as I remember
Nice❤❤
Thanks 🤗
19:24 is too relatable
Hi, I have an AttributeError: “ImageToWordModel” object has no attribute “input_shapes”,What can I do to fix it?
it seems like you are using latest tutorial code from github with older mltu version, use latest mltu in this case
@@PyLessons Problem solved. I would like to know how to do text recognition with my own images without labels, do I need to preprocess the images?
Can i convert the model.h5 to tflite?
Yes, you can
Excuse me sir I am doing a project which is to recognize just letters not words and also a pen or pencil drawn line on paper... Plz plz help me sir I need a dataset first
I can't help you getting a dataset, you can use mnist dataset for letters
@@PyLessons how mnist used for letters
@@vigneshvicky6720 sorry, its EMNIST not mnist
@@PyLessons sir , dataset that u used to regonize hand written digits using yolo v3 is made by yourself??
@@vigneshvicky6720 no, it's mnist dataset
Where can I get dataset?
Sir i would like to ask im learning AI. Can i test it with my own data? and how?
I would like to test with my images data after training. How can i do that?
Hey , can you please help me?
I have problem on this step
model.fit(
train_dataset,
validation_data=val_dataset,
epochs=configs.train_epochs,
callbacks=[earlystopper, checkpoint, trainLogger, reduceLROnPlat, tb_callback, model2onnx],
workers=configs.train_workers
)
It's seems that fit() method is not able to handle the train_data_provider and val_data_provider inputs correctly.
I can't tell you, there is no error no nothing. Next time write issue on github. How I can be sure that you feed data provider to fit function not a simple list of data?
@@PyLessons hey can you help with this import?
Help on package mltu:
NAME
mltu
PACKAGE CONTENTS
augmentors
callbacks
configs
dataProvider
inferenceModel
losses
metrics
model_utils
preprocessors
transformers
VERSION
0.1.5
FILE
/usr/local/lib/python3.9/dist-packages/mltu/__init__.py
from mltu.utils.text_utils import ctc_decoder, get_cer
No module named 'mltu.utils'
@@olenkanamaka4636 its bug in 0.1.5 version, udpate to 0.1.7 version
@@PyLessons thank you 💛
NEED HELP! I am making a website where user can upload a pdf but I want that pdf to upload only if that pdf has images of only HANDWRITTEN text. Thank you for reading.
Bro did you make the website ?
Bro did you make the website?
didn't include this feature
hi, can i use my custom dataset? my text like "hình ảnh", its latin
yes, you can
What tensorflow version you used?
I used 2.10, but I hope to find time in the future to review my library and upgrade it to latest tensorflow version
Hey, can we run this program in macOS?
Don't have macOS, can't test, but it should work
Hi Bro, is your solution applicable for Chinese HanZi ? thanks a lot!
Hey, havent tried but i think it should work
@@PyLessons Cool, thanks Bro!
is it normal in epoch 107 early stopping
Hey, it depends on your early stopping parameters and etc. You need to check how tour model was trained
Can this model predict external images that aren't derived from datasets?
Yes if images are at least similar to dataset
Did you do it? Please teach me how to recognize my own pictures.
how to download the data set
Can you describe how to OCR memes dataset, that include complex background
You asking how to extract text from memes? Segments text from these images, then crop text and use with OCR :)
sir i am facing problems installing mltu package in python 3.7 using conda.Plzz help
tried latest version, what error you face? try to update python version, many libraries doesn't support 3.7 anymore
@@PyLessons sir the link to iam dataset is not working. Please help sir
Sir when i am trying to load this model after saving it as .h5 file using model.save() and it is showing error unknown ctc loss function used when i try to load the model
can anyone help me with that
load_model(path, compile=False) try this
@@PyLessons thank you it loads just fine now
Ayush Nauriyal
After loading the model i performed the prediction on the image
img_path = '/content/a01-000u-s01-02.png'
import numpy as np
import cv2
img = cv2.imread(img_path)
img2 = cv2.resize(img, (1408, 96))
img2 = np.expand_dims(img2, axis = 0)
img2.shape
predic = model.predict(img2)
predic
after doing this i am getting the prediction like this
array([[[1.2415222e-09, 7.0665460e-11, 1.3446735e-09, ...,
4.2244028e-11, 4.6788357e-10, 9.9999982e-01],
[9.2563290e-11, 3.5853189e-12, 1.3980632e-09, ...,
1.8043905e-12, 4.3966573e-11, 9.9999994e-01],
[9.2093624e-11, 8.1774344e-13, 6.3274475e-10, ...,
2.2918776e-13, 1.6017824e-11, 9.9999994e-01],
...,
[1.4345783e-10, 3.5449276e-12, 7.9118561e-09, ...,
7.7375151e-13, 1.8447799e-11, 9.9999994e-01],
[1.9966975e-10, 2.5930644e-12, 6.7138979e-09, ...,
9.9339905e-13, 1.3786991e-11, 9.9999994e-01],
[2.6358316e-09, 7.7780477e-11, 3.4101092e-07, ...,
1.6719615e-11, 3.1711211e-10, 9.9999934e-01]]], dtype=float32)
how do i get it converted to text form ?
can it predict words that are not from the dataset?
YES! That's the whole purporse on this tutorial, that's why we use validation data
@@PyLessons how can we implement that type of task here?
can u give link for download IAM database, your link dont work :(
It works, sign up before downloading, fki.tic.heia-fr.ch/databases/download-the-iam-handwriting-database
can u help me to create a custom ocr
I already helped by creating this tutorial
While training it is taking lot of time. For 1 epoch it is taking around 14 minutes. For you it is showing 1221 per epoch but for me 5461 per epoch
At this rate it will take 10+ days. Can you help me on this?
What gpu you have, you sure you train on gpu?
I am using AMD Radeon Graphics, and I cant run tf with gpu, any suggestions how to run the training efficiently? @@PyLessons
How to find the accuracy sir
For words accuracy we use CER (Character Error Rate) I introduced it in this tutorial, read text version tutorial or watch full video :)
Ouch, internal server error. 502
bro for download the datasets is error
i used the codes that you've given
Does that work with Arabic please??
Should work, I didn't tried
hello sir, im getting the following error
Traceback (most recent call last):
File "d:\Ram
ew project fy\mltu-main\Tutorials\03_handwriting_recognition\train.py", line 74, in
configs.save()
File "C:\Python310\lib\site-packages\mltu\configs.py", line 16, in save
stow.mkdir(self.model_path)
File "C:\Python310\lib\site-packages\stow\stateless.py", line 199, in mkdir
return manager.mkdir(relpath,*args, **kwargs)
File "C:\Python310\lib\site-packages\stow\manager\manager.py", line 866, in mkdir
return self.put(directory, path, overwrite=overwrite)
File "C:\Python310\lib\site-packages\stow\manager\manager.py", line 638, in put
source = self._findArtefact(self.abspath(source))
File "C:\Python310\lib\site-packages\stow\manager\manager.py", line 215, in _findArtefact
return manager[self.abspath(source)]
File "C:\Python310\lib\site-packages\stow\manager\manager.py", line 71, in __getitem__
return self._loadArtefact(path)
File "C:\Python310\lib\site-packages\stow\manager\manager.py", line 188, in _loadArtefact
raise exceptions.ArtefactNotFound("Couldn't locate artefact {}".format(managerPath))
stow.exceptions.ArtefactNotFound: Couldn't locate artefact /Users/USER/AppData/Local/Temp/tmptvef7ore .
can you please help me
Try to pip uninstall stow and then pip install stow
@@PyLessons what is the python version I have to use
@@RamPrasad-vg5ii I am using 3.10, but it shouldnt be a problem with python, what OS you use?
@@PyLessons window 11
I uninstalled and reinstalled python latest version and got error with downloading mltu
🤗😘
zip file download link not working
any one help please
I don't know, for me it works...
@@PyLessons how many days ago you try
@@pritamdas2232 Ok, it seems it doesn't work anymore, download from official link fki.tic.heia-fr.ch/databases/download-the-iam-handwriting-database I need to find another working link...
@@PyLessons This link does not have the .txt file, only the words. Can you suggest me what to do ?
@@comendantcristian3413 download fki.tic.heia-fr.ch/DBs/iamDB/data/ascii.tgz it has words.txt
no audio
need to turn it on then :)
Sir how can I solve this error please reply it's very urgent
image = cv2.resize(image, self.input_shape[:2][::-1])
cv2.error: OpenCV(4.6.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src
esize.cpp:4052: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'
read an error, either a size in None or image is none
💕 promo sm
Hey
Can I pls get your contact? I need your help to make the project run 'cause I've tried so hard but sill encountering mistakes...it's really an emergency and hopefully to get a feedback,thanks