xavctn / img2table

img2table is a table identification and extraction Python Library for PDF and images, based on OpenCV image processing
MIT License
521 stars 74 forks source link

VisionOCR class missing in module after installing [gcp] #162

Open ranjitpad opened 7 months ago

ranjitpad commented 7 months ago

After running pip install img2table[gcp], I could not find the VisionOCR class and from img2table.ocr import VisionOCR failed.

I checked the module with inspect and only saw TesseractOCR present:

>>> inspect.getmembers(img2table.ocr)
[('TesseractOCR', <class 'img2table.ocr.tesseract.TesseractOCR'>)...

I then tried running pip install img2table[aws], and saw both the TextractOCR and VisionOCR classes in the module, in addition to TesseractOCR.

>>> inspect.getmembers(img2table.ocr)
[('TesseractOCR', <class 'img2table.ocr.tesseract.TesseractOCR'>), ('TextractOCR', <class 'img2table.ocr.aws_textract.TextractOCR'>), ('VisionOCR', <class 'img2table.ocr.google_vision.VisionOCR'>)...
xavctn commented 7 months ago

Hello, That should not be happening. What version of the library have you installed ?