Multi-Type-TD-TSR icon indicating copy to clipboard operation
Multi-Type-TD-TSR copied to clipboard

provided model config: absolute path for base

Open bertsky opened this issue 1 year ago • 0 comments

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"

bertsky avatar Mar 10 '23 15:03 bertsky