Scientists at the MIT have created a "Nightmare Machine" that uses artificial intelligence to create the scariest possible visuals.
The primary reason for building Nightmare Machine was to explore the common fear inspired by intelligent computers, said researchers including Pinar Yanardag from Massachusetts Institute of Technology (MIT) Media Lab.
They wanted to confront the anxiety inspired by AI, and simultaneously test if a computer is capable of understanding and visualizing what makes people afraid.
The designers used "deep learning" - a system that mimics the neural connections in a human brain - to teach a computer what makes for a frightening visual, according to Manuel Cebrian, a principal research scientist at CSIRO in Australia.
"Deep-learning algorithms perform remarkably well in several tasks considered difficult or impossible," Cebrian said.
"Even though there is a lot of room for improvement, some of the faces already look remarkably creepy!" he said.
"We wanted to playfully explore whether and how AI can indeed become a demon, that can learn how to scare us, both by extracting features from scary images and subsequent refinement using crowd feedback," Iyad Rahwan, an associate professor at MIT Media Lab, told 'Live Science'.
Once deep-learning algorithms understood the visual elements that were commonly perceived as spooky, they applied those styles to images of buildings and human faces - with chilling results.
Some of Nightmare Machine's faces are almost abstract, but subtle - suggestions of hollow eyes, bloody shadows and decaying flesh resulting in disturbing images.
(With agency input)