Closed razvanbarbura closed 1 year ago
Hi, after some reruns, now I've got this error.
Traceback (most recent call last):
File "demo/demo.py", line 114, in
AttributeError: Attribute 'thing_train_id2contiguous_id' does not exist in the metadata of dataset 'cityscapes_fine_panoptic_train_separated': metadata is empty.
@razvanbarbura I am having the same problem, could you tell me what was the solution at the end ?
Hello, I trained a model on Cityscapes dataset using PanopticFCN cityscapes implementation. Now I want to use the demo.py from detectron2 to see the result of my trained model on a new image. I've already imported panoptic fcn in the demo.py and also added the panoptic fcn configuration in init.py.
But when I try to use the demo.py like this:
python demo/demo.py --config-file projects/PanopticFCN/configs/cityscapes/PanopticFCN-R50-cityscapes.yaml --input projects/PanopticFCN/images/image1.png --output projects/PanopticFCN/results --opts MODEL.WEIGHTS projects/PanopticFCN/model/model_final.pth
I've got the following error. What do I still need to do, to be able to run the demo.py?
File "demo/demo.py", line 100, in
cfg = setup_cfg(args)
File "demo/demo.py", line 29, in setup_cfg
cfg.merge_from_file(args.config_file)
File "/usr/local/lib/python3.7/dist-packages/detectron2/config/config.py", line 69, in merge_from_file
self.merge_from_other_cfg(loaded_cfg)
File "/usr/local/lib/python3.7/dist-packages/fvcore/common/config.py", line 132, in merge_from_other_cfg
return super().merge_from_other_cfg(cfg_other)
File "/usr/local/lib/python3.7/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.7/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.7/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.LOSS_WEIGHT'