
Shortly before the celebration of the
most terrible day of the year, a team from the Massachusetts Institute of Technology
launched the Nightmare Machine. Inspired by the classic “horror” and the capabilities of artificial intelligence, Pinar Yanardag, Manuel Kebrian and Iyad Rawhan taught the neural network to create gloomy urban landscapes from popular sights, and frightening portraits from celebrities.

Eiffel Tower / MIT
')
In order for the Nightmare Machine to generate Halloween-like pictures, MIT scientists used
the Neural Art Style Algorithm , which gained widespread popularity with the release of applications like Prisma and Vinci, which run on an optimized version of this algorithm.
Deep neural networks consist of many layers. During training, each of them is able to “capture” certain information from the image, depending on what “depth” the layer is at, and transfer the remaining data to the next one. Those that are outside perceive only common features and color spots, but the deeper, the more details. Information extracted by deeper layers is crucial. In fact, these layers contain the essence of the image, regardless of the context (style, color, texture).

In 2015, specialists from
the University of
Tübingen in Germany found that the artistic style can be “captured” from the correlation between the layers. They were able to separate the content of the image from the artistic style and transfer the latter to any other image.
“Scary” pictures are generated in exactly the same way. Researchers at MIT first showed neural networks images of classic haunted houses and ghost towns, identifying common patterns. Then, artificial intelligence applied them to new designs, populating the Roman Colosseum with ghosts and forcing Tower Bridge to glow with infernal fire.
A trio from MIT offered five different styles: from “House with ghosts” to “Inferno”.
House with the ghosts

Night of fear

Toxic City

Ghost town

Inferno

To create portraits, the researchers used an
uncontrollable learning algorithm for generative adversarial networks . It was introduced in January 2015 by Alec Redford from Indico.
This algorithm is the best suited for creating faces of non-existent people. A trained neural network can replace one given part with another. For example, a sullen male face in the portrait "bestow" a dazzling female smile, and in the interior
replace the window with a door. In the case of the Nightmare Machine, the situation is much more frightening. She creates faces that look like ghostly entities from the darkest horror, and then adds a “pinch” of Halloween spirit to them. Below you can look at the finished "dishes" of this particular kitchen.

According to the authors, anyone can contribute to the training of the Nightmare Machine. On the project site openly vote for the most terrible portrait. Having chosen the most terrible of the ten proposed images, the site visitor receives a selection of 36 pictures, which, in the opinion of the creators, will make an impression on him. The voting results will be taken into account in the neural network.
The site "Machines nightmares" presents only part of the work. To see how Brad Pitt and Bart Simpson turn into zombies, you have to go to the
instagram profile of the project.
The effect that the Nightmare Machine produces is comparable to what can be seen in Google's
DeepDream . The program searches for and successfully finds in the picture faces and patterns that are difficult for a person to imagine.

The result is psychedelic, but initially the developers did not put a frightening sense in their offspring. The Nightmare Machine is the first project specifically designed to make the pictures look intimidating.