Тёмный

Rip out Drug Labels using Deep Learning with PaddleOCR & Python 

Nicholas Renotte
Подписаться 269 тыс.
Просмотров 39 тыс.
50% 1

Want to learn how to apply optical character recognition?
In this video you'll be able to leverage it to extract prescription medication labels using PaddleOCR. This has a range of applications and could be used as part of a broader deep learning pipeline. It could be integrated with a Text to Speech system to make it easier for people with accessibility issues to interpret their medications.
Get the code: github.com/nicknochnack/DrugL...
In this video, you'll learn:
1. How to install PaddleOCR for Python
2. Applying OCR to images
3. Extracting prescription medication labels using PaddleOCR
Links:
Paper: arxiv.org/pdf/2009.09941v3.pdf
GitHub: github.com/PaddlePaddle/Paddl...
Chapters:
0:00 Start
3:13 - Install and Import Dependencies
10:31 - Make Detections
20:36 - Visualise OCR Results
31:51 - Other Examples
36:00 - Ending
Oh, and don't forget to connect with me!
LinkedIn: bit.ly/324Epgo
Facebook: bit.ly/3mB1sZD
GitHub: bit.ly/3mDJllD
Patreon: bit.ly/2OCn3UW
Join the Discussion on Discord: bit.ly/3dQiZsV
Happy coding!
Nick
P.s. Let me know how you go and drop a comment if you need a hand!

Опубликовано:

 

