Google has built image recognition software that enables an artificial neural network of computers to see shapes in images, and the by-product of this is some surprisingly creative and unusual pictures.

Psychedelic images generated by Google's neural network
Pictures of dogs have been superimposed over this painting of a knight Google Research

The internet giant's software engineers fed millions of pictures to the neural network in order to teach it to understand specific parts of an image, such as what a tree is, or what the sky looks like.

Artificial neural networks are being used to power facial recognition and speech recognition systems. They are built using mathematical algorithms, but it is still difficult to understand how exactly the computers are able to detect images and why sometimes it doesn't work.

Psychedelic images generated by Google's neural network
A picture of antelope takes on an impressionist painting feel in the neural network Google Research

Google's artificially intelligent neural network consists of between 10 to 30 stacked layers of artificial neurons. Each layer looks at the image and detects different aspects, such as a corner or a shape, conveying information to the next layer, until the final layer formulates an answer.

Sometimes, the network interprets shapes and decides to interpret innocuous images like clouds or faces as animals.

Psychedelic images generated by Google's neural network
Clouds start to take on the shape of animals the neural network has seen before Google Research

"The results are intriguing — even a relatively simple neural network can be used to over-interpret an image, just like as children we enjoyed watching clouds and interpreting the random shapes," Google writes in its blog.

"This network was trained mostly on images of animals, so naturally it tends to interpret shapes as animals. But because the data is stored at such a high abstraction, the results are an interesting remix of these learned features."

Psychedelic images generated by Google's neural network
A "dream" image that was generated by the Google neural network completely by itself Google Research

The software engineers in Google's artificial intelligence department also discovered that the neural network would mistake inanimate objects for other inanimate objects, so rocks and trees would suddenly appear as buildings, or actual animals like birds, fish and insects might be mistaken as being images of leaves or clouds.

Even better, if the same computer algorithm is then applied to the picture that the neural network produced, the end result is even more fantastical, with regular pictures of towns turning into whimsical impressionistic art masterpieces that Monet and Van Gogh would probably approve of.

Psychedelic images generated by Google's neural network
Inanimate objects are interpreted as other structures and living things by the Google neural network Google Research

The results are so pretty that Google is now wondering whether the neural networks, which are meant to be for image recognition, could one day become a tool for digital artists.

Psychedelic images generated by Google's neural network
Google's neural network could one day be used by artists Google Research