Extract text from an Invoice Image | OCR in python | Python Implementation of EasyOCR library

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 ต.ค. 2024

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

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

    Tq u very much bro Nice explanation. Please continue a series of videos on OCR

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

      Yes sure. Thank you. Plz share the channel across your friends. 🤟 it will help me for sure.

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

      @@dineshraturi sure Bro

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

    Thanks Dinesh Raturi. Much appreciated for sharing with the community :-)

  • @IronMan-ke8zq
    @IronMan-ke8zq 4 ปีที่แล้ว

    hi.. In your description for the second step you forgot to add "conda"... it should be $ conda activate env_easyocr . Thank you for the video, it was helpful..

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

      Thanks IRON MAN 👨 Thanks for saving the universe 😛😉

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

    Thanks sir.helped me alot. Plz start NLP series soon.

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

    I am unable to install the package of "pip install easy ocr". Please advise @Dinesh Raturi

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

    Thank you for the video. Very useful. One question how can i export the result to excel the final output ? especially for the invoice extraction. thanks

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

      output is in the form of array , now u can create a dataframe from this array by making it numpy.array an put it inside excel.

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

    thank u for the tuto but the problem is the errors after extraction the text , i tested both pytesseract and easyocr and both make errors , so i thought that preprocessing step is important so i applied thresh , filters ... but none has given an enhancement , Do you have any tips please !

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

    Thanks for the video. How can you correct the bounding boxes?

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

    Thanks bro it's very useful 👍

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

    I am facing following issue with the Reader module of easyocr. Can you please help me out. I am running it locally
    [AttributeError: module 'easyocr' has no attribute 'Reader']
    Can you please help me.
    Following is my code.
    import easyocr
    reader = easyocr.Reader(['ch_sim', 'en'])
    result = reader.readtext('/test.jpg')
    print(result)

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

      Hi Hassan, Pleases add gpu=Flase/True like this reader = easyocr.Reader(['th','en'], gpu = False). If it still didn't work then use first uninstall easyocr and pip install easyocr==1.1

  • @RahulParmar-ld4ut
    @RahulParmar-ld4ut 3 ปีที่แล้ว

    how to save bounds into csv, xml or json?

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

    Tq u bro

  • @jena.omprakash
    @jena.omprakash 4 ปีที่แล้ว +1

    nice explanation. but how can you separate individual character and numbers after finding the words.

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

      Good question.
      EasyOCR used RNN LSTM based seq to seq model for arranging the words so we don’t need to recognise a single character.
      Because for us whole word important otherwise we have yo manually arrange them. But here easyocr does the job for. We just need to put for loop and thats it. Like in the last cell of the video i have shown.

    • @jena.omprakash
      @jena.omprakash 4 ปีที่แล้ว

      That's fine.... But can you recognize each character in the word so they may be used for construction of other word prediction related to that text

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

      Oh got it, you want further text generation task on the basis of characters.
      So i think you can put a for loop again till word.length and these characters will work as a input for RNN family models.
      If m getting your question correct.

    • @jena.omprakash
      @jena.omprakash 4 ปีที่แล้ว

      Have you preprocess the data before fitting to the model or raw data are directly implemented into Bidirectional LSTM network? If yes what are the steps you followed for that?? Do you have any validation test to those results???

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

      Hi, we always have to preprocess the text data as machine don’t understand raw input in natural language.
      We have word embeddings for that. U can use tfid w2v avg w2v glove or SOTA is BERT.

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

    Im really confused in 8:30 where did you get that? u didnt mention that in preparation

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

      It was just a anaconda jupyter notebook steps. We need to open jupyter notebook

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

    How do I use the GPU? I want to get a boost in speed.
    When I don't write gpu = false, I get the error "CUDA not available - defaulting to CPU. Note: This module is much faster with a GPU." How to solve it?

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

    import easyocr throws error- The kernel appears to have died. It will restart automatically

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

      Ohh i need to check. This is something new error came into the picture.

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

      Thanks for this content.. Can you also show how to tabulate the extracted data in a proper structure like in tabular form?

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

    It shows an error 'ValueError: source code string cannot contain null bytes' and points out to the easyocr files

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

    Does we have to download model everytime when we run the script or can we save it.

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

      You can save it

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

      How can we load it from memory then beacause I have tried running easyocr.Reader(["en"],gpu= False)
      again it is getting downloaded.

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

    Hi,
    Thanks for video. I try it on hand written bank from its work fine but can't read hand written word... How to solve the problem.

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

      Use tesseract library once

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

    Setup and overview - 0 - 9:30 mins
    Actual implementation starts from 9:30 mins.
    This is just an implementation video. I am not doing any kind of benchmarking here.
    github full source code - github.com/AndroidArena/EasyOCR

  • @PraveenKumar-zo8wp
    @PraveenKumar-zo8wp 2 ปีที่แล้ว

    6th cell
    I am getting error bro
    error: Unknown c++ exception from opencv code

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

    Can we extract text from specific point of location?

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

      you will find an array as a result, then locate it from there.

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

      @@dineshraturi how to do that?

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

      Check the output it is giving u array from there you can find the specificlocation

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

    if we want to extract only invoice no , phone number, address and name only in the document, from this we can extract all texts and bboxes . So now what should we do to detect these part only?

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

      There are two approaches to this.
      1. There is a parameter blacklist and whitelist to extract method. Explore it and put the values which you don’t want to extract or leave.
      2. Upon extracting all the data u can
      put it inside regex pattern/if else condition block then you will be able to get your data.
      Like there should be a regex for mobile no. Validation or regex for address and regex for indian names etc.
      After validation through regex you will het ur desire results.

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

      @@dineshraturi hi Dinesh...thanks a lot for ur suggestions I also needed the same...if possible,can u help me in thic code for the regex pattern/if else condition block

    • @AnuRadha-fg8ry
      @AnuRadha-fg8ry 4 ปีที่แล้ว

      @@dineshraturi I also need ur help with this code..please help

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

      @@dineshraturi HI Dinesh, thank you for the code and explanation. I have got this assignment for data science position and I am struggling to export this data into csv. Can you please help

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

    when i am trying to run the reader = easyocr.Reader(['en'], gpu = False),i am ending up with an error HTTP Error 403: Forbidden...i tried in Firefox and chrome as well.No use..I am getting the same error.Can you please help me how to solve it

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

      Try this -
      reader = easyocr.Reader(['ch_sim','en'])
      # need to run only once to load model into memory

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

      @@dineshraturi Will try and let u know.thanks for reply.

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

      It's not working dinesh.I am facing the same issue.Please help me to sort it out.

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

      Ok allow me sometime i will. Check it again.

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

      @@dineshraturi thank you.

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

    Could you please provide the steps to install easyocr on pycharm

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

      Steps will remain the same.

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

    He'll bro i need some help for my project

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

    i have a doubt?

  • @navin.thamindu
    @navin.thamindu 4 ปีที่แล้ว

    Wheres the invoice part??

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

      After simple image i have took invoice image. Kindly watch whole video and ask if you got stuck :)

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

    Hi. Can you make a video of same for android.

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

      we have to use firebase MLKIT for that. its easy .

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

    Is that voor pdf to text? Thanks

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

      While making the video it won’t . But plz visit its github to see its latest development.

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

    issue fter issue error after error