Skip to content
New issue

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

Colab: #108

Closed
DimIsaev opened this issue Jan 5, 2022 · 2 comments
Closed

Colab: #108

DimIsaev opened this issue Jan 5, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@DimIsaev
Copy link

DimIsaev commented Jan 5, 2022

Describe the bug

<ipython-input-7-22403b0e7bb6> in <module>()
----> 1 model = lp.Detectron2LayoutModel('lp://PubLayNet/faster_rcnn_R_50_FPN_3x/config', 
      2                                  extra_config=["MODEL.ROI_HEADS.SCORE_THRESH_TEST", 0.8],
      3                                  label_map={0: "Text", 1: "Title", 2: "List", 3:"Table", 4:"Figure"})
      4     # Load the deep layout model from the layoutparser API
      5     # For all the supported model, please check the Model

/usr/local/lib/python3.7/dist-packages/layoutparser/file_utils.py in __getattr__(self, name)
    224             value = getattr(module, name)
    225         else:
--> 226             raise AttributeError(f"module {self.__name__} has no attribute {name}")
    227 
    228         setattr(self, name, value)

AttributeError: module layoutparser has no attribute Detectron2LayoutModel```

To Reproduce

model = lp.Detectron2LayoutModel('lp://PubLayNet/faster_rcnn_R_50_FPN_3x/config', 
                                 extra_config=["MODEL.ROI_HEADS.SCORE_THRESH_TEST", 0.8],
                                 label_map={0: "Text", 1: "Title", 2: "List", 3:"Table", 4:"Figure"})

Environment
Colab (CPU) Env: Python3

@DimIsaev DimIsaev added the bug Something isn't working label Jan 5, 2022
@DimIsaev DimIsaev closed this as completed Jan 5, 2022
@DimIsaev
Copy link
Author

DimIsaev commented Jan 5, 2022

Install Detectron2
solved the problem

@WYY220062
Copy link

Hi @DimIsaev, how did you install the Detectron2 and did you install the layout parser with detectron2 version by pip install layoutparser torchvision && pip install "git+https://github.com/facebookresearch/[email protected]#egg=detectron2"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants