PoseCNN: ImportError while Running the demo
when Running the demo:
./experiments/scripts/demo.sh --gpu 0
I got the following error:
ImportError: /home/zgl/PoseCNN/tools/…/lib/synthesize/synthesizer.so: undefined symbol: ZN11SynthesizerC1ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5
anyone has gotten the same error and solved it?
About this issue
- Original URL
- State: open
- Created 6 years ago
- Comments: 15 (1 by maintainers)
@saurabheights I managed to create a Dockerfile for demo.py.
https://gist.github.com/koki0702/1b5ee259ba688cd2aee7b644190e5813
I got the error below when running the demo.
Where can I install
normals
?BTW, This is my Dockerfile.
Check this to find gcc version used - https://www.tensorflow.org/versions/master/install/install_sources
I installed tensorflow using conda, so probably it used gcc-4.8
Now, my gcc -version was 5.4, which means my tensorflow is compiled using gcc-4.8 and I am compiling the lib code using gcc-5.4 which is causing the error, atleast in my case.
To fix this, install gcc-4.8, you should have /usr/bin/gcc-4.8 and /usr/bin/g+±4.8 after that. This error will still happen, because when our
ll /usr/bin/gcc
is still pointed to gcc-5.4.Now, change the softlink to :-
sudo ln -sf /usr/bin/gcc-4.8
/usr/bin/gcc``sudo ln -sf /usr/bin/g++-4.8 /usr/bin/g++
Now, check
gcc --version
andg++ --version
and if they are at 4.8 do:cd PoseCNN/lib
./make.sh && git clean -f && python setup.py build_ext --inplace && cd .. && ./experiments/scripts/demo.sh 0
NOTE:
git clean -f
removes any untracked file so dont run it and just delete below given files manually. Or rungit clean -n
to check what willgit clean -f
delete without deleting anything. It should be following files only:rm lib/nms/gpu_nms.cpp
rm lib/normals/gpu_normals.cpp
sudo pip install cython
orconda install cython
then, from $ROOT/lib:python setup.py build_ext --inplace
In the current version, you might have to comment out the Extension(synthesizer…) in the setup.py file, as that one files to compile (synthesize/synthesizer.cpp:588:27: fatal error: synthesizer.hpp: No such file or directory), but apart from that, this fixes the gpu_nms issue.