Тёмный
No video :(

Python Extract Text from Scanned PDF | Python Extract Text from Image | Python Tesseract OCR Setup 

Python2020
Подписаться 3,1 тыс.
Просмотров 16 тыс.
50% 1

#pythonocr #pythontesseract #gettextfromscannedpdf #gettextfromimage #tesseract
00:00 Libraries for reading scanned pdf and dependencies to read scanned pdf
02:00 How To Install Tesseract For Python
05:00 How To Install Poppler for extracting text from scanned pdf
07:00 Extract Text From Images Using Python OCR
10:00 Extract Text From Scanned PDF using Python
14:00 Get Text From Images and Scanned PDFs using python
github.com/UB-Mannheim/tesser...
blog.alivate.com.au/poppler-w...

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

 

7 авг 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 48   
@anthonyavellanedapaitan7081
@anthonyavellanedapaitan7081 12 дней назад
Could you share the poppler file that you downloaded on a google drive please, because the link you provide in the description is broken
@reetanimesh4903
@reetanimesh4903 2 года назад
Good Detailed Explanation
@Anarky35
@Anarky35 Год назад
Great thanks a lot, very helful
@dedisupardi2815
@dedisupardi2815 Год назад
Cool 👍
@Python2020
@Python2020 Год назад
Thank you
@manishtripathi1778
@manishtripathi1778 2 года назад
Thanks for the video, i required some help in cropping the header and then extracting the text from the file, can you suggest how i can do that, my pdf files are a mix of scanned pdf and text pdf files
@Python2020
@Python2020 2 года назад
When you will read scanned pdf with pypdf2 it should throw error inside catch you can can write code for reading scanned pdf... My way
@khaledibrahim1065
@khaledibrahim1065 6 месяцев назад
First of all, thank you for this excellent explanation, if I want to extract scanned PDF file contains complicated table to csv file, do you have any suggestions?
@Python2020
@Python2020 6 месяцев назад
You have to use regex and then map va values to field for a line... Then appen new line... Direct from image to csv might not be possible using these libraries
@pradeepreddychejarla3753
@pradeepreddychejarla3753 7 месяцев назад
Hi. Thank you for this video.Follwoed the exact steps. For images, the code is working and output is coming as expected but for scanned pdfs, the output is generated with random alphabets and missing out a lot of text. Why is that so? what is the solution for this issue ?
@Python2020
@Python2020 7 месяцев назад
Quality matters
@robertcenusa8636
@robertcenusa8636 2 года назад
12:35 my txt files are empty (in case of scanned PDF, or even text PDF). For Images is working.
@Python2020
@Python2020 2 года назад
Check file writing mode
@user-hl9wt9qs3t
@user-hl9wt9qs3t 4 месяца назад
sir... thnks a lot for the info... can u provide me python script for extracting company details like companyname,adress and all from multiple images which are in pdf format... i went through lots of reasearch but didnt get. help me out
@Python2020
@Python2020 4 месяца назад
Would be complex, se there is one OCR video on this channel that might help
@user-hl9wt9qs3t
@user-hl9wt9qs3t 4 месяца назад
thnk you soo much sir@@Python2020
@Android_19
@Android_19 2 года назад
how to do image pre processing if the image quality is not good .
@Python2020
@Python2020 2 года назад
use opencv enhanse resolution, or few paid services are also there like Google Vision, Textract,Flexicapture
@arunkumar-nb7be
@arunkumar-nb7be Год назад
Is there any way I can install libraries with pip.install ocrmypdf, in my company laptop I can't run .exe files, but I can run library thro python..
@Python2020
@Python2020 Год назад
There is CMD way you have download the library file
@Python2020
@Python2020 Год назад
stackoverflow.com/questions/11091623/how-to-install-packages-offline/14447068#14447068
@user-fy6gi2vx8g
@user-fy6gi2vx8g Год назад
I am also getting blank .txt files for PDFs. The code is working for images. Would you mind giving a more detailed suggestion for what I should do? Thanks so much!
@Python2020
@Python2020 Год назад
Try to print before writing the text file... See if dara is coming in variable or not
@user-fy6gi2vx8g
@user-fy6gi2vx8g Год назад
@@Python2020 Thank you so much for your prompt reply! I printed the variable, and it shows up blank for all the PDF files. In one of the PDF files, I put in an image I produced by typing something in Word and then turning it into an image using Snipping Tool, so I don't think image quality is causing the problem.
@user-fy6gi2vx8g
@user-fy6gi2vx8g Год назад
@@Python2020 Nevermind. I discovered that I accidentally put in "5" as the page number instead of "500". I changed it to 500 and now it is working! I find this very interesting, though, because most of my PDFs are 5 pages long or shorter. Thanks so much for your help!
@CSE-AshikAhamedP
@CSE-AshikAhamedP Год назад
but where you trained images in Teseract OCR tools
@Python2020
@Python2020 Год назад
We don't have to train OCR engine.. I think You are refering to train ML models to identify right lables
@hanifadhithan
@hanifadhithan Год назад
Is there a possible method to extract without using the tesseract model but using py libraries only
@Python2020
@Python2020 Год назад
There is a video on my RU-vid channel but it won't work for scanned pdf Or image pdf.. Only on text pdf.... ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-7f0Bc2ateqQ.html
@hanifadhithan
@hanifadhithan Год назад
@@Python2020 thanks for the reply...but do you know is that possible to do with only libraries
@beatsbyharman7882
@beatsbyharman7882 9 месяцев назад
Hi , if i have a pdf of 10 pages and i want to extract the data for only 7th page , how can i specify that ? Where do i need to do changes ? Thanks ! Waiting for the reply
@Python2020
@Python2020 9 месяцев назад
Spilt pdf save splits in different folder..give name ending with index and use name ending with required index .. You still hv your original file
@beatsbyharman7882
@beatsbyharman7882 9 месяцев назад
@@Python2020 in my pdf i have 10 pages and i want to extract ony 7th page . How can i do that?
@satyaprasadmohanty9093
@satyaprasadmohanty9093 Год назад
how can i store all the text of different pages extracted from pdf into a single text page?
@Python2020
@Python2020 Год назад
Use a single variable if pages are up to 10,20, once code goes out of the loop there you write the file
@satyaprasadmohanty9093
@satyaprasadmohanty9093 Год назад
@@Python2020 thanks for your response will you tell me exactly where i need to change the code resume_pdfs=glob.glob(r"/content/drive/MyDrive/New folder (2)") for pdf_path in resume_pdfs: pages=convert_from_path(pdf_path,500) for pageNum, imgBlob in enumerate(pages): text=pytesseract.image_to_string(imgBlob,lang='eng') with open(f'{pdf_path[:-4]}_page_{pageNum}.txt','w') as the_file: the_file.write(text)
@DhanasekaranEsfita
@DhanasekaranEsfita Месяц назад
Hi Sir, I'm working with scanned PDFs (bank statements). The PDF quality is low, so I can't extract the text accurately. Are there any other ways to extract the text accurately?
@Python2020
@Python2020 Месяц назад
Use Azure OCR
@sushmahs7840
@sushmahs7840 2 года назад
How to apply this method in anaconda for text extraction
@Python2020
@Python2020 2 года назад
Code will remain same in any environment
@abdullahfahad6388
@abdullahfahad6388 8 месяцев назад
Sir, will it work with pycharm community edition?
@Python2020
@Python2020 7 месяцев назад
Yes... Pycharm is just code editor.. I have also used community version
@abdullahfahad6388
@abdullahfahad6388 7 месяцев назад
@@Python2020 thank you
@ROKKor-hs8tg
@ROKKor-hs8tg 10 месяцев назад
أين الاكواد
@tapanpati9452
@tapanpati9452 5 месяцев назад
2nd link is not working
@vthelagan2198
@vthelagan2198 7 дней назад
yes for me too
@Python2020
@Python2020 6 дней назад
Tere might be some change as it is old video...
Далее
Extract Text From Images in Python (OCR)
29:24
Просмотров 264 тыс.
Extracting data from PDF files using Python
35:35
Просмотров 44 тыс.
Using Tesseract-OCR to extract text from images
11:29
Просмотров 221 тыс.
[23] Use Python to OCR a scanned PDF for accounting
13:55
The most important Python script I ever wrote
19:58
Просмотров 177 тыс.
Make Images Readable Again in Python
14:46
Просмотров 21 тыс.
Extract PDF Content with Python
13:15
Просмотров 202 тыс.