jagin / detectron2-pipeline

Modular image processing pipeline using OpenCV and Python generators powered by Detectron2.
MIT License
88 stars 36 forks source link

Detectron2 external projects #7

Open Auth0rM0rgan opened 4 years ago

Auth0rM0rgan commented 4 years ago

Hey @jagin,

I would like to ask you how can I connect Detectron2 external projects(like this one: https://github.com/youngwanLEE/centermask2) to the pipeline?

Thanks!

jagin commented 4 years ago

@Auth0rM0rgan I was able to quickly look at that project and for me it looks like you should be able to use CenterMask models without any problem. Try to use --config-file option to load the model you need.

Auth0rM0rgan commented 4 years ago

Hey @jagin,

I have tried to run the process_video.py with the absolute path to the centermask config file but I am getting an error that Non-existent config key: MODEL.VOVNET

This is my command: python process_video.py -i 0 -p -d --config-file /home/XXX/centermask2/configs/centermask/centermask_V_39_eSE_FPN_ms_3x.yaml

This is the error I am getting:

Traceback (most recent call last): File "process_video.py", line 155, in <module> main(args) File "process_video.py", line 91, in main cpu=False if args.gpus > 0 else True) File "/home/media4us/PycharmProjects/detectron2-pipeline/pipeline/utils/detectron.py", line 9, in setup_cfg cfg.merge_from_file(config_file) File "/home/media4us/PycharmProjects/detectron2/detectron2/config/config.py", line 47, in merge_from_file self.merge_from_other_cfg(loaded_cfg) File "/home/media4us/anaconda3/lib/python3.7/site-packages/fvcore/common/config.py", line 121, in merge_from_other_cfg return super().merge_from_other_cfg(cfg_other) File "/home/media4us/anaconda3/lib/python3.7/site-packages/yacs/config.py", line 217, in merge_from_other_cfg _merge_a_into_b(cfg_other, self, self, []) File "/home/media4us/anaconda3/lib/python3.7/site-packages/yacs/config.py", line 460, in _merge_a_into_b _merge_a_into_b(v, b[k], root, key_list + [k]) File "/home/media4us/anaconda3/lib/python3.7/site-packages/yacs/config.py", line 473, in _merge_a_into_b raise KeyError("Non-existent config key: {}".format(full_key)) KeyError: 'Non-existent config key: MODEL.VOVNET'

Thanks!

jagin commented 4 years ago

I'm not able to help you with that. First I would check if your model is working with the demo sources of centermask2 project. Maybe there is something missing in my pipeline considering centermask2. Good luck!

ShahriyarR commented 4 years ago

Well, I was able to get rid off the KeyError: 'Non-existent config key: MODEL.VOVNET' by:

But now the new error is: KeyError: 'Non-existent config key: MODEL.FCOS