Extract Tables from Image Documents | Paddle Paddle | Paddleocr | OCR | Text Extraction |
HTML-код
- Опубликовано: 12 сен 2024
- Video explains the step-by-step extraction of the table from a given document image using paddleocr.
Paddleocr Github: github.com/Pad...
Notebook : github.com/kar...
✅Recommended Gaming Laptops For Machine Learning and Deep Learning :
👉 1. HP Pavillion (Ryzen 5 / RTX 3050) - amzn.to/3HM2hI1
👉 2. Asus TUF (Ryzen 7 / RT 3050) - amzn.to/3sISj5P
👉 3. Acer Nitro 5 (Ryzen 5/ GTX 1650) - amzn.to/3HII8mi
👉 4. Acer Nitro 5 (Intel Core i5-11th Gen/ GTX 1650) - amzn.to/3hHBAcN
👉 5. Lenovo Legion 5 (Ryzen 5/ GTX 1650) - amzn.to/3KjpB1r
✅ Best Work From Home utilities to Purchase for Data Scientist :
👉 1. Wifi Range Extender - amzn.to/3INxUCf
👉 2. Samsung LED Monitor (24 Inches) - amzn.to/35U8sN3
👉 3. Laptop Stand - amzn.to/3KhUzqS
👉 3. Office Chair - amzn.to/3IJoiZl
👉 4. Power bank - amzn.to/3IMISrQ
👉 5. Wireless Keyboard and Mouse (Without Backlit) - amzn.to/3tthnNC
👉 6. Table Lamp - amzn.to/3IJIieg
👉 7. Table - amzn.to/3tv6tXA
👉 8. Mic - amzn.to/35rnzOb
✅ Recommended Books to Read on Machine Learning And Deep Learning:
👉 1. Natural Language Processing - amzn.to/3KhqszI
👉 2. Hands-On Machine Learning with Keras and Tensorflow - amzn.to/3KddeE2
👉 3. Deep Learning with Pytorch - amzn.to/35Lk2Kd
👉 4. Practical Machine Learning for Computer Vision - amzn.to/3HFfaDz
👉 5. Applied Data Science using Pyspark - amzn.to/3sLaV5s
Connect with me on :
1. LinkedIn: / karndeepsingh
2. Github: www.github.com...
I tried and i always get an empty excel only.
Thank you so much . I do the same as you but I always get an empty Excel.
Why would it be?
Hey, have you got the mistake?
Hi @karndeep
Thank you for sharing.
Will it work if my table doesn't have vertical and horizontal lines?
Thanks for the great explanation and video. I have some doubts like
1. Is paddleocr is open source library and anyone can use?
2.Whether we can fine-tune ocr models like easyocr, paddleocr libraries, Kindly reply and share links that will be useful for reading/learning purpose.
3. Whether huggingface library has ocr models?
1. Yes, paddlepaddle is an open source library.
2. You can train OCR model using paddleocr
3. Huggingface may not have OCR models.
@@karndeepsingh Thanks for your kind replies.Can you share any links for finetuning models of easyocr/paddleocr( I hav searched for easyocr but not obtained proper links for finetuning tasks)
@@venkatesanr9455 you can check paddleocr github for the same.
@@karndeepsingh Ok thanks a lot
@@venkatesanr9455 Watch his video titled OCR Text from PDFs and Image Documents using docTR | Better than Tesseract OCR | Text Extraction
Dude, please explain how to use the PPstructure from paddle paddle into our own custom code
My output is always empty xlsx file. What could be the reason? Thanks in advance!
May be OCR is unable to read the table content
@@karndeepsingh Is there any prerequisite for input image? Like resolution more than X or something like that? Because for me as well, output is empty.
@@karndeepsingh Eve with high resolution image output is empty, when I checked show.html, the blue box is not able to correctly locate the table in image. So I think as there is no text inside blue box, there is empty csv. Please correct me if I am wrong.
@@kishoripawar2522 even iam getting empty xlsx as output did you found any solution?
any update for this issue? I am facing this issue after trying another ocr model... please help
How can I apply Google Vision after table is recognized?
Thanks, all I get is empty cells
when I am running the code predict_table.py file is not there
This is kind of urgent. What if on some page half of the table is in one page and other half is on 2nd page. What can be done on such situation? Will the model recognize it??. i highly expect your answer as I am currently working on it. Thank you! :)
In such situations, you need to search identifier in the page that consider that half of the information in going to next page. Model can only help you extract or detect table but on top of that you need to apply logic to know whether its full information or half information
getting this error
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> PyMuPDF
what to do??
wont this support long image table
Hello
Iam always getting output as empty xlsx file could you please help me here.
May be OCR is not working that great. You may consider replacing OCR.
getting this error executing
#%cd PaddleOCR/ppstructure
!python3 /content/PaddleOCR/ppstructure/table/predict_table.py --det_model_dir=inference/en_PP-OCRv3_det_infer --rec_model_dir=inference/en_ppocr_mobile_v2.0_table_rec_infer --table_model_dir=inference/en_ppocr_mobile_v2.0_table_structure_infer --image_dir=/content/PaddleOCR/ppstructure/table_2.png --rec_char_dict_path=../ppocr/utils/dict/table_dict.txt --table_char_dict_path=../ppocr/utils/dict/table_structure_dict.txt --det_limit_side_len=736 --det_limit_type=min --output ./output/table
Traceback (most recent call last):
File "/content/PaddleOCR/ppstructure/table/predict_table.py", line 30, in
import tools.infer.predict_det as predict_det
File "/content/PaddleOCR/tools/infer/predict_det.py", line 31, in
from ppocr.data import create_operators, transform
File "/content/PaddleOCR/ppocr/data/__init__.py", line 35, in
from ppocr.data.imaug import transform, create_operators
File "/content/PaddleOCR/ppocr/data/imaug/__init__.py", line 47, in
from .ct_process import *
File "/content/PaddleOCR/ppocr/data/imaug/ct_process.py", line 22, in
import Polygon as plg
ModuleNotFoundError: No module named 'Polygon'
how to fix this error ?
@@rohithuria1168 Did you get any fix for that? I am also facing the same error
Me too
i can't open predict_table.py file getting the same error python3: can't open file '/PaddleOCR/ppstructure/table/predict_table.py': [Errno 2] No such file or directory how can i resolve
%cd /content/PaddleOCR: go to the Path
!mkdir inference: create folder "inference" inside the Path below "/content/PaddleOCR"
%cd /content/PaddleOCR/inference: go to the PATH
download and unzip file inside "inference"
how did you get the vqa folder? Sorry I was trying to do all the steps you did and find error on the last line, i have no idea to fix it. Thanks in advance!
[Errno 2] No such file or directory: 'PaddleOCR/ppstructure'
/content/PaddleOCR/ppstructure/inference
Traceback (most recent call last):
File "/content/PaddleOCR/ppstructure/table/predict_table.py", line 230, in
main(args)
File "/content/PaddleOCR/ppstructure/table/predict_table.py", line 149, in main
image_file_list = get_image_file_list(args.image_dir)
File "/content/PaddleOCR/ppocr/utils/utility.py", line 60, in get_image_file_list
raise Exception("not found any img file in {}".format(img_file))
Exception: not found any img file in /content/PaddleOCR/ppstructure/table/image1.png
Provide absolute path to the image that is placed in drive. For example
/content/gdrive/MyDrive/PaddleOCR/ppstructure/table/image1.png
and also ensure that the image is place in the table folder that you have mentioned in the exception statement.
it is not working for me .
I suspect text ocr is independent from table detection/recognition. You could replaced it with easyocr/pytesseract without ruining the structure.
How to make this code work on pdf files with multiple pages
Pass each page of PDF to the model
@@karndeepsingh i have tried but i am unable to iterate
you need to write code to iterate each page of it. Ask chatgpt or google that, ive seen it. If I find it Ill let you know.
@@texasfossilguy yaaaa pls let me know if you find one
Use other python libraries to extract pdf to images then ocr it one by one using loop 😊
[Errno 2] No such file or directory: 'PaddleOCR/ppstructure'
/content/PaddleOCR/ppstructure/inference
Traceback (most recent call last):
File "/content/PaddleOCR/ppstructure/table/predict_table.py", line 30, in
import tools.infer.predict_det as predict_det
File "/content/PaddleOCR/tools/infer/predict_det.py", line 31, in
from ppocr.data import create_operators, transform
File "/content/PaddleOCR/ppocr/data/__init__.py", line 35, in
from ppocr.data.imaug import transform, create_operators
File "/content/PaddleOCR/ppocr/data/imaug/__init__.py", line 47, in
from .ct_process import *
File "/content/PaddleOCR/ppocr/data/imaug/ct_process.py", line 22, in
import Polygon as plg
ModuleNotFoundError: No module named 'Polygon'
getting this error please help.
get to the point dude.
Errno 2] No such file or directory: 'PaddleOCR/ppstructure'
/content/PaddleOCR/ppstructure/inference
Traceback (most recent call last):
File "/content/PaddleOCR/ppstructure/table/predict_table.py", line 230, in
main(args)
File "/content/PaddleOCR/ppstructure/table/predict_table.py", line 153, in main
table_sys = TableSystem(args)
File "/content/PaddleOCR/ppstructure/table/predict_table.py", line 67, in __init__
self.text_detector = predict_det.TextDetector(copy.deepcopy(
File "/content/PaddleOCR/tools/infer/predict_det.py", line 141, in __init__
self.predictor, self.input_tensor, self.output_tensors, self.config = utility.create_predictor(
File "/content/PaddleOCR/tools/infer/utility.py", line 199, in create_predictor
raise ValueError(
ValueError: not find model.pdmodel or inference.pdmodel in inference/en_PP-OCRv3_det_infer
I am getting the same error. please tell how to solve this
i have tried with vs code and colab but
iam getting this error
python3: can't open file '/PaddleOCR/ppstructure/table/predict_table.py': [Errno 2] No such file or directory
change the path bro
@@thepresistence5935 I tried with change of path also getting same error
@@rajeshroyal5922 It's working fine for me, put quotes.