Facial recognition technology has been tested by the Walt Disney Company to determine whether audience members are enjoying a film or thinking about walking out.

Disney, the makers of the latest episodes of Star Wars and hit franchises like Pirates of the Caribbean, are gearing up to better understand what their audience wants by monitoring facial expressions while they watch the screen.

READ MORE: Hackers seize unreleased Disney film, demand ‘huge’ Bitcoin ransom – report

Known as factorized variational autoencoders (FVAEs), the method involves the use of four infrared cameras placed in a theatre and an algorithm that can recognize a variety of facial expressions.

The technology was put to the test during multiple showings of 2015 blockbuster films, including ‘Ant Man’, ‘The Jungle Book’ and ‘Star Wars: The Force Awakens’.

FVAEs capture facial movement while the AI translates them into statistical data that can establish if a viewer was responsive to what they were watching in a positive or negative way.

In a Disney Research document, which was produced with the help of Simon Fraser University and Caltech, the company says technology is more practical than other audience response methods such as using wearable sensors or measuring eye fixation or movement.

The deep learning system is so adept at understanding facial responses that it can predict how a person will feel about a movie just minutes into watching.

READ MORE: Disney goes Westworld? Media giant plans 3D printed, soft robots for ‘human interaction’ (IMAGES)

“After observing an audience member for a few minutes, FVAEs are able to reliably predict that viewer’s facial expressions for the remainder of the movie,” the Disney Research document states.

“Furthermore, FVAEs were able to learn concepts of smiling and laughing, and that these signals correlate with humorous scenes in a movie.”