Implementation of Super Resolution (SR) with CoreML and Swift. You can use SR method in your app using SRCNNKit UIImageView extension.
For details, see the following presentaion:
https://speakerdeck.com/kenmaz/super-resolution-with-coreml-at-try-swift-tokyo-2018
Sorry, this project dosen't contain *.mlmodel yet. You should train your own model and import SRCNN.mlmodel
to your project.
import SRCNNKit
let imageView: UIImageView = ...
let image: UIImage = ...
imageView.setSRImage(image)
- Copy sources to your project.
- CocoaPods and Carthage will be supported soon.
- iOS11
- Xcode9.x
- Copy your
SRCNN.mlmodel
tomodel
directory - Run following command:
git submodule init
git submodule update
- Open
SRCNN-ios/SRCNN-ios.xcodeproj
and Run
- Python 3.0+
- see
script/packages.txt
cd script
python3 convert.py <original train image dir> <train data dir>
python3 convert.py <original validation image dir> <validation data dir>
python3 train.py <tf log dir> <model output dir> <train data dir> <validation data dir>
python plot.py <.h5 model path> <output dir>
python3 coreml_convert.py <h5 mode path> <output dir>
python3 coreml_predict.py <mlmodel path> <input patch image path> <output patch image path>
https://github.com/hollance/CoreMLHelpers
SRCNNKit is released under the MIT license. See LICENSE for details.
Copyright © 2018 DeNA Co., Ltd. All rights reserved.