tucan9389 / PoseEstimation-TFLiteSwift

The baseline project for inferencing various Pose Estimation tflite models with TFLiteSwift on iOS
https://github.com/motlabs/awesome-ml-demos-with-ios
Apache License 2.0
151 stars 20 forks source link
3d-pose-estimation cpm hourglass ios mobilenetv2 on-device openpose pose-matching posenet simplepose tensorflow tensorflow-lite tflite

logo-pose-estimatiton-for-tflite-3

platform-ios swift-version lisence PRs Welcome

This project is Pose Estimation on iOS with TensorFlow Lite.
If you are interested in iOS + Machine Learning, visit here you can see various DEMOs.

2D pose estimation in real-time 3D pose estimation

Features

Models

Source Images

Name | gif | img-0 | img-1 | img-2 :---: | :---: | :---: | :---: | :---: Source | - | | |

Joint Samples

Model Names gif img-0 img-1 img-2
PoseNet - pose-demo-linedot-posenet-0 pose-demo-linedot-posenet-2 pose-demo-linedot-posenet-3
PEFM CPM - pose-demo-PEFMCPM-0 pose-demo-PEFMCPM-2 pose-demo-PEFMCPM-3
PEFM Hourglass - pose-demo-PEFMHourglass-0 pose-demo-PEFMHourglass-2 pose-demo-PEFMHourglass-3
OpenPose (multi-person) - pose-demo-openpose-0 pose-demo-openpose-2 pose-demo-openpose-3

Heatmap-ConfidenceMap Samples

Model Names gif img-0 img-1 img-2
PoseNet - - - - -
PEFM CPM - pose-demo-heatmap-PEFMCPM-0 pose-demo-heatmap-PEFMCPM-2 pose-demo-heatmap-PEFMCPM-3
PEFM Hourglass - pose-demo-heatmap-PEFMHourglass-0 pose-demo-heatmap-PEFMHourglass-2 pose-demo-heatmap-PEFMHourglass-3
OpenPose (multi-person) - pose-demo-heatmap-posenet-0 pose-demo-heatmap-posenet-2 pose-demo-heatmap-posenet-3

Heatmap-PAF Samples

Model Names gif img-0 img-1 img-2
OpenPose (PAF x) - pose-demo-heatmap-pafx-PEFMHourglass-0 pose-demo-heatmap-pafx-PEFMHourglass-2 pose-demo-heatmap-pafx-PEFMHourglass-3
OpenPose (PAF y) - pose-demo-heatmap-pafy-PEFMHourglass-0 pose-demo-heatmap-pafy-PEFMHourglass-2 pose-demo-heatmap-pafy-PEFMHourglass-3

Meta Data

2D

✅ vs ☑️ Name Size Inference
Time
on iPhone11Pro
Post-process
Time
on iPhone11Pro
PCKh-0.5 multi person
vs
single person
Model Source Paper tflite
download
PoseNet 13.3 MB - - - single tensorflow/tensorflow PersonLab
PEFM CPM 2.4 MB - - - single edvardHua/PoseEstimationForMobile Convolutional Pose Machines
PEFM Hourglass v1 1.8 MB - - - single edvardHua/PoseEstimationForMobile Stacked Hourglass Networks
PEFM Hourglass v2 1.7 MB - - - single edvardHua/PoseEstimationForMobile Stacked Hourglass Networks
OpenPose 7.8 MB - - - multi ildoonet/tf-pose-estimation OpenPose
☑️ AlphaPose - - - - single osmr/imgclsmob RMPE
☑️ SelecSLS - - - - single osmr/imgclsmob -
☑️ IBPPose - - - - single osmr/imgclsmob -
☑️ Lightweight OpenPose - - - - single osmr/imgclsmob OpenPose

3D

✅ vs ☑️ Name Size Inference
Time
on iPhone11Pro
Post-process
Time
on iPhone11Pro
(metric) Model Source Paper tflite
download
Baseline3DPose 137.1 MB 347 ms 79 ms - mks0601/3DMPPE_POSENET_RELEASE Baseline3D download
LiteBaseline3DPose 16.6 MB 116 ms
(cpu only)
19 ms
(cpu only)
SangbumChoi/MobileHumanPose MHP download

Requirements

Build & Run

  1. Install dependencies with cocoapods

    cd ~/{PROJECT_PATH}
    pod install
  2. Open the PoseEstimation-TFLiteSwift.xcworkspace and run the project

See also

License

This repository is licensed under Apache 2.0. Full license text is available in LICENSE.