Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: u'Non-existent config key: MRCNN.BBOX2MASK' #2

Closed
mengyuest opened this issue Aug 3, 2018 · 2 comments
Closed

KeyError: u'Non-existent config key: MRCNN.BBOX2MASK' #2

mengyuest opened this issue Aug 3, 2018 · 2 comments

Comments

@mengyuest
Copy link

I was trying to test the inference section. My computer is Ubuntu16.04 with 1080TI (CUDA9.0 + CUDNN7.1). The installation of Caffe2 and Detectron all seemed work (no error in test, except some warnings). Then I ran

python2 tools/infer_simple.py \
    --cfg configs/bbox2mask_vg/eval_sw/runtest_clsbox_2_layer_mlp_nograd.yaml \
    --output-dir /tmp/detectron-visualizations-vg3k \
    --image-ext jpg \
    --thresh 0.5 --use-vg3k \
    --wts lib/datasets/data/trained_models/33241332_model_final_coco2vg3k_seg.pkl \
    demo_vg3k

It aborted with error KeyError: u'Non-existent config key: MRCNN.BBOX2MASK' . Followed is the full logging.

/home/meng/.local/lib/python2.7/site-packages/scipy/sparse/lil.py:19: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  from . import _csparsetools
/home/meng/.local/lib/python2.7/site-packages/scipy/sparse/csgraph/__init__.py:165: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  from ._shortest_path import shortest_path, floyd_warshall, dijkstra,\
/home/meng/.local/lib/python2.7/site-packages/scipy/sparse/csgraph/_validation.py:5: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  from ._tools import csgraph_to_dense, csgraph_from_dense,\
/home/meng/.local/lib/python2.7/site-packages/scipy/sparse/csgraph/__init__.py:167: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  from ._traversal import breadth_first_order, depth_first_order, \
/home/meng/.local/lib/python2.7/site-packages/scipy/sparse/csgraph/__init__.py:169: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  from ._min_spanning_tree import minimum_spanning_tree
/home/meng/.local/lib/python2.7/site-packages/scipy/sparse/csgraph/__init__.py:170: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  from ._reordering import reverse_cuthill_mckee, maximum_bipartite_matching, \
Found Detectron ops lib: /usr/local/lib/libcaffe2_detectron_ops_gpu.so
E0802 21:35:37.893579 20333 init_intrinsics_check.cc:43] CPU feature avx is present on your machine, but the Caffe2 binary is not compiled with it. It means you may not get the full speed of your CPU.
E0802 21:35:37.893594 20333 init_intrinsics_check.cc:43] CPU feature avx2 is present on your machine, but the Caffe2 binary is not compiled with it. It means you may not get the full speed of your CPU.
E0802 21:35:37.893596 20333 init_intrinsics_check.cc:43] CPU feature fma is present on your machine, but the Caffe2 binary is not compiled with it. It means you may not get the full speed of your CPU.
Traceback (most recent call last):
  File "tools/infer_simple.py", line 162, in <module>
    main(args)
  File "tools/infer_simple.py", line 108, in main
    merge_cfg_from_file(args.cfg)
  File "/home/meng/lab-mill/Detectron/lib/core/config.py", line 1091, in merge_cfg_from_file
    _merge_a_into_b(yaml_cfg, __C)
  File "/home/meng/lab-mill/Detectron/lib/core/config.py", line 1149, in _merge_a_into_b
    _merge_a_into_b(v, b[k], stack=stack_push)
  File "/home/meng/lab-mill/Detectron/lib/core/config.py", line 1139, in _merge_a_into_b
    raise KeyError('Non-existent config key: {}'.format(full_key))
KeyError: u'Non-existent config key: MRCNN.BBOX2MASK'

I checked with some similar errors online, which is about "indentation mismatch", but seems not our case. Anyone knows how to solve this, and does the warning information matter? Thanks.

@ronghanghu
Copy link
Owner

Hi, from your error message, it seems that you are using your existing Detectron installation (/home/meng/lab-mill/Detectron) instead the modified Detectron codebase contained in this repo.

This repo has a modified config file (lib/core/config.py) that is different from the default Detection codebase released by FAIR, causing the error above. It's necessary that this repo comes before your existing installation in your python path (You can use import sys; print(sys.path) to see your python path). Running cd ./lib && make in this repo may resolve the issue.

@mengyuest
Copy link
Author

Great cd ./lib && make perfectly works. Thanks for the help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants