While implementing "layoutparser" I get this error. What is wrong with this?
model = lp.Detectron2LayoutModel('lp://PubLayNet/mask_rcnn_X_101_32x8d_FPN_3x/config',
extra_config=["MODEL.ROI_HEADS.SCORE_THRESH_TEST", 0.5],
label_map={0: "Text", 1: "Title", 2: "List", 3:"Table", 4:"Figure"})
AttributeError Traceback (most recent call last)
<ipython-input-8-d8a245fa8739> in <module>()
----> 1 model = lp.Detectron2LayoutModel('lp://PubLayNet/mask_rcnn_X_101_32x8d_FPN_3x/config',
2 extra_config=["MODEL.ROI_HEADS.SCORE_THRESH_TEST", 0.5],
3 label_map={0: "Text", 1: "Title", 2: "List", 3:"Table", 4:"Figure"}) 34 frames /usr/local/lib/python3.7/dist-packages/PIL/Image.py in
__getattr__(name)
63 stacklevel=2,
64 )
---> 65 return categories[name]
66 elif name in ("NEAREST", "NONE"):
67 warnings.warn( AttributeError: module 'PIL.Image' has no attribute 'Resampling'
Convert image to numpy array.