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 |
---|---|---|---|
When use Metal
- Xcode 10.2+
- iOS 12.0+
- Swift 5
Download model from apple's model page.
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 |
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
Device | Inference Time | Total Time (GPU) | Total Time (CPU) |
---|---|---|---|
iPhone 12 Pro | ⏲ | ⏲ | ⏲ |
iPhone 11 Pro | 37 ms | 37 ms | ⏲ |
# total 21
["background", "aeroplane", "bicycle", "bird", "boat",
"bottle", "bus", "car", "cat", "chair",
"cow", "diningtable", "dog", "horse", "motorbike",
"person", "pottedplant", "sheep", "sofa", "train",
"tv"]
# 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"]
- motlabs/iOS-Proejcts-with-ML-Models
: The challenge using machine learning model created from tensorflow on iOS - DeepLab on TensorFlow
: The repository providing DeepLabV3 model - FaceParsing
: The repository providing the FaceParsing pytorch model