Keras OCR - Reading Text from Images and Custom Models using Python

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ต.ค. 2024
  • #datascience #OCR #Keras
    Optical character recognition or optical character reader (OCR) is the electronic or mechanical conversion of images of typed, handwritten or printed text into machine-encoded text, whether from a scanned document, a photo of a document, a scene-photo
    In this video we will see how we can use Keras OCR to scan report and we will also see how we can extend it to build custom OCR models

ความคิดเห็น • 105

  • @Behindthewheelwithsyed
    @Behindthewheelwithsyed 4 ปีที่แล้ว +4

    Thank you for sharing. Everyday I am watching atleast a video from your library and great learning.

  • @siddarthbali12
    @siddarthbali12 4 ปีที่แล้ว +12

    Can u please make a video demonstrating, the method to train the recognizer on custom data images.

    • @AIEngineeringLife
      @AIEngineeringLife  4 ปีที่แล้ว +9

      I have it in plans and will do it in coming month

    • @santhoshmanoharan8969
      @santhoshmanoharan8969 3 ปีที่แล้ว

      @@AIEngineeringLife waiting for custom models recognizer training tutorial

    • @santhoshmanoharan8969
      @santhoshmanoharan8969 3 ปีที่แล้ว +1

      @@AIEngineeringLife waiting for that video

    • @abhilasht6471
      @abhilasht6471 3 ปีที่แล้ว

      @@AIEngineeringLife thank you for such a wonderful tutorial, could you please share video on how retrain on custom images

    • @shouryanagpal5813
      @shouryanagpal5813 ปีที่แล้ว

      @@AIEngineeringLife sir please tell how to train the model , either provide some links or blogs or a video (best)

  • @yashdeepkumar2495
    @yashdeepkumar2495 2 ปีที่แล้ว +1

    Hi srivatsan I have a doubt. How did you train the 'captcha.hdf5' model that you are using here

  • @machinelearning9197
    @machinelearning9197 4 ปีที่แล้ว +1

    very helpful,, thank you for the video,one question--> going back and forth and seeing the bounding box is the only way to evaluate how accurate it is or there is any evaluation metrics for this pretrained CRNN.
    please post a video on how to train custom keras ocr model and to evaluate its performance

    • @AIEngineeringLife
      @AIEngineeringLife  4 ปีที่แล้ว +1

      CRNN metrics is typically per character precision or full sequence precision. This is close to how character error rate or word error rate works. For CRAFT bounding box can be a measure.. Yes on custom model

  • @viveksuresh7178
    @viveksuresh7178 4 ปีที่แล้ว +1

    thank you Srivatsan - was trying to do something similar with EAST but was running into issues with multi oriented and arbitary shapes for text content , will try with CRAFT and see if this will give better result

    • @tanmaygupta638
      @tanmaygupta638 4 ปีที่แล้ว

      have you tried? How was the result?

  • @paavanshah855
    @paavanshah855 8 หลายเดือนก่อน

    Good tutorial.
    Is there a video on how to train custom model?

  • @talhayousuf4599
    @talhayousuf4599 3 ปีที่แล้ว +3

    Thanks for this video, Can you please make a video to train custom detector and recognizer?

  • @abhishek_maity
    @abhishek_maity 3 ปีที่แล้ว +2

    Sir Please show us how to do the custom training for the handwritten text and use it in keras OCR or at least share some blog/resources to follow and achieve this please.

    • @AIEngineeringLife
      @AIEngineeringLife  3 ปีที่แล้ว +1

      Abhishek.. Currently I am focusing on Cloud and MLOps will get back to this one once I am done with that. But have you tried keras-ocr fine tuning that is mentioned in their document?

    • @abhishek_maity
      @abhishek_maity 3 ปีที่แล้ว +1

      Thanks Srinivasan sir for replying . I have not tried keras ocr fine tuning. but i wanted to explore offline ocr for handwritten texts. Because Google vision api is giving better results in hand written text. but wanted to explore more on offline ocrs. I also tried EasyOCR but its giving poor results on handwritten text.

    • @AIEngineeringLife
      @AIEngineeringLife  3 ปีที่แล้ว +1

      @@abhishek_maity Beating accuracy of Google API will be difficult as they have lot of data but have you checked this session on custom training handwritten OCR - th-cam.com/video/QnPZZb9D2Ss/w-d-xo.html

    • @abhishek_maity
      @abhishek_maity 3 ปีที่แล้ว

      this seems to be very very helpful thanks a lot Srinivasan sir for sharing this .... I will now look this 😊

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

  • @binvantbajwa9101
    @binvantbajwa9101 3 ปีที่แล้ว +2

    Awesome tutorial! Is there any way to count the number of boxes created?

    • @AIEngineeringLife
      @AIEngineeringLife  3 ปีที่แล้ว +1

      Yes.. The pipeline recognize methods just gives a list of recognized objects with boxes. You can check length of list

    • @binvantbajwa9101
      @binvantbajwa9101 3 ปีที่แล้ว

      @@AIEngineeringLife If I use 3 images to perform ocr and then i use the len() function to find the length of the list on which I ran the pipeline.recognize method, it outputs 3 (the number of input images) instead of the number of bounding boxes. Any reason? As far as i know, number of boxes should have been the output. Please help

  • @ouardafenek3765
    @ouardafenek3765 3 ปีที่แล้ว +1

    Thanks a lot for sharing. May I ask how can I fine tune the model on custom data images please ? Thanks in advance.

    • @AIEngineeringLife
      @AIEngineeringLife  3 ปีที่แล้ว

      Have you seen this link - keras-ocr.readthedocs.io/en/latest/examples/fine_tuning_recognizer.html
      This shows how recognizer can be customized. Even the detector component can be done in similar way

  • @shouryanagpal5813
    @shouryanagpal5813 ปีที่แล้ว +1

    hello sir can u provide the video in which you have trained the model with different captcha images , I am thinking a simillar thing for my final year project and I really want to train a model with different kind of images , Please help

  • @atharvajadhav8598
    @atharvajadhav8598 3 ปีที่แล้ว +1

    Hello, first of all thank you for a great video. I wanted to know how did you custom train the recognizer model. I do want to train my own model based on custom dataset for number plates as inputs. I tried looking for fine tuning the model with dataset but I was confused with the dataset they have used. Kindly provide any link for the same. Reply from you will help me a lot.

    • @AIEngineeringLife
      @AIEngineeringLife  3 ปีที่แล้ว +3

      Atharva, Custom training is basically creating a tuple object with file name and ground truth. It is documented in keras-ocr git repo. I will try to make one video on it later this year

    • @atharvajadhav8598
      @atharvajadhav8598 3 ปีที่แล้ว +1

      @@AIEngineeringLife Thank you for replying. I will try doing the same. It would be very kind of you if you upload a tutorial, as a beginner into NN it would be a great help. Also I did see that you have forked and added the model file. I would like to do a similar thing since i have a dataset of number plates instead of captcha.

    • @AIEngineeringLife
      @AIEngineeringLife  3 ปีที่แล้ว +2

      @@atharvajadhav8598 Will do that early next year

    • @atharvajadhav8598
      @atharvajadhav8598 3 ปีที่แล้ว

      @@AIEngineeringLife thanks a lot, I'll be waiting for the same.

    • @althobhanialaa8268
      @althobhanialaa8268 3 ปีที่แล้ว +1

      ​@@AIEngineeringLife We still waiting for the tutorial, thanks a lot for your help

  • @zaheerbeg4810
    @zaheerbeg4810 4 ปีที่แล้ว +2

    Srivatsan Sir Nice , Kindly keep it up

  • @gauravranchi
    @gauravranchi 4 ปีที่แล้ว +1

    I was trying to find a software like this which can translate doctors prescription...do you know where to find it or can you help me develop one .

    • @AIEngineeringLife
      @AIEngineeringLife  4 ปีที่แล้ว

      I am not sure such software exists but if you have lot of data and examples of it then you can label it and train using keras-ocr

    • @gauravranchi
      @gauravranchi 4 ปีที่แล้ว

      @@AIEngineeringLife Yes I have data and example to label... please guide me how to... right from first step. Should I download keras ocr?

  • @alsgusdl
    @alsgusdl 3 ปีที่แล้ว +1

    Thank youfor sharing. but i can't find model weights='captcha'.
    how could I get captcha model?

    • @AIEngineeringLife
      @AIEngineeringLife  3 ปีที่แล้ว

      If you have installed it from my git repo i have modified version of keras-ocr. Else you can use this to download the captcha
      'weights': {
      'notop': {
      'url': 'drive.google.com/uc?export=download&id=1drJ9rlIb6WtnW8ysoWU9kTp3TBAS-q6v',
      'filename': 'captcha.hdf5',
      'sha256': '701e0947beab802624ba562200da7b7684b87fd516a7d720c6a7453d0e3db805'
      },

    • @alsgusdl
      @alsgusdl 3 ปีที่แล้ว

      @@AIEngineeringLife Thank you!

  • @fahadhassan8749
    @fahadhassan8749 3 ปีที่แล้ว

    Hey Sir ! are there weights for handwritten recognition that we can use in Recognizer() method for handwritten recogntion ?
    please reply !

    • @AIEngineeringLife
      @AIEngineeringLife  3 ปีที่แล้ว

      Fahad.. Nope it cannot be used for handwritten test. Weights have to be fine tuned based on handwritten dataset for it to work

  • @fredweb1997
    @fredweb1997 3 ปีที่แล้ว

    Thanks for sharing. I think it is a very useful guide. just a question. I have to extract the text for a .pdf in the right order. I convert the single pages in image format (.jpg) and now I would like to obtain a proper .txt file in the same text order from the original. (something like pytesseract). is it possible?

    • @AIEngineeringLife
      @AIEngineeringLife  3 ปีที่แล้ว

      Yes you might be able to do it by customizing detector module to identify each line as single object

    • @mohanrajk-c4m
      @mohanrajk-c4m 8 หลายเดือนก่อน

      @@AIEngineeringLife how to do that sir.

  • @nisarggandhewar8242
    @nisarggandhewar8242 4 ปีที่แล้ว +1

    Its very nice video, thanks for sharing.
    Kindly prepare video to prepare Custom Models.

  • @ipvikas
    @ipvikas 4 ปีที่แล้ว +4

    Thanks a lot!!! Can you please make a seperate video for 'How to use "github", illustrating any End to End Data Science Project?
    Thanks a lot in Advance :)

    • @AIEngineeringLife
      @AIEngineeringLife  4 ปีที่แล้ว +3

      Sure Vikas.. I have a plan to start ML from scratch where I plan to cover git and best practices. This will be towards Nov this year

  • @NaveenKumar-zo2rz
    @NaveenKumar-zo2rz 3 ปีที่แล้ว +1

    Hi Sir !! Great content. Can you help on how to train the model ?

  • @hareshr1986
    @hareshr1986 3 ปีที่แล้ว +1

    Thanks a lot bro
    Englightening
    Keep it going

  • @ridhazaghdoud6208
    @ridhazaghdoud6208 ปีที่แล้ว

    Hi sir thanks for this work,how to evaluate my model in order to display the iou score

  • @anuradhab1043
    @anuradhab1043 4 ปีที่แล้ว +1

    sir..I have a ledger image[which is a table] and want to extract the table into excel..can u please put a video reg the same

    • @AIEngineeringLife
      @AIEngineeringLife  4 ปีที่แล้ว

      Anuradha... Can you show me some sample.. It is very difficult to read table as it is but if some sample is there I can try it out

  • @hamzakhanniazaee224
    @hamzakhanniazaee224 3 ปีที่แล้ว

    Sir when i gave more than 10 imagea to keras.recognize() function.
    My session got crashed every time.

  • @kusamuzukashi3825
    @kusamuzukashi3825 2 ปีที่แล้ว

    cool tutorial bro, thanks for your good video

  • @rhiothelab5251
    @rhiothelab5251 4 ปีที่แล้ว +1

    Eagerly waiting for HTR

    • @AIEngineeringLife
      @AIEngineeringLife  4 ปีที่แล้ว

      Yes Gaurav.. Have dataset but need to prepare it which might take time. Will try to get it done

    • @radhakrishnanrayaprolu
      @radhakrishnanrayaprolu 4 ปีที่แล้ว

      @@AIEngineeringLife use IAM offline dataset

  • @muralir3551
    @muralir3551 4 ปีที่แล้ว +1

    Hai
    How to read text and formulas by capturing the image (Image contains text and formulas question paper
    with high accuracy

    • @AIEngineeringLife
      @AIEngineeringLife  4 ปีที่แล้ว

      Murali... Sorry I have never worked on that except for some research papers I have seen

    • @muralir3551
      @muralir3551 4 ปีที่แล้ว

      @@AIEngineeringLife Thank you for your reply

  • @sharanbabu2001
    @sharanbabu2001 4 ปีที่แล้ว +2

    Awesome as usual :)

  • @shivampurbia6169
    @shivampurbia6169 3 ปีที่แล้ว

    Sir any package for handwritten text ?
    For computer generated text I am using tesseract but for hand written I need you help .

    • @AIEngineeringLife
      @AIEngineeringLife  3 ปีที่แล้ว

      Have you tried Nephi.. You can search for Nephi crnn in github

  • @abhinavraja650
    @abhinavraja650 3 ปีที่แล้ว

    I'm having trouble with importing the keras-ocr library, can someone help

  • @tariqulislam7926
    @tariqulislam7926 4 ปีที่แล้ว

    please send me the link that, how to train the custom model ?

  • @mithunktmrc5934
    @mithunktmrc5934 3 ปีที่แล้ว

    Hello sir
    How can I contact u have some doubts to ask
    Thank you

  • @nithinreddy2299
    @nithinreddy2299 4 ปีที่แล้ว +1

    Can you please post the code link with your custom models, please?

    • @AIEngineeringLife
      @AIEngineeringLife  4 ปีที่แล้ว

      Nithin, Code link for the vieo is here - github.com/srivatsan88/TH-camLI/blob/master/Keras_OCR_Demo.ipynb

    • @nithinreddy2299
      @nithinreddy2299 4 ปีที่แล้ว

      @@AIEngineeringLife thankss

    • @nithinreddy2299
      @nithinreddy2299 4 ปีที่แล้ว

      @@AIEngineeringLife and please make a video on how to train custom model. It will be great. Thank you man in advance.

  • @shreyaputhran7646
    @shreyaputhran7646 2 ปีที่แล้ว

    how to print the text as output. Pls help

  • @nsnilesh604
    @nsnilesh604 3 ปีที่แล้ว

    How to create that custom model sir

  • @pycodesmachinelearning5096
    @pycodesmachinelearning5096 4 ปีที่แล้ว

    amazing, thanks a lot for such kinds of quality videos.
    I have completed my be.tech CSE in 2020.
    I am from up. Tell me In which city, I apply for data science job or internship.
    and please tell me some companies name.

  • @Wanderlust1342
    @Wanderlust1342 3 ปีที่แล้ว

    how can i print out the text that i have detected onto the console

    • @AIEngineeringLife
      @AIEngineeringLife  3 ปีที่แล้ว

      Prediction object is an array. You can print the text by iteration the array of text and printing 0 index

  • @mridul6019
    @mridul6019 3 ปีที่แล้ว +1

    but how to get this output from here ???????

    • @AIEngineeringLife
      @AIEngineeringLife  3 ปีที่แล้ว +1

      Which output ?

    • @mridul6019
      @mridul6019 3 ปีที่แล้ว

      @@AIEngineeringLife like the text you get from caption will be the final output with most precision

  • @charud1874
    @charud1874 3 หลายเดือนก่อน

    Where can I get the code

  • @mridul6019
    @mridul6019 3 ปีที่แล้ว

    you must share the git link of all codes you use in a video in description

    • @AIEngineeringLife
      @AIEngineeringLife  3 ปีที่แล้ว +1

      Mridul.. all codes is in my git repo. My channel homepage has link to repo or you can search for username srivatsan88 in git to get code
      I will try to update on future videos

    • @mridul6019
      @mridul6019 3 ปีที่แล้ว

      @@AIEngineeringLife thanks 😊

  • @nigamaveena4211
    @nigamaveena4211 3 ปีที่แล้ว

    Please share your github repo of this project

  • @RAJATSINGH-hk6xi
    @RAJATSINGH-hk6xi 3 ปีที่แล้ว

    Thanku soo much ..can you please share this code link sir it will be helpful for me

    • @AIEngineeringLife
      @AIEngineeringLife  3 ปีที่แล้ว

      You can find all video codes in my repo here - github.com/srivatsan88/TH-camLI

  • @bilel255b
    @bilel255b 3 ปีที่แล้ว

    hi, i got this erreur
    import keras_ocr
    OSError: [WinError 126] Le module spécifié est introuvable

    • @AIEngineeringLife
      @AIEngineeringLife  3 ปีที่แล้ว

      I think you did not install keras-ocr. Here is the step - !pip install git+github.com/srivatsan88/keras-ocr.git#egg=keras-ocr
      If you are not planning to use custom model then you can directly install from keras-ocr git

    • @bilel255b
      @bilel255b 3 ปีที่แล้ว

      @@AIEngineeringLife thank you

    • @AjitKumar-wm5cl
      @AjitKumar-wm5cl 3 ปีที่แล้ว

      @@AIEngineeringLife I tried on windows it gives error keras_ocr the specified module could not be found. It works on colab

  • @manuelcan
    @manuelcan ปีที่แล้ว

    This video does not contain the subtitles that help people with disabilities to understand it. I request the author to complete this deficiency, improving his excellent work.Thank you

  • @sainikhila1193
    @sainikhila1193 3 ปีที่แล้ว +1

    🙏🙏👌

  • @arpanghosh3801
    @arpanghosh3801 4 ปีที่แล้ว

    please share the github link for the code

    • @AIEngineeringLife
      @AIEngineeringLife  4 ปีที่แล้ว

      Here you go - github.com/srivatsan88/TH-camLI/blob/master/Keras_OCR_Demo.ipynb

  • @ntchindagiscard3870
    @ntchindagiscard3870 5 หลายเดือนก่อน

    I am just asking my selve what i really learned from this video ?

  • @devman1546
    @devman1546 3 ปีที่แล้ว

    where is source code

    • @AIEngineeringLife
      @AIEngineeringLife  3 ปีที่แล้ว

      github.com/srivatsan88/TH-camLI/blob/master/Keras_OCR_Demo.ipynb

  • @AregGhazaryan
    @AregGhazaryan 3 ปีที่แล้ว

    WOw you USe COLLaB? WoW Soo InforMAtiVE I can DO ThaT TooO. You MusST WorK At NaSA