Step-by-Step Handwriting Recognition Tutorial Using TensorFlow

Поділитися
Вставка
  • Опубліковано 3 лис 2024

КОМЕНТАРІ • 168

  • @arielm2466
    @arielm2466 Рік тому +14

    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

  • @AnupamKumar-s5k
    @AnupamKumar-s5k 8 місяців тому +5

    could you help me how i can create with my own image datasets for ocr creation

  • @AyushGuptaAyushgupta
    @AyushGuptaAyushgupta Рік тому +3

    thank you sir ill will use it for project

    • @PyLessons
      @PyLessons  Рік тому +2

      Your welcome, for sure use it!

  • @SHUAIZHANG-rs7vn
    @SHUAIZHANG-rs7vn 5 місяців тому +1

    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.

  • @atharvamahalle4825
    @atharvamahalle4825 Рік тому +5

    how much time it took you to train dataset

  • @eznex5249
    @eznex5249 6 місяців тому +2

    thanks for video is it possible to use this model without doing the training process? thanks

    • @PyLessons
      @PyLessons  6 місяців тому +1

      Main tutorial purpose to show how to train such model, but yes you can use it if it’s enough to you

  • @shashidhardevraj
    @shashidhardevraj Рік тому +2

    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?

    • @PyLessons
      @PyLessons  Рік тому +1

      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

    • @boitumelorethabile4102
      @boitumelorethabile4102 11 місяців тому

      @@PyLessons can it work for hand written text on a form with multiple lines? or a table?

    • @şulemeşe-z7w
      @şulemeşe-z7w 8 місяців тому

      @@boitumelorethabile4102 did you finish it ? I am trying to work full paragraph. but it doesnt work

  • @tanvir_ovi010
    @tanvir_ovi010 6 місяців тому

    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

    • @PyLessons
      @PyLessons  5 місяців тому

      Yes, absolutely. I haven't tried but you should be good with it

  • @SHUAIZHANG-rs7vn
    @SHUAIZHANG-rs7vn 5 місяців тому

    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.

  • @vkrts9176
    @vkrts9176 Рік тому +3

    Can we send a sentence in the form of an image to get the predictions?

    • @PyLessons
      @PyLessons  Рік тому +3

      yes we can, that's what about my next tutorial will be

  • @yogeshmodi392
    @yogeshmodi392 Рік тому

    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.

  • @Shayankhan-q8f
    @Shayankhan-q8f 6 місяців тому +1

    Hello sir! This model will be work on current version of Python and Tensorflow?i am using version 3.11

    • @PyLessons
      @PyLessons  6 місяців тому

      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

  • @acronym6589
    @acronym6589 10 місяців тому +1

    i installed everything correctly but i get errors on importing anything from mltu.tensorflow or mltu.annotations. Is there a fix?

    • @PyLessons
      @PyLessons  10 місяців тому +1

      Hey, thanks. I created mltu 1.1.8 versiopn, that should solve your issues, try it out :)

  • @Auguste-y3l
    @Auguste-y3l Рік тому +2

    Thank you, Sir! Your work is truly amazing! Can I use it in my project?

  • @baludatascience3094
    @baludatascience3094 Рік тому

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

    • @PyLessons
      @PyLessons  Рік тому

      You need to separate each sentence, otherwise it may not or it would be really hard to train

  • @saadmasood4956
    @saadmasood4956 7 місяців тому

    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

    • @PyLessons
      @PyLessons  6 місяців тому +1

      Usually you won't get exact tutorial to your need, you have this my tutorial, that should help you a lot!

  • @bhanusri3732
    @bhanusri3732 10 місяців тому +1

    I couldn't find documentation for dataprovider in tensorflow. Could you help me?

    • @PyLessons
      @PyLessons  10 місяців тому

      Hey, you need to check tf.keras.utils.Sequence object

    • @bhanusri3732
      @bhanusri3732 10 місяців тому +1

      @@PyLessons thank you

  • @nareshmalviya3100
    @nareshmalviya3100 8 місяців тому +1

    When i pass whole image. Can it detecr all the text in one shot

    • @PyLessons
      @PyLessons  7 місяців тому

      Yes, that's what it does when we use CTC loss

  • @Desmond_Plays
    @Desmond_Plays Місяць тому

    Is it possible to use this kind of model for a lengthy hand written text like a paragraph? Or is there any issue?

    • @PyLessons
      @PyLessons  Місяць тому

      this solution is not the best for paragraphs, this might be too hard, best I can recommend you to extract each line of paragtaph

    • @Desmond_Plays
      @Desmond_Plays Місяць тому +2

      @@PyLessons Thanks

  • @MemesNFacts
    @MemesNFacts 8 місяців тому

    please help
    when i try to open the database website, it never opens.
    i really need the database

  • @frog_ictu
    @frog_ictu 9 місяців тому

    very good

    • @PyLessons
      @PyLessons  9 місяців тому

      Thank you! Cheers!

  • @sruthigayathrisrinivasan9141
    @sruthigayathrisrinivasan9141 9 місяців тому

    Can i use this code for tamil text recognition

  • @HRaf-v3q
    @HRaf-v3q Рік тому

    Thank you for the great tutorial. What Python version is used. I have 3.11.4, it is not very happy with this.

    • @PyLessons
      @PyLessons  Рік тому +1

      Hey, right now, I recommend using 3.10, on the next release I'll check why it's not happy with 3.11 :D

    • @HRaf-v3q
      @HRaf-v3q Рік тому +1

      Thanks.@@PyLessons

    • @şulemeşe-z7w
      @şulemeşe-z7w 8 місяців тому

      @@HRaf-v3q I agree with you. When I use python 3.11 it doesnt work

  • @cloydquisora4266
    @cloydquisora4266 Рік тому

    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?

    • @PyLessons
      @PyLessons  Рік тому

      Yes, it is but it's not as straightforward as you may think :)

  • @andrewpang7343
    @andrewpang7343 Рік тому

    hey, thx so much

  • @devikaar9066
    @devikaar9066 2 місяці тому +1

    can i done this project on google collab?

    • @PyLessons
      @PyLessons  2 місяці тому

      Yes, you can do this in google collab

  • @lilfeccibraemusic
    @lilfeccibraemusic Рік тому

    hi sorry how do i test this model on my own images

  • @emalalekozai
    @emalalekozai Рік тому

    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.

    • @PyLessons
      @PyLessons  Рік тому

      "ModelConfigs" is an object, that you must import

  • @coelhucas
    @coelhucas Рік тому +1

    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.

    • @SonamSharma-ot9uo
      @SonamSharma-ot9uo Рік тому

      have u resolved this error?same error i am also getting

  • @yashkewlani2878
    @yashkewlani2878 Рік тому

    Can you please tell me how can we take input from our side after training the model with datasets ??

    • @PyLessons
      @PyLessons  Рік тому +1

      There is an example where I do so with test data after training, simply replace it with your files

  • @cloudartwork
    @cloudartwork Рік тому

    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!

    • @PyLessons
      @PyLessons  Рік тому

      Usually you dont need to wait for email back, as I remember

  • @behzadbaghery2090
    @behzadbaghery2090 9 місяців тому

    Nice❤❤

  • @Harregarre
    @Harregarre 5 місяців тому

    19:24 is too relatable

  • @SHUAIZHANG-rs7vn
    @SHUAIZHANG-rs7vn 6 місяців тому

    Hi, I have an AttributeError: “ImageToWordModel” object has no attribute “input_shapes”,What can I do to fix it?

    • @PyLessons
      @PyLessons  6 місяців тому

      it seems like you are using latest tutorial code from github with older mltu version, use latest mltu in this case

    • @SHUAIZHANG-rs7vn
      @SHUAIZHANG-rs7vn 6 місяців тому

      @@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?

  • @franskilyrics4139
    @franskilyrics4139 Рік тому +1

    Can i convert the model.h5 to tflite?

  • @vigneshvicky6720
    @vigneshvicky6720 Рік тому +1

    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

    • @PyLessons
      @PyLessons  Рік тому +1

      I can't help you getting a dataset, you can use mnist dataset for letters

    • @vigneshvicky6720
      @vigneshvicky6720 Рік тому +1

      @@PyLessons how mnist used for letters

    • @PyLessons
      @PyLessons  Рік тому +1

      @@vigneshvicky6720 sorry, its EMNIST not mnist

    • @vigneshvicky6720
      @vigneshvicky6720 Рік тому +1

      @@PyLessons sir , dataset that u used to regonize hand written digits using yolo v3 is made by yourself??

    • @PyLessons
      @PyLessons  Рік тому +1

      @@vigneshvicky6720 no, it's mnist dataset

  • @businessmanagement4848
    @businessmanagement4848 8 місяців тому

    Where can I get dataset?

  • @ruckydelmoro2500
    @ruckydelmoro2500 Рік тому

    Sir i would like to ask im learning AI. Can i test it with my own data? and how?

    • @ruckydelmoro2500
      @ruckydelmoro2500 Рік тому

      I would like to test with my images data after training. How can i do that?

  • @olenkanamaka4636
    @olenkanamaka4636 Рік тому

    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.

    • @PyLessons
      @PyLessons  Рік тому

      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?

    • @olenkanamaka4636
      @olenkanamaka4636 Рік тому

      @@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'

    • @PyLessons
      @PyLessons  Рік тому

      @@olenkanamaka4636 its bug in 0.1.5 version, udpate to 0.1.7 version

    • @olenkanamaka4636
      @olenkanamaka4636 Рік тому

      @@PyLessons thank you 💛

  • @hemantchauhan6437
    @hemantchauhan6437 7 місяців тому

    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.

  • @pancakekiemtienonline6562
    @pancakekiemtienonline6562 Рік тому

    hi, can i use my custom dataset? my text like "hình ảnh", its latin

  • @shivamkumar-tg5wb
    @shivamkumar-tg5wb 2 місяці тому

    What tensorflow version you used?

    • @PyLessons
      @PyLessons  Місяць тому

      I used 2.10, but I hope to find time in the future to review my library and upgrade it to latest tensorflow version

  • @vaibhavsinghrathore5897
    @vaibhavsinghrathore5897 Рік тому

    Hey, can we run this program in macOS?

    • @PyLessons
      @PyLessons  Рік тому

      Don't have macOS, can't test, but it should work

  • @QzBoy
    @QzBoy Рік тому

    Hi Bro, is your solution applicable for Chinese HanZi ? thanks a lot!

    • @PyLessons
      @PyLessons  Рік тому

      Hey, havent tried but i think it should work

    • @QzBoy
      @QzBoy Рік тому

      @@PyLessons Cool, thanks Bro!

  • @şulemeşe-z7w
    @şulemeşe-z7w 8 місяців тому

    is it normal in epoch 107 early stopping

    • @PyLessons
      @PyLessons  8 місяців тому

      Hey, it depends on your early stopping parameters and etc. You need to check how tour model was trained

  • @jayathakur6928
    @jayathakur6928 Рік тому

    Can this model predict external images that aren't derived from datasets?

    • @PyLessons
      @PyLessons  Рік тому

      Yes if images are at least similar to dataset

    • @SHUAIZHANG-rs7vn
      @SHUAIZHANG-rs7vn 6 місяців тому

      Did you do it? Please teach me how to recognize my own pictures.

  • @pritamdas2232
    @pritamdas2232 Рік тому

    how to download the data set

  • @umandadikwatta178
    @umandadikwatta178 Рік тому

    Can you describe how to OCR memes dataset, that include complex background

    • @PyLessons
      @PyLessons  Рік тому

      You asking how to extract text from memes? Segments text from these images, then crop text and use with OCR :)

  • @HitheshShetty-k1s
    @HitheshShetty-k1s Рік тому

    sir i am facing problems installing mltu package in python 3.7 using conda.Plzz help

    • @PyLessons
      @PyLessons  Рік тому

      tried latest version, what error you face? try to update python version, many libraries doesn't support 3.7 anymore

    • @abhideep2004
      @abhideep2004 Рік тому

      @@PyLessons sir the link to iam dataset is not working. Please help sir

  • @ayushnauriyal8527
    @ayushnauriyal8527 Рік тому

    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

    • @PyLessons
      @PyLessons  Рік тому

      load_model(path, compile=False) try this

    • @ayushnauriyal8527
      @ayushnauriyal8527 Рік тому

      @@PyLessons thank you it loads just fine now

    • @ayushnauriyal8527
      @ayushnauriyal8527 Рік тому

      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 ?

  • @peterj1298
    @peterj1298 Рік тому

    can it predict words that are not from the dataset?

    • @PyLessons
      @PyLessons  Рік тому

      YES! That's the whole purporse on this tutorial, that's why we use validation data

    • @illiahimself
      @illiahimself Рік тому

      @@PyLessons how can we implement that type of task here?

  • @vantanle4720
    @vantanle4720 Рік тому

    can u give link for download IAM database, your link dont work :(

    • @PyLessons
      @PyLessons  Рік тому

      It works, sign up before downloading, fki.tic.heia-fr.ch/databases/download-the-iam-handwriting-database

  • @ManishKumar-b1k7o
    @ManishKumar-b1k7o Рік тому

    can u help me to create a custom ocr

    • @PyLessons
      @PyLessons  Рік тому +1

      I already helped by creating this tutorial

  • @parikshitbarua8520
    @parikshitbarua8520 Рік тому

    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

    • @parikshitbarua8520
      @parikshitbarua8520 Рік тому

      At this rate it will take 10+ days. Can you help me on this?

    • @PyLessons
      @PyLessons  Рік тому

      What gpu you have, you sure you train on gpu?

    • @calioutmyname
      @calioutmyname 10 місяців тому

      I am using AMD Radeon Graphics, and I cant run tf with gpu, any suggestions how to run the training efficiently? @@PyLessons

  • @jay-uw9rx
    @jay-uw9rx Рік тому

    How to find the accuracy sir

    • @PyLessons
      @PyLessons  Рік тому

      For words accuracy we use CER (Character Error Rate) I introduced it in this tutorial, read text version tutorial or watch full video :)

  • @ridrugo182
    @ridrugo182 Рік тому

    Ouch, internal server error. 502

  • @riswangp
    @riswangp Рік тому

    bro for download the datasets is error

    • @riswangp
      @riswangp Рік тому

      i used the codes that you've given

  • @EbtsamNasser-b8l
    @EbtsamNasser-b8l Рік тому

    Does that work with Arabic please??

    • @PyLessons
      @PyLessons  Рік тому

      Should work, I didn't tried

  • @RamPrasad-vg5ii
    @RamPrasad-vg5ii Рік тому

    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

    • @PyLessons
      @PyLessons  Рік тому

      Try to pip uninstall stow and then pip install stow

    • @RamPrasad-vg5ii
      @RamPrasad-vg5ii Рік тому

      @@PyLessons what is the python version I have to use

    • @PyLessons
      @PyLessons  Рік тому

      @@RamPrasad-vg5ii I am using 3.10, but it shouldnt be a problem with python, what OS you use?

    • @RamPrasad-vg5ii
      @RamPrasad-vg5ii Рік тому

      @@PyLessons window 11

    • @RamPrasad-vg5ii
      @RamPrasad-vg5ii Рік тому

      I uninstalled and reinstalled python latest version and got error with downloading mltu

  • @adamofucci4558
    @adamofucci4558 Рік тому +1

    🤗😘

  • @pritamdas2232
    @pritamdas2232 Рік тому

    zip file download link not working
    any one help please

    • @PyLessons
      @PyLessons  Рік тому

      I don't know, for me it works...

    • @pritamdas2232
      @pritamdas2232 Рік тому

      @@PyLessons how many days ago you try

    • @PyLessons
      @PyLessons  Рік тому +1

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

    • @comendantcristian3413
      @comendantcristian3413 Рік тому

      @@PyLessons This link does not have the .txt file, only the words. Can you suggest me what to do ?

    • @PyLessons
      @PyLessons  Рік тому +1

      ​@@comendantcristian3413 download fki.tic.heia-fr.ch/DBs/iamDB/data/ascii.tgz it has words.txt

  • @jasonjunio388
    @jasonjunio388 11 місяців тому

    no audio

    • @PyLessons
      @PyLessons  10 місяців тому

      need to turn it on then :)

  • @atharvamahalle4825
    @atharvamahalle4825 Рік тому

    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'

    • @PyLessons
      @PyLessons  Рік тому

      read an error, either a size in None or image is none

  • @kendrickcasanova9938
    @kendrickcasanova9938 Рік тому +1

    💕 promo sm

  • @modestebolina3054
    @modestebolina3054 Рік тому

    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