Just in Time for Halloween, We Have an A.I. Program for Making Celebrities Look Absolutely Horrifying

Can artificial intelligence learn what keeps you up at night?

Charles McQuillan/Getty Images

Angelina Jolie’s lips bleed onto her sallow, graying skin. Ellen DeGeneres stares at us with one crazed eye, blood dripping out of her mouth. Kermit the Frog holds his head in agony as the skin on his abdomen appears to peel off.

Are you scared yet? Well, according to two self-learning programs, you should be. The Nightmare Machine, a tool created by researchers at the Massachusetts Institute of Technology’s Media Lab just in time for Halloween, employs deep-learning algorithms to superimpose our deepest, darkest fears onto regular images, from celebrities and fictional characters to images of famous landmarks, like the White House, Taj Mahal, and the Colosseum.

Created by Media Lab post-doctoral fellow Pinar Yanardag, Commonwealth Scientific and Industrial Research Organisation research scientist Manuel Cebrian, and MIT professor Iyad Rahwan, the Nightmare Machine uses data from an online form in which users are shown 10 of the team’s more than 200,000 computer-generated images and asked to rate the scariness of each one. Having learned what makes certain images scary, the algorithms pulls out these elements and combines them with ordinary images.

“We started little by little, experimenting with what we call the ‘nightmarifying’ process,” Manuel explained on CSIRO’s blog. “We use deep learning algorithms to learn first how haunted houses, then ghost towns, and more recently toxic cities look. Then, we apply the learned style to famous landmarks. It’s surprising how well the algorithm can extract the element from the ‘scary’ templates and plant it into the landmarks.”

The researchers used two main types of algorithms for their fright-inducing scenes: “deep convolutional generative adversarial networks” for its Haunted Faces; and a “neural algorithm of artistic style” for its Haunted Places. The landmarks are categorized into eight spooky styles: haunted house, fright night, slaughterhouse, toxic city, ghost town, inferno, tentacle monster, and alien invasion. “Our research group’s main goal is to understand the barriers between human and machine cooperation,” Rahwan wrote in an email to the Washington Post, noting people’s growing fears of the threat of artificial intelligence.

You can check out more of the Nightmare Machine’s pictures on its website and Instagram page. In what might be its most terrifying image, a bruised Hillary Clinton and Donald Trump face-off on the debate stage—as if this election season were not scary enough already.