Giter Site home page Giter Site logo

henshmi / grayscale-flower-image-colorization Goto Github PK

View Code? Open in Web Editor NEW
3.0 0.0 1.0 3.37 MB

Convolutional neural network code for colorization and up-scaling of grayscale flowers images.

Jupyter Notebook 100.00%
convolutional-neural-networks cnn cnn-keras image-colorization grayscale-images python machine-learning deep-learning neural-network flowers

grayscale-flower-image-colorization's Introduction

B&W Flower Image Colorization

Elad Shabi, Nadav Dori, Chen Shmilovich


In the following code we built a convolutional neural network using keras library,
that gets as an input 32X32 pixels grayscale images of flowers, and generates an output of 96X96 colored flowers images.


  • Data-Sets
    We used a data set that contains 8189 pairs of grayscale and colored flower images
    The training set is consisted of 70% of the images, while the test set is consisted of 30% of them. 10% of the training images are used for validation.

  • Model's Network Architecture
    We've been experimenting with several different designs of the network.
    In every model we chose to use RELU activation function on the hidden layers of the network.
    On the output layer we used sigmoid function in order to output values between 0 and 1.
    Generally the network processed the input image in such a way that it has been shrinked on the first few layers and than upscaled to the desired output dimensions. We used strides and up-sampling in order to do so.
    We achieved the best results for this assignment using the described method.
    Overfitting on these kind of networks is a subjective matter, therefore we needed to examine the results and determine wether they match our expectations.

  • Model's Training
    We normalized the input pixel values to be between 0 and 1, and used the mean square error loss function to measure our results.
    After that we also tried using the "msle" loss function which we found more suitable for our project. On both occasions we used the "rmsprop" optimizer to minimize our loss.

  • Performance
    We were suprised by our initial results, it seemed like the network recognized the shapes and textures of the input images, and also colored them nicely.
    The only issue we had is the lack of sharpness of the output images.
    We then added more convolutional layers to deepen our network and we increased the amount of filters in each layer dramatically. Furthermore we tested different batch sizes and number of epochs.
    The output images became more sharp and clear, the results were way over our expectations.

  • Results
Input Model A Model B Model C

grayscale-flower-image-colorization's People

Contributors

henshmi avatar

Stargazers

 avatar  avatar  avatar

Forkers

leandrodaher

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.