dvlab-research/PanopticFCN

Demo script

veer5551 opened this issue · 2 comments

Hello,
Thanks for this project!

I was wondering if we there can be a demo script to test the inference on single/folder of images.
I tried the suggestion you mentioned: to use the detectron2 viz utils (I used the demo script in the /demo folder of the repo)
I am getting the below error:

Traceback (most recent call last):
  File "pan_demo.py", line 120, in <module>
    cfg = setup_cfg_custom()
  File "pan_demo.py", line 55, in setup_cfg_custom
    cfg.merge_from_file(CONFIG_FILE)
  File "c:\workspace\msjmf59\virtualenvironments\detectron2\detectron2\detectron2\config\config.py", line 54, in merge_from_file
    self.merge_from_other_cfg(loaded_cfg)
  File "C:\Workspace\msjmf59\VirtualEnvironments\detectron2\lib\site-packages\fvcore\common\config.py", line 124, in merge_from_other_cfg
    return super().merge_from_other_cfg(cfg_other)
  File "C:\Workspace\msjmf59\VirtualEnvironments\detectron2\lib\site-packages\yacs\config.py", line 217, in merge_from_other_cfg
    _merge_a_into_b(cfg_other, self, self, [])
  File "C:\Workspace\msjmf59\VirtualEnvironments\detectron2\lib\site-packages\yacs\config.py", line 478, in _merge_a_into_b
    _merge_a_into_b(v, b[k], root, key_list + [k])
  File "C:\Workspace\msjmf59\VirtualEnvironments\detectron2\lib\site-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.FEATURE_ENCODER'

Thanks in advance!

Hi! Thanks for your interest. Actually, you can visualize it like the given example Panoptic-DeepLab in the demo/demo.py.
Assume the demo.py in your own project, you can uncomment and modify the following lines

# To use demo for Panoptic-DeepLab, please uncomment the following two lines.
# from detectron2.projects.panoptic_deeplab import add_panoptic_deeplab_config  # noqa
# add_panoptic_deeplab_config(cfg)

to

from panopticfcn.config import add_panopticfcn_config  # noqa
add_panopticfcn_config(cfg)

Hope this could help you.

Thanks @yanwei-li ,

Will check the Panoptic-deeplab demo code!