Coder Social home page Coder Social logo

drawing-to-face's Introduction

Drawing to Face

This project is based on pix2pix architecture which is a conditional Generative Adversarial Network (cGAN) that is trained to convert a drawing to a face, specifically its Tensorflow implementation. Special thanks to the people who made this possible.

Dataset

I used CUHK sketches and faces dataset, which contains 188 pair of faces and sketches. To prepare the dataset, I created cropper and combiner scripts. The cropper script crops the faces from the original dataset and the combiner script combines the faces and sketches into pairs.

Training

I trained the model for 200 epochs and the loss was around 0.1. You can use the command to train the model:

python pix2pix.py --mode="train" --output_dir="images/output" --max_epochs="200" --input_dir="images/combined/train" --which_directi
on="BtoA"

Testing

I reserved 4 pairs of images for testing. You can use the command to test:

python pix2pix.py --mode="test" --output_dir="images/test" --input_dir="images/combined/test" --checkpoint="images/output"

For more information about the parameters, please refer to the original Tensorflow implementation.

Results

Here are some results of the model. The first column is the input, the second column is the ground truth, and the third column is the output of the model.

Input Ground Truth Output

drawing-to-face's People

Contributors

tunayev 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.