Skip to main content

A Netflix data scientist taught an A.I. to recognize smooching scenes in movies

A senior data scientist at Netflix has taught an artificial intelligence (A.I.) algorithm to be able to recognize smooches. Amir Ziai developed the tool, which is able to watch movies and recognize scenes in which the characters lock lips, as part of his work to obtain an A.I. graduate certificate from Stanford University.

He selected kissing scenes because, he told Digital Trends, they can be tough to detect using traditional video-processing techniques. That’s because machines get easily confused and produce false positives when seeing other scenarios in which two people have their heads close to one another — such as talking scenes or ones in which characters walk in close proximity.

“Training was done using a database of Hollywood movies spanning multiple decades and genres,” Ziai said. “I annotated kissing and non-kissing segments in 100 of these movies, and used those segments to train a multimodal neural network that uses both audio and visual features from 1-second segments. The major challenge with training these models is twofold. First, I had to make sure that I’ve annotated a representative set of training examples that’ll help with generalizing to a diverse set of movies. Second, training deep-learning models on video can be very resource intensive.”

Nonetheless, he pulled off the feat, and the resulting tool turns out to be impressively accurate. The system employs a two-phase process. First, it uses a binary classifier to predict whether kissing is or isn’t taking place using features extracted from still frames and audio waves. The second component then aggregates the binary labels for “contiguous non-overlapping segments” into a set of kissing scenes. The final result achieves a validation F1 score of 0.95 on a diverse database of movies.

Ziai, it should be noted, isn’t the only person interested in getting machine intelligence to recognize kisses. Recently, Google unveiled a new feature for its Photobooth tool that prompts Pixel smartphones to automatically take photos when they recognize that the subjects in a frame are kissing.

“System like the kissing detector can be used to automatically add metadata to movies,” Ziai said. “This metadata can be used to search and retrieve relevant snippets. For example, a video editor can use such metadata to quickly find relevant segments and to speed up the process of editing a movie.”

A paper describing the work, titled Detecting Kissing Scenes in a Database of Hollywood Films, is available to read on the preprint server arXiv.

Editors' Recommendations

Luke Dormehl
I'm a UK-based tech writer covering Cool Tech at Digital Trends. I've also written for Fast Company, Wired, the Guardian…
Why is this 2018 action movie starring The Rock so popular on Netflix right now?
McKenna Roberts and Dwayne Johnson in Skyscraper.

Dwayne "The Rock" Johnson started his career as a wrestler in WWE, and that's what he's been doing again as recently as WrestleMania. Outside of the ring, Johnson established himself as one of the top action stars in Hollywood. In that capacity, Johnson starred in the 2018 action thriller Skyscraper, which is currently one of the most popular movies on Netflix.

Although Skyscraper is not Johnson's best action movie, it is underrated compared not only to his own films but also to the rest of the modern action flicks. So, if you're looking for an action fix this week, here are three reasons why The Rock's Skyscraper is an underrated action movie.
Johnson allows himself to be more physically vulnerable

Read more
The best LGBTQ movies on Netflix right now
A family dances in The Persian Version.

After years of asking, LGBTQ+ content is more readily available than ever, largely thanks to streaming. No longer do audiences have to settle for "bury your gays" stories because the best LGBTQ+ movies on Netflix include a healthy mix of every possible genre. From dramas to comedies, rom-coms, and even the occasional genre movie, including horror and sci-fi, there actually is something for everyone in the LGBTQ+ community. These films feature compelling queer stories and characters that will make their audience feel seen, perhaps for the first time.

New movies come to Netflix every week, meaning there's a consistent and varied collection of queer-themed pictures available. Some are acquired tastes, while others are critically acclaimed classics; a few are animated, and some others are decidedly not kid-friendly. With so much to choose from, it might be tedious to search for just one title. Luckily for you, we've pulled together a list of the best LGBTQ-themed movies on Netflix right now.

Read more
Netflix’s most addictive movie of 2024 is now streaming. Here’s why you need to watch it
A man aims his camera in Scoop.

Thrillers come in all shapes and sizes. There's the psychological or serial killer thriller, which was popularized in the '90s by The Silence of the Lambs and Se7en. There's the erotic thriller, which had its heyday in the late '80s and early '90s with such hits as Fatal Attraction and Basic Instinct. And then there's the action thriller, which is probably the most popular offshoot of the genre right now, with the Taken series and Salt as prime examples.

Recently, there's been a revival of a subgenre that's been dormant since the 1970s: the journalism thriller. From Nightcrawler with Jake Gyllenhaal to the Oscar-winning Spotlight to 2022's She Said, this type of thriller usually centers around journalists pursuing a controversial and sometimes dangerous story. One of the best journalism thrillers has just been released by Netflix: Scoop. In chronicling how the BBC managed to snag the scoop of the decade by interviewing Prince Andrew about his connections to convicted sex offender Jeffrey Epstein, the movie manages to be suspenseful, informative, and one of 2024's most purely entertaining films.
The story everyone is after

Read more