• Stars
    star
    316
  • Rank 132,587 (Top 3 %)
  • Language
    Swift
  • License
    MIT License
  • Created over 5 years ago
  • Updated over 3 years ago

Reviews

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

Repository Details

The example project of inferencing Semantic Segementation using Core ML

SemanticSegmentation-CoreML

platform-ios swift-version lisence

This project is Object Segmentation on iOS with Core ML.
If you are interested in iOS + Machine Learning, visit here you can see various DEMOs.

DeepLabV3-DEMO1 FaceParsing-DEMO DeepLabV3-DEMO-2 DeepLabV3-DEMO-3

How it works

When use Metal

image

Requirements

  • Xcode 10.2+
  • iOS 12.0+
  • Swift 5

Models

Download

Download model from apple's model page.

Matadata

Name Input Output Size iOS version+ Download
DeepLabV3 Image (Color 513 Γ— 513) MultiArray (Int32 513 Γ— 513) 8.6 MB iOS 12.0+ link
DeepLabV3FP16 Image (Color 513 Γ— 513) MultiArray (Int32 513 Γ— 513) 4.3 MB iOS 12.0+ link
DeepLabV3Int8LUT Image (Color 513 Γ— 513) MultiArray (Int32 513 Γ— 513) 2.3 MB iOS 12.0+ link
FaceParsing Image (Color 512 Γ— 512) MultiArray (Int32) 512 Γ— 512 52.7 MB iOS 14.0+ link

Inference Time βˆ’ DeepLabV3

Device Inference Time Total Time (GPU) Total Time (CPU)
iPhone 12 Pro 29 ms 29 ms 240 ms
iPhone 12 Pro Max ⏲ ⏲ ⏲
iPhone 12 30 ms 31 ms 253 ms
iPhone 12 Mini 29 ms 30 ms 226 ms
iPhone 11 Pro 39 ms 40 ms 290 ms
iPhone 11 Pro Max 35 ms 36 ms 280 ms
iPhone 11 ⏲ ⏲ ⏲
iPhone SE (2nd) ⏲ ⏲ ⏲
iPhone XS Max ⏲ ⏲ ⏲
iPhone XS 54 ms 55 ms 327 ms
iPhone XR 133 ms ⏲ 402 ms
iPhone X 137 ms 143 ms 376 ms
iPhone 8+ 140 ms 146 ms 420 ms
iPhone 8 189 ms ⏲ 529 ms
iPhone 7+ 240 ms ⏲ 667 ms
iPhone 7 192 ms 208 ms 528 ms
iPhone 6S + 309 ms ⏲ 1015 ms

⏲: need to measure

Inference Time βˆ’ FaceParsing

Device Inference Time Total Time (GPU) Total Time (CPU)
iPhone 12 Pro ⏲ ⏲ ⏲
iPhone 11 Pro 37 ms 37 ms ⏲

Labels βˆ’ DeepLabV3

# total 21
["background", "aeroplane", "bicycle", "bird", "boat", 
"bottle", "bus", "car", "cat", "chair", 
"cow", "diningtable", "dog", "horse", "motorbike", 
"person", "pottedplant", "sheep", "sofa", "train", 
"tv"]

Labels βˆ’ FaceParsing

# total 19
["background", "skin", "l_brow", "r_brow", "l_eye", 
"r_eye", "eye_g", "l_ear", "r_ear", "ear_r", 
"nose", "mouth", "u_lip", "l_lip", "neck", 
"neck_l", "cloth", "hair", "hat"]

See also

More Repositories

1

awesome-ml-demos-with-ios

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

PoseEstimation-CoreML

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

ObjectDetection-CoreML

An example running Object Detection using Core ML (YOLOv8, YOLOv5, YOLOv3, MobileNetV2+SSDLite)
Swift
282
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
148
star
6

DepthPrediction-CoreML

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

TextRecognition-MLKit

Swift
88
star
8

TextDetection-CoreML

Swift
79
star
9

FingertipEstimation-CoreML

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

KeypointAnnotation

Swift
42
star
11

ImageClassification-CoreML

The example of running Image Classification using Core ML
Swift
42
star
12

TFLiteSwift-Vision

Swift
38
star
13

FaceDetection-MLKit

Swift
21
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
14
star
16

InstanceSegmentation-CoreML

Swift
12
star
17

MobileNet-MLKit

MLKit을 μ‚¬μš©ν•˜μ—¬ MobileNet.tfliteλ₯Ό μ‹€ν–‰μ‹œμΌœλ³Έ μ˜ˆμ œμž…λ‹ˆλ‹€.
Swift
11
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

async-filtering-photo-album-ios

Swift
2
star
28

tc-stock-management-system

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