facebookresearch / DensePose

A real-time approach for mapping all human pixels of 2D RGB images to a 3D surface-based model of the body
http://densepose.org
Other
6.98k stars 1.3k forks source link

KeyError: u'Non-existent config key: BODY_UV_RCNN' #106

Closed steffi4321 closed 6 years ago

steffi4321 commented 6 years ago

Hello,

I have finally installed DensePose and all the dependencies. First I installed Caffe2 following this instruction, then I installed DensePose and tested Detectron with python2 $DENSEPOSE/detectron/tests/test_spatial_narrow_as_op.py As this didn't work, because Detectron ops lib was not found, I followed the installation instruction to install Detectron seperately. After this the detectron test passes, but when I know try the demo inference via: python2 tools/infer_simple.py \ --cfg configs/DensePose_ResNet101_FPN_s1x-e2e.yaml \ --output-dir DensePoseData/infer_out/ \ --image-ext jpg \ --wts https://s3.amazonaws.com/densepose/DensePose_ResNet101_FPN_s1x-e2e.pkl \ DensePoseData/demo_data/demo_im.jpg I receive the following error: Found Detectron ops lib: /home/steffi1/pytorch/build/lib/libcaffe2_detectron_ops_gpu.so E0829 11:15:59.217773 7098 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. E0829 11:15:59.217797 7098 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. E0829 11:15:59.217803 7098 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 140, in <module> main(args) File "tools/infer_simple.py", line 87, in main merge_cfg_from_file(args.cfg) File "/home/steffi1/detectron/detectron/core/config.py", line 1133, in merge_cfg_from_file _merge_a_into_b(yaml_cfg, __C) File "/home/steffi1/detectron/detectron/core/config.py", line 1183, in _merge_a_into_b raise KeyError('Non-existent config key: {}'.format(full_key)) KeyError: u'Non-existent config key: BODY_UV_RCNN' I read issue #33 , but I exactly followed the installation steps of DensePose in INSTALL.md and I don't know in how far I could have installed it wrong.

I would really appreciate any help! Regards

joel-huang commented 6 years ago

Check out https://github.com/facebookresearch/DensePose/issues/9. You probably have two versions of config.py

steffi4321 commented 6 years ago

I resolved it somehow by copying some files from the installed detectron into the densepose-detectron folder and updated my PYTHONPATH variable. It only worked with both workarounds, but now it works, thank you :)

ArsenicBismuth commented 5 years ago

@steffi4321 Can you specify what are those "some files" you're copying? I stumbled upon the same issue for weeks LOL.

alvenchen commented 5 years ago

I resolved it by copying Detectron/detectron/utils/*.so to DensePose/detectron/utils/ do not just copy -r all the 'Detectron/detectron' to DensePose/ because there are big difference between them.

by the way,if can't find libcaffe2_detectron_ops_gpu.so, just locate it manually, then modify function get_detectron_ops_lib in DensePose/detectron/utils/env.py