Open Auth0rM0rgan opened 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.
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!
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!
Well, I was able to get rid off the KeyError: 'Non-existent config key: MODEL.VOVNET'
by:
detectron2-pipeline
project.vovnet-detectron2
to vovnet_detectron2
detectron2-pipeline/pipeline/utils/detectron.py
from vovnet_detectron2.vovnet import add_vovnet_config
import torch
from detectron2.config import get_cfg
from vovnet_detectron2.vovnet import add_vovnet_config
def setup_cfg(config_file, weights_file=None, config_opts=[], confidence_threshold=None, cpu=False):
# load config from file and command-line arguments
cfg = get_cfg()
add_vovnet_config(cfg)
...
...
But now the new error is:
KeyError: 'Non-existent config key: MODEL.FCOS
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!