Laurent Berger commited on
Commit
9665382
·
1 Parent(s): 3b8b9d5

Pose estimation mp (#186)

Browse files

* pose estimation mediapie

* review 1
r Please enter the commit message for your changes. Lines starting

* review 2

* typo

* review 3

* review 4

models/pose_estimation_mediapipe/CMakeLists.txt ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cmake_minimum_required(VERSION 3.24)
2
+ set(project_name "opencv_zoo_pose_estimation_mediapipe")
3
+
4
+ PROJECT (${project_name})
5
+
6
+ set(OPENCV_VERSION "4.8.0")
7
+ set(OPENCV_INSTALLATION_PATH "" CACHE PATH "Where to look for OpenCV installation")
8
+ find_package(OpenCV ${OPENCV_VERSION} REQUIRED HINTS ${OPENCV_INSTALLATION_PATH})
9
+ # Find OpenCV, you may need to set OpenCV_DIR variable
10
+ # to the absolute path to the directory containing OpenCVConfig.cmake file
11
+ # via the command line or GUI
12
+
13
+ file(GLOB SourceFile
14
+ "demo.cpp")
15
+ # If the package has been found, several variables will
16
+ # be set, you can find the full list with descriptions
17
+ # in the OpenCVConfig.cmake file.
18
+ # Print some message showing some of them
19
+ message(STATUS "OpenCV library status:")
20
+ message(STATUS " config: ${OpenCV_DIR}")
21
+ message(STATUS " version: ${OpenCV_VERSION}")
22
+ message(STATUS " libraries: ${OpenCV_LIBS}")
23
+ message(STATUS " include path: ${OpenCV_INCLUDE_DIRS}")
24
+
25
+ # Declare the executable target built from your sources
26
+ add_executable(${project_name} ${SourceFile})
27
+
28
+ # Link your application with OpenCV libraries
29
+ target_link_libraries(${project_name} PRIVATE ${OpenCV_LIBS})
models/pose_estimation_mediapipe/README.md CHANGED
@@ -12,6 +12,8 @@ This model is converted from TFlite to ONNX using following tools:
12
  - Visit https://github.com/google/mediapipe/blob/master/docs/solutions/models.md#pose for models of larger scale.
13
  ## Demo
14
 
 
 
15
  Run the following commands to try the demo:
16
  ```bash
17
  # detect on camera input
@@ -19,6 +21,22 @@ python demo.py
19
  # detect on an image
20
  python demo.py -i /path/to/image -v
21
  ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
  ### Example outputs
24
 
 
12
  - Visit https://github.com/google/mediapipe/blob/master/docs/solutions/models.md#pose for models of larger scale.
13
  ## Demo
14
 
15
+ ### python
16
+
17
  Run the following commands to try the demo:
18
  ```bash
19
  # detect on camera input
 
21
  # detect on an image
22
  python demo.py -i /path/to/image -v
23
  ```
24
+ ### C++
25
+
26
+ Install latest OpenCV and CMake >= 3.24.0 to get started with:
27
+
28
+ ```shell
29
+ # A typical and default installation path of OpenCV is /usr/local
30
+ cmake -B build -D OPENCV_INSTALLATION_PATH=/path/to/opencv/installation .
31
+ cmake --build build
32
+
33
+ # detect on camera input
34
+ ./build/opencv_zoo_pose_estimation_mediapipe
35
+ # detect on an image
36
+ ./build/opencv_zoo_pose_estimation_mediapipe -m=/path/to/model -i=/path/to/image -v
37
+ # get help messages
38
+ ./build/opencv_zoo_pose_estimation_mediapipe -h
39
+ ```
40
 
41
  ### Example outputs
42
 
models/pose_estimation_mediapipe/demo.cpp ADDED
The diff for this file is too large to render. See raw diff