Comments (11)
it works.
os system: centos7 , default( protobuf 2.6.1, gcc 4.8.5)
- git clone https://github.com/CMU-Perceptual-Computing-Lab/openpose
- cd 3rdparty
- git clone https://github.com/CMU-Perceptual-Computing-Lab/caffe.git
- cd caffe
- cp Makefile.config.Ubuntu14_cuda8.example Makefile.config
- modify blas choice by changing BLAS := open
- make all # in caffe dir
- protoc src/caffe/proto/caffe.proto --cpp_out=.
- mkdir include/caffe/proto
- mv src/caffe/proto/caffe.pb.h include/caffe/proto
- cmake -DCaffe_INCLUDE_DIRS=/xxx/3rdparty/caffe/include/ -DCaffe_LIBS=/xxx/3rdparty/caffe/build/lib/libcaffe.so -DBUILD_CAFFE=OFF .. # here /xxx is absolute path of 3rdparty
- make -j[cpu count]
please keep protobuf version 2.6.1
if compile error, please update gcc version(such as gcc 7.3.1)
update gcc method:
- yum -y install centos-release-scl
- yum -y install devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-binutils
- scl enable devtoolset-7 bash
from openpose.
Just writing down the steps I ended up running to make things work on centOS.
Create and move to build directory.
Use this command to point cmake to correct libs and include dirs for an existing caffe build:
$ cmake -DCaffe_INCLUDE_DIRS=/caffe-rc3/include/ -DCaffe_LIBS=/caffe-rc3/build/lib/libcaffe.so -DBUILD_CAFFE=OFF ..
It gave the following error issuing make
:
Linking CXX executable openpose.bin
/bin/ld: /usr/local/lib/libgflags.a(gflags.cc.o): undefined reference to symbol 'pthread_rwlock_wrlock@@GLIBC_2.2.5'
/bin/ld: note: 'pthread_rwlock_wrlock@@GLIBC_2.2.5' is defined in DSO /lib64/libpthread.so.0 so try adding it to the linker command line
/lib64/libpthread.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [examples/openpose/openpose.bin] Error 1
make[1]: *** [examples/openpose/CMakeFiles/openpose.bin.dir/all] Error 2
To resolve this, I added a flag to CMakeLists.txt after which the unix sub-case looks like this:
elseif (UNIX AND NOT APPLE)
# Turn on C++11
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lpthread")
add_definitions(-std=c++11)
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
After the change, issuing cmake
and make
should build successfully.
When running the demo, make sure to use --display 0
if you face X11 issues. Full command:
$ ./build/examples/openpose/openpose.bin --net_resolution "64x48" --image_dir examples/media/ --display 0 --write_json out
from openpose.
I am sorry, but we do not have any Centos machine to try it.
The OpenPose code uses c++11 and the same dependencies than Caffe. So if you are able to compile Caffe (with CUDA and cuDNN) of you own on Centos, you should be able to install OpenPose too.
Please, if you are able to install it, a few lines with the basic steps would be highly appreciated for other Centos users.
from openpose.
Compiled OpenPose successfully.
Just as you say,modify the CAFFE_DIR ,and have an compiled caffe is enough.
When I first comment,I met the google::protobuf undefined reference problem,I solved it and can install OpenPose.
from openpose.
Great, thanks for letting us know.
from openpose.
@liaowang0125 How did you modify the CAFFE_DIR, can you please elaborate? Maybe post your makefile?
from openpose.
modify it to the path to your compiled caffe,like: path/caffe @saxenarohan97
from openpose.
@ankit204
Thanks for the feed-back. I've just pushed a fix to include pthread as you did. Could you try the latest OpenPose and let me know if it works by default? Thanks!
(PS: Instead of -lpthread, I did it in the supposedly right CMake way with find_package
, it works in Ubuntu, but I could not test it on CentOS as I don't have it)
from openpose.
@liaowang0125 ,can you tell me how do you solve the google::protobuf undefined reference problem?this is my error msg:
[ 91%] Linking CXX executable cpp_classification/classification
[ 93%] Linking CXX executable upgrade_net_proto_text
[ 93%] Linking CXX executable upgrade_net_proto_binary
[ 93%] Linking CXX executable caffe
[ 94%] Linking CXX executable upgrade_solver_proto_text
../lib/libcaffe.so.1.0.0:对‘google::protobuf::internal::AssignDescriptors(std::string const&, google::protobuf::internal::MigrationSchema const*, google::protobuf::Message const* const*, unsigned int const*, google::protobuf::Metadata*, google::protobuf::EnumDescriptor const**, google::protobuf::ServiceDescriptor const**)’未定义的引用
../lib/libcaffe.so.1.0.0:对‘google::protobuf::io::CodedInputStream::SetTotalBytesLimit(int)’未定义的引用
../lib/libcaffe.so.1.0.0:对‘google::protobuf::internal::InitSCCImpl(google::protobuf::internal::SCCInfoBase*)’未定义的引用
../lib/libcaffe.so.1.0.0:对‘google::protobuf::internal::WireFormatLite::Int64Size(google::protobuf::RepeatedField const&)’未定义的引用
collect2: 错误:ld 返回 1
../lib/libcaffe.so.1.0.0:对‘google::protobuf::internal::AssignDescriptors(std::string const&, google::protobuf::internal::MigrationSchema const*, google::protobuf::Message const* const*, unsigned int const*, google::protobuf::Metadata*, google::protobuf::EnumDescriptor const**, google::protobuf::ServiceDescriptor const**)’未定义的引用
../lib/libcaffe.so.1.0.0:对‘google::protobuf::io::CodedInputStream::SetTotalBytesLimit(int)’未定义的引用
../lib/libcaffe.so.1.0.0:对‘google::protobuf::internal::InitSCCImpl(google::protobuf::internal::SCCInfoBase*)’未定义的引用
../lib/libcaffe.so.1.0.0:对‘google::protobuf::internal::WireFormatLite::Int64Size(google::protobuf::RepeatedField const&)’未定义的引用
collect2: 错误:ld 返回 1
make[5]: *** [tools/convert_imageset] 错误 1
make[4]: *** [tools/CMakeFiles/convert_imageset.dir/all] 错误 2
make[4]: *** 正在等待未完成的任务....
make[5]: *** [examples/siamese/convert_mnist_siamese_data] 错误 1
make[4]: *** [examples/CMakeFiles/convert_mnist_siamese_data.dir/all] 错误 2
../lib/libcaffe.so.1.0.0:对‘google::protobuf::internal::AssignDescriptors(std::string const&, google::protobuf::internal::MigrationSchema const*, google::protobuf::Message const* const*, unsigned int const*, google::protobuf::Metadata*, google::protobuf::EnumDescriptor const**, google::protobuf::ServiceDescriptor const**)’未定义的引用
../lib/libcaffe.so.1.0.0:对‘google::protobuf::io::CodedInputStream::SetTotalBytesLimit(int)’未定义的引用
../lib/libcaffe.so.1.0.0:对‘google::protobuf::internal::InitSCCImpl(google::protobuf::internal::SCCInfoBase*)’未定义的引用
../lib/libcaffe.so.1.0.0:对‘google::protobuf::internal::WireFormatLite::Int64Size(google::protobuf::RepeatedField const&)’未定义的引用
../lib/libcaffe.so.1.0.0:对‘google::protobuf::internal::AssignDescriptors(std::string const&, google::collect2: 错误:ld 返回 1
protobuf::internal::MigrationSchema const*, google::protobuf::Message const* const*, unsigned int const*, google::protobuf::Metadata*, google::protobuf::EnumDescriptor const**, google::protobuf::ServiceDescriptor const**)’未定义的引用
../lib/libcaffe.so.1.0.0:对‘google::protobuf::io::CodedInputStream::SetTotalBytesLimit(int)’未定义的引用
../lib/libcaffe.so.1.0.0:对‘google::protobuf::internal::InitSCCImpl(google::protobuf::internal::SCCInfoBase*)’未定义的引用
../lib/libcaffe.so.1.0.0:对‘google::protobuf::internal::WireFormatLite::Int64Size(google::protobuf::RepeatedField const&)’未定义的引用
collect2: 错误:ld 返回 1
make[5]: *** [examples/cifar10/convert_cifar_data] 错误 1
make[5]: *** [examples/mnist/convert_mnist_data] 错误 1
make[4]: *** [examples/CMakeFiles/convert_cifar_data.dir/all] 错误 2
make[4]: *** [examples/CMakeFiles/convert_mnist_data.dir/all] 错误 2
from openpose.
Just writing down the steps I ended up running to make things work on centOS.
Create and move to build directory.
Use this command to point cmake to correct libs and include dirs for an existing caffe build:
$ cmake -DCaffe_INCLUDE_DIRS=/caffe-rc3/include/ -DCaffe_LIBS=/caffe-rc3/build/lib/libcaffe.so -DBUILD_CAFFE=OFF ..
It gave the following error issuingmake
:Linking CXX executable openpose.bin /bin/ld: /usr/local/lib/libgflags.a(gflags.cc.o): undefined reference to symbol 'pthread_rwlock_wrlock@@GLIBC_2.2.5' /bin/ld: note: 'pthread_rwlock_wrlock@@GLIBC_2.2.5' is defined in DSO /lib64/libpthread.so.0 so try adding it to the linker command line /lib64/libpthread.so.0: could not read symbols: Invalid operation collect2: error: ld returned 1 exit status make[2]: *** [examples/openpose/openpose.bin] Error 1 make[1]: *** [examples/openpose/CMakeFiles/openpose.bin.dir/all] Error 2
To resolve this, I added a flag to CMakeLists.txt after which the unix sub-case looks like this:
elseif (UNIX AND NOT APPLE) # Turn on C++11 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lpthread") add_definitions(-std=c++11) set(CMAKE_CXX_FLAGS_RELEASE "-O3")
After the change, issuing
cmake
andmake
should build successfully.
When running the demo, make sure to use--display 0
if you face X11 issues. Full command:
$ ./build/examples/openpose/openpose.bin --net_resolution "64x48" --image_dir examples/media/ --display 0 --write_json out
Is this solution still applicable today?
from openpose.
it works. os system: centos7 , default( protobuf 2.6.1, gcc 4.8.5)
- git clone https://github.com/CMU-Perceptual-Computing-Lab/openpose
- cd 3rdparty
- git clone https://github.com/CMU-Perceptual-Computing-Lab/caffe.git
- cd caffe
- cp Makefile.config.Ubuntu14_cuda8.example Makefile.config
- modify blas choice by changing BLAS := open
- make all # in caffe dir
- protoc src/caffe/proto/caffe.proto --cpp_out=.
- mkdir include/caffe/proto
- mv src/caffe/proto/caffe.pb.h include/caffe/proto
- cmake -DCaffe_INCLUDE_DIRS=/xxx/3rdparty/caffe/include/ -DCaffe_LIBS=/xxx/3rdparty/caffe/build/lib/libcaffe.so -DBUILD_CAFFE=OFF .. # here /xxx is absolute path of 3rdparty
- make -j[cpu count]
please keep protobuf version 2.6.1 if compile error, please update gcc version(such as gcc 7.3.1) update gcc method:
- yum -y install centos-release-scl
- yum -y install devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-binutils
- scl enable devtoolset-7 bash
Thank you very much. I successfully installed Openpose under centos according to your steps, and you saved me.
from openpose.
Related Issues (20)
- just copy and paste the model's directory to the release directory
- unable to install openpose in colab settings HOT 2
- I can't download any model. The URL is just loading and nothing appears HOT 2
- 3D pose estimation
- cann't use getModels.sh to download from posefs1.perception.cs.cmu.edu HOT 6
- How to select stable keypoints from a HeatMap?
- No Keypoints Detected After Running Python Examples
- Gait Analysis Output Video frame is very slow. How can I optimize the code?
- 18 keypoins output HOT 2
- Openpose with Infrared Images HOT 1
- help wanted: which data belongs to which person in the video?
- Problems with the installation HOT 5
- download Caffe, OpenCV, and Caffe prerequisites wrong bying official link, help me HOT 2
- Why cannot detect right hand keypoints in the following image?
- Problem building with CPU_ONLY:
- Release - Dockerfiles with Fixed Model Downloads - CPU / CPU + CUDA + cuDNN HOT 3
- How to modify the identification file path
- Cmake- GUI - Error in Configuration process, project files maybe in invalid
- unknown type name 'PROTOBUF_NAMESPACE_OPEN'
- OpenPose Fine-Tuning with customized data
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openpose.