irfanICMLL / Auto_painter

Recently, realistic image generation using deep neural networks has become a hot topic in machine learning and computer vision. Such an image can be generated at pixel level by learning from a large collection of images. Learning to generate colorful cartoon images from black-and-white sketches is not only an interesting research problem, but also a useful application in digital entertainment. In this paper, we investigate the sketch-to-image synthesis problem by using conditional generative adversarial networks (cGAN). We propose a model called auto-painter which can automatically generate compatible colors given a sketch. Wasserstein distance is used in training cGAN to overcome model collapse and enable the model converged much better. The new model is not only capable of painting hand-draw sketch with compatible colors, but also allowing users to indicate preferred colors. Experimental results on different sketch datasets show that the auto-painter performs better than other existing image-to-image methods.
132 stars 22 forks source link

a #1

Closed irfanICMLL closed 6 years ago

irfanICMLL commented 6 years ago

import numpy as np import random res=np.zeros([1000,100]) for i in range(1000): for j in range(100): p=random.random() w=random.random()/2.5 if p <w: res[i,j] = 0 else: res[i, j] = 1

np.savetxt('vote_results.csv', res, delimiter = ',')