Closed gaohuan2015 closed 3 years ago
config.yaml
and model_final.pth
in the same directory as the python script? ./
before the paths:
model = lp.Detectron2LayoutModel("./config.yaml", "./model_final.pth",
extra_config=["MODEL.ROI_HEADS.SCORE_THRESH_TEST", 0.8],
label_map={0: "Text", 1: "Title", 2: "List", 3:"Table", 4:"Figure"})
. If not, please attach your error message in the next post. Thanks.
Thanks very much for your help. The problem is resolved and we can close the issue
Thanks very much, it helps me a lot.
where to download config and model @gaohuan2015 @lolipopshock
Hi
I am trying to use layout-parser to parse the data from PDF. Because some network issue, I can't download the config from 'lp://PubLayNet/faster_rcnn_R_50_FPN_3x/config'. But I can down load the model_final.pth and config.yaml through my browser. After that I use following code to set up the config path and model path. However, Nothing can be parsed. Is there any thing wrong when I use local path? model = lp.Detectron2LayoutModel(''config.yaml', "model_final.pth", extra_config=["MODEL.ROI_HEADS.SCORE_THRESH_TEST", 0.8], label_map={0: "Text", 1: "Title", 2: "List", 3:"Table", 4:"Figure"})