Coder Social home page Coder Social logo

naveenvenk17 / face-generation-from-sketch-using-gans Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 2.0 4.51 MB

This repository contains the code for implementing an image generation system using GAN (Generative Adversarial Networks) to turn face sketches into realistic photos.

Jupyter Notebook 100.00%
deep-learning image-processing

face-generation-from-sketch-using-gans's Introduction

Face Sketch to Image Generation using GAN

This repository contains the code for implementing an image generation system using GAN (Generative Adversarial Networks) to turn face sketches into realistic photos.

pred1

Contents

Install requirements

pip install -r requirements.txt
Keras-contrib installation

Or you can refer to this link https://medium.com/@kegui/how-to-install-keras-contrib-7b75334ab742

Data Augmentation

  • The dataset consists 100 pairs faces and sketches. 88 pairs were chosen for training set.
  • Each pair is augmented to 200 pairs of face and sketch using transformation, rotation and shearing.
  • Do Data Augmentation with this notebook

GAN

  • The GAN model architecture involves two sub-models: a generator model for generating new examples and a discriminator model for classifying whether generated examples are real, from the domain, or fake, generated by the generator model.

  • GAN model consists of Generator model with 50 layers and Adversary Model with 9 layers.

Training

  • Start training GAN model with this notebook
  • GAN model trained for 82 epochs
  • Generator model Loss = 2.052
  • Discriminator model Loss = 1.139

Model Prediction after

  • 1 epoch :

  • 10 epoch :

  • 25 epoch :

  • 50 epoch :

  • 82 epoch :

Performance Measurement

  • SSIM (Structural Similarity Index) is used for measuring the similarity between two images.
  • SSIM = 0.7858
  • L2 Norm = 93.452
  • Calculate SSIM and Verification Accuracy (L2-norm) using this notebook

Testing

Generate single image with this notebook

References

[1] X. Wang and X. Tang. (2009). Face Photo-Sketch Synthesis and Recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence (PAMI), 31(11), 1955-1967.

[2] W. Zhang, X. Wang and X. Tang. (2011). Coupled Information-Theoretic Encoding for Face Photo-Sketch Recognition. Proceedings of IEEE Conference on Computer Vision and Pattern Recognition (CVPR).

[3] https://github.com/Malikanhar/Face-Sketch-to-Image-Generation-using-GAN

face-generation-from-sketch-using-gans's People

Contributors

naveenvenk17 avatar

Stargazers

 avatar  avatar

Watchers

 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.