Watch a haunting MIT program transform photos into your worst nightmares

The smarter artificial intelligence (AI) software gets, the more fearful the world’s brightest contemporary minds seem to grow.

SpaceX and Tesla founder Elon Musk said in 2014 that “we’re summoning the demon” with the technology. And just last week Stephen Hawking, during the opening of the Leverhulme Centre for the Future of Intelligence, also stumped on his trepidation of ever-powerful computer algorithms.

“In short, the rise of powerful AI will be either the best, or the worst thing, ever to happen to humanity,” Hawking said. “We do not yet know which.”

Preying on these fears, three researchers at MIT Media Lab took a page from “Black Mirror” and created the Nightmare Machine.

“We know that AI terrifies us in the abstract sense. But we wondered: […] can AI elicit more powerful visceral reactions more akin to what we see in a horror movie?” Pınar Yanardağ, a data scientist and member of the project, told Business Insider in an email. “That is, can AI creatively imagine things that we find terrifying?”

Here’s how the team developed its scary software, plus some images and animations of it at work.

The team first borrowed an algorithm that can transform ordinary images into the styles of famous artists, like Vincent Van Gogh.

The algorithm can be trained on some source material, then recognise and break up discrete stylistic elements into layers.

Leon Gatys

Source: Business Insider

The MIT Media Lab team adapted the algorithm, editing some of the source code and then training it with some ... more macabre source material. They did so several times to create different filters.

This is the original photo for one transformation the Nightmare Machine made, using a filter called 'toxic city'.

Here's the end result. It's pretty spooky.

This is the Taj Mahal in the 'Slaughterhouse' filter.

Because the Nightmare Machine processes images in layers, you can watch it apply its scary aesthetic. Watch a bright image of Saint Basil's Cathedral in Moscow get spooky through the lens of the 'haunted house' filter.

And here's the Neuschwanstein Castle in Germany under the same filter.

The creators also tweaked a different algorithm to make ordinary faces look horrific -- and you can help train it by voting 10 of its images at a time 'scary' or 'not scary'.

'There is extra information in how humans perceive horror that can be exploited to make even scarier faces,' Iyad Rahwan, another researcher on the Nightmare Machine project, told Business Insider in an email. And, he said, 'personalised horror images' -- those tailored to your own idea of scary.

Business Insider Emails & Alerts

Site highlights each day to your inbox.

Follow Business Insider Australia on Facebook, Twitter, LinkedIn, and Instagram.