Git Product home page Git Product logo

awesome-ml-demos-with-ios's Introduction

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

awesome-ml-demos-with-ios's People

Contributors

itsnamgyu avatar tucan9389 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

awesome-ml-demos-with-ios's Issues

Whether other types of model can be moved to the android using TF Lite

I am working on the TF Lite model on Android, and I have got into trouble for a while. I wonder this problem: except some classification, detection, pose estimation and other official models, other models may have problems moving to the android, due to the API problems, etc.?
Do appreciate it. (input: 2 images (left and right camera) ; output: one disparity map )
I find it hard to move the model to the android, and errors occurs at 'Interpreter' class.

Deeplab segmentation ios

i used deeplab model on real-time ios application but i got very slow capture .did there any solution to improve fps??

Change performance table format

Example:

Inference Time(ms)

Repo Model XS,
XS Max
XR X, 8, 8+ 7, 7+ 6S, 6S+ 6, 6+
PoseEstimation-CoreML cpm 27 27 32 39 44 115
PoseEstimation-CoreML hourhglass 6 7 29 42 48 94

Add new apple's model

Models

Vision

Model Name Problem Demo Project Performance Test Demo Gif Added in here
MobileNetV2 Image Classification Done Done Done TODO
Resnet50 Image Classification Done Done TODO TODO
SqueezeNet Image Classification Done Done TODO TODO
MNIST Drawing Classification TODO TODO TODO TODO
YOLOv3-Tiny Object Detection Done Done TODO TODO
YOLOv3 Object Detection) Done Done TODO TODO
DeeplabV3 Image Segmentation Done Done Done TODO
FCRN-DepthPrediction Depth Estimation Done Done Done TODO

Text

Model Name Problem Demo Project Performance Test Demo Gif Added in here
BERT-SQuAD Question Answering TODO TODO TODO TODO

Related Links

WWDC Links

Core ML

Create ML and Turi Create

Common ML

Used script for picking the title and url

https://developer.apple.com/videos/all-videos/

var all_titles = ""
var isEven = true
$("html body section ul ul li section section.row section.column a").each(function() { 
	isEven = !isEven
	if (isEven) {
		var url = window.location.origin + $(this).attr("href")
		var components = url.split("/")
		var wwdcName = components[components.length-3].toUpperCase()
		var seesionNumber = components[components.length-2]
		var title = $(this).text().trim()
		all_titles += "- " + "[" + wwdcName + " " + seesionNumber + " Session - " + title + "]" + "(" + url + ")" + "\n"
	}
 });
all_titles

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.