Skip to content

AutoLayoutModel returns None #223

Open

Description

@cloudy-sfu

Describe the bug

In Windows, AutoLayoutModel('lp://EfficientDete/PubLayNet') or AutoLayoutModel('lp://EfficientDet/PubLayNet') returns None. See reproducing steps.

To Reproduce
Steps to reproduce the behavior:

pip install layoutparser
pip install "layoutparser[layoutmodels]"
pip install "layoutparser[ocr]"
pip install asgiref 
pip install "layoutparser[detectron2]"                      

No error happens when installing these packages.

from layoutparser.models import AutoLayoutModel
model = AutoLayoutModel('lp://EfficientDete/PubLayNet')

Also tried:

from layoutparser.models import AutoLayoutModel
model = AutoLayoutModel('lp://EfficientDet/PubLayNet')  # maybe "Det" instead of "Dete", typo in documentation

Always there is model = None.

Environment

  1. Please describe your Platform [Windows/MacOS/Linux]: Windows 10 64-bit
  2. Please show the Layout Parser version 0.3.4
  3. You may add addition that may be helpful for locating the problem, such as
    • How you installed PyTorch [e.g., pip, conda, source]
    • Other environment variables that may be related (such as $PATH, $LD_LIBRARY_PATH, $PYTHONPATH, etc.)

pytorch is installed as a dependency when installing layoutparser. I use pip package management.

CPU only.

Error traceback

No error returned.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Activity

  1. Alidar40 commented on May 2, 2025

    @Alidar40

    The documentation and the released package are outdated. This #146 was merged, but not released.
    Try lowercasing and installing from the source code:

    import layoutparser as lp
    list(lp.models.auto_layoutmodel.ALL_AVAILABLE_BACKENDS)
    >> ['detectron2', 'paddledetection', 'efficientdet']
    
    model = lp.AutoLayoutModel('lp://efficientdet/PubLayNet')
  2. wtiandong commented on Jan 27, 2026

    @wtiandong

    See pull request #226

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions