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.

Recommended Videos

“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.

Luke Dormehl
Former Digital Trends Contributor
I'm a UK-based tech writer covering Cool Tech at Digital Trends. I've also written for Fast Company, Wired, the Guardian…
If you have to watch one Netflix movie in November, stream this one
A girl leans out of a car window in Woman of the Hour.

Few things are more relatable than opening Netflix knowing full well that you have time to watch a movie, and realizing with a pang of panic that you don't actually know what you want to watch. If you've ever found yourself scrolling through Netflix for what feels like hours without a clear sense of purpose, know that you aren't alone.

We've tried to take some of the hard work on and save you from that endless scroll by picking out one movie that's worth making time for this November. Woman of the Hour tells the true story of a woman who went on a dating game show in the 1970s, and almost found herself victimized by serial killer Rodney Alcala, who she chose to be her date. Here are three reasons the movie is worth checking out.

Read more
5 great Netflix movies to stream this Election Day
Will Smith and Martin Lawrence in Bad Boys: Ride or Die.

There's good news for everyone this election season: It's almost over. We can't guarantee that we'll have a presidential winner on Election Day, but you don't have to be glued to the results as they come in. There's an easy way to escape the endless onslaught of incremental news by taking a few hours to Netflix and chill.

We've put together a list of the five great Netflix movies that you should stream this Election Day, and there's something here for everyone, from action fans to romance and comedy lovers.

Read more
iOS 18’s best AI tools arrive in December, but Siri has a longer wait
Apple Intelligence on iPhone 15 Pro.

The Apple Intelligence toolkit has witnessed a staggered mix of delayed features and underwhelming perks. But it seems that the most promising set of those AI tools that Apple revealed at WWDC earlier this year is right around the corner.

In the latest edition of his PowerOn newsletter, Bloomberg’s Mark Gurman writes that the iOS 18.2 update will start rolling out via the stable channel in the first week of December.

Read more