1. Introduction
Machine Learning researchers may split the learned model into two catogories, generative model and discriminative model, and Convolutional Neural Network is usually seen as a powerful discriminative model. We used to think that the discriminative model have no ability of generating the whole image, just as we human beings, we cannot draw a vivid picture without professional training.
Now we all know that the CNN based system has surpassed human beings in the ability of recognizing people. So do the discriminative CNNs have better ability of drawing portraits, even trained with only discriminative signals? This post will tell you the answer.
Firstly, we need to find a CNN model which is close to the human beings in recognizing people. Thanks Wu Xiang. He has provided a model with 98.13% verification rate on LFW, while human beings’ average rate is about 99%. We will use the model he provided for the following experiments.
2. Method
If you are interested in Deep Learning, you must know the Inceptionism, which have raised a huge wave of using Neural Networks for art making. Here we will use a similar tool, reversing the neural network. Different from what we usually do, giving an image to a CNN model and it tell us this is Susan or Lucy, now we will tell the neural network from the tail of CNN that we need Susan’s image. Then by back-propagation, we will finally get an image from the input side of the CNN model.
3. Result
Wu Xiang’s model is trained with CASIA-WebFace dataset, which is very huge, containing about 490,000 face images of 10,575 movie stars. Now, let’s see choose some movie stars and see what they look like in computer’s brain:
Bruce Lee | Mr Bean |
---|---|
Yun-Fat Chow | Anne Hathaway |
---|---|
Bingbing Li | Bingbing Fan |
---|---|
LoL, are these portraits somewhat look like them in the real world? We can see that the CNN have indeedly memorized some features of the training samples, not as the all along prejudice that discriminative model cannot do generating tasks. They can, and do well!
PS: I can’t wait to show the images generated by a pornography detection system. If you have trained one, please contact me!
PS2: The codes are on my Github. The face verification model can be found in Wu Xiang’s Github.
PS3: A friend of mine gave me a pedestrian detection model. Here is its visualization. I believe you can find a “fat person” in it, LOL.