Giter Site home page Giter Site logo

sc-fegan's Introduction

SC-FEGAN

SC-FEGAN : Face Editing Generative Adversarial Network with User's Sketch and Color

Youngjoo Jo, Jongyoul Park

arXiv: https://arxiv.org/abs/1902.06838

Teaser GUI

Overview

We learn to edit face image with a deep network. Our network SC-FEGAN is well suited to generate high quality synthetic image using intuitive user inputs with sketch and color. We used SN-patchGAN discriminator and Unet-like generator with gated convolutional layers.

Teaser Image

Dependencies

  • tensorflow
  • numpy
  • Python3
  • PyQt5
  • opencv-python
  • pyyaml

Usage

First, download the model from Google drive.

Basic usage is:

mv /${HOME}/SC-FEGAN.ckpt.* /${HOME}/ckpt/
python3 demo.py

Select the number of GPU by editing demo.yaml file (not support multi-GPUs).

GPU_NUM: 1 (the number you want to use)
#GPU_NUM: (if you want to use only CPU, erase the number)

You can use our network with simple GUI. The only erased regions are filled.

The buttons in GUI:

  • Open Image: Open the image you want to edit and reset sketch and color.
  • Mask: Click this button and draw the mask on the left viewer.
  • Sketches: Click this button and draw the line for sketch on the left viewer.
  • Color: Click this button and draw the line for color. If you click this first time, you have to choose the color from palette.
  • Palette: Click this button to change color. If you choose the color, then click the Color button to change.
  • Save Img: Click this button to save results. It is saved as 'name.jpg'.
  • Arrange: Arrange the editing works.
  • Undo: Undo previous editing work.
  • Complete: Complete the image and show it on the right.

We recommend using this in the following steps:

1. Draw the sketch plausibly referring to the original image.
2. Draw the mask on the sketched region.
3. Click the `Arrange` button.
4. Draw the color on the masked region.
5. Click `Complete'.

Example Results

Face editing

Face editing

Edit earring

Earring

Face restoration

restore1

Face restoration (with only sketch and color)

restore2

License

CC 4.0 Attribution-NonCommercial International

The software is for educational and academic research purpose only.

Notes

  • This is developed on Linux machine running Ubuntu 18.04.1
  • Provided model and sample code is under a non-commercial creative commons license.

Citing

@article{jo2019sc,
  title={SC-FEGAN: Face Editing Generative Adversarial Network with User's Sketch and Color},
  author={Jo, Youngjoo and Park, Jongyoul},
  journal={arXiv preprint arXiv:1902.06838},
  year={2019}
}

Next

  • Update training code

Acknowledgement

We acknowledge the official code DeepFillv1. We thank all the researchers at ETRI, especially Kimin Yun and Jinwoo Jung, for insightful discussions.

sc-fegan's People

Contributors

run-youngjoo avatar 0xflotus avatar ebazarov avatar

Watchers

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