How do autoencoders reconstruct images/color?
Autoencoders ( AE ) are obviously unsupervised learning algorithms as they try to reconstruct the input or something similar to their input. To get a better understanding, we may use autoencoder to colourizing grayscale images. Given an input grayscale image, the AE will predict coloured images.

I have tried one such AE here.


  Autoencoders learn to represent the given grayscale image into a latent ( compressed ) form. The encoder does this job. Now when the image has been brought down to its latent form, the decoder reconstructs the coloured image using that latent representation.


Due to this ability of autoencoders, they are used in image colorization, neural implanting and even generating images ( VAEs ). See this video.

Image colourization is not pixel-level operation. We need a smarter system which can literally observe the surroundings and assign a colour to the pixel. If we are training one such model on images of various landscapes ( sky and green croplands, for instance ) the most probable colour for green ( grass ) will be blue ( sky ).

Meaning, image colourization AEs extract spatial features which may be responsible for a colour change in the target image. A model trained on face images knows that there is a dark-coloured region above the eyes ( hair ). Many such features are learnt by even more complex models which give excellent results.


  Autoencoders store the knowledge required to colourize an image by learning features from grayscale images. After enough they tend to know which region has to colourized with which colours.