chongruo / detectron2-ResNeSt

A fork of Detectron2 with ResNeSt backbone
https://arxiv.org/abs/2004.08955
Apache License 2.0
385 stars 73 forks source link

Predicting the trained detectron2-Resnest model in original detectron2 #49

Open Zeeshan75 opened 4 years ago

Zeeshan75 commented 4 years ago

Hi @zhanghang1989

I used your pre-trained model in training with our custom dataset and it worked very well and thanks to your work.

I have a doubt regarding the trained model and installation.

Consider the process as follows.

  1. I have trained the model with your repo detectron2-resnest.
  2. In my local I have detectron2(original) installed.
  3. While I am predicting the model trained from your repo in local I'm getting the below error.

/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/yacs-0.1.6-py3.6.egg/yacs/config.py in _merge_a_into_b(a, b, root, key_list) 458 if isinstance(v, CfgNode): 459 try: --> 460 _merge_a_into_b(v, b[k], root, key_list + [k]) 461 except BaseException: 462 raise

/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/yacs-0.1.6-py3.6.egg/yacs/config.py in _merge_a_into_b(a, b, root, key_list) 471 root.raise_key_rename_error(full_key) 472 else: --> 473 raise KeyError("Non-existent config key: {}".format(full_key)) 474 475

KeyError: 'Non-existent config key: MODEL.RESNETS.RADIX'

Note: I have used the config file from your repo i.e /detectron2-ResNeSt/configs/COCO-InstanceSegmentation/mask_rcnn_ResNeSt_50_FPN_syncBN_1x.yaml

Is there any way that I can predict the trained model from the original detectron2 instead of your repo??

shida666 commented 4 years ago

maybe refer to https://github.com/zhanghang1989/detectron2-ResNeSt/issues/33#issue-627915251

shida666 commented 4 years ago

【detectron2-ResNeSt/INSTALL.md】,it's 【# Or, to install it from a local clone: git clone https://github.com/zhanghang1989/detectron2-ResNeSt.git cd detectron2 && python -m pip install -e .】, maybe it should be 【# Or, to install it from a local clone: git clone https://github.com/zhanghang1989/detectron2-ResNeSt.git cd detectron2-ResNeSt && python -m pip install -e .】 I solved this problem this way,you can try it.