DavidGillsjo / SRW-Net

Semantic Room Wireframe Detection from a single perspective image
MIT License
72 stars 9 forks source link

KeyError: 'Non-existent config key: MODEL.PARSING_HEAD.LAYERS' #2

Closed ariel415el closed 2 years ago

ariel415el commented 2 years ago

Hi, I'm running the commands in "Run inference on your own images" via the docker enviroment

python3 test.py --config-file ../config-files/layout-SRW-S3D.yaml --img-folder ruby-room.jpg 
CHECKPOINT ./data/model_proposal_s3d.pth
GNN_CHECKPOINT ../data/model_gnn_s3d.pth

but get this runtime error:

Traceback (most recent call last):
  File "test.py", line 575, in <module>
    cfg.merge_from_file(args.config_file)
  File "/usr/local/lib/python3.6/dist-packages/yacs/config.py", line 213, in merge_from_file
    self.merge_from_other_cfg(cfg)
  File "/usr/local/lib/python3.6/dist-packages/yacs/config.py", line 217, in merge_from_other_cfg
    _merge_a_into_b(cfg_other, self, self, [])
  File "/usr/local/lib/python3.6/dist-packages/yacs/config.py", line 478, in _merge_a_into_b
    _merge_a_into_b(v, b[k], root, key_list + [k])
  File "/usr/local/lib/python3.6/dist-packages/yacs/config.py", line 478, in _merge_a_into_b
    _merge_a_into_b(v, b[k], root, key_list + [k])
  File "/usr/local/lib/python3.6/dist-packages/yacs/config.py", line 491, in _merge_a_into_b
    raise KeyError("Non-existent config key: {}".format(full_key))
KeyError: 'Non-existent config key: MODEL.PARSING_HEAD.LAYERS'

This is eventhough the /config-files/layout-SRW-S3D.yaml does have these keys. Any idea?s

ariel415el commented 2 years ago

As a workaround I added these lines:

PARSING_HEAD.LAYERS = None PARSING_HEAD.JUNCTION_LAYERS = None

to parsing/config/models/head.py

DavidGillsjo commented 2 years ago

Thanks for creating the issue. There was a line missing in the config file, fixed it now.

Note that the --img-folder argument requires a folder. The output is now placed according to OUTPUT_DIR in the config, see new README instructions.

ariel415el commented 2 years ago

Tnanks it is fixed now