Skip to content

OSError: [Errno 22] on Detectron2LayoutModel() #140

@FuJiK0

Description

@FuJiK0

When I try to Create a Detectron2-based Layout Detection Model, I encounter the following error:

model = lp.Detectron2LayoutModel(
    'lp://PrimaLayout/mask_rcnn_R_50_FPN_3x/config',
    extra_config=["MODEL.ROI_HEADS.SCORE_THRESH_TEST", 0.5],
    label_map={
        1: "TextRegion",
        2: "ImageRegion"
    })

Error:

File f:\Coding\Conda\envs\LP\lib\site-packages\portalocker\utils.py:289, in Lock._get_fh(self)
    [287](file:///f%3A/Coding/Conda/envs/LP/lib/site-packages/portalocker/utils.py?line=286) def _get_fh(self) -> typing.IO:
    [288](file:///f%3A/Coding/Conda/envs/LP/lib/site-packages/portalocker/utils.py?line=287)     '''Get a new filehandle'''
--> [289](file:///f%3A/Coding/Conda/envs/LP/lib/site-packages/portalocker/utils.py?line=288)     return open(self.filename, self.mode, **self.file_open_kwargs)

OSError: [Errno 22] Invalid argument: 'C:\\Users\\60953/.torch/iopath_cache\\s/yc92x97k50abynt\\config.yaml?dl=1.lock'

image

image

Environment

  1. Platform Windows 11
  2. Layout Parser version 0.3.4
  3. Torch version 1.10.0+cu113

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions