ismail-mebsout / Parsing-PDFs-using-YOLOV3

Parsing pdf tables using YOLOV3
113 stars 42 forks source link

Running command on input pdfs #4

Closed elnazsn1988 closed 3 years ago

elnazsn1988 commented 3 years ago

Hi- Ive installed your repo in a standalone VM, and have correct installations as far as I can see, however when I try to run the one line command to extract tables: python predict_table.py --pdf_path pdfs/nexusfpr.pdf --page 3

I get this error:

image 1/1 pdfs/nexusfpr-3.jpg: Traceback (most recent call last):
  File "predict_table.py", line 130, in <module>
    detect_tables(opt)
  File "predict_table.py", line 109, in detect_tables
    [x1, y1, x2, y2]=bboxes_pdf(img, pdf_page, x)
  File "predict_table.py", line 75, in bboxes_pdf
    with open("cropped_"+pdf_file[:-4]+"-"+str(pg)+".pdf", "wb") as out_f:
NameError: name 'pdf_file' is not defined
ismail-mebsout commented 3 years ago

Hello,

I have checked the command-line and it seems to be working correctly. Maybe you have not provided the right path of your PDF.

Best regards, Ismail Mebsout