• Stars
    star
    144
  • Rank 246,939 (Top 6 %)
  • Language
    Swift
  • License
    Apache License 2.0
  • Created about 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The baseline project for inferencing various Pose Estimation tflite models with TFLiteSwift on iOS

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

  • Support 2D pose estimaiton TFLite models
    • Real-time demo with Metal framwork
    • Photo album demo
  • Support 3D pose estimation TFLite model
    • Real-time demo with Metal framwork (but realtime model is not ready yet)
    • Real-time pose matching demo
    • Photo album demo
  • Render the result keypoints of 2D pose estimation in 2D demo page
  • Render the result keypoints of 3D pose estimation with SceneKit
  • Render the heatmaps of 2D pose estimation output
    • Part Confidence Maps for typical heatmap based models
    • Part Affinity Fields for OpenPose (2D multi-person)
  • Implemented pose-matching with cosine similiarity in 3D pose demo
  • Implemented to fix the shoulders' keypoints in 3D pose estimation to pre-process for pose-matching

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

  • Xcode 11.3+
  • iOS 11.0+
  • Swift 5
  • CocoaPods
gem install cocoapods

Build & Run

  1. Install dependencies with cocoapods
cd ~/{PROJECT_PATH}
pod install
  1. 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.

More Repositories

1

awesome-ml-demos-with-ios

The challenge projects for Inferencing machine learning models on iOS
Python
1,133
star
2

PoseEstimation-CoreML

The example project of inferencing Pose Estimation using Core ML
Swift
664
star
3

SemanticSegmentation-CoreML

The example project of inferencing Semantic Segementation using Core ML
Swift
296
star
4

ObjectDetection-CoreML

An example running Object Detection using Core ML (YOLOv8, YOLOv5, YOLOv3, MobileNetV2+SSDLite)
Swift
253
star
5

tf2-mobile-2d-single-pose-estimation

πŸ’ƒ Pose estimation for iOS and android using TensorFlow 2.0
Python
167
star
6

DepthPrediction-CoreML

The example of running Depth Prediction using Core ML
Swift
131
star
7

TextRecognition-MLKit

Swift
85
star
8

TextDetection-CoreML

Swift
74
star
9

FingertipEstimation-CoreML

Detect fingertip by using machine learning for pose estimation
Swift
70
star
10

KeypointAnnotation

Swift
42
star
11

TFLiteSwift-Vision

Swift
36
star
12

ImageClassification-CoreML

The example of running Image Classification using Core ML
Swift
31
star
13

FaceDetection-MLKit

Swift
20
star
14

PoseEstimation-MLKit

The example of running Pose Estimation using ML Kit
Swift
17
star
15

SimpleClassification-CreateML-CoreML

Create ML둜 λ‚˜λ§Œμ˜ Classifier λͺ¨λΈμ„ λ§Œλ“€κ³  Core ML둜 μ•±μ—μ„œ μ‚¬μš©ν•΄λ³΄λŠ” End-to-End 예제 ν”„λ‘œμ νŠΈμž…λ‹ˆλ‹€.
Swift
13
star
16

InstanceSegmentation-CoreML

Swift
11
star
17

MobileNet-MLKit

MLKit을 μ‚¬μš©ν•˜μ—¬ MobileNet.tfliteλ₯Ό μ‹€ν–‰μ‹œμΌœλ³Έ μ˜ˆμ œμž…λ‹ˆλ‹€.
Swift
9
star
18

GyroMaze-STM32

μž„λ² λ””λ“œ μ‹€ν—˜μ—μ„œ ν…€ ν”„λ‘œμ νŠΈ κ²°κ³Όλ¬Όμž…λ‹ˆλ‹€.
C
7
star
19

pytorch-Korean-NER

Python
5
star
20

HangeulClock-iOS

Objective-C
5
star
21

MNIST-TFLiteSwift

Swift
4
star
22

MyBookshelf-iOS

The assignment is to see code design, code accuracy, data structure, algorithms, and learning abilities, as well as the ability to implement your app.
Objective-C
4
star
23

excel-example-ios

libxlsxwriter(C라이브러리)λ₯Ό iOSμ—μ„œ μ‚¬μš©ν•œ μ˜ˆμ œμž…λ‹ˆλ‹€.
Swift
4
star
24

image-clustering-browser

Python
3
star
25

WordRecognition-CoreML-MLKit

Detect character, find a word what I point and then recognize the word using Core ML and ML Kit.
3
star
26

ZoomableScrollView

Simple Zoomable Scroll View inherited from UIScrollView
Swift
3
star
27

tc-stock-management-system

1
star
28

async-filtering-photo-album-ios

Swift
1
star
29

MLProblem-MLFramework-for-iOS-template-project

Swift
1
star
30

tucan9389.github.io

HTML
1
star
31

mnist-ml-to-mobile

Python
1
star