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...

Комментарии • 54

  • @ajithn7336
    @ajithn7336 6 месяцев назад +3

    I tried and i always get an empty excel only.

  • @user-pj3bf7sr3t
    @user-pj3bf7sr3t 9 месяцев назад +4

    Thank you so much . I do the same as you but I always get an empty Excel.
    Why would it be?

    • @hemu2723
      @hemu2723 5 месяцев назад

      Hey, have you got the mistake?

  • @ram_rahim_creations_officials
    @ram_rahim_creations_officials 10 месяцев назад +1

    Hi @karndeep
    Thank you for sharing.
    Will it work if my table doesn't have vertical and horizontal lines?

  • @venkatesanr9455
    @venkatesanr9455 2 года назад +1

    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?

    • @karndeepsingh
      @karndeepsingh  2 года назад +2

      1. Yes, paddlepaddle is an open source library.
      2. You can train OCR model using paddleocr
      3. Huggingface may not have OCR models.

    • @venkatesanr9455
      @venkatesanr9455 2 года назад

      @@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)

    • @karndeepsingh
      @karndeepsingh  2 года назад +2

      @@venkatesanr9455 you can check paddleocr github for the same.

    • @venkatesanr9455
      @venkatesanr9455 2 года назад

      @@karndeepsingh Ok thanks a lot

    • @NickWindham
      @NickWindham 2 года назад +1

      @@venkatesanr9455 Watch his video titled OCR Text from PDFs and Image Documents using docTR | Better than Tesseract OCR | Text Extraction

  • @nomuchohan
    @nomuchohan 10 месяцев назад +1

    Dude, please explain how to use the PPstructure from paddle paddle into our own custom code

  • @niroshiniedayaratne4066
    @niroshiniedayaratne4066 Год назад +2

    My output is always empty xlsx file. What could be the reason? Thanks in advance!

    • @karndeepsingh
      @karndeepsingh  Год назад

      May be OCR is unable to read the table content

    • @kishoripawar2522
      @kishoripawar2522 Год назад

      @@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.

    • @kishoripawar2522
      @kishoripawar2522 Год назад

      @@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.

    • @pavitrabiradar6334
      @pavitrabiradar6334 Год назад

      @@kishoripawar2522 even iam getting empty xlsx as output did you found any solution?

    • @user-hl5sk1oj1m
      @user-hl5sk1oj1m Год назад

      any update for this issue? I am facing this issue after trying another ocr model... please help

  • @kiddicode6897
    @kiddicode6897 2 года назад +1

    How can I apply Google Vision after table is recognized?

  • @eliaweiss1
    @eliaweiss1 6 месяцев назад +2

    Thanks, all I get is empty cells

  • @avikalchauhan9907
    @avikalchauhan9907 8 месяцев назад

    when I am running the code predict_table.py file is not there

  • @jayeshnikam3279
    @jayeshnikam3279 Год назад

    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! :)

    • @karndeepsingh
      @karndeepsingh  Год назад

      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

  • @poojabhandari631
    @poojabhandari631 Год назад

    getting this error
    error: legacy-install-failure
    × Encountered error while trying to install package.
    ╰─> PyMuPDF
    what to do??

  • @ganeshrajv130
    @ganeshrajv130 2 года назад

    wont this support long image table

  • @pavitrabiradar6334
    @pavitrabiradar6334 Год назад

    Hello
    Iam always getting output as empty xlsx file could you please help me here.

    • @karndeepsingh
      @karndeepsingh  Год назад

      May be OCR is not working that great. You may consider replacing OCR.

  • @ShivShankarDutta1
    @ShivShankarDutta1 Год назад +5

    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'

  • @rajeshroyal5922
    @rajeshroyal5922 2 года назад

    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

    • @kiddicode6897
      @kiddicode6897 2 года назад

      %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"

  • @louieelumbaring1790
    @louieelumbaring1790 Год назад

    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

    • @rivamalik9575
      @rivamalik9575 Год назад

      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.

  • @shobhitsadwal6081
    @shobhitsadwal6081 6 месяцев назад

    it is not working for me .

  • @vogel2499
    @vogel2499 2 года назад

    I suspect text ocr is independent from table detection/recognition. You could replaced it with easyocr/pytesseract without ruining the structure.

  • @Smddlvvs
    @Smddlvvs 2 года назад

    How to make this code work on pdf files with multiple pages

    • @karndeepsingh
      @karndeepsingh  2 года назад

      Pass each page of PDF to the model

    • @Smddlvvs
      @Smddlvvs 2 года назад

      @@karndeepsingh i have tried but i am unable to iterate

    • @texasfossilguy
      @texasfossilguy Год назад

      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.

    • @Smddlvvs
      @Smddlvvs Год назад

      @@texasfossilguy yaaaa pls let me know if you find one

    • @AliAlias
      @AliAlias Год назад

      Use other python libraries to extract pdf to images then ocr it one by one using loop 😊

  • @shwetabhilare9473
    @shwetabhilare9473 Год назад

    [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.

  • @madhavkumarpancholi9842
    @madhavkumarpancholi9842 Год назад +5

    get to the point dude.

  • @anouaraadoud58
    @anouaraadoud58 8 месяцев назад

    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

    • @user-jc2ot4tk7y
      @user-jc2ot4tk7y 8 месяцев назад

      I am getting the same error. please tell how to solve this

  • @rajeshroyal5922
    @rajeshroyal5922 2 года назад

    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

    • @thepresistence5935
      @thepresistence5935 2 года назад

      change the path bro

    • @rajeshroyal5922
      @rajeshroyal5922 2 года назад

      @@thepresistence5935 I tried with change of path also getting same error

    • @thepresistence5935
      @thepresistence5935 2 года назад

      @@rajeshroyal5922 It's working fine for me, put quotes.