You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: Implementation in this repo has been largely outdated. You may refer to my presentation slides for your own implementation.
This is based on one of our prior works on Sketch-to-Image Generation. Freehand sketch can be highly abstract (examples shown below), and learning representations of sketches is not trivial. In contrast to other cross domain learning approaches, like pix2pix and CycleGAN, where a mapping from representations in one domain to those in another domain is learned using translation networks, in Sketch-to-Image Generation, we propose to learn a joint representation of sketch and image.
In this project we intend to add text constraints to sketch-to-image generation, where texts provide the contents and sketches control the shapes. So far, I only tried to add attribute guidance instead of using text embeddings as additional conditions, and this repo demonstrates results on Attribute-Guided Sketch-to-Image Generation.
face
bird
shoe
* A few freehand sketches were collected from volunteers.
We test our framework with 3 kinds of data, face(CelebA), bird(CUB), and flower(Oxford-102). So far, we have only experimented with face images using attribute vectors as texts information. Here are some preliminary results:
1. Face
We used CelebA dataset, which also provides 40 attributes for each image. Similar to the text information, attributes control the specific details of the generated images. We chose 18 attrbutes for training.
a). Attributes match sketch:
The following images were generated given sketches and the corresponding attriubtes.
The following images were generated given freehand sketches and the random attriubtes. The controlling effects of the attributes are still under improvement.
Consider citing the following paper if you find this repo helpful:
@InProceedings{Lu_2018_ECCV,
author = {Lu, Yongyi and Wu, Shangzhe and Tai, Yu-Wing and Tang, Chi-Keung},
title = {Image Generation from Sketch Constraint Using Contextual GAN},
booktitle = {The European Conference on Computer Vision (ECCV)},
month = {September},
year = {2018}
}