Giter Site home page Giter Site logo

keras-mobile-colorizer's Introduction

Keras Mobile Colorizer

Utilizes a U-Net inspired model conditioned on MobileNet class features to generate a mapping from Grayscale to Color image. Based on the work https://github.com/baldassarreFe/deep-koalarization

Uses MobileNets for memory efficiency in comparison to Inception-ResNet-V2 so that training can be done on a single GPU (of 4 GB size minimum).

Installation

Open the data_utils.py script and edit the TRAIN_IMAGE_PATH and VALIDATION_IMAGE_PATH to point to directories of images. There must be at least 1 folder pointed to by each of those paths.

Then run data_utils.py to construct the required folders and the TFRecords which will store the training data.

This is necessary to drastically improve the speed of training by extracting all the MobileNet features from each training image before training. The major bottleneck during training is the extraction of image features from MobileNet at runtime.

Training & Evaluation

  • To train the model : Use the train_mobilenet.py script. Make sure to verify the batch size and how many images are in the TF record before beginning training.

  • To evaluate the model : Use the evaluate_mobilenet.py script. Make sure that the path to the validation images is provided in data_utils.py

Evaluation

There are a lot of splotchy reddish-brown patches. This may probably be because training was done using only 60k images from MS-COCO dataset, not the full ImageNet dataset.

Requirements

  • Keras 2.0.8+
  • Numpy
  • Scikit-image
  • Tensorflow (GPU is a must for training, CPU is fine for inference)

Install via pip install -r "requirements.txt"

keras-mobile-colorizer's People

Contributors

titu1994 avatar

Watchers

James Cloos avatar Sarath Chandra Kothapalli avatar  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.