https://github.com/tucan9389/depthprediction-coreml
The example of running Depth Prediction using Core ML
https://github.com/tucan9389/depthprediction-coreml
coreml depth-prediction fcrn-depthprediction swift
Last synced: 6 months ago
JSON representation
The example of running Depth Prediction using Core ML
- Host: GitHub
- URL: https://github.com/tucan9389/depthprediction-coreml
- Owner: tucan9389
- License: mit
- Created: 2019-07-20T04:45:48.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-06-15T14:32:24.000Z (over 4 years ago)
- Last Synced: 2025-03-28T08:01:39.202Z (7 months ago)
- Topics: coreml, depth-prediction, fcrn-depthprediction, swift
- Language: Swift
- Homepage: https://github.com/motlabs/awesome-ml-demos-with-ios
- Size: 53.2 MB
- Stars: 138
- Watchers: 3
- Forks: 15
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DepthPrediction-CoreML


This project is Depth Prediction on iOS with Core ML.
If you are interested in iOS + Machine Learning, visit [here](https://github.com/motlabs/iOS-Proejcts-with-ML-Models) you can see various DEMOs.| GIF demo 1 | Screenshot 1 | Screenshot 2 | Screenshot 3 | Screenshot 4 |
| ------------ | ------------ | ------------ | ------------ | ------------ |
||
|
|
|
|
## How it works
> When use Metal

## Requirements
- Xcode 10.2+
- iOS 11.0+
- Swift 5## Model
### Download
Download model from [apple's model page](https://developer.apple.com/machine-learning/models/).
### Matadata
| | input node | output node | size |
| :--------: | :-----------: | :------------: | :----: |
| FCRN | `[1, 304, 228, 3]`
name: `image` | `[1, 128, 160]`
name: `depthmap` | 254.7 MB |
| FCRNFP16 | `[1, 304, 228, 3]`
name: `image` | `[1, 128, 160]`
name: `depthmap` | 127.3 MB |### Inference Time
| Device | Inference Time | Total Time(GPU) | Total Time(CPU) |
| ------------- | :-----: | :-----: | :-----------: |
| iPhone 12 Pro Max | ⏲ | ⏲ | ⏲ |
| iPhone 12 Pro | ⏲ | ⏲ | ⏲ |
| iPhone 12 | ⏲ | ⏲ | ⏲ |
| iPhone 12 Mini | ⏲ | ⏲ | ⏲ |
| iPhone 11 Pro Max | ⏲ | ⏲ | ⏲ |
| iPhone 11 Pro | **134 ms** | **134 ms** | **149 ms** |
| iPhone 11 | ⏲ | ⏲ | ⏲ |
| iPhone SE(2nd) | ⏲ | ⏲ | ⏲ |
| iPhone XS Max | 146 ms | ⏲ | 155 ms |
| iPhone XS | 146 ms | ⏲ | 151 ms |
| iPhone XR | 148 ms | ⏲ | 154 ms |
| iPhone X | 624 ms | ⏲ | 640 ms |
| iPhone 8+ | 621 ms | ⏲ | 634 ms |
| iPhone 8 | 626 ms | ⏲ | 639 ms |
| iPhone 7+ | 595 ms | ⏲ | 609 ms |
| iPhone 7 | 612 ms | ⏲ | 624 ms |
| iPhone 6S+ | 1038 ms | ⏲ | 1051 ms |## See also
- [motlabs/iOS-Proejcts-with-ML-Models](https://github.com/motlabs/iOS-Proejcts-with-ML-Models)
: The challenge using machine learning model created from tensorflow on iOS
- [iro-cp/FCRN-DepthPrediction](https://github.com/iro-cp/FCRN-DepthPrediction)
: The repository prividing FCRN-DepthPrediction model