11 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 123   
@danielbozinovski8419
@danielbozinovski8419 2 года назад
Just watched some of your previous tf videos, and man was I blown away by how you didn't already have at least a million subs. Keep up the awesome work!
@dan3370
@dan3370 2 года назад
This guy deserves more subs! One of the best content creator in the ML space.
@csoham96
@csoham96 2 года назад
This model is crazy good with accuracy! Love your tutorial as always
@mathewsjoby6455
@mathewsjoby6455 2 года назад
Always LOVED YOU CONTENT FROM DAY 1 SINCE I GOT HERE! Simple and Intelligent content which any KID can understand the most complex things! good job!
@salabsonisa1650
@salabsonisa1650 2 года назад
Hi nick, I love your videos because of how detailed you are. Since I discovered your channel I have never been the same because I have learned a lot from your teaching method and technical stuff on AI and deep learning. Kudos to you for your effort to impart knowledge.
@flashkachannel2756
@flashkachannel2756 2 года назад
Agree
@alexandregagne4151
@alexandregagne4151 2 года назад
Agree 👌👍👌
@NicholasRenotte
@NicholasRenotte 2 года назад
Thanks so much @Salabson! Means a ton to me 🙏
@brunospfc8511
@brunospfc8511 Год назад
Still works, very easy, thanks Nick!
@pseudounknow5559
@pseudounknow5559 2 года назад
Thanks for your positivity in all of your videos 😊
@NicholasRenotte
@NicholasRenotte 2 года назад
Gotta be! Life is too short, just tryna have some fun along the way!
@janicejose5809
@janicejose5809 2 года назад
Accidently stumbled upon this channel .Thanks a lot ,This was exactly what I was looking for !!
@NicholasRenotte
@NicholasRenotte 2 года назад
Glad you stumbled over here Janice, welcome to the team!
@janicejose5809
@janicejose5809 2 года назад
@@NicholasRenotte Hello sir your channel has pretty amazing content .I was planning on building an app that helps in detecting fake medicines using computer vision techniques .Could u please make a video wherein it analyse the input images and detects the difference and highlight it or any related tutorial .Thanks a lot
@hilariouzclips1235
@hilariouzclips1235 2 года назад
Your channel is the only one that I've click the bell button. Your vids are 💎
@NicholasRenotte
@NicholasRenotte 2 года назад
🙏❤
@VivekSingh-in6rq
@VivekSingh-in6rq 2 года назад
thanks for always posting videos, love them
@NicholasRenotte
@NicholasRenotte 2 года назад
Stoked man, so pumped you're enjoying them!
@leoletchoum
@leoletchoum 2 года назад
I love the video thanks Nick! Something that might be useful for Mac users is adding the following option at the beginning of step 2: ocr_model = PaddleOCR(lang=‘en’, use_gpu=False) Tested it on MBP Intel and worked like a charm with impressive accuracy :-)
@NicholasRenotte
@NicholasRenotte 2 года назад
Ha, that's awesome. Thanks so much for sharing my guy!!
@serboutyassine1733
@serboutyassine1733 2 года назад
Amazing content, you are the best.
@alexandregagne4151
@alexandregagne4151 2 года назад
Like always, 😎😎😎. Good job Nicholas.
@NicholasRenotte
@NicholasRenotte 2 года назад
Thanks a mil!
@gustavojuantorena
@gustavojuantorena 2 года назад
Nice and simple! 👏👏
@NicholasRenotte
@NicholasRenotte 2 года назад
Thanks a billion @Gustavo!
@bankcrawpackchannel6936
@bankcrawpackchannel6936 2 года назад
So awesome!!
@TejrajParab
@TejrajParab 2 года назад
Love your videos!
@NicholasRenotte
@NicholasRenotte 2 года назад
Thanks a bunch @tejraj!!
@BurnLai
@BurnLai 8 месяцев назад
good and clear.
@shraddhapawar5921
@shraddhapawar5921 2 года назад
Hello Nicholas, thank you so much for your awesome videos! they are really very helpful! keep it up . I have one question if we can use paddle ocr for handwritten text too? Thank you
@NicholasRenotte
@NicholasRenotte 2 года назад
Nope, would suggest using a handwritten dl model for that!
@yohannesabrha6823
@yohannesabrha6823 9 месяцев назад
Great Presentation and work. did you try to train it by using your own datasets ?
@PurushothamReddy-ff6vp
@PurushothamReddy-ff6vp 2 месяца назад
hello, Awesome video!, i have a small doubt, if im trying to extract data from a table is there any way to extract data as as rows instead of selecting each line as a raw which it does by default? Thank you!
@johnurena2863
@johnurena2863 9 месяцев назад
You are awesome!!!!
@sebastianromero5686
@sebastianromero5686 Год назад
Amazing video! Is it possible to implement it in a mobile app through React Native? Thanks a lot Nick!!!
@lebaolochuynh4222
@lebaolochuynh4222 2 года назад
thank you for very greate video. but in paddle paddle do we need preprocess our image first ?
@PD-iu2sr
@PD-iu2sr 2 года назад
Hiii @Nicholas is it possible for live camera detection???
@senthilkumarnadarajan2247
@senthilkumarnadarajan2247 Год назад
Hi Nicolas. Your video was awesome and it was a great help in implementing our ocr model. If possible, Please do a tutorial for paddle lite in mobile
@ChirawatNg
@ChirawatNg Год назад
Thank you :)
@prateekeshsabat4631
@prateekeshsabat4631 2 года назад
Hey, Nicholas Thanks for the content. Can we run this on the windows vscode
@ameerazam3269
@ameerazam3269 2 года назад
😊 😊 😊 😊 😊 😊 😊 thank you so much
@brianfc1906
@brianfc1906 2 года назад
Just here to let you know how awesome you are ❤️
@anishaudayakumar1778
@anishaudayakumar1778 2 года назад
Amazing content as always ❤️! Is this licensed model? How good is paddleOCR when compared to Tesseract?
@NicholasRenotte
@NicholasRenotte 2 года назад
It's very good especially when it comes to preprocessing (virtually none needed). Looks like it's open source under Apache!
@SasiKumar-zz5ps
@SasiKumar-zz5ps 3 месяца назад
@NicholasRenotte Is there any option like paddle OCR can we create custom OCR model and application from scratch, what are the steps has to be done from your thoughts.
@romeshrajoria4267
@romeshrajoria4267 2 года назад
Hey, I saw your TensorFlow object detection API video. I have a query to ask. I want to know how to visualize the custom trained model & how we can edit these layers for creating a new model.
@NicholasRenotte
@NicholasRenotte 2 года назад
Not possible to dive into the underlying layers with the TFOD API afaik. Can fine tune if needed but added explicit layers using keras for example isn't possible .
@morancium
@morancium Год назад
bro I LOVE YOU
@irugal8964
@irugal8964 2 года назад
you are the best
@NicholasRenotte
@NicholasRenotte 2 года назад
noooo, you are!
@leezx337
@leezx337 Год назад
Good Afternoon Mr Nicholas Renotte, my kernel keeps dying when i run 'from paddleocr import PaddleOCR...' even though i manage to install the packages required... do you know how i might resolve this issue or what the potential problem is? THANK YOU!!
@cissemy
@cissemy Год назад
Hi Is it possible to use this model to extract : number of rows and columns, elements of matrix ?
@krtk9675
@krtk9675 2 года назад
Loved the video man this is an awsome video, Is there anyway we can specifially get only drug name from that text.
@NicholasRenotte
@NicholasRenotte 2 года назад
Yep, should be able to extract it from the results using some indexing.
@__-_-__..
@__-_-__.. 2 года назад
Awsome content again! I'm wondering if you have created a tutorial for Emotion Recognition? Thanks!
@NicholasRenotte
@NicholasRenotte 2 года назад
Yup! Check out the body language decoder vid on the channel!
@arifshaik9201
@arifshaik9201 2 года назад
Loving it Nicholas........can you please share the video link or upload for, how we can detect the specific drug label. Thanks in Adv..
@dinugakasun5218
@dinugakasun5218 2 года назад
superb video, but I have a question, is there any possible way to extract texts from only specific parts of an image, for example. I have an image of the license card, I need to extract only the name and address. Any help you can provide would be greatly appreciated. Thank you.
@gisellepena7927
@gisellepena7927 2 года назад
Same question.
@NicholasRenotte
@NicholasRenotte 2 года назад
You can isolate that part of the frame and pass that through to the OCR model. This is a little trickier though particularly if that region is going to be in a different location each time.
@dinugakasun5218
@dinugakasun5218 2 года назад
@@NicholasRenotte yeah, figured out a way using object detection and crop the roi then pasting roi's separetly. Anyway Thank you, You are the best
@bambitousttous4311
@bambitousttous4311 2 года назад
Thanks for the tutorial ! Could you tell me please how to use a custom dictionary with python ?
@user-mm7gj4gs5g
@user-mm7gj4gs5g 11 месяцев назад
Hi Nick, very well explained. But I get error 'Can not import paddle core while this file exists: /usr/local/lib/python3.10/dist-packages/paddle/fluid/libpaddle.so' Please help
@VivekSingh-in6rq
@VivekSingh-in6rq 2 года назад
by the way, i think this video is created a weeks ago because there has been certain changes in the stable release and code would have to be modified accordingly
@kuronokei388
@kuronokei388 3 месяца назад
first of all thanks so much u have been a great help, i clicked on the link below to install but it was all chinese
@thelazydeveloper
@thelazydeveloper 2 года назад
amazing video .. can you make tutorials about custom mask rcnn for object segmentation and thanks
@samahashabbir6584
@samahashabbir6584 Год назад
Hi Nick! TypeError Traceback (most recent call last) in ----> 1 annotated = draw_ocr(img, boxes, texts, scores, font_path=font_path) /usr/local/lib/python3.7/dist-packages/paddleocr/tools/infer/utility.py in draw_ocr(image, boxes, txts, scores, drop_score, font_path) 380 box_num = len(boxes) 381 for i in range(box_num): --> 382 if scores is not None and (scores[i] < drop_score or 383 math.isnan(scores[i])): 384 continue TypeError: '
@KD-qo7kx
@KD-qo7kx 4 месяца назад
this is kinda late, but has anyone gotten a solution for this? chatgpt is not helping at all
@hatemhenchir
@hatemhenchir 2 года назад
Good job . In anpr system in pi4 who the best easyocr or paddleocr
@NicholasRenotte
@NicholasRenotte 2 года назад
I'm using Paddle these days, works really well. Haven't done a proper comparison though @Hatem
@rachanareddy6115
@rachanareddy6115 2 года назад
I'm getting an error installing paddleOCR. I have a MacBook with M1 chip. It would be great if you could help me with that! Thank you
@rikeshpatel309
@rikeshpatel309 2 года назад
Hi, I have same error, did you happen to find the fix?
@ayamahmoud5700
@ayamahmoud5700 Год назад
Hi nick, I want to ask you if you try to deploy paddleocr on mobile application ?
@pandat99
@pandat99 2 года назад
Hi Nick, I'm having a little issue...when I try to call PaddleOCR in my python script I keep getting a WinError 126, any advice?
@NicholasRenotte
@NicholasRenotte 2 года назад
Got a longer error for me?
@prateekeshsabat4631
@prateekeshsabat4631 2 года назад
@@NicholasRenotte yes same i am also getting when i was trying to write the script in vscode
@TEAM-sn1lw
@TEAM-sn1lw 3 месяца назад
iam unable to extract only text ,but able to extract info about coordinates and text together .what should i do extraxt only text
@juanricardorivera3591
@juanricardorivera3591 2 года назад
Thanks for posting. It's not directly related but perhaps you/others can share ideas on how to solve something I've been struggling with: in a supermarket, how to identify what price belongs to what product? Once the above is clear, the OCR solution would fit perfectly.
@NicholasRenotte
@NicholasRenotte 2 года назад
Kinda tricky, first up, this would be a HUGE model. One approach could be to classify the products with an image could classify the products.....actually wait, do you need to map the physical photos of the products to prices?
@juanricardorivera3591
@juanricardorivera3591 2 года назад
@@NicholasRenotte yup. We need from an image to get the products and their corresponding prices
@NicholasRenotte
@NicholasRenotte 2 года назад
@@juanricardorivera3591 you could build an image classifier to classify the product then once classified do a lookup to a prices table!
@sheetaljoshi6740
@sheetaljoshi6740 9 месяцев назад
RuntimeError: (PreconditionNotMet) The third-party dynamic library (cudnn64_8.dll) that Paddle depends on is not configured correctly. (error code is 126)
@vasamsettisharmilasairagha5863
Could not find a version that satisfies the requirement paddlepaddle-gpu==2.0.0 (from versions: none) I'm getting above error can anyone suggest a solution
@user-oj5bz9xd2s
@user-oj5bz9xd2s 2 года назад
"positional argument follows keyword argument" can you add links to documentation for OCR?? I've got problems with arguments if I set gpu as False
@NicholasRenotte
@NicholasRenotte 2 года назад
pypi.org/project/paddleocr/
@ashleysami1640
@ashleysami1640 2 года назад
👏👏
@saharshsinha5349
@saharshsinha5349 2 года назад
In instantiating model and detect section, when i setup the model with ocr = PaddleOCR(leng='eng') , I am getting an error that is: AttributeError: module 'paddle.fluid.core_avx' has no attribute 'is_compiled_with_rocm' How can solve this, any help?
@lailigita4251
@lailigita4251 2 года назад
i have the same problem
@aviparnabiswas3707
@aviparnabiswas3707 Год назад
Seems to me that your pc might not have GPU integrated. While installing paddle-ocr do not provide the gpu argument
@myriamagrebi2114
@myriamagrebi2114 Год назад
@@aviparnabiswas3707 hello you can change it with this: # Setup model ocr_model = PaddleOCR(lang='en', use_gpu=False)
@dalinsixtus6752
@dalinsixtus6752 5 месяцев назад
far better than tesseract and easy ocr i guess , im using it for prediciting the food can serial number and paddle is really great
@stevengiallourakis5816
@stevengiallourakis5816 Год назад
How did you handle the PHI?
@TamilSelvan-jl5nx
@TamilSelvan-jl5nx 2 года назад
HI nick,, can you pls ping how to retrain that Paddleocr module.. any video or documents.. Thanks in advance
@NicholasRenotte
@NicholasRenotte 2 года назад
github.com/PaddlePaddle/PaddleOCR/blob/release/2.2/doc/doc_en/recognition_en.md
@TaoZen888
@TaoZen888 Год назад
Hi nick. who is jan lokon, lokoun at 2:26 ?
@ramkrishnachoudhary633
@ramkrishnachoudhary633 2 года назад
Hello sir.....kindly do a video on how to recognise handwritten text characters.....it would be great help
@RAZZKIRAN
@RAZZKIRAN 2 года назад
i want to extract hand written text from image,
@souramrakesh8900
@souramrakesh8900 2 года назад
@ridewithkay
@ridewithkay 2 года назад
Hey nick, i've run into another error i can't seem to install paddleocr. the error "failed building wheel for python-Levenshtein" keeps appearing i've tried everything i can find related to paddleocr on the internet and can't seem to find a way to fix the error
@mrityunjaysingh607
@mrityunjaysingh607 2 года назад
Hey Nick, I am also facing same error.
@NicholasRenotte
@NicholasRenotte 2 года назад
Got Visual C installed? Take a look at this; stackoverflow.com/questions/37676623/cant-install-levenshtein-distance-package-on-windows-python-3-5
@ridewithkay
@ridewithkay 2 года назад
@@NicholasRenotte hey nick thanks for replying, apparently it's smtng to do with my computer? Cause when i send the code to my friend who is using a different model year and brand computer it can run perfectly. Anyways, thanks for the help 😄
@NicholasRenotte
@NicholasRenotte 2 года назад
@@ridewithkay hmmm, does it run on Colab? Might be a faster solution!
@kiranquidwai1128
@kiranquidwai1128 Год назад
Can u make a video on recognizing words in handwritten sentence?
@wachangastephen2859
@wachangastephen2859 Год назад
Hi Nick! Thank you very much for a super great tutorial. I would truly love if you can share how one can train the paddle ocr with some customized images, which would help improve on text extraction for different use cases. Once again thank you very much.
@alexsollis5504
@alexsollis5504 Год назад
Did you give this a go?
@nosuchthing4789
@nosuchthing4789 2 года назад
Wow!
@suryatejamenta6555
@suryatejamenta6555 2 года назад
Which one is the best? EasyOCR or PaddleOCR..!
@jayadevi2341
@jayadevi2341 Год назад
Instead of image can I use scanned pdf
@meghanarprakash7862
@meghanarprakash7862 Год назад
Great video, Thanks a lot!!!!!!!!! can you please make a video on how to install and use paddle ocr on raspberry pi???
@tylerkim4799
@tylerkim4799 2 месяца назад
I know this video is old and would be surprised to see a reply but the format is a little different now. To get the text, it is now 4 slots. To get the text, it would be [0][line number][1][0] and I cant use the for loop when the var is not in the first slot. Suggestions?
@tylerkim4799
@tylerkim4799 2 месяца назад
also I am very new to coding
@saurabhbudhori1776
@saurabhbudhori1776 2 года назад
FileNotFoundError: Could not find module 'C:\Users\budho\anaconda3\Library\bin\geos_c.dll' (or one of its dependencies). Try using the full path with constructor syntax. while importing paddleocr!!!!!!!!!
@NicholasRenotte
@NicholasRenotte 2 года назад
Hmmm, not sure if this will help but does this work? github.com/Toblerity/Shapely/issues/1032
@donovanvanderlinde3478
@donovanvanderlinde3478 4 месяца назад
Fix for M1 issues with PyMyPDF: ERROR: Failed building wheel for PyMuPDF # brew install swig # pip3 install paddleocr --upgrade PyMuPDF==1.21.1
@medjawherzgolli9507
@medjawherzgolli9507 4 месяца назад
thank you , it worked
@profapps
@profapps 3 месяца назад
please help with this issue TypeError Traceback (most recent call last) Cell In[141], line 6 3 plt.figure(figsize=(15,15)) 5 # draw annotations on image ----> 6 annotated = draw_ocr(img, boxes, texts, scores, font_path=font_path) 8 # show the image using matplotlib 9 plt.imshow(annotated) File ~\AppData\Roaming\Python\Python311\site-packages\paddleocr\tools\infer\utility.py:387, in draw_ocr(image, boxes, txts, scores, drop_score, font_path) 385 box_num = len(boxes) 386 for i in range(box_num): --> 387 if scores is not None and (scores[i] < drop_score or 388 math.isnan(scores[i])): 389 continue 390 box = np.reshape(np.array(boxes[i]), [-1, 1, 2]).astype(np.int64)
@tjtj1122
@tjtj1122 Месяц назад
pdf to json extract how
@sathyanarayanan4196
@sathyanarayanan4196 Год назад
the for is not working for me
@fr3847
@fr3847 2 года назад
how would you do real time ocr detection via webcam?
@NicholasRenotte
@NicholasRenotte 2 года назад
Check this out: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-0-4p_QgrdbE.html
@sidmagger
@sidmagger Год назад
bro make QR on band to solve
Далее
🎙ПЕСНИ ВЖИВУЮ от КВАШЕНОЙ🌹
3:09:38
Does size matter? BEACH EDITION
00:32
Просмотров 7 млн
Цены на iPhone и Жигули в ЕГИПТЕ!
50:12
Optical Character Recognition (OCR)
6:16
Просмотров 66 тыс.
PaddleOCR Python Demo #computervision
11:20
Просмотров 24 тыс.
Automatic OCR Receipt & Invoice Parsing in Python
15:56
🎙ПЕСНИ ВЖИВУЮ от КВАШЕНОЙ🌹
3:09:38