You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i.e., 'efficientdet' is not in 'lp://EfficientDete/PubLayNet'.
When AutoLayoutModel cannot find a model to instantiate, it silently returns None (because it returns nothing).
This means that we get AttributeError: 'NoneType' object has no attribute 'detect' during layout = model.detect(image)
My suggestions are:
update the README with a proper model, perhaps from:
Describe the bug
README contains the following (since #73):
This fails to instantiate a valid model because
AutoLayoutModel
runslayout-parser/src/layoutparser/models/auto_layoutmodel.py
Lines 62 to 63 in 89aca03
and
i.e., 'efficientdet' is not in 'lp://EfficientDete/PubLayNet'.
When
AutoLayoutModel
cannot find a model to instantiate, it silently returnsNone
(because it returns nothing).This means that we get
AttributeError: 'NoneType' object has no attribute 'detect'
duringlayout = model.detect(image)
My suggestions are:
layout-parser/tests/test_model.py
Line 50 in f230971
AutoLayoutModel
should complain if it fails auto detecting the model.# from PIL import Image
along README's# image = Image.open("path/to/image")
The text was updated successfully, but these errors were encountered: