tianzhi0549 / FCOS

FCOS: Fully Convolutional One-Stage Object Detection (ICCV'19)
https://arxiv.org/abs/1904.01355
Other
3.28k stars 630 forks source link

inference error #1

Closed tre-pengxu closed 5 years ago

tre-pengxu commented 5 years ago

Hi, I follow the instructions to create an environment FCOS,every package installed successful.

after run

python tools/test_net.py \
    --config-file configs/fcos/fcos_R_50_FPN_1x.yaml \
    MODEL.WEIGHT models/FCOS_R_50_FPN_1x.pth \
    TEST.IMS_PER_BATCH 4 

error happens

Traceback (most recent call last):
  File "tools/test_net.py", line 97, in <module>
    main()
  File "tools/test_net.py", line 49, in main
    cfg.merge_from_file(args.config_file)
  File "/home/peng/anaconda3/envs/FCOS/lib/python3.6/site-packages/yacs/config.py", line 213, in merge_from_file
    self.merge_from_other_cfg(cfg)
  File "/home/peng/anaconda3/envs/FCOS/lib/python3.6/site-packages/yacs/config.py", line 217, in merge_from_other_cfg
    _merge_a_into_b(cfg_other, self, self, [])
  File "/home/peng/anaconda3/envs/FCOS/lib/python3.6/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/peng/anaconda3/envs/FCOS/lib/python3.6/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.FCOS_ON'

thank you!

stanstarks commented 5 years ago

Are you sure you only have one version of maskrcnn_benchmark installed in this environment? Can you make sure the imported maskrcnn_benchmark is located in your current working directory by

python -c "import imp; print(imp.find_module('maskrcnn_benchmark'))"

tianzhi0549 commented 5 years ago

@tre-pengxu Or you can try to run python setup.py build develop and then run the inference command line again.

tre-pengxu commented 5 years ago

@tre-pengxu Or you can try to run python setup.py build develop and then run the inference command line again.

I use conda remove the old FCOS environment, and create an new environment from the beginning,it works! thank you!