• Stars
    star
    1,133
  • Rank 39,572 (Top 0.9 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 6 years ago
  • Updated about 3 years ago

Reviews

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

Repository Details

The challenge projects for Inferencing machine learning models on iOS

Awesome Hits PRs Welcome GIF PRs More Welcome

This repo was moved from @motlabs group. Thanks for @jwkanggist who is a leader of motlabs community.

Awesome Machine Learning DEMOs with iOS

We tackle the challenge of using machine learning models on iOS via Core ML and ML Kit (TensorFlow Lite).

ํ•œ๊ตญ์–ด README

Contents

Machine Learning Framework for iOS

Flow of Model When Using Core ML

Flow of Model When Using Core ML

The overall flow is very similar for most ML frameworks. Each framework has its own compatible model format. We need to take the model created in TensorFlow and convert it into the appropriate format, for each mobile ML framework.

Once the compatible model is prepared, you can run the inference using the ML framework. Note that you must perform pre/postprocessing manually.

If you want more explanation, check this slide(Korean).

Flow of Model When Using Create ML

playground-createml-validation-001

Baseline Projects

DONE

  • Using built-in model with Core ML

  • Using built-in on-device model with ML Kit

  • Using custom model for Vision with Core ML and ML Kit

  • Object Detection with Core ML

TODO

  • Object Detection with ML Kit
  • Using built-in cloud model on ML Kit
    • Landmark recognition
  • Using custom model for NLP with Core ML and ML Kit
  • Using custom model for Audio with Core ML and ML Kit
    • Audio recognition
    • Speech recognition
    • TTS

Image Classification

Name DEMO Note
ImageClassification-CoreML

-
MobileNet-MLKit

-

Object Detection & Recognition

Name DEMO Note
ObjectDetection-CoreML

-
TextDetection-CoreML

-
TextRecognition-MLKit

-
FaceDetection-MLKit

-

Pose Estimation

Name DEMO Note
PoseEstimation-CoreML

-
PoseEstimation-TFLiteSwift -
PoseEstimation-MLKit

-
FingertipEstimation-CoreML

-

Depth Prediction

DepthPrediction-CoreML

-

Semantic Segmentation

Name DEMO Note
SemanticSegmentation-CoreML

-

Application Projects

Name DEMO Note
dont-be-turtle-ios

-
WordRecognition-CoreML-MLKit(preparing...)

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

Annotation Tool

Name DEMO Note
KeypointAnnotation

Annotation tool for own custom estimation dataset

Create ML Projects

Name Create ML DEMO Core ML DEMO Note
SimpleClassification-CreateML-CoreML IMG_0436 IMG_0436 A Simple Classification Using Create ML and Core ML

Performance

Execution Time: Inference Time + Postprocessing Time

(with iPhone X) Inference Time(ms) Execution Time(ms) FPS
ImageClassification-CoreML 40 40 23
MobileNet-MLKit 120 130 6
ObjectDetection-CoreML 100 ~ 120 110 ~ 130 5
TextDetection-CoreML 12 13 30(max)
TextRecognition-MLKit 35~200 40~200 5~20
PoseEstimation-CoreML 51 65 14
PoseEstimation-MLKit 200 217 3
DepthPrediction-CoreML 624 640 1
SemanticSegmentation-CoreML 178 509 1
WordRecognition-CoreML-MLKit 23 30 14
FaceDetection-MLKit - - -

๐Ÿ“Measure module

You can see the measured latency time for inference or execution and FPS on the top of the screen.

If you have more elegant method for measuring the performance, suggest on issue!

Implements

Measure๐Ÿ“ Unit Test Bunch Test
ImageClassification-CoreML O X X
MobileNet-MLKit O X X
ObjectDetection-CoreML O O X
TextDetection-CoreML O X X
TextRecognition-MLKit O X X
PoseEstimation-CoreML O O X
PoseEstimation-MLKit O X X
DepthPrediction-CoreML O X X
SemanticSegmentation-CoreML O X X

See also

WWDC

Core ML

Create ML and Turi Create

Common ML

Metal

AR

Examples

More Repositories

1

PoseEstimation-CoreML

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

SemanticSegmentation-CoreML

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

ObjectDetection-CoreML

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

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

๐Ÿ’ƒ Pose estimation for iOS and android using TensorFlow 2.0
Python
167
star
5

PoseEstimation-TFLiteSwift

The baseline project for inferencing various Pose Estimation tflite models with TFLiteSwift on iOS
Swift
144
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