Layout-Parser / layout-parser

A Unified Toolkit for Deep Learning Based Document Image Analysis
https://layout-parser.github.io/
Apache License 2.0
4.83k stars 464 forks source link

Model instantiation throwing 500 error #119

Open pbamotra opened 2 years ago

pbamotra commented 2 years ago

Describe the bug Model instantiation throwing 500 error

To Reproduce Steps to reproduce the behavior:

  1. What command or script did you run?
    model = lp.Detectron2LayoutModel(
            config_path ='lp://PrimaLayout/mask_rcnn_R_50_FPN_3x/config', # In model catalog
            label_map   ={0: "Text", 1: "Title", 2: "List", 3:"Table", 4:"Figure"}, # In model`label_map`
            extra_config=["MODEL.ROI_HEADS.SCORE_THRESH_TEST", 0.8] # Optional
        )

Environment

  1. Please describe your Platform [Windows/MacOS/Linux]: Colab
  2. Please show the Layout Parser version: 0.3.2
  3. You may add addition that may be helpful for locating the problem, such as
    • How you installed PyTorch [e.g., pip, conda, source]: pip

Error traceback

config.yaml?dl=1: 8.19kB [00:01, 5.24kB/s]
model_final.pth?dl=1: 0.00B [00:02, ?B/s]
Failed to download https://www.dropbox.com/s/h7th27jfv19rxiy/model_final.pth?dl=1

---------------------------------------------------------------------------

HTTPError                                 Traceback (most recent call last)

[<ipython-input-6-8dcd95fb9d82>](https://localhost:8080/#) in <module>()
      2             config_path ='lp://PrimaLayout/mask_rcnn_R_50_FPN_3x/config', # In model catalog
      3             label_map   ={0: "Text", 1: "Title", 2: "List", 3:"Table", 4:"Figure"}, # In model`label_map`
----> 4             extra_config=["MODEL.ROI_HEADS.SCORE_THRESH_TEST", 0.8] # Optional
      5         )

22 frames

[/usr/lib/python3.7/urllib/request.py](https://localhost:8080/#) in http_error_default(self, req, fp, code, msg, hdrs)
    647 class HTTPDefaultErrorHandler(BaseHandler):
    648     def http_error_default(self, req, fp, code, msg, hdrs):
--> 649         raise HTTPError(req.full_url, code, msg, hdrs, fp)
    650 
    651 class HTTPRedirectHandler(BaseHandler):

HTTPError: HTTP Error 500: Internal Server Error
bhuvanamohankolasani commented 2 years ago

faced the same issue...but it is resolved now i think...it is downloading the model now

rbturnbull commented 2 years ago

I'm having the issue now with the following config files:

rbturnbull commented 2 years ago

I was just able to download with this config file now: lp://PubLayNet/faster_rcnn_R_50_FPN_3x/config

lolipopshock commented 2 years ago

Thanks! Typically you just need to try again to download the models and it should be resolved -- but perhaps we will improve the model hosting strategy soon :)

zhepherd commented 1 year ago

i can't download config and model from www.dropbox.com, the address is samething wrong, can you support google drive? thx very much