2

I read The Batch: GANs newsletter and Goodfellow said:

My colleague Bing Xu modeled face images from the Toronto Face Database, which were only 90 pixels square and grayscale. Because the faces were always centered and looking straight at the camera, even very simple algorithms like PCA could make pretty good faces.

I wonder how PCA can be used to make faces. As far as I know, it can be used to reconstruct image like in the article Facial Image Compression and Reconstruction with PCA. But can it generate a new random image?

MarianD
  • 1,493
  • 2
  • 8
  • 17
Thew
  • 121
  • 3
  • 1
    Because an image is a vector, https://stats.stackexchange.com/questions/229092/how-to-reverse-pca-and-reconstruct-original-variables-from-several-principal-com answers your question. See https://stats.stackexchange.com/search?q=pca+reconstruct for more related posts. – whuber Oct 13 '20 at 15:08
  • @whuber But can it generate a new *random* image? – Thew Oct 13 '20 at 15:12
  • 1
    Sure--in a huge number of ways. If you wish to ask that question, simply edit your post. But please indicate what random distribution you want to use. – whuber Oct 13 '20 at 15:12
  • @whuber Not sure what random distribution means. Can it be normal distribution? – Thew Oct 13 '20 at 15:21
  • Not usually, because the components of an image are typically restricted either to the range $[0,1]$ or are limited to the integers 0, 1, ..., 255, while Normal distributions do not have that property. – whuber Oct 13 '20 at 15:55
  • @whuber Could you give an example of distribution that will work? In GANs, the input can be normal distribution. – Thew Oct 13 '20 at 16:03
  • 2
    Sure: take a linear combination of the principal components whose weights are determined by *any* distribution, followed by clamping the values of the result to the range $[0,1].$ – whuber Oct 13 '20 at 16:06
  • @whuber Thanks, I just tried and it works. However, all generated images look alike. – Thew Oct 13 '20 at 17:14
  • 1
    Varying the first PCs more will cause the random images to look more different. – whuber Oct 13 '20 at 17:38

0 Answers0