From c9fbc7b685a7bc022f26009e01787f7e2efd1cb8 Mon Sep 17 00:00:00 2001 From: gineshidalgo99 Date: Thu, 17 May 2018 11:28:47 -0400 Subject: [PATCH] Tracking out of experimental --- .github/issue_template.md | 37 +++++++++++++------ doc/contributors.md | 7 ++-- doc/installation.md | 2 +- doc/release_notes.md | 2 + include/openpose/experimental/headers.hpp | 7 ---- .../experimental/producer/headers.hpp | 7 ---- .../producer/wPeoplePoseLoader.hpp | 28 -------------- .../experimental/tracking/headers.hpp | 9 ----- include/openpose/headers.hpp | 6 +-- include/openpose/pose/poseExtractor.hpp | 4 +- include/openpose/tracking/headers.hpp | 9 +++++ .../tracking/personIdExtractor.hpp | 0 .../tracking/personTracker.hpp | 1 - .../tracking/pyramidalLK.hpp | 0 .../tracking/wPersonIdExtractor.hpp | 2 +- include/openpose/wrapper/wrapper.hpp | 4 +- src/openpose/CMakeLists.txt | 11 +++--- src/openpose/experimental/CMakeLists.txt | 8 ---- .../tracking/CMakeLists.txt | 0 .../tracking/defineTemplates.cpp | 2 +- .../tracking/personIdExtractor.cpp | 4 +- .../tracking/personTracker.cpp | 4 +- .../tracking/pyramidalLK.cpp | 2 +- .../tracking/pyramidalLK.cu | 2 +- 24 files changed, 63 insertions(+), 95 deletions(-) delete mode 100644 include/openpose/experimental/headers.hpp delete mode 100644 include/openpose/experimental/producer/headers.hpp delete mode 100644 include/openpose/experimental/producer/wPeoplePoseLoader.hpp delete mode 100644 include/openpose/experimental/tracking/headers.hpp create mode 100644 include/openpose/tracking/headers.hpp rename include/openpose/{experimental => }/tracking/personIdExtractor.hpp (100%) rename include/openpose/{experimental => }/tracking/personTracker.hpp (97%) rename include/openpose/{experimental => }/tracking/pyramidalLK.hpp (100%) rename include/openpose/{experimental => }/tracking/wPersonIdExtractor.hpp (97%) delete mode 100644 src/openpose/experimental/CMakeLists.txt rename src/openpose/{experimental => }/tracking/CMakeLists.txt (100%) rename src/openpose/{experimental => }/tracking/defineTemplates.cpp (54%) rename src/openpose/{experimental => }/tracking/personIdExtractor.cpp (99%) rename src/openpose/{experimental => }/tracking/personTracker.cpp (99%) rename src/openpose/{experimental => }/tracking/pyramidalLK.cpp (99%) rename src/openpose/{experimental => }/tracking/pyramidalLK.cu (99%) diff --git a/.github/issue_template.md b/.github/issue_template.md index a5f25ea7..8853fd00 100644 --- a/.github/issue_template.md +++ b/.github/issue_template.md @@ -36,14 +36,29 @@ You might select multiple topics, delete the rest: ### Your System Configuration -**Operating system** (`lsb_release -a` in Ubuntu): -**Installation mode**: CMake, sh script, manual Makefile installation, ... (Ubuntu); VS2015, VS2017, CMake, ... (Windows); ...? -**CUDA version** (`cat /usr/local/cuda/version.txt` in most cases): -**cuDNN version**: -**CMake version** (`cmake --version` in Ubuntu): -**Release or Debug mode**? (by defualt: release): -**3-D Reconstruction module added**? (by default: no): -**GPU model** (`nvidia-smi` in Ubuntu): -**Caffe version**: Default from OpenPose, custom version, ...? -**OpenCV version**: pre-compiled `apt-get install libopencv-dev` (only Ubuntu); OpenPose default (only Windows); compiled from source? If so, 2.4.9, 2.4.12, 3.1, 3.2?; ...? -Compiler (`gcc --version` in Ubuntu): +1. **General configuration**: + - **Installation mode**: CMake, sh script, manual Makefile installation, ... (Ubuntu); CMake, ... (Windows); ...? + - **Operating system** (`lsb_release -a` in Ubuntu): + - **Release or Debug mode**? (by defualt: release): + - Compiler (`gcc --version` in Ubuntu or VS version in Windows): 5.4.0, ... (Ubuntu); VS2015 Enterprise Update 3, VS2017 community, ... (Windows); ...? + +2. **Non-default settings**: + - **3-D Reconstruction module added**? (by default: no): + - Any other custom CMake configuration with respect to the default version? (by default: no): + +3. **3rd-party software**: + - **Caffe version**: Default from OpenPose, custom version, ...? + - **CMake version** (`cmake --version` in Ubuntu): + - **OpenCV version**: pre-compiled `apt-get install libopencv-dev` (only Ubuntu); OpenPose default (only Windows); compiled from source? If so, 2.4.9, 2.4.12, 3.1, 3.2?; ...? + +4. If **GPU mode** issue: + - **CUDA version** (`cat /usr/local/cuda/version.txt` in most cases): + - **cuDNN version**: + - **GPU model** (`nvidia-smi` in Ubuntu): + +5. If **CPU-only mode** issue: + - **CPU model**: + - Total **RAM memory** available: + +6. If **speed performance** issue: + - Report OpenPose timing speed based on [this link](https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/installation.md#profiling-speed). diff --git a/doc/contributors.md b/doc/contributors.md index 227c2a20..88b52992 100644 --- a/doc/contributors.md +++ b/doc/contributors.md @@ -11,6 +11,7 @@ OpenPose is authored by [Gines Hidalgo](https://www.gineshidalgo.com/), [Zhe Cao ### Contributors We would also like to thank the following people who have highly contributed to OpenPose: -1. [Yaadhav Raaj](https://www.linkedin.com/in/yaadhavraaj): OpenPose maintainer, CPU version, and OpenCL version. -2. [Bikramjot Hanzra](https://www.linkedin.com/in/bikz05): former OpenPose maintainer, CMake (Ubuntu and Windows) version, and Travis Build. -3. [Helen Medina](https://github.com/helen-medina): Initial Windows version. +1. [Yaadhav Raaj](https://www.linkedin.com/in/yaadhavraaj): OpenPose maintainer, CPU version, OpenCL version, and person tracker. +2. [Bikramjot Hanzra](https://www.linkedin.com/in/bikz05): Former OpenPose maintainer, CMake (Ubuntu and Windows) version, and Travis Build. +3. [Luis Fernando Fraga](https://github.com/fragalfernando/): Implementation of Lukas-Kanade algorith and person ID extractor. +4. [Helen Medina](https://github.com/helen-medina): Initial Windows version. diff --git a/doc/installation.md b/doc/installation.md index 5278d7a4..e650801f 100644 --- a/doc/installation.md +++ b/doc/installation.md @@ -235,7 +235,7 @@ To manually select the CPU Version, open CMake GUI mentioned above, and set the - On Ubuntu, OpenPose will link against the Intel MKL version (Math Kernel Library) of Caffe. Alternatively, the user can choose his own Caffe version, by unselecting `USE_MKL` and selecting his own Caffe path. - On Windows, it will use the default version of Caffe or one provided by the user on the CPU. -The default CPU version takes ~0.2 seconds per image on Ubuntu (~50x slower than GPU) while the MKL version provides a roughly 2x speedup at ~0.4 seconds. As of now OpenPose does not support MKL on Windows but will at a later date. Also, MKL version does not support unfixed resolution. So a folder of images of different resolutions with openpose, requires the `--net_resolution 656x368` flag for example. +The default CPU version takes ~0.2 images per second on Ubuntu (~50x slower than GPU) while the MKL version provides a roughly 2x speedup at ~0.4 images per second. As of now OpenPose does not support MKL on Windows but will at a later date. Also, MKL version does not support unfixed resolution. So a folder of images of different resolutions requires a fixed net resolution (e.g., `--net_resolution 656x368`). The user can configure the environmental variables `MKL_NUM_THREADS` and `OMP_NUM_THREADS`. They are set at an optimum parameter level by default (i.e., to the number of threads of the machine). However, they can be tweak by running the following commands into the terminal window, right before running any OpenPose application. Eg: ``` diff --git a/doc/release_notes.md b/doc/release_notes.md index 7bde419a..f207973d 100644 --- a/doc/release_notes.md +++ b/doc/release_notes.md @@ -220,10 +220,12 @@ OpenPose Library - Release Notes 5. Function `scaleKeypoints(Array& keypoints, const float scale)` also accepts 3D keypoints. 6. 3D keypoints and camera parameters in meters (instead of millimeters) in order to reduce numerical errors. 7. New `PoseExtractor` class to contain future ID and tracking algorithms as well as the current OpenPose keypoint detection algorithm. + 8. Added initial alpha versions of the `tracking` and `identification` modules (for now disabled but available in the source code), including `PersonIdExtractor` and `PersonTracker`. `PersonIdExtractor` includes greedy matrix OP-LK matching. 2. Functions or parameters renamed: 1. Removed scale parameter from hand and face rectangle extractor (causing wrong results if custom `--output_resolution`). 2. Functions `scaleKeypoints`, other than `scaleKeypoints(Array& keypoints, const float scale)`, renamed as `scaleKeypoints2d`. 3. `(W)PoseExtractor` renamed to `(W)PoseExtractorNet` to distinguish from new `PoseExtractor`. Analogously with `(W)FaceExtractorNet` and `(W)HandExtractorNet`. + 4. Experimental module removed and internal `tracking` folder moved to main openpose folder. 3. Main bugs fixed: 1. Fixed hand and face extraction and rendering scaling issues when `--output_resolution` is not the default one. 2. Part candidates (`--part_candidates`) are saved with the same scale than the final keypoints itself. diff --git a/include/openpose/experimental/headers.hpp b/include/openpose/experimental/headers.hpp deleted file mode 100644 index 04520211..00000000 --- a/include/openpose/experimental/headers.hpp +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef OPENPOSE_EXPERIMENTAL_HEADERS_HPP -#define OPENPOSE_EXPERIMENTAL_HEADERS_HPP - -// experimental modules -#include - -#endif // OPENPOSE_EXPERIMENTAL_HEADERS_HPP diff --git a/include/openpose/experimental/producer/headers.hpp b/include/openpose/experimental/producer/headers.hpp deleted file mode 100644 index 24f66e77..00000000 --- a/include/openpose/experimental/producer/headers.hpp +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef OPENPOSE_EXPERIMENTAL_PRODUCER_HEADERS_HPP -#define OPENPOSE_EXPERIMENTAL_PRODUCER_HEADERS_HPP - -// producer module -// #include - -#endif // OPENPOSE_EXPERIMENTAL_PRODUCER_HEADERS_HPP diff --git a/include/openpose/experimental/producer/wPeoplePoseLoader.hpp b/include/openpose/experimental/producer/wPeoplePoseLoader.hpp deleted file mode 100644 index b5acd1a9..00000000 --- a/include/openpose/experimental/producer/wPeoplePoseLoader.hpp +++ /dev/null @@ -1,28 +0,0 @@ -// TODO: IMPLEMENT THIS CLASS so that we can: - // 1. Pre-process whole video and save people pose - // 2. Real-time showing it by loading this + original video - -// #ifndef OPENPOSE_PRODUCER_W_POSE_LOADER_HPP -// #define OPENPOSE_PRODUCER_W_POSE_LOADER_HPP - -// namespace op -// { -// template -// class wPoseLoader : public Worker -// { -// public: -// explicit WPoseLoader() -// { -// } -// bool work(TDatums& datums, const bool isValidFrame) -// { -// } - -// private: -// const WPoseLoader mFormat; -// }; - -// COMPILE_TEMPLATE_DATUM(WPoseLoader); -// } - -// #endif // OPENPOSE_PRODUCER_W_POSE_LOADER_HPP diff --git a/include/openpose/experimental/tracking/headers.hpp b/include/openpose/experimental/tracking/headers.hpp deleted file mode 100644 index 41e6f916..00000000 --- a/include/openpose/experimental/tracking/headers.hpp +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef OPENPOSE_TRACKING_HEADERS_HPP -#define OPENPOSE_TRACKING_HEADERS_HPP - -// tracking module -#include -#include -#include - -#endif // OPENPOSE_TRACKING_HEADERS_HPP diff --git a/include/openpose/headers.hpp b/include/openpose/headers.hpp index 41df8706..c5702df7 100644 --- a/include/openpose/headers.hpp +++ b/include/openpose/headers.hpp @@ -7,9 +7,6 @@ // core module #include -// experimental module -#include - // face module #include @@ -34,6 +31,9 @@ // threading module #include +// tracking module +#include + // utilities module #include diff --git a/include/openpose/pose/poseExtractor.hpp b/include/openpose/pose/poseExtractor.hpp index d64342bf..f66601d6 100644 --- a/include/openpose/pose/poseExtractor.hpp +++ b/include/openpose/pose/poseExtractor.hpp @@ -6,8 +6,8 @@ #include #include #include -#include -#include +#include +#include namespace op { diff --git a/include/openpose/tracking/headers.hpp b/include/openpose/tracking/headers.hpp new file mode 100644 index 00000000..d2daf852 --- /dev/null +++ b/include/openpose/tracking/headers.hpp @@ -0,0 +1,9 @@ +#ifndef OPENPOSE_TRACKING_HEADERS_HPP +#define OPENPOSE_TRACKING_HEADERS_HPP + +// tracking module +#include +#include +#include + +#endif // OPENPOSE_TRACKING_HEADERS_HPP diff --git a/include/openpose/experimental/tracking/personIdExtractor.hpp b/include/openpose/tracking/personIdExtractor.hpp similarity index 100% rename from include/openpose/experimental/tracking/personIdExtractor.hpp rename to include/openpose/tracking/personIdExtractor.hpp diff --git a/include/openpose/experimental/tracking/personTracker.hpp b/include/openpose/tracking/personTracker.hpp similarity index 97% rename from include/openpose/experimental/tracking/personTracker.hpp rename to include/openpose/tracking/personTracker.hpp index 589f6c7a..75c3798a 100644 --- a/include/openpose/experimental/tracking/personTracker.hpp +++ b/include/openpose/tracking/personTracker.hpp @@ -4,7 +4,6 @@ #include #include #include -#include namespace op { diff --git a/include/openpose/experimental/tracking/pyramidalLK.hpp b/include/openpose/tracking/pyramidalLK.hpp similarity index 100% rename from include/openpose/experimental/tracking/pyramidalLK.hpp rename to include/openpose/tracking/pyramidalLK.hpp diff --git a/include/openpose/experimental/tracking/wPersonIdExtractor.hpp b/include/openpose/tracking/wPersonIdExtractor.hpp similarity index 97% rename from include/openpose/experimental/tracking/wPersonIdExtractor.hpp rename to include/openpose/tracking/wPersonIdExtractor.hpp index ccca5d19..0d8bc23a 100644 --- a/include/openpose/experimental/tracking/wPersonIdExtractor.hpp +++ b/include/openpose/tracking/wPersonIdExtractor.hpp @@ -3,7 +3,7 @@ #include #include -#include +#include namespace op { diff --git a/include/openpose/wrapper/wrapper.hpp b/include/openpose/wrapper/wrapper.hpp index 22511abe..7594777e 100644 --- a/include/openpose/wrapper/wrapper.hpp +++ b/include/openpose/wrapper/wrapper.hpp @@ -261,14 +261,14 @@ namespace op // Implementation #include #include -#include #include #include -#include #include +#include #include #include #include +#include #include #include #include diff --git a/src/openpose/CMakeLists.txt b/src/openpose/CMakeLists.txt index d48a7f9f..93d20bb1 100644 --- a/src/openpose/CMakeLists.txt +++ b/src/openpose/CMakeLists.txt @@ -10,11 +10,12 @@ file(GLOB_RECURSE OP_HEADERS_UNFILTERED "${CMAKE_SOURCE_DIR}/include/openpose/*. "${CMAKE_SOURCE_DIR}/include/openpose/*.hu") set(OP_HEADERS "") -foreach (FILE ${OP_HEADERS_UNFILTERED}) - if (NOT FILE MATCHES "${CMAKE_SOURCE_DIR}/include/openpose/experimental/*") - list(APPEND OP_HEADERS ${FILE}) - endif () -endforeach(FILE ${OP_HEADERS_UNFILTERED}) +# # Add experimental sub-folders +# foreach (FILE ${OP_HEADERS_UNFILTERED}) +# if (NOT FILE MATCHES "${CMAKE_SOURCE_DIR}/include/openpose/experimental/*") +# list(APPEND OP_HEADERS ${FILE}) +# endif () +# endforeach(FILE ${OP_HEADERS_UNFILTERED}) if (${GPU_MODE} MATCHES "CUDA") cuda_add_library(openpose ${SOURCES_OPENPOSE} ${OP_HEADERS}) diff --git a/src/openpose/experimental/CMakeLists.txt b/src/openpose/experimental/CMakeLists.txt deleted file mode 100644 index baac2abe..00000000 --- a/src/openpose/experimental/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -add_subdirectory(tracking) - -if (UNIX AND NOT APPLE) - add_custom_target(openpose_experimental) - add_dependencies(openpose_experimental openpose_tracking) -endif (UNIX AND NOT APPLE) - -set(SOURCES_OPENPOSE ${SOURCES_OPENPOSE} PARENT_SCOPE) diff --git a/src/openpose/experimental/tracking/CMakeLists.txt b/src/openpose/tracking/CMakeLists.txt similarity index 100% rename from src/openpose/experimental/tracking/CMakeLists.txt rename to src/openpose/tracking/CMakeLists.txt diff --git a/src/openpose/experimental/tracking/defineTemplates.cpp b/src/openpose/tracking/defineTemplates.cpp similarity index 54% rename from src/openpose/experimental/tracking/defineTemplates.cpp rename to src/openpose/tracking/defineTemplates.cpp index 33ec4e15..baafab87 100644 --- a/src/openpose/experimental/tracking/defineTemplates.cpp +++ b/src/openpose/tracking/defineTemplates.cpp @@ -1,4 +1,4 @@ -#include +#include namespace op { diff --git a/src/openpose/experimental/tracking/personIdExtractor.cpp b/src/openpose/tracking/personIdExtractor.cpp similarity index 99% rename from src/openpose/experimental/tracking/personIdExtractor.cpp rename to src/openpose/tracking/personIdExtractor.cpp index 460e70b9..0918ee4a 100644 --- a/src/openpose/experimental/tracking/personIdExtractor.cpp +++ b/src/openpose/tracking/personIdExtractor.cpp @@ -1,7 +1,7 @@ #include -#include +#include #include -#include +#include // #define LK_CUDA diff --git a/src/openpose/experimental/tracking/personTracker.cpp b/src/openpose/tracking/personTracker.cpp similarity index 99% rename from src/openpose/experimental/tracking/personTracker.cpp rename to src/openpose/tracking/personTracker.cpp index ec52eba5..e785fbb8 100644 --- a/src/openpose/experimental/tracking/personTracker.cpp +++ b/src/openpose/tracking/personTracker.cpp @@ -1,8 +1,8 @@ #include #include #include // cv::resize -#include -#include +#include +#include namespace op { diff --git a/src/openpose/experimental/tracking/pyramidalLK.cpp b/src/openpose/tracking/pyramidalLK.cpp similarity index 99% rename from src/openpose/experimental/tracking/pyramidalLK.cpp rename to src/openpose/tracking/pyramidalLK.cpp index 31387996..4406e66a 100644 --- a/src/openpose/experimental/tracking/pyramidalLK.cpp +++ b/src/openpose/tracking/pyramidalLK.cpp @@ -3,7 +3,7 @@ #include // cv::pyrDown #include // cv::buildOpticalFlowPyramid #include -#include +#include #if defined (WITH_SSE4) #include diff --git a/src/openpose/experimental/tracking/pyramidalLK.cu b/src/openpose/tracking/pyramidalLK.cu similarity index 99% rename from src/openpose/experimental/tracking/pyramidalLK.cu rename to src/openpose/tracking/pyramidalLK.cu index 2a438cf9..bef3e6dc 100644 --- a/src/openpose/experimental/tracking/pyramidalLK.cu +++ b/src/openpose/tracking/pyramidalLK.cu @@ -14,7 +14,7 @@ #define cvCuda cv::cuda #endif #endif -#include +#include // Error codes for kernel caller #define IMAGE_SIZES_NEQUAL -1 -- GitLab