diff options
author | ioctl | 2020-12-02 22:39:56 +0300 |
---|---|---|
committer | ioctl | 2020-12-02 22:39:56 +0300 |
commit | bc569a909694470758e94bdd2ceda4d1a25925cb (patch) | |
tree | 466911ee0d4ff27a6c27b3631972a4f495d0896d | |
parent | e6ee475d7889fbb1676ee5663219d5ead4d6655d (diff) | |
download | aur-bc569a909694470758e94bdd2ceda4d1a25925cb.tar.gz |
Update OpenPose version to 1.7.0. Clean build script.
-rw-r--r-- | GLU.patch | 12 | ||||
-rw-r--r-- | PKGBUILD | 20 | ||||
-rw-r--r-- | models.patch | 165 |
3 files changed, 12 insertions, 185 deletions
diff --git a/GLU.patch b/GLU.patch deleted file mode 100644 index eb6af5fe9cf4..000000000000 --- a/GLU.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/src/openpose/CMakeLists.txt b/src/openpose/CMakeLists.txt -index cedcfdb..4a918a5 100644 ---- a/src/openpose/CMakeLists.txt -+++ b/src/openpose/CMakeLists.txt -@@ -25,6 +25,7 @@ endif () - # Ubuntu - if(UNIX AND NOT APPLE) - target_link_libraries(openpose ${OpenCV_LIBS} ${Caffe_LIBS} -+ GLU - ${GFLAGS_LIBRARY} ${GLOG_LIBRARY} ${MKL_LIBS} ${GLUT_LIBRARY} ${SPINNAKER_LIB}) - if (CMAKE_COMPILER_IS_GNUCXX) - foreach (SUB_DIR ${SUB_DIRS}) @@ -2,16 +2,22 @@ # Contributor: Franck Lucien Duriez <franck.lucien.duriez@gmail.com> pkgname=openpose -pkgver=1.5.1 +pkgver=1.7.0 pkgrel=1 pkgdesc='OpenPose: Real-time multi-person keypoint detection library for body, face, hands, and foot estimation' -arch=('any') +arch=('x86_64') url='https://github.com/CMU-Perceptual-Computing-Lab/openpose' license=("ACADEMIC OR NON-PROFIT ORGANIZATION NONCOMMERCIAL RESEARCH USE ONLY") -depends=('caffe' 'intel-mkl' 'libgl' 'glu' 'lilv' 'boost') -makedepends=('cmake' 'doxygen' 'graphviz' 'wget') +depends=('caffe' 'libgl' 'glu' 'glut') +makedepends=('cmake' 'doxygen' 'graphviz' 'wget' 'boost') source=("${url}/archive/v${pkgver}.tar.gz") -md5sums=('ac27f8102c1e8c2e5b51532a46c10181') +md5sums=('178876507c11dab3da2fcd68c748d90b') + +prepare() { + mkdir -p openpose-$pkgver + cd openpose-$pkgver + find ./ -name "*.hpp" | xargs -n1 sed -i "s|models/|/usr/lib/OpenPose/models/|g" +} build() { cd "${pkgname}-${pkgver}" @@ -30,8 +36,6 @@ build() { -DDOWNLOAD_HAND_MODEL:BOOL=ON \ -DGPU_MODE:STRING=CPU_ONLY \ -DWITH_3D_RENDERER:BOOL=ON \ - -DCMAKE_CXX_FLAGS:STRING="-I/opt/intel/mkl/include" \ - -DCMAKE_C_FLAGS:STRING="-I/opt/intel/mkl/include" \ -DCaffe_INCLUDE_DIRS:PATH="/usr/include" \ -DCaffe_LIBS:PATH="/usr/lib/libcaffe.so" \ -DCMAKE_INSTALL_PREFIX:PATH="${pkgdir}/usr" \ @@ -70,4 +74,4 @@ package() { _destdir="${pkgdir}/usr/lib/OpenPose" cp -r "models" "${_destdir}" find "${_destdir}" -type f -exec chmod 644 '{}' ';' -}
\ No newline at end of file +} diff --git a/models.patch b/models.patch deleted file mode 100644 index edda81d3b65b..000000000000 --- a/models.patch +++ /dev/null @@ -1,165 +0,0 @@ -diff --git a/examples/openpose/openpose.cpp b/examples/openpose/openpose.cpp -index 711b0ad..3930674 100755 ---- a/examples/openpose/openpose.cpp -+++ b/examples/openpose/openpose.cpp -@@ -64,9 +64,9 @@ DEFINE_int32(frame_rotate, 0, "Rotate each frame, 4 po - DEFINE_bool(frames_repeat, false, "Repeat frames when finished."); - DEFINE_bool(process_real_time, false, "Enable to keep the original source frame rate (e.g. for video). If the processing time is" - " too long, it will skip frames. If it is too fast, it will slow it down."); --DEFINE_string(camera_parameter_folder, "models/cameraParameters/flir/", "String with the folder where the camera parameters are located."); -+DEFINE_string(camera_parameter_folder, "/usr/lib/OpenPose/models/cameraParameters/flir/", "String with the folder where the camera parameters are located."); - // OpenPose --DEFINE_string(model_folder, "models/", "Folder path (absolute or relative) where the models (pose, face, ...) are located."); -+DEFINE_string(model_folder, "", "Folder path (absolute or relative) where the models (pose, face, ...) are located."); - DEFINE_string(output_resolution, "-1x-1", "The image resolution (display and output). Use \"-1x-1\" to force the program to use the" - " input image resolution."); - DEFINE_int32(num_gpu, -1, "The number of GPU devices to use. If negative, it will use all the available GPUs in your" -diff --git a/examples/tests/handFromJsonTest.cpp b/examples/tests/handFromJsonTest.cpp -index c6925a9..822ec88 100644 ---- a/examples/tests/handFromJsonTest.cpp -+++ b/examples/tests/handFromJsonTest.cpp -@@ -18,7 +18,7 @@ DEFINE_int32(logging_level, 3, ""); - DEFINE_string(image_dir, "", ""); - DEFINE_string(hand_ground_truth, "", ""); - // OpenPose --DEFINE_string(model_folder, "models/", ""); -+DEFINE_string(model_folder, "/usr/lib/OpenPose/models/", ""); - DEFINE_int32(num_gpu, -1, ""); - DEFINE_int32(num_gpu_start, 0, ""); - // OpenPose Hand -@@ -60,7 +60,7 @@ int handFromJsonTest() - op::WrapperStructPose wrapperStructPose{false, op::flagsToPoint("656x368"), op::flagsToPoint("1280x720"), - op::ScaleMode::InputResolution, FLAGS_num_gpu, FLAGS_num_gpu_start, - 1, 0.15f, op::RenderMode::None, op::PoseModel::COCO_18, -- true, 0.f, 0.f, 0, "models/", {}, op::ScaleMode::ZeroToOne, false, -+ true, 0.f, 0.f, 0, "/usr/lib/OpenPose/models/", {}, op::ScaleMode::ZeroToOne, false, - 0.05f, -1, enableGoogleLogging, false, identification}; - wrapperStructPose.modelFolder = FLAGS_model_folder; - // Hand configuration (use op::WrapperStructHand{} to disable it) -diff --git a/examples/tutorial_add_module/1_custom_post_processing.cpp b/examples/tutorial_add_module/1_custom_post_processing.cpp -index 54b9d13..e4f489d 100644 ---- a/examples/tutorial_add_module/1_custom_post_processing.cpp -+++ b/examples/tutorial_add_module/1_custom_post_processing.cpp -@@ -73,9 +73,9 @@ DEFINE_int32(frame_rotate, 0, "Rotate each frame, 4 po - DEFINE_bool(frames_repeat, false, "Repeat frames when finished."); - DEFINE_bool(process_real_time, false, "Enable to keep the original source frame rate (e.g. for video). If the processing time is" - " too long, it will skip frames. If it is too fast, it will slow it down."); --DEFINE_string(camera_parameter_folder, "models/cameraParameters/flir/", "String with the folder where the camera parameters are located."); -+DEFINE_string(camera_parameter_folder, "/usr/lib/OpenPose/models/cameraParameters/flir/", "String with the folder where the camera parameters are located."); - // OpenPose --DEFINE_string(model_folder, "models/", "Folder path (absolute or relative) where the models (pose, face, ...) are located."); -+DEFINE_string(model_folder, "/usr/lib/OpenPose/models/", "Folder path (absolute or relative) where the models (pose, face, ...) are located."); - DEFINE_string(output_resolution, "-1x-1", "The image resolution (display and output). Use \"-1x-1\" to force the program to use the" - " input image resolution."); - DEFINE_int32(num_gpu, -1, "The number of GPU devices to use. If negative, it will use all the available GPUs in your" -diff --git a/examples/tutorial_pose/1_extract_from_image.cpp b/examples/tutorial_pose/1_extract_from_image.cpp -index b0a75c9..8d37f86 100644 ---- a/examples/tutorial_pose/1_extract_from_image.cpp -+++ b/examples/tutorial_pose/1_extract_from_image.cpp -@@ -34,7 +34,7 @@ DEFINE_string(image_path, "examples/media/COCO_val2014_00000000019 - // OpenPose - DEFINE_string(model_pose, "COCO", "Model to be used. E.g. `COCO` (18 keypoints), `MPI` (15 keypoints, ~10% faster), " - "`MPI_4_layers` (15 keypoints, even faster but less accurate)."); --DEFINE_string(model_folder, "models/", "Folder path (absolute or relative) where the models (pose, face, ...) are located."); -+DEFINE_string(model_folder, "/usr/lib/OpenPose/models/", "Folder path (absolute or relative) where the models (pose, face, ...) are located."); - DEFINE_string(net_resolution, "-1x368", "Multiples of 16. If it is increased, the accuracy potentially increases. If it is" - " decreased, the speed increases. For maximum speed-accuracy balance, it should keep the" - " closest aspect ratio possible to the images or videos to be processed. Using `-1` in" -diff --git a/examples/tutorial_pose/2_extract_pose_or_heatmat_from_image.cpp b/examples/tutorial_pose/2_extract_pose_or_heatmat_from_image.cpp -index b2c2bee..9e1afc9 100644 ---- a/examples/tutorial_pose/2_extract_pose_or_heatmat_from_image.cpp -+++ b/examples/tutorial_pose/2_extract_pose_or_heatmat_from_image.cpp -@@ -34,7 +34,7 @@ DEFINE_string(image_path, "examples/media/COCO_val2014_00000000019 - // OpenPose - DEFINE_string(model_pose, "COCO", "Model to be used. E.g. `COCO` (18 keypoints), `MPI` (15 keypoints, ~10% faster), " - "`MPI_4_layers` (15 keypoints, even faster but less accurate)."); --DEFINE_string(model_folder, "models/", "Folder path (absolute or relative) where the models (pose, face, ...) are located."); -+DEFINE_string(model_folder, "/usr/lib/OpenPose/models/", "Folder path (absolute or relative) where the models (pose, face, ...) are located."); - DEFINE_string(net_resolution, "-1x368", "Multiples of 16. If it is increased, the accuracy potentially increases. If it is" - " decreased, the speed increases. For maximum speed-accuracy balance, it should keep the" - " closest aspect ratio possible to the images or videos to be processed. Using `-1` in" -diff --git a/examples/tutorial_thread/1_openpose_read_and_display.cpp b/examples/tutorial_thread/1_openpose_read_and_display.cpp -index 2003d28..a2def83 100644 ---- a/examples/tutorial_thread/1_openpose_read_and_display.cpp -+++ b/examples/tutorial_thread/1_openpose_read_and_display.cpp -@@ -44,7 +44,7 @@ DEFINE_bool(flir_camera, false, "Whether to use FLIR (Po - DEFINE_string(ip_camera, "", "String with the IP camera URL. It supports protocols like RTSP and HTTP."); - DEFINE_bool(process_real_time, false, "Enable to keep the original source frame rate (e.g. for video). If the processing time is" - " too long, it will skip frames. If it is too fast, it will slow it down."); --DEFINE_string(camera_parameter_folder, "models/cameraParameters/flir/", "String with the folder where the camera parameters are located."); -+DEFINE_string(camera_parameter_folder, "/usr/lib/OpenPose/models/cameraParameters/flir/", "String with the folder where the camera parameters are located."); - // OpenPose - DEFINE_string(output_resolution, "-1x-1", "The image resolution (display and output). Use \"-1x-1\" to force the program to use the" - " input image resolution."); -diff --git a/examples/tutorial_thread/2_user_processing_function.cpp b/examples/tutorial_thread/2_user_processing_function.cpp -index b098502..2662284 100644 ---- a/examples/tutorial_thread/2_user_processing_function.cpp -+++ b/examples/tutorial_thread/2_user_processing_function.cpp -@@ -45,7 +45,7 @@ DEFINE_bool(flir_camera, false, "Whether to use FLIR (Po - DEFINE_string(ip_camera, "", "String with the IP camera URL. It supports protocols like RTSP and HTTP."); - DEFINE_bool(process_real_time, false, "Enable to keep the original source frame rate (e.g. for video). If the processing time is" - " too long, it will skip frames. If it is too fast, it will slow it down."); --DEFINE_string(camera_parameter_folder, "models/cameraParameters/flir/", "String with the folder where the camera parameters are located."); -+DEFINE_string(camera_parameter_folder, "/usr/lib/OpenPose/models/cameraParameters/flir/", "String with the folder where the camera parameters are located."); - // OpenPose - DEFINE_string(output_resolution, "-1x-1", "The image resolution (display and output). Use \"-1x-1\" to force the program to use the" - " input image resolution."); -diff --git a/examples/tutorial_wrapper/1_user_asynchronous_output.cpp b/examples/tutorial_wrapper/1_user_asynchronous_output.cpp -index 181113f..dcead2d 100644 ---- a/examples/tutorial_wrapper/1_user_asynchronous_output.cpp -+++ b/examples/tutorial_wrapper/1_user_asynchronous_output.cpp -@@ -63,9 +63,9 @@ DEFINE_int32(frame_rotate, 0, "Rotate each frame, 4 po - DEFINE_bool(frames_repeat, false, "Repeat frames when finished."); - DEFINE_bool(process_real_time, false, "Enable to keep the original source frame rate (e.g. for video). If the processing time is" - " too long, it will skip frames. If it is too fast, it will slow it down."); --DEFINE_string(camera_parameter_folder, "models/cameraParameters/flir/", "String with the folder where the camera parameters are located."); -+DEFINE_string(camera_parameter_folder, "/usr/lib/OpenPose/models/cameraParameters/flir/", "String with the folder where the camera parameters are located."); - // OpenPose --DEFINE_string(model_folder, "models/", "Folder path (absolute or relative) where the models (pose, face, ...) are located."); -+DEFINE_string(model_folder, "/usr/lib/OpenPose/models/", "Folder path (absolute or relative) where the models (pose, face, ...) are located."); - DEFINE_string(output_resolution, "-1x-1", "The image resolution (display and output). Use \"-1x-1\" to force the program to use the" - " input image resolution."); - DEFINE_int32(num_gpu, -1, "The number of GPU devices to use. If negative, it will use all the available GPUs in your" -diff --git a/examples/tutorial_wrapper/2_user_synchronous.cpp b/examples/tutorial_wrapper/2_user_synchronous.cpp -index 606321c..006632d 100644 ---- a/examples/tutorial_wrapper/2_user_synchronous.cpp -+++ b/examples/tutorial_wrapper/2_user_synchronous.cpp -@@ -46,7 +46,7 @@ DEFINE_string(image_dir, "examples/media/", "Process a direc - DEFINE_double(camera_fps, 30.0, "Frame rate for the webcam (also used when saving video). Set this value to the minimum" - " value between the OpenPose displayed speed and the webcam real frame rate."); - // OpenPose --DEFINE_string(model_folder, "models/", "Folder path (absolute or relative) where the models (pose, face, ...) are located."); -+DEFINE_string(model_folder, "/usr/lib/OpenPose/models/", "Folder path (absolute or relative) where the models (pose, face, ...) are located."); - DEFINE_string(output_resolution, "-1x-1", "The image resolution (display and output). Use \"-1x-1\" to force the program to use the" - " input image resolution."); - DEFINE_int32(num_gpu, -1, "The number of GPU devices to use. If negative, it will use all the available GPUs in your" -diff --git a/examples/tutorial_wrapper/3_user_asynchronous.cpp b/examples/tutorial_wrapper/3_user_asynchronous.cpp -index 085be55..cbf20a6 100644 ---- a/examples/tutorial_wrapper/3_user_asynchronous.cpp -+++ b/examples/tutorial_wrapper/3_user_asynchronous.cpp -@@ -46,7 +46,7 @@ DEFINE_string(image_dir, "examples/media/", "Process a direc - DEFINE_double(camera_fps, 30.0, "Frame rate for the webcam (also used when saving video). Set this value to the minimum" - " value between the OpenPose displayed speed and the webcam real frame rate."); - // OpenPose --DEFINE_string(model_folder, "models/", "Folder path (absolute or relative) where the models (pose, face, ...) are located."); -+DEFINE_string(model_folder, "/usr/lib/OpenPose/models/", "Folder path (absolute or relative) where the models (pose, face, ...) are located."); - DEFINE_string(output_resolution, "-1x-1", "The image resolution (display and output). Use \"-1x-1\" to force the program to use the" - " input image resolution."); - DEFINE_int32(num_gpu, -1, "The number of GPU devices to use. If negative, it will use all the available GPUs in your" -diff --git a/src/openpose/pose/poseExtractorCaffe.cpp b/src/openpose/pose/poseExtractorCaffe.cpp -index e59513b..7033d94 100644 ---- a/src/openpose/pose/poseExtractorCaffe.cpp -+++ b/src/openpose/pose/poseExtractorCaffe.cpp -@@ -110,9 +110,10 @@ namespace op - try - { - // Add Caffe Net -+ std::string folder = modelFolder.empty() ? "/usr/lib/OpenPose/models/" : modelFolder; - netCaffe.emplace_back( -- std::make_shared<NetCaffe>(modelFolder + getPoseProtoTxt(poseModel), -- modelFolder + getPoseTrainedModel(poseModel), -+ std::make_shared<NetCaffe>(folder + getPoseProtoTxt(poseModel), -+ folder + getPoseTrainedModel(poseModel), - gpuId, enableGoogleLogging) - ); - // Initializing them on the thread |