Psarpei / Multi-Type-TD-TSR

Extracting Tables from Document Images using a Multi-stage Pipeline for Table Detection and Table Structure Recognition:
MIT License
258 stars 51 forks source link

provided model config: absolute path for base #14

Open bertsky opened 1 year ago

bertsky commented 1 year ago

When I run with the weights and config linked in the Readme, Detectron2 cannot correctly resolve the base config file:

  File "/lib/python3.7/site-packages/detectron2/config/config.py", line 46, in merge_from_file
    loaded_cfg = self.load_yaml_with_base(cfg_filename, allow_unsafe=allow_unsafe)
  File "/lib/python3.7/site-packages/fvcore/common/config.py", line 103, in load_yaml_with_base
    base_cfg = _load_with_base(base_cfg_file)
  File "/lib/python3.7/site-packages/fvcore/common/config.py", line 93, in _load_with_base
    return cls.load_yaml_with_base(base_cfg_file, allow_unsafe=allow_unsafe)
  File "/lib/python3.7/site-packages/fvcore/common/config.py", line 59, in load_yaml_with_base
    with cls._open_cfg(filename) as f:
  File "/lib/python3.7/site-packages/detectron2/config/config.py", line 34, in _open_cfg
    return PathManager.open(filename, "r")
  File "/lib/python3.7/site-packages/iopath/common/file_io.py", line 1012, in open
    bret = handler._open(path, mode, buffering=buffering, **kwargs)  # type: ignore
  File "/lib/python3.7/site-packages/iopath/common/file_io.py", line 612, in _open
    opener=opener,
FileNotFoundError: [Errno 2] No such file or directory: '/content/Base-RCNN-FPN.yaml'

That's because your config contains

_BASE_: "/content/Base-RCNN-FPN.yaml"

Which should correctly read

_BASE_: "../configs/Base-RCNN-FPN.yaml"

or simply

_BASE_: "Base-RCNN-FPN.yaml"