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…
Stop! And watch these 3 great movies leaving Netflix by May 1
Elvis Presley stands at the mic and performs with his band.

May 1 is less than a week away, meaning Netflix will be removing numerous movies from its library. Notable titles leaving at the end of April include Joker, Todd Phillips' Oscar-winning origin story for DC's most notorious villain; Apollo 13, Ron Howard's terrific drama about the failed moon mission; and Whiplash, Damien Chazelle's sensational thriller about a jazz drummer's pursuit of excellence.

And there are even more great movies leaving Netflix in April. Our selections include a revolutionary sci-fi action film from the 1990s, a hilarious comedy featuring a terrific duo, and a musical biopic about an icon. Carve out some time to watch these three movies by May 1.
Jurassic Park (1993)

Read more
5 movies leaving Netflix in April 2024 you have to watch now
A clown stares into the mirror.

The end of April means Hollywood is heading into the summer blockbuster season. The new month also signals the removal of many notable films on Netflix. Step Brothers, The Florida Project, The Sting, and the first three Jurassic Park films will be unavailable on Netflix starting May 1.

The list does not stop at the six films mentioned above. We selected five additional films departing Netflix at the end of April. Our choices include an Oscar-winning psychological thriller revolving around jazz, an iconic comedy from the 1990s, and a billion-dollar-grossing comic book villain origin story.
Silver Linings Playbook (2012)

Read more
The best Netflix original movies right now
Micheal Ward and Bill Nighy in The Beautiful Game.

Rebel Moon – Part Two: The Scargiver and Woody Woodpecker Goes to Camp may currently have higher places on the list of the most popular movies on Netflix, but they're not among our picks for the best Netflix original movies. Instead, our choices for the month of April are the sports drama The Beautiful Game and two biographical dramas: Scoop and Shirley.

Thankfully, Netflix offers fans more than just dramas. The streamer's vast library of original movies has a number of comedies, thrillers, sci-fi films, animated flicks, horror stories, and more. You can find them all in our roundup of the best Netflix original movies right now.

Read more