Closed de-code closed 2 years ago
Describe the bug
Following the installation instructions to use Detectron2, the command is:
pip install layoutparser torch && pip install "git+https://github.com/facebookresearch/detectron2.git@v0.5#egg=detectron2"
When trying to load the model (as per the example):
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"} )
That leads to the exception NameError: name 'IMAGENET_DEFAULT_MEAN' is not defined (see logs below)
NameError: name 'IMAGENET_DEFAULT_MEAN' is not defined
Following the stacktrace, it seems to be related to EfficientDet.
The error goes away after installing that option via:
pip install layoutparser[effdet]
Environment Linux.
LayoutParser 0.3.1
Error traceback
Gotcha! Thant's a good point and let me work on a fix!
Fixed in #79
Describe the bug
Following the installation instructions to use Detectron2, the command is:
When trying to load the model (as per the example):
That leads to the exception
NameError: name 'IMAGENET_DEFAULT_MEAN' is not defined
(see logs below)Following the stacktrace, it seems to be related to EfficientDet.
The error goes away after installing that option via:
Environment Linux.
LayoutParser 0.3.1
Error traceback
logs
```text --------------------------------------------------------------------------- NameError Traceback (most recent call last)