All Projects → yuanyuanli85 → Fast_Stacked_Hourglass_Network_OpenVino

yuanyuanli85 / Fast_Stacked_Hourglass_Network_OpenVino

Licence: other
A fast stacked hourglass network for human pose estimation on OpenVino

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Fast Stacked Hourglass Network OpenVino

MobileNetV2-PoseEstimation
Tensorflow based Fast Pose estimation. OpenVINO, Tensorflow Lite, NCS, NCS2 + Python.
Stars: ✭ 99 (+90.38%)
Mutual labels:  pose-estimation, ncs, openvino
ONNX-Mobile-Human-Pose-3D
Python scripts for performing 3D human pose estimation using the Mobile Human Pose model in ONNX.
Stars: ✭ 69 (+32.69%)
Mutual labels:  pose-estimation, onnx
vs-mlrt
Efficient ML Filter Runtimes for VapourSynth (with built-in support for waifu2x, DPIR, RealESRGANv2, and Real-CUGAN)
Stars: ✭ 34 (-34.62%)
Mutual labels:  onnx, openvino
YOLOX
YOLOX is a high-performance anchor-free YOLO, exceeding yolov3~v5 with MegEngine, ONNX, TensorRT, ncnn, and OpenVINO supported. Documentation: https://yolox.readthedocs.io/
Stars: ✭ 6,570 (+12534.62%)
Mutual labels:  onnx, openvino
Mobilenetv3 Ssd
MobileNetV3-SSD for object detection and implementation in PyTorch
Stars: ✭ 188 (+261.54%)
Mutual labels:  mobilenet, onnx
OpenVINO-EmotionRecognition
OpenVINO+NCS2/NCS+MutiModel(FaceDetection, EmotionRecognition)+MultiStick+MultiProcess+MultiThread+USB Camera/PiCamera. RaspberryPi 3 compatible. Async.
Stars: ✭ 51 (-1.92%)
Mutual labels:  ncs, openvino
Hyperpose
HyperPose: A Collection of Real-time Human Pose Estimation
Stars: ✭ 961 (+1748.08%)
Mutual labels:  pose-estimation, mobilenet
Tf Pose Estimation
Deep Pose Estimation implemented using Tensorflow with Custom Architectures for fast inference.
Stars: ✭ 3,856 (+7315.38%)
Mutual labels:  pose-estimation, mobilenet
Posenet Coreml
I checked the performance by running PoseNet on CoreML
Stars: ✭ 143 (+175%)
Mutual labels:  pose-estimation, mobilenet
Swiftopenpose
tf-openpose Based iOS Project
Stars: ✭ 215 (+313.46%)
Mutual labels:  pose-estimation, mobilenet
pytorch YOLO OpenVINO demo
No description or website provided.
Stars: ✭ 73 (+40.38%)
Mutual labels:  onnx, openvino
Php Opencv Examples
Tutorial for computer vision and machine learning in PHP 7/8 by opencv (installation + examples + documentation)
Stars: ✭ 333 (+540.38%)
Mutual labels:  mobilenet, onnx
ONNX-Runtime-with-TensorRT-and-OpenVINO
Docker scripts for building ONNX Runtime with TensorRT and OpenVINO in manylinux environment
Stars: ✭ 15 (-71.15%)
Mutual labels:  onnx, openvino
mtomo
Multiple types of NN model optimization environments. It is possible to directly access the host PC GUI and the camera to verify the operation. Intel iHD GPU (iGPU) support. NVIDIA GPU (dGPU) support.
Stars: ✭ 24 (-53.85%)
Mutual labels:  onnx, openvino
openvino pytorch layers
How to export PyTorch models with unsupported layers to ONNX and then to Intel OpenVINO
Stars: ✭ 17 (-67.31%)
Mutual labels:  onnx, openvino
Tensorflow realtime multi Person pose estimation
Multi-Person Pose Estimation project for Tensorflow 2.0 with a small and fast model based on MobilenetV3
Stars: ✭ 129 (+148.08%)
Mutual labels:  pose-estimation, mobilenet
pytorch-PyraNet
Pytorch version reinplement code of PyraNet , for paper : Learning Feature Pyramids for Human Pose Estimation
Stars: ✭ 32 (-38.46%)
Mutual labels:  mpii-dataset, pose-estimation
eval-mpii-pose
Evaluation code for the MPII human pose dataset
Stars: ✭ 58 (+11.54%)
Mutual labels:  mpii-dataset, pose-estimation
popart
Poplar Advanced Runtime for the IPU
Stars: ✭ 62 (+19.23%)
Mutual labels:  onnx
label-studio-frontend
Data labeling react app that is backend agnostic and can be embedded into your applications — distributed as an NPM package
Stars: ✭ 230 (+342.31%)
Mutual labels:  pose-estimation

Fast_Stacked_Hourglass_Network_OpenVino

A fast stacked hourglass network for human pose estimation on OpenVino. Stacked hourglass network proposed by Stacked Hourglass Networks for Human Pose Estimation is a very good network for single-person pose estimation regarding to speed and accuracy. This repo contains a demo to show how to depoly model trained by Keras. It converts a Keras model to IR and shows how to use the generated IR to do inference. Have fun with OpenVino!

Installation

  • Python3
  • Install OpenVino 2018 R5
  • Install python dependencies
keras==2.1.5
scipy==1.2.0
tensorflow==1.12.0
opencv-python==3.4.3.18

[Keras] Convert pre-trained Keras models

Download pre-trained hourglass models

  • Download models from Google drive and save them to models. You are going to download two files, one is json file for network configuration while another is weight.
  • hg_s2_b1_mobile, inputs: 256x256x3, Channel Number: 256, pckh 78.86% @MPII.
  • hg_s2_b1_tiny, inputs:192x192x3, Channel Number: 128, [email protected]%MPII.

Convert keras models to tensorflow forzen pb

  • Convert keras models to tf frozen pb
python3 tools/keras_to_tfpb.py --input_model_json ./models/path/to/network/json --input_model_weights
./models/path/to/network/weight/h5 --out_tfpb ./models/hg_s2_b1_tf.pb

Use OpenVino Model Optimizer to convert tf pb to IR.

  • For CPU, please use mobile version hg_s2_b1_mobile and FP32
~/intel/computer_vision_sdk/deployment_tools/model_optimizer/mo_tf.py -w ./models/hg_s2_b1_tf.pb --input_shape [1,256,256,3] --data_type FP32 --output_dir ./models/ --model_name hg_s2_mobile
  • For NCS2(Myriad), please use tiny version hg_s2_b1_tiny and FP16
~/intel/computer_vision_sdk/deployment_tools/model_optimizer/mo_tf.py -w ./models/hg_s2_b1_tf.pb --input_shape [1,192,128,3] --data_type FP16 --output_dir ./models/ --model_name hg_s2_tiny
  • .xml and .bin will be generated.

[PyTorch] Convert pre-trained Onnx models

Download model trained by pytorch

Download the model_best.onnx model from below table to fit your accuracy and speed requirements. hg_s2_b1_mobile_fpd model trained by using the knowledge distillation proposed by paper Fast Human Pose Estimation. Details can be found in Fast_Human_Pose_Estimation_Pytorch.

Model in_res featrues # of Weights Head Shoulder Elbow Wrist Hip Knee Ankle Mean Link
hg_s2_b1 256 128 6.73m 95.74 94.51 87.68 81.70 87.81 80.88 76.83 86.58 GoogleDrive
hg_s2_b1_mobile 256 128 2.31m 95.80 93.61 85.50 79.63 86.13 77.82 73.62 84.69 GoogleDrive
hg_s2_b1_mobile_fpd 256 128 2.31m 95.67 94.07 86.31 79.68 86.00 79.67 75.51 85.41 GoogleDrive
hg_s2_b1_tiny 192 128 2.31m 94.95 92.87 84.59 78.19 84.68 77.70 73.07 83.88 GoogleDrive

Convert onnx to IR

Use model optimizer to convert onnx to IR. FP32 for CPU while FP16 for MYRIAD

~/intel/computer_vision_sdk/deployment_tools/model_optimizer/mo.py -w ./models/model_best.onnx --data_type FP32 --output_dir ./models/ --model_name hg_s2_mobile_onnx 

Run demo

  • Run single image demo on CPU
cd src
python3 stacked_hourglass.py -i ../models/sample.jpg -m ../models/hg_s2_mobile.xml -d CPU -l /path/to/cpu/extension/library
  • Run single image demo on NCS2(MYRIAD)
cd src
python3 stacked_hourglass.py -i ../models/sample.jpg -m ../models/hg_s2_tiny.xml -d MYRIAD
  • Run Aysnc demo with camera input on CPU
cd src
python3 stacked_hourglass_camera_async.py -i cam -m ../models/hg_s2_mobile.xml -d CPU -l /path/to/cpu/extension/library

Reference

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].