We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
While using this code, I get this error of Pillow. I tried re-installing pillow but still struggling with this issue. Any help to make this code run?
import layoutparser as lp model = lp.Detectron2LayoutModel( config_path ='lp://PubLayNet/faster_rcnn_R_50_FPN_3x/config', # In model catalog label_map ={0: "Text", 1: "Title", 2: "List", 3:"Table", 4:"Figure"}, # In model`label_map` extra_config=["MODEL.ROI_HEADS.SCORE_THRESH_TEST", 0.8] # Optional ) model.detect(image)
Getting this error:
ImportError Traceback (most recent call last) [<ipython-input-6-59f0fb07b7e3>](https://localhost:8080/#) in <module> 1 import layoutparser as lp ----> 2 model = lp.Detectron2LayoutModel( 3 config_path ='lp://PubLayNet/faster_rcnn_R_50_FPN_3x/config', # In model catalog 4 label_map ={0: "Text", 1: "Title", 2: "List", 3:"Table", 4:"Figure"}, # In model`label_map` 5 extra_config=["MODEL.ROI_HEADS.SCORE_THRESH_TEST", 0.8] # Optional 31 frames [/usr/local/lib/python3.7/dist-packages/PIL/ImageFont.py](https://localhost:8080/#) in <module> 35 from . import Image 36 from ._deprecate import deprecate ---> 37 from ._util import is_directory, is_path 38 39 ImportError: cannot import name 'is_directory' from 'PIL._util' (/usr/local/lib/python3.7/dist-packages/PIL/_util.py)
The text was updated successfully, but these errors were encountered:
i got the same problem while using Detectron2LayoutModel on google collab, did you fix it yet ?
Sorry, something went wrong.
I solved by uninstalling the latest pillow version and instead installed pillow of version 7.1.2 !pip install pillow==7.1.2
!pip install pillow==7.1.2
i just did what you told me and it worked thank you very much brother
It works. Thank you a lot
No branches or pull requests
While using this code, I get this error of Pillow. I tried re-installing pillow but still struggling with this issue. Any help to make this code run?
Getting this error:
The text was updated successfully, but these errors were encountered: