A 'Nightmare Machine' is using artificial intelligence to scare people just in time for Halloween.

Algorithms, developed by MIT, have been used to generate creepy images out of an ordinary photos.

The team of researchers behind the machine is also using the images in an experiment designed to find the root of horror.

The DeepDream algorithm transfers a photograph of the Eiffel Tower in Paris to a horror scene, in a style called 'Fright Night', according to the website. 'We use state-of-the-art deep learning algorithms to learn how haunted houses, or toxic cities look like,' the researchers said

Share this article

A normal photograph of St Basil's Cathedral in Moscow is pictured left. The image on the right shows the photograph of the cathedral after it has been transformed into a scary picture using artificial intelligence

The Nightmare Machine team is making photographs of famous landmarks appear scary. New York city after an alien invasion, according to the Google Deep Dream algorithm, is pictured

HOW DEEP DREAM WORKS

Google trains an artificial neural network by showing it millions of training examples and gradually adjusting the network parameters until it gives the classifications the team want.

The network typically consists of 10 to 30 stacked layers of artificial neurons and each image is fed into the input layer, which then talks to the next layer, until eventually the 'output' layer is reached.

The network's 'answer' comes from this final output layer.

In doing this, the software builds up a idea of what it thinks an object looked like.

In the 'generative adversarial network,' part of the network will attempt to fool the other part by inventing fake data, which will be mistaken for training data.

The Nightmare Machine team is making photographs of famous landmarks appear scary.

The two main techniques used in the project, style transfer and generative adversarial networks, were published in papers last year.

The network typically consists of 10 to 30 stacked layers of artificial neurons and each image is fed into the input layer, which then talks to the next layer, until eventually the 'output' layer is reached.

The network's 'answer' comes from this final output layer.

In doing this, the software builds up a idea of what it thinks an object looked like.

'In the 'generative adversarial network,' part of the network will attempt to fool the other part by inventing fake data, which will be mistaken for training data.

In creating a network that works against itself, researchers believe it will eventually learn to be more precise in its output.

A spooky Stonehenge is pictured, after a transformation using Google's Deep Dream AI. The 5,000-year-old structure was erected in the late Neolithic period about 2500 BC

The Taj Mahal in Agra, India has been turned into multiple horror scenes, with the 'Toxic City' style shown left and the 'Slaughterhouse' style shown right

The Colosseum in Rome, Italy shown in the 'Tentacle Monster' theme. In another part of the spooky research, the AI system learns what makes images frightening using feedback from humans

This AI-generated image of Tower Bridge in London was created with an 'Inferno' theme. The two main techniques used in the Nightmare Machine project, style transfer and generative adversarial networks, were published in papers last year

A series of algorithms known as the ‘Nightmare Machine’ is trying to find the root of horror by generating a scary-looking face (various pictured) then making it even scarier

In another part of the research, the AI system learns what makes images frightening using feedback from humans.

‘Then, we dropped a hint of scariness onto the generated faces in the spirit of Halloween.

‘Now, we wonder: which faces are scarier?’

Visitors to the website can rate whether an image they see is scary or not, and help the AI to learn.

Each time someone votes for an image as scary, the algorithms learn to consider the qualities of that image as fear-inducing qualities - and the same goes for non-scary' images.

Every time a vote is cast, the AI learns more about what humans consider a scary image.

With enough input from people around the world, the AI could generate the sum of human fears.

TURN YOUR PHOTOGRAPHS INTO DEEP DREAM NIGHTMARES

Last year, Google gave a glimpse into how its Deep Dream networks learns to recognise photos.

The results were a terrifying and fascinating mix of random animals, eyes and psychedelic shapes spotted in everyday images.

And a few weeks later, developers created an app that lets you transform your own photos and GIFs into Deep Dream nightmares.

Called Deep Dreamer, the tool was built by Realmac Software based in Brighton and is only available for Mac users.

The company specialises in Mac software and has not revealed plans to roll it our for Windows user.

Any photo or GIF can be dragged into the tool, or opened from the File menu, and a series of tools lets users tweak how the finished photo, or ‘dream’ will look.

These range from an impressionist painting style, to looking for eyes, animals and a dream described simply as ‘trippy’.

The number of ‘dreams’ and iterations can be tweaked to dig deeper into the image and Google’s code, resulting in more obscure and surreal images.

Once the refinements have been selected, users click ‘Start dreaming’ and the image begins to change on the screen.

A progress bar sits at the top and a notification is sent when the ‘dream has finished’.

Last year, Google gave a glimpse into how its Deep Dream networks learns to recognise photos. The results were a terrifying and fascinating mix of random animals, eyes and psychedelic shapes spotted in everyday images. And a few weeks later, developers created an app that lets you transform your own photos and GIFs into Deep Dream nightmares (pictured)