Open7
human-pose-estimation-3d-0001 解像度変更版 480x640
$ 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 ../..
$ sudo ${INTEL_OPENVINO_DIR}/deployment_tools/tools/model_downloader/src/open_model_zoo/model_tools/internal_scripts/pytorch_to_onnx.py \
--model-path=human-pose-estimation-3d-0001 \
--model-name=PoseEstimationWithMobileNet \
--model-param=is_convertible_by_mo=True \
--import-module=model \
--weights=human-pose-estimation-3d-0001.pth \
--input-shape=1,3,480,640 \
--input-names=data \
--output-names=features,heatmaps,pafs \
--output-file=human-pose-estimation-3d-0001.onnx
$ python3 -m onnxsim human-pose-estimation-3d-0001.onnx human-pose-estimation-3d-0001_bgr_480x640.onnx
$INTEL_OPENVINO_DIR/deployment_tools/model_optimizer/mo.py \
--input_model human-pose-estimation-3d-0001_bgr_480x640.onnx \
--data_type FP32 \
--output_dir openvino/FP32 \
--mean_values=data[128.0,128.0,128.0] \
--scale_values=data[255.0,255.0,255.0]
$INTEL_OPENVINO_DIR/deployment_tools/model_optimizer/mo.py \
--input_model human-pose-estimation-3d-0001_bgr_480x640.onnx \
--data_type FP16 \
--output_dir openvino/FP16 \
--mean_values=data[128.0,128.0,128.0] \
--scale_values=data[255.0,255.0,255.0]
$ mkdir -p monitors_extension/build && cd monitors_extension/build
$ cmake \
-DPYTHON_INCLUDE_DIRS=${PYTHON_INCLUDE_DIRS} \
-DNUMPY_INCLUDE_DIR=${NUMPY_INCLUDE_DIR} ..
For RealSense D435 + CPU
$ 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/video0:/dev/video1:mwr \
--device /dev/video0:/dev/video2:mwr \
--device /dev/video0:/dev/video3:mwr \
--device /dev/video0:/dev/video4:mwr \
--device /dev/video0:/dev/video5:mwr \
--net=host \
-e XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR \
-e DISPLAY=$DISPLAY \
--privileged \
ghcr.io/pinto0309/openvino2tensorflow:latest
$ python3 human_pose_estimation_3d_demo.py \
--model openvino/FP32/human-pose-estimation-3d-0001_bgr_480x640.xml \
--device CPU \
--input 0