Layout-Parser / layout-parser

A Unified Toolkit for Deep Learning Based Document Image Analysis
https://layout-parser.github.io/
Apache License 2.0
4.64k stars 449 forks source link

AttributeError: 'GCVAgent' object has no attribute '_client' #183

Open wr0124 opened 1 year ago

wr0124 commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

Thanks for this great work, it really very good. But when I try to use Google Cloud Vision engines, it turns out problems by execute the exemple 'OCR Tables and Parse the Output.ipynb'

Checklist

  1. I have searched related issues but cannot get the expected help.
  2. The bug has not been fixed in the latest version, see the Layout Parser Releases

To Reproduce Steps to reproduce the behavior:

  1. What command or script did you run?
    
    A placeholder for the command.
    after I run: ocr_agent = lp.GCVAgent.with_credential("<path/to/your/credential>",  languages = ['en'])
    the result shows: The GCV credential has not been set. You could not run the detect command.
    Do I have to have one account on google cloud for running normally? 

I tried the Tesseract, but some numbers cannot be read correctly, and in the publication of this paper, it is said that "CAN BE EASILY SWITCHED TO OTHER OCR SOFTWARE", how to do that ?

Environment

  1. Please describe your Platform [Windows/MacOS/Linux] I use MacOS M1
  2. Please show the Layout Parser version : I use the latested version
  3. You may add addition that may be helpful for locating the problem, such as
    • How you installed PyTorch [e.g., pip, conda, source]
    • Other environment variables that may be related (such as $PATH, $LD_LIBRARY_PATH, $PYTHONPATH, etc.) torch: 1.12 ; cuda: 1.12.1 detectron2: 0.5 Error traceback If applicable, paste the error traceback here.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.