Questions tagged [layout-parser]

11 questions
2
votes
1 answer

ImportError: cannot import name 'is_directory' from 'PIL._util' (/usr/local/lib/python3.7/dist-packages/PIL/_util.py)

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…
1
vote
1 answer

Layout Parser: lp.draw_box not working in for loop

I am trying to visualize pages after passing through layout parser using lp.draw_box. It works fine for a single image, but if I run through a for loop and try for each image at once from a set of images, it doesn't print anything. Could someone…
0
votes
0 answers

Unsupported query remaining error using layout parser library on mac m2

I am having a problem with using the layout parser library on my m2 mac mini. It keeps on giving me this error: Traceback (most recent call last): File "/Volumes/easystore/Pycharm/Study_GPT/test.py", line 7, in model =…
jjboi8708
  • 65
  • 1
  • 7
0
votes
1 answer

layout-parser basic api test code throws weird error

I am trying out layout-parser api from https://layout-parser.readthedocs.io/en/latest/notes/modelzoo.html#example-usage My detectron2 installation is quite successful as evident from running python -m detectron2.utils.collect_env So is my torch…
Gautam
  • 1,030
  • 13
  • 37
0
votes
0 answers

How to solve pycocotools installation error

I have a problem installing a dependency for the layoutpharser library in python. This dependency is pycocotools. So I tried following the instructions given by the GitHub page, which I link at the end, which said to install this dependency with the…
0
votes
0 answers

Detectron2LayoutModel requires the detectron2 library but it was not found in your environment

I have Windows and went through installation for installing Detectron2 on Windows: [Detectron2 walkthrough (Windows)][1] I write a code in jupyter notebook. If I change directory to where I installed detectron2 as mentioned above, import detectron2…
0
votes
0 answers

Detectron2 pre-trained model using layoutparser in Docker container Error: Checkpoint Not Found

following is my Dockerfile. FROM python:3.9 RUN apt-get clean && apt-get update pip install --upgrade pip RUN pip install layoutparser RUN pip install "layoutparser[ocr]" RUN pip install pytesseract RUN pip install pdf2image RUN pip install…
SMI
  • 71
  • 1
  • 11
0
votes
0 answers

torch circular import AttributeError

I am trying to use a script that uses torch but I keep getting this Attribute Error: AttributeError: partially initialized module 'torch' has no attribute 'Tensor' (most likely due to a circular import) I have tried running pip3 uninstall torch pip3…
Anna M
  • 21
  • 1
0
votes
2 answers

Installed C++ build tools via Visual Studio Installed, but pip install pycocotools still give me error

Installing pycotools via pip install gives the error error log of failing to install pycotools I have installed C++ build tools via Visual Studio Installed image of installed C++ build tools But, when I pip install pycocotools, It still gives the…
0
votes
1 answer

Running Detectron2 locally - windows - [Pytorch Config error]

I am trying to run this code locally: https://gist.github.com/shashank524/74d8f46d5de633b84e2265fcc34774de#file-tabledetection-ipynb After installing required packages, when I am trying to run this line: import layoutparser as lp # PubLayNet model…
CFD
  • 607
  • 1
  • 11
  • 29
-1
votes
2 answers

AttributeError: module 'PIL.Image' has no attribute 'Resampling'

While implementing "layoutparser" I get this error. What is wrong with this? model = lp.Detectron2LayoutModel('lp://PubLayNet/mask_rcnn_X_101_32x8d_FPN_3x/config', extra_config=["MODEL.ROI_HEADS.SCORE_THRESH_TEST",…