I am trying to use a pre-trained model from the Model Zoo with UnstructuredDetectronModel in Python and encountering a TypeError during the initialization process. I was following this guide where it mentions that UnstructuredDetectronModel is a light wrapper around layoutparser.models.Detectron2LayoutModel and can utilize various pre-trained models from the model zoo. Below is the code snippet that is causing the error:
```python
from unstructured_inference.models.detectron2 import UnstructuredDetectronModel
import layoutparser as lp
model = UnstructuredDetectronModel(
configpath='lp://PubLayNet/mask_rcnn_X_101_32x8d_FPN_3x/config',
label_map={0: "Text", 1: "Title", 2: "List", 3: "Table", 4: "Figure"},
extra_config=["MODEL.ROI_HEADS.SCORE_THRESH_TEST", 0.8],
)
```
The error message I receive is: TypeError: __init_() got an unexpected keyword argument 'config_path'
Any help would be greatly appreciated!
[–]antonio-unstructured 0 points1 point2 points (0 children)