GithubHelp home page GithubHelp logo

grseb9s / srcnnkit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dena/srcnnkit

0.0 1.0 0.0 83 KB

CoreML and Keras implementation of Super-Resolution Convolutional Neural Network (SRCNN)

License: MIT License

Swift 43.96% Objective-C 2.31% Python 53.73%

srcnnkit's Introduction

SRCNNKit

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

Pre trained model

Sorry, this project dosen't contain *.mlmodel yet. You should train your own model and import SRCNN.mlmodel to your project.

or use this fork: https://github.com/kenmaz/SRCNNKit

iOS

Usage

import SRCNNKit

let imageView: UIImageView = ...
let image: UIImage = ...

imageView.setSRImage(image)

Install

  • Copy sources to your project.
  • CocoaPods and Carthage will be supported soon.

Requirements

  • iOS11
  • Xcode9.x

Run sample project

  • Copy your SRCNN.mlmodel to model directory
  • Run following command:
git submodule init
git submodule update
  • Open SRCNN-ios/SRCNN-ios.xcodeproj and Run

Train Your own model

Requirements

  • Python 3.0+
  • see script/packages.txt

Convert Training Data

cd script
python3 convert.py <original train image dir> <train data dir>
python3 convert.py <original validation image dir> <validation data dir>

Training

python3 train.py <tf log dir> <model output dir> <train data dir> <validation data dir>

Plot Model Image

python plot.py <.h5 model path> <output dir>

Convert Keras to CoreML Model

python3 coreml_convert.py <h5 mode path> <output dir>

Validate CoreML Model

python3 coreml_predict.py <mlmodel path> <input patch image path> <output patch image path>

Dependencies

https://github.com/hollance/CoreMLHelpers

Licence

SRCNNKit is released under the MIT license. See LICENSE for details.

Copyright © 2018 DeNA Co., Ltd. All rights reserved.

srcnnkit's People

Contributors

kenmaz avatar sdushantha avatar

Watchers

James Cloos avatar

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.