https://github.com/pinto0309/human-pose-estimation-3d-python-cpp
Monocular 3D pose estimation. OpenVINO. CPU inference or iGPU (OpenCL) inference.
https://github.com/pinto0309/human-pose-estimation-3d-python-cpp
cpp onnx opencl openvino python
Last synced: 11 months ago
JSON representation
Monocular 3D pose estimation. OpenVINO. CPU inference or iGPU (OpenCL) inference.
- Host: GitHub
- URL: https://github.com/pinto0309/human-pose-estimation-3d-python-cpp
- Owner: PINTO0309
- License: apache-2.0
- Created: 2021-11-02T12:04:14.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-11-09T08:19:35.000Z (over 4 years ago)
- Last Synced: 2025-05-07T23:42:55.741Z (11 months ago)
- Topics: cpp, onnx, opencl, openvino, python
- Language: Python
- Homepage:
- Size: 62 MB
- Stars: 9
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# human-pose-estimation-3d-python-cpp
- RealSenseD435 (RGB) 480x640 + CPU Corei9 45 FPS (Depth is not used)

## 1. Run
```bash
$ git clone https://github.com/PINTO0309/human-pose-estimation-3d-python-cpp
$ cd human-pose-estimation-3d-python-cpp
```
### 1-1. RealSenseD435 (RGB) 480x640 + CPU Corei9 45 FPS (Depth is not used)
```bash
$ xhost +local: && \
docker run -it --rm \
-v `pwd`:/home/user/workdir \
-v /tmp/.X11-unix/:/tmp/.X11-unix:rw \
--device /dev/video0:/dev/video0:mwr \
--device /dev/video1:/dev/video1:mwr \
--device /dev/video2:/dev/video2:mwr \
--device /dev/video3:/dev/video3:mwr \
--device /dev/video4:/dev/video4:mwr \
--device /dev/video5:/dev/video5:mwr \
--net=host \
-e XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR \
-e DISPLAY=$DISPLAY \
--privileged \
ghcr.io/pinto0309/openvino2tensorflow:latest
```
```bash
$ python3 human_pose_estimation_3d_demo.py \
--model models/openvino/FP16/human-pose-estimation-3d-0001_bgr_480x640.xml \
--device CPU \
--input 4
```
### 1-2. RealSenseD435 (RGB) 480x640 + iGPU (OpenCL)
```bash
$ xhost +local: && \
docker run -it --rm \
-v `pwd`:/home/user/workdir \
-v /tmp/.X11-unix/:/tmp/.X11-unix:rw \
--device /dev/video0:/dev/video0:mwr \
--device /dev/video1:/dev/video1:mwr \
--device /dev/video2:/dev/video2:mwr \
--device /dev/video3:/dev/video3:mwr \
--device /dev/video4:/dev/video4:mwr \
--device /dev/video5:/dev/video5:mwr \
--net=host \
-e LIBVA_DRIVER_NAME=iHD \
-e XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR \
-e DISPLAY=$DISPLAY \
--privileged \
ghcr.io/pinto0309/openvino2tensorflow:latest
```
```bash
$ python3 human_pose_estimation_3d_demo.py \
--model models/openvino/FP16/human-pose-estimation-3d-0001_bgr_480x640.xml \
--device GPU \
--input 4
```
### 1-3. General USB Camera 480x640 + CPU
```bash
$ xhost +local: && \
docker run -it --rm \
-v `pwd`:/home/user/workdir \
-v /tmp/.X11-unix/:/tmp/.X11-unix:rw \
--device /dev/video0:/dev/video0:mwr \
--net=host \
-e XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR \
-e DISPLAY=$DISPLAY \
--privileged \
ghcr.io/pinto0309/openvino2tensorflow:latest
```
```bash
$ python3 human_pose_estimation_3d_demo.py \
--model models/openvino/FP16/human-pose-estimation-3d-0001_bgr_480x640.xml \
--device CPU \
--input 0
```
## 2. Build
```bash
$ PYTHON_PREFIX=$(python3 -c "import sys; print(sys.prefix)") \
&& PYTHON_VERSION=$(python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')") \
&& PYTHON_INCLUDE_DIRS=${PYTHON_PREFIX}/include/python${PYTHON_VERSION}
$ NUMPY_INCLUDE_DIR=$(python3 -c "import numpy; print(numpy.get_include())")
$ mkdir -p pose_extractor/build && cd pose_extractor/build
$ cmake \
-DPYTHON_INCLUDE_DIRS=${PYTHON_INCLUDE_DIRS} \
-DNUMPY_INCLUDE_DIR=${NUMPY_INCLUDE_DIR} ..
$ make && cp pose_extractor.so ../.. && cd ../..
```
## 3. Reference
1. https://github.com/openvinotoolkit/open_model_zoo/tree/2021.4.1/demos/human_pose_estimation_3d_demo/python
2. https://docs.openvino.ai/2021.4/omz_models_model_human_pose_estimation_3d_0001.html
3. https://github.com/PINTO0309/PINTO_model_zoo/tree/main/029_human-pose-estimation-3d-0001