Open hahalidaxin opened 5 years ago
Hi,
Thanks for reaching out!
Do you mind sharing the output of running the setup.py script? It seems like the C++ components may not have built successfully.
Best, John
Output details are as bellows:
running install
running bdist_egg
running egg_info
writing trt_pose.egg-info/PKG-INFO
writing dependency_links to trt_pose.egg-info/dependency_links.txt
writing top-level names to trt_pose.egg-info/top_level.txt
reading manifest file 'trt_pose.egg-info/SOURCES.txt'
writing manifest file 'trt_pose.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/trt_pose
copying trt_pose/parse_objects.py -> build/lib.linux-x86_64-3.6/trt_pose
copying trt_pose/coco.py -> build/lib.linux-x86_64-3.6/trt_pose
copying trt_pose/draw_objects.py -> build/lib.linux-x86_64-3.6/trt_pose
copying trt_pose/init.py -> build/lib.linux-x86_64-3.6/trt_pose
copying trt_pose/train.py -> build/lib.linux-x86_64-3.6/trt_pose
creating build/lib.linux-x86_64-3.6/util
copying util/cam.py -> build/lib.linux-x86_64-3.6/util
copying util/init.py -> build/lib.linux-x86_64-3.6/util
creating build/lib.linux-x86_64-3.6/trt_pose/models
copying trt_pose/models/mnasnet.py -> build/lib.linux-x86_64-3.6/trt_pose/models
copying trt_pose/models/dla.py -> build/lib.linux-x86_64-3.6/trt_pose/models
copying trt_pose/models/resnet.py -> build/lib.linux-x86_64-3.6/trt_pose/models
copying trt_pose/models/common.py -> build/lib.linux-x86_64-3.6/trt_pose/models
copying trt_pose/models/init.py -> build/lib.linux-x86_64-3.6/trt_pose/models
copying trt_pose/models/densenet.py -> build/lib.linux-x86_64-3.6/trt_pose/models
running build_ext
building 'plugins' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/trt_pose
creating build/temp.linux-x86_64-3.6/trt_pose/plugins
gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/root/anaconda3/envs/pytorch1.0/lib/python3.6/site-packages/torch/include -I/root/anaconda3/envs/pytorch1.0/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/root/anaconda3/envs/pytorch1.0/lib/python3.6/site-packages/torch/include/TH -I/root/anaconda3/envs/pytorch1.0/lib/python3.6/site-packages/torch/include/THC -I/root/anaconda3/envs/pytorch1.0/include/python3.6m -c trt_pose/plugins/find_peaks.cpp -o build/temp.linux-x86_64-3.6/trt_pose/plugins/find_peaks.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=plugins -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/root/anaconda3/envs/pytorch1.0/lib/python3.6/site-packages/torch/include -I/root/anaconda3/envs/pytorch1.0/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/root/anaconda3/envs/pytorch1.0/lib/python3.6/site-packages/torch/include/TH -I/root/anaconda3/envs/pytorch1.0/lib/python3.6/site-packages/torch/include/THC -I/root/anaconda3/envs/pytorch1.0/include/python3.6m -c trt_pose/plugins/paf_score_graph.cpp -o build/temp.linux-x86_64-3.6/trt_pose/plugins/paf_score_graph.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=plugins -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
trt_pose/plugins/paf_score_graph.cpp: In function ‘void paf_score_graph_out(at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, int)’:
trt_pose/plugins/paf_score_graph.cpp:59:27: warning: unused variable ‘progress’ [-Wunused-variable]
float progress = 0.0;
^
trt_pose/plugins/paf_score_graph.cpp:10:9: warning: unused variable ‘M’ [-Wunused-variable]
int M = peaks.size(2);
^
gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/root/anaconda3/envs/pytorch1.0/lib/python3.6/site-packages/torch/include -I/root/anaconda3/envs/pytorch1.0/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/root/anaconda3/envs/pytorch1.0/lib/python3.6/site-packages/torch/include/TH -I/root/anaconda3/envs/pytorch1.0/lib/python3.6/site-packages/torch/include/THC -I/root/anaconda3/envs/pytorch1.0/include/python3.6m -c trt_pose/plugins/refine_peaks.cpp -o build/temp.linux-x86_64-3.6/trt_pose/plugins/refine_peaks.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=plugins -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/root/anaconda3/envs/pytorch1.0/lib/python3.6/site-packages/torch/include -I/root/anaconda3/envs/pytorch1.0/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/root/anaconda3/envs/pytorch1.0/lib/python3.6/site-packages/torch/include/TH -I/root/anaconda3/envs/pytorch1.0/lib/python3.6/site-packages/torch/include/THC -I/root/anaconda3/envs/pytorch1.0/include/python3.6m -c trt_pose/plugins/plugins.cpp -o build/temp.linux-x86_64-3.6/trt_pose/plugins/plugins.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=plugins -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/root/anaconda3/envs/pytorch1.0/lib/python3.6/site-packages/torch/include -I/root/anaconda3/envs/pytorch1.0/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/root/anaconda3/envs/pytorch1.0/lib/python3.6/site-packages/torch/include/TH -I/root/anaconda3/envs/pytorch1.0/lib/python3.6/site-packages/torch/include/THC -I/root/anaconda3/envs/pytorch1.0/include/python3.6m -c trt_pose/plugins/munkres.cpp -o build/temp.linux-x86_64-3.6/trt_pose/plugins/munkres.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=plugins -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
trt_pose/plugins/munkres.cpp: In function ‘void munkresStep5(at::TensorAccessor<float, 2ul>, const CoverTable&, int, int)’:
trt_pose/plugins/munkres.cpp:160:34: warning: ‘min’ may be used uninitialized in this function [-Wmaybe-uninitialized]
cost_graph[i][j] -= min;
^
gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/root/anaconda3/envs/pytorch1.0/lib/python3.6/site-packages/torch/include -I/root/anaconda3/envs/pytorch1.0/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/root/anaconda3/envs/pytorch1.0/lib/python3.6/site-packages/torch/include/TH -I/root/anaconda3/envs/pytorch1.0/lib/python3.6/site-packages/torch/include/THC -I/root/anaconda3/envs/pytorch1.0/include/python3.6m -c trt_pose/plugins/connect_parts.cpp -o build/temp.linux-x86_64-3.6/trt_pose/plugins/connect_parts.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=plugins -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
trt_pose/plugins/connect_parts.cpp: In function ‘std::vector
Installed /root/anaconda3/envs/pytorch1.0/lib/python3.6/site-packages/trt_pose-0.0.0-py3.6-linux-x86_64.egg Processing dependencies for trt-pose==0.0.0 Finished processing dependencies for trt-pose==0.0.0
Hi @hahalidaxin after building, please put plugins.cpython-36m-x86_64-linux-gnu.so who is under buid/lib.linux-x86_64-3.6/trt_pose/ into /trt_pose/. should be fine after that.
Appreciate your advice @princefr , I dynamically load plugins.cpython-36m-x86_64-linux-gnu.so after building and that works.
Perfect. your welcome
@princefr it seems that i have a problem too, i do not have plugins.cpython-36m-x86_64-linux-gnu.so or plugins.py
:::::Here is the output of setup.py:::::::::: No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda' running install /usr/local/lib/python3.6/dist-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. setuptools.SetuptoolsDeprecationWarning, /usr/local/lib/python3.6/dist-packages/setuptools/command/easy_install.py:159: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools. EasyInstallDeprecationWarning, running bdist_egg running egg_info writing trt_pose.egg-info/PKG-INFO writing dependency_links to trt_pose.egg-info/dependency_links.txt writing top-level names to trt_pose.egg-info/top_level.txt /home/jetson/.local/lib/python3.6/site-packages/torch/utils/cpp_extension.py:381: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend. warnings.warn(msg.format('we could not find ninja.')) reading manifest file 'trt_pose.egg-info/SOURCES.txt' adding license file 'LICENSE.md' writing manifest file 'trt_pose.egg-info/SOURCES.txt' installing library code to build/bdist.linux-aarch64/egg running install_lib running build_py running build_ext creating build/bdist.linux-aarch64/egg creating build/bdist.linux-aarch64/egg/trt_pose copying build/lib.linux-aarch64-3.6/trt_pose/coco.py -> build/bdist.linux-aarch64/egg/trt_pose copying build/lib.linux-aarch64-3.6/trt_pose/init.py -> build/bdist.linux-aarch64/egg/trt_pose copying build/lib.linux-aarch64-3.6/trt_pose/train.py -> build/bdist.linux-aarch64/egg/trt_pose creating build/bdist.linux-aarch64/egg/trt_pose/models copying build/lib.linux-aarch64-3.6/trt_pose/models/dla.py -> build/bdist.linux-aarch64/egg/trt_pose/models copying build/lib.linux-aarch64-3.6/trt_pose/models/init.py -> build/bdist.linux-aarch64/egg/trt_pose/models copying build/lib.linux-aarch64-3.6/trt_pose/models/common.py -> build/bdist.linux-aarch64/egg/trt_pose/models copying build/lib.linux-aarch64-3.6/trt_pose/models/resnet.py -> build/bdist.linux-aarch64/egg/trt_pose/models copying build/lib.linux-aarch64-3.6/trt_pose/models/densenet.py -> build/bdist.linux-aarch64/egg/trt_pose/models copying build/lib.linux-aarch64-3.6/trt_pose/models/mnasnet.py -> build/bdist.linux-aarch64/egg/trt_pose/models copying build/lib.linux-aarch64-3.6/trt_pose/draw_objects.py -> build/bdist.linux-aarch64/egg/trt_pose copying build/lib.linux-aarch64-3.6/trt_pose/parse_objects.py -> build/bdist.linux-aarch64/egg/trt_pose creating build/bdist.linux-aarch64/egg/trt_pose/utils copying build/lib.linux-aarch64-3.6/trt_pose/utils/init.py -> build/bdist.linux-aarch64/egg/trt_pose/utils copying build/lib.linux-aarch64-3.6/trt_pose/utils/export_for_isaac.py -> build/bdist.linux-aarch64/egg/trt_pose/utils copying build/lib.linux-aarch64-3.6/trt_pose/plugins.cpython-36m-aarch64-linux-gnu.so -> build/bdist.linux-aarch64/egg/trt_pose byte-compiling build/bdist.linux-aarch64/egg/trt_pose/coco.py to coco.cpython-36.pyc byte-compiling build/bdist.linux-aarch64/egg/trt_pose/init.py to init.cpython-36.pyc byte-compiling build/bdist.linux-aarch64/egg/trt_pose/train.py to train.cpython-36.pyc byte-compiling build/bdist.linux-aarch64/egg/trt_pose/models/dla.py to dla.cpython-36.pyc byte-compiling build/bdist.linux-aarch64/egg/trt_pose/models/init.py to init.cpython-36.pyc byte-compiling build/bdist.linux-aarch64/egg/trt_pose/models/common.py to common.cpython-36.pyc byte-compiling build/bdist.linux-aarch64/egg/trt_pose/models/resnet.py to resnet.cpython-36.pyc byte-compiling build/bdist.linux-aarch64/egg/trt_pose/models/densenet.py to densenet.cpython-36.pyc byte-compiling build/bdist.linux-aarch64/egg/trt_pose/models/mnasnet.py to mnasnet.cpython-36.pyc byte-compiling build/bdist.linux-aarch64/egg/trt_pose/draw_objects.py to draw_objects.cpython-36.pyc byte-compiling build/bdist.linux-aarch64/egg/trt_pose/parse_objects.py to parse_objects.cpython-36.pyc byte-compiling build/bdist.linux-aarch64/egg/trt_pose/utils/init.py to init.cpython-36.pyc byte-compiling build/bdist.linux-aarch64/egg/trt_pose/utils/export_for_isaac.py to export_for_isaac.cpython-36.pyc creating stub loader for trt_pose/plugins.cpython-36m-aarch64-linux-gnu.so byte-compiling build/bdist.linux-aarch64/egg/trt_pose/plugins.py to plugins.cpython-36.pyc creating build/bdist.linux-aarch64/egg/EGG-INFO copying trt_pose.egg-info/PKG-INFO -> build/bdist.linux-aarch64/egg/EGG-INFO copying trt_pose.egg-info/SOURCES.txt -> build/bdist.linux-aarch64/egg/EGG-INFO copying trt_pose.egg-info/dependency_links.txt -> build/bdist.linux-aarch64/egg/EGG-INFO copying trt_pose.egg-info/top_level.txt -> build/bdist.linux-aarch64/egg/EGG-INFO writing build/bdist.linux-aarch64/egg/EGG-INFO/native_libs.txt zip_safe flag not set; analyzing archive contents... trt_pose.pycache.plugins.cpython-36: module references file trt_pose.models.pycache.dla.cpython-36: module references file creating 'dist/trt_pose-0.0.1-py3.6-linux-aarch64.egg' and adding 'build/bdist.linux-aarch64/egg' to it removing 'build/bdist.linux-aarch64/egg' (and everything under it) Processing trt_pose-0.0.1-py3.6-linux-aarch64.egg removing '/usr/local/lib/python3.6/dist-packages/trt_pose-0.0.1-py3.6-linux-aarch64.egg' (and everything under it) creating /usr/local/lib/python3.6/dist-packages/trt_pose-0.0.1-py3.6-linux-aarch64.egg Extracting trt_pose-0.0.1-py3.6-linux-aarch64.egg to /usr/local/lib/python3.6/dist-packages trt-pose 0.0.1 is already the active version in easy-install.pth
Installed /usr/local/lib/python3.6/dist-packages/trt_pose-0.0.1-py3.6-linux-aarch64.egg Processing dependencies for trt-pose==0.0.1 Finished processing dependencies for trt-pose==0.0.1
Hello! After setup in PC, I tried to running demo, but I got : AttributeError: module 'trt_pose.plugins' has no attribute 'find_peaks' It seems like a error missing package under plugins caused by setup.py script . Do you kown how to fix it ? THX