Detect Text in Images with Python - pytesseract vs. easyocr vs keras_ocr

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

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

  • @pcargolo1
    @pcargolo1 ปีที่แล้ว +5

    I had fun watching this video! Great job. Also very nice to see you making typos and then fixing it. Many people on TH-cam cut those parts and it gives some sort of weird feeling like the person is pretending like they never make mistakes. It's impossible!

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

    I love that you had an “Chain of Strength” image!!!! Straight Edge Hardcore Lives! Youth Crew!

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

      Glad you liked it. To be honest I had never heard of them before you mentioned it. But checked it out!

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

    Thanks for showing how to use all three methods. For the comparison part I think you could go a lot more in depth on the results. For most applications the results seem largely insufficient to me, but for some applications it is already fine.

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

    Hey Rob, thank you for the Video! this helped me a lot.!!!
    @to my Indian Developers, I have tried these libraries for Indian languages. And `pytesseract` seems to be a winner fro reading Marathi and Hindi language.

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

      Thanks for watching and good to know about that library being best. Didn’t know it could do Hindi!

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

    Thank you so much, your code removed my days of frustation.

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

      Glad I could help!

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

    Great video! Clear and concise. You've earned my subscription.

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

      Thanks so much for watching and subscribing!

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

      @@robmulla you're welcome

  • @lphilippeabadieo298
    @lphilippeabadieo298 4 หลายเดือนก่อน

    Hi there!
    I wanted to thank you for the incredible video on text detection in images using `pytesseract`, `easyocr`, and `keras_ocr`. It was exactly what I needed to resolve all my doubts about which tool to use in my projects. Your clear explanation and comparative analysis helped me understand the advantages and disadvantages of each, allowing me to make an informed decision.
    Thanks again for sharing your knowledge and for the quality of your content. I would love to see more videos like this, where you explain and compare different tools and technologies. Keep up the excellent work!
    Best regards and well done!
    Philippe

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

    Thanks a lot, Rob. This is a great Tutorial. Hats off!

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

      I apprecaite the feedback. Glad to hear you found it helpful.

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

    Your video is really great, thank you Rob!

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

      Thanks so much for the feedback. Hope it helped you out.

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

    I lost track of what happens at the 5:04 mark. Some text moves around, and other text all of a sudden appears, and I can't follow what exactly is happening there. Can you explain?

  • @MM-un7wg
    @MM-un7wg 2 ปีที่แล้ว +1

    Great job as always mate!

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

      Thanks MM!

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

    Nice explaination Rob.

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

      Thanks Ashay for the feedback!

  • @tigranmkrtchyan7346
    @tigranmkrtchyan7346 2 ปีที่แล้ว +10

    Hey Rob, thanks a ton for the awesome job you do, I have learnt a lot of new cool stuff (I was only aware of pytessaract, thought it is the best one and tried it on pictures), now I will definitely give a try to the other libraries as well. As I already mentioned, overall you are doing an extremely great job, I just have 1 idea and 1 suggestion : )
    1) idea: as you mentioned in the video, we have the annotations (like the ground truth) already provided in the dataset, right? Wouldn't it be a good idea to check the results vs the ground truth? I.e. smth like lib2 has 3 out of 10 annotations correctly ( recall 0,3) out of 6 predicted texts (0,5 precision) smth like accuracy etc. I understand, this is not perfect as it could only partially extract the text (like miss 1-2 letters) or recognize letter 'G' instead of 'C'. I mean the question is: what's a fair way to have some numerical result based on the dataset? Say library 1 has accuracy X precision Y and recall Z and based on this values and the confusion matrix to be able to make a selection of a library given a particular dataset?
    2) Suggestion: I am mentioning this 3rd time already, but your videos are just marvellous, I mean extremely informative, to the point, no second wasted at all. Just perfect. So, what I would really love to see is (as you asked about suggestion for some next video) is almost the same kind of video for some audio task. There is this new BLOOM model out today, I haven't checked it yet, but maybe you could pick some models (like based on wav2vec2) that recognize voice (asr) and compare them using transformers and huggingface for example? Would really be nice to see some comparison of different models in some audio related task, where the whole pipeline (like loading audio, extracting the numerical features, feeding to some pretrained model and finally prediction) would be implemented and validated based on say word error rate. Thanks in advance ; )

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

      Great comment. Wow! Lots to respond to. For #1 that’s a great idea and I had considering doing a more formal evaluation metric to compare the models but ended up deciding it would be too much for this video. I think most of these models are released with their metrics on similar datasets. For #2 I’ll have to check out the model you are referring to I’ve never heard of it before but will read up. I was considering making a video on the new language translation model that meta released last week. Thanks for watching and I appreciate the feedback!

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

    Hi Medallion, do you know how to improve the accuracy of the easyocr ? I have a image , like a dataframe image, it can only read 95% of the data in the image. Thanks in advance

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

      Great question. I’m not sure how you could improve it without training on an additional set of labeled data. You could attempt to use different models and somehow merge the results.

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

    I have a problem, the problem is DataFrame.___init___() got an unexpected keyword argument 'coloumn'. How should i do ?

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

      I think you spelled "column" wrong, you said "coloumn"

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

      @@robmulla thanks Sir. The, how do fix error in (-215:Assertion Failed)!_src empty() in function 'cv::filter2D' ?

  • @KuldipSolanki-o5b
    @KuldipSolanki-o5b หลายเดือนก่อน

    ditect place and shape and size of upload second image in main image and after ditectin all thing second image upload in main image acording to ditection and save image
    i dont get solution please help me sir
    give me solution

  • @vesper8
    @vesper8 10 หลายเดือนก่อน

    Great video but man I would have loved to see another half hour where you compare the results to the original annotations, give a score to each technique, and then try to make improvements to get the score to increase

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

    thanks for video! what about paddle ocr?

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

      Thanks for watching. Never heard of that. Is it any good?

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

      @@robmulla I head that it's faster than easyocr, also it has several features: for text detection, text identification, document identification (like tables, ...), mobile and embedded devices support and looks like it's easy to fine-tune (for a new language). I gonna use it and will share experience

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

    Which library would you recommend using to extract all handwritten text from like a doctors prescription or a diary page or something like that?

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

    fantastic work!

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

      Thank you! Cheers!

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

    Hey! I wanted to ask how you add yousefl to video without background?

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

      Thanks for watching. I’m using a green screen during the tutorials and OBS has filters that filter out the green.

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

      @@robmulla Big thanks for both film, and answer :)

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

    Highly appreciated

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

    For document files, how do easy ocr and keras ocr perform as compared to Tesseract?

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

    Hello Rob. Can you please tell what you think about which one of these 3 will work best if I have to extract text from images of products of inventory? for example soft drinks pictures, chips, snacks, chocolates, tissue boxes, vanity products, etc.

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

    Thank you Rob for another great tutorial! I've been following along for one of my OCR project. Qq -- when I tried to pip install keras-ocr in Kaggle. I kept getting error message of "ERROR: Could not find a version that satisfies the requirement keras-ocr (from versions: none)". Do you happen to know why? Thanks!

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

      Oh no. Good question but I don't know the answer, check the keras-ocr github to make sure there isn't an issue with the latest release maybe?

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

    Cool explanation, thank you

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

    Hi, can you explain this in ReactJS or JavaScript?

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

      No I can’t. I don’t know those languages, sorry.

  • @MegaArti2000
    @MegaArti2000 11 หลายเดือนก่อน

    amazing libraries; thx for sharing

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

    hi, i'm trying to find a way to process bulk ai generated art, and flag any images that contain even the tiniest watermark or text. I fumbled around with some OCR previously in python (don't remember what i used) but it wasn't very close to what i needed it to do considering the text is often just random scribbles or gibberish. any chance you could point me in the right direction to a possible solution? thanks.

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

    Hello, do you mind telling which GPU you used for this test ?

  • @destanifountain
    @destanifountain 2 หลายเดือนก่อน

    how are we able to put our own images into this? I'm not very familiar with kaggle, but id love to use this code for a project!

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

    What code editor you are using

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

      This is a Kaggle notebook. The link is in the description.

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

    Nice tutorial! I only try pytesseract in the past with PDF files.
    For future video recommendation I will like to see something about how you organize your ML experiments. In the competitions do you use some tool in order to try multiple models and hyperparameter tuning?

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

      Yes, I think pytesseract is really good for documents, but not so much for extracting text from images.
      Great reccomendation for future videos. There are a lot of great resources for organizing ML experiments these days. I used to just append all my experiment results to a CSV but now things like Weights & Biases or Neptune.ai make these things a lot easier. I'll have to think about how to make a video for that....

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

      ​@@robmulla I agree currently trying to extract text from a scanned file. But tesseract isn't getting it right. Picks some words but not all readable words.
      About to try the others

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

    Hi Rob, a very informative video thank you!
    After we extract the data what is the best solution to save it into a table without missing the context of future images or PDFs?
    Per example if I save Customer's First Name from first file, it should be easier to detect it in the next file and save it under the same column

  • @josephmeyer6107
    @josephmeyer6107 10 หลายเดือนก่อน

    Great video, thanks. Which one do you like the best for invoices and business documents. any for handwriting

  • @FrancescoZaccaria-uv2zm
    @FrancescoZaccaria-uv2zm ปีที่แล้ว

    great video! i was asking myself if as a languages i could set "math". i'm trying to get a prediction of number and text together could i use one of this libraries or for handwritten numbers i have to use a totally different library?

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

    Hey Rob, Amazing content, thanks for making this. Can you suggest the best method to detect words from a printed text? also like to isolate a single word out of a paragraph.
    Keep up the good work!

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

    Which is suitable for deploy? And can you tell me how? Cause I am having problems deploying a web app using tesseract.

  • @chandnichandni-o3o
    @chandnichandni-o3o ปีที่แล้ว +1

    what do i do if I have png images?
    glob doesnt for that?

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

      Glob is just used to identify all the complete file paths. cv2 should be able to read png files the same as jpeg.

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

    Great Video !

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

      Glad you enjoyed it

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

    thats cool, but why keras ocr result doesn't use any capitalization?

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

    Hello sir, I tried to install keras-ocr through pip in kaggle. But it wont install throwing an error saying,
    "ERROR: Could not find a version that satisfies the requirement keras-ocr (from versions: none)
    ERROR: No matching distribution found for keras-ocr. What should i do for this?

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

      Hey, even I am facing the same error. Did you find any solution to solve that?

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

      @@anishvikramvarma9952 no I didnt find any. Try it in anaconda maybe

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

    Thanks rob!

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

      Thanks for watching!

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

    Wow nice work... My question is in a situation where they're many text on the image is it possible for me to get just a word..
    Can it work by automatic capture and convert to text

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

    Could you show how to OCR hand writing text

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

      Hi! This is a hard task and depends on the handwriting and language. Unfortunately I haven’t looked into to it much! Good luck.

  • @Helloch3421
    @Helloch3421 9 หลายเดือนก่อน

    Please help keras-ocr showing error while installing 😢😢😢
    Error: couldn't find a version that satisfies the requirement
    Error: no matching distribution found for keras-ocr

    • @davidhugenberg2389
      @davidhugenberg2389 6 หลายเดือนก่อน

      Verify your kaggle profile with your phone number (1 time key/code). Then copy the notebook again, and in the session options (right side of notebood) you will see that "internet is on". This will also let you use GPU resources.

    • @Helloch3421
      @Helloch3421 6 หลายเดือนก่อน

      @@davidhugenberg2389 thx bro❤️

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

    Can I run this on Google colab?

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

      You should be able to, although I haven't tried it. Let me know if you get it working!

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

      @@robmulla thanks for the reply!

  • @cs.mohitmakhija4230
    @cs.mohitmakhija4230 7 หลายเดือนก่อน

    How to extract select data values for example an invoice image into a template seeking selected values from that image

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

    Can you make a video related to custom train out own datasets on EasyOCR and specially Keras_OCR
    That would be helpful

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

      Thanks. I’ll see what I can do. The hardest part is finding good training dataset to use! If it exists there is probably a pretrained model that exists.

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

      I am trying to mess with japanese data which is cc100 datasets
      U can find manga_ocr that's pretty good but i think if somehow we use that data we can make better in EasyOCR for handwriting

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

    can you please video how to prepare our custom dataset with annotation. and how use these dataset with anotation to train a pretrained pytesseract or easyocr or kerasocr

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

    is it possible to get a text from a video using this method?

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

      Great question. It should be possible. I have a TH-cam video about working with video data. Each frame is essentially just an image that you could apply these techniques to. Check it out!

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

    awesome lets try this.......

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

      Have fun

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

    Hi, I'm a new sub here! I've tried many times to decode a datamatrix code in order to get the text string represented by that code but my Python script seems not able to decode it... I use opencv, libdmtx and pil but nothing... Probably once the script opens the picture and tries to find the code (the pattern) in the image nothing occurs, and it happens well before the decoding effort that should come right after a pattern has been recognized... Please help 😅 Thanks!

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

      Hey. Thanks for subbing. I’m not sure what you mean by data matrix. Are you able to first convert the file to something like a jpg first? That’s what I’d suggest.

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

      @@robmulla So instead of opening it as a png image you rather suggest to first convert it into a jpg image, and then use the decode command... Working with a png image and then using decode generally gives me an empty output []... Thanks!
      P.s. For the sake of clarity, my png image is a foto of an electronic device with a datamatrix printed on it

  • @guocity
    @guocity 8 หลายเดือนก่อน +3

    they can't extract text in 90 degree

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

    Hi Rob, could you do a video on extracting text from the Crosswords puzzle, compare it to the correct answers image, and show the results?

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

    Keras takes 3 secs on rtx 4070. I have like 100k frames. How to make it faster?

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

    hi amazing jop on the comparison and can you add trocr to the mix next time thanks alot

  • @MehdiRS6
    @MehdiRS6 10 หลายเดือนก่อน

    Hello Rob, I saw your video on text detection from images, and I have some questions. If you can help me, please, I appreciate it. Thank you.

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

    good job thanks

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

      Thanks for watching and giving feedback!

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

    what about videos, can it extract text from video

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

    hey can you please make something that can identify how many pages in a PDF are having images and how many pages are non-Image, Thanks in advance, or at least guide me through the process of doing do

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

    Dear Sir, I am your Subscriber
    I want to create a tool that finds text errors in the image.
    For Example:
    I forgot to write CONTACT US, BUY NOW, CONTACT NUMBER, SPELLING MISTAKE, etc... in my social media post.
    that the tool finds error and suggests what are missing or what is incorrect in social media post.
    🙏 Please guide me and suggest what course I need to buy or what I need to learn to create this tool
    Thank you

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

    i want extract arabic text from english text who do using LLM

  • @semireddy5108
    @semireddy5108 7 หลายเดือนก่อน

    is there anyone have an idea how to extract table data from image by maintaining the table format

    • @eightbo
      @eightbo 6 หลายเดือนก่อน

      Hi, did you ever figure this out??
      I want to extract only column 4 of the table and output to .txt file, any idea how? 😅

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

    I was trying to do EasyOCR to accelerate some software of mine by using GPU instead of pytesseract, but the results are absolute dog shit on obviously readable text.
    Pytesseract is getting it word for word yet EasyOCR can barely get even a couple of the letters correct.
    Pretty disapointing, wish pytesseract was GPU enabled from the start.

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

    it's was helpful

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

    ur amazing

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

      Thanks Levy. Hope you found the video helpful.

  • @luvjain4145
    @luvjain4145 9 หลายเดือนก่อน

    can u give source code please ?

    • @robmulla
      @robmulla  9 หลายเดือนก่อน

      All the code can be found here (also in the video description): www.kaggle.com/code/robikscube/extracting-text-from-images-youtube-tutorial

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

    Does anyone else feel completely stupid watching this guy fly through this?! 🤣

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

      We all start somewhere- also I edit out all the bad parts :D

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

    hi