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

Please enable Javascript to view this content

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…
3 action movies on Netflix you need to watch in December 2024
Spartan soldiers wield their weapons in 300.

Despite it being the season of giving, Netflix has a surprising amount of action content queued up in December. The return of Squid Game, Netflix's most popular TV show, returns for a second season that will be even more violent and bloodier than the first. Black Doves, an entertaining spy thriller starring Keira Knightley, is also on the streamer this month.

While those two offerings are TV shows, Netflix does not skimp on action movies. The service has an entire genre dedicated to action, with multiple subgenres highlighting blockbusters, indies, and more. This month, consider streaming these three action movies, including a live-action film based on popular action figures, a brutal war story, and a survival thriller.

Read more
5 underrated movies on Netflix you need to watch in December 2024
A woman and man embrace by touching heads in The Last Letter From Your Lover.

It's the final month of 2024, and Netflix is not holding back. The streamer will release several movies and TV shows that will undoubtedly wind up on the streamer's most popular lists. On December 26, Squid Game, Netflix's most-watched show, returns for its deadly second season. Plus, Taron Egerton will play a TSA agent out to save his airport from a terrorist in a new Netflix action movie, Carry-On.

Netflix's biggest strength is its vault. If Squid Game or Carry-On are of no interest to you, then keep searching the service for something that fits your needs. If you feel like taking a chance, try one of these underrated movies. Our picks include an entertaining thriller, a Fast & Furious sequel, and a holiday romance.

Read more
Netflix is now streaming a killer AI horror movie that’s like M3GAN’s twisted sister
A female robot stands behind a man in Subservience.

Finding stuff on Netflix that is worth your time is often more work than it's worth. The recommendations that Netflix's algorithm surfaces for you aren't necessarily the things you might like best, but if you don't rely on the algorithm, there aren't a lot of alternatives.

If you're looking for something great, though, we'd recommend you check out Subservience on Netflix. The movie stars Megan Fox as an AI servant who slowly gains sentience and decides she wants the undivided attention of her male owner. Here are four reasons it's worth checking out.

Read more