Skip to main content

YouTubers can soon replace ugly video backgrounds — no green screen required

Google Research
Google Research

Replacing the background on a video typically requires advanced desktop software and plenty of free time, or a full-fledged studio with a green screen — but Google is developing an artificial intelligence alternative that works in real time, from a smartphone camera. On Thursday, March 1, Google shared the tech behind a new feature that’s now being beta tested on the YouTube Stories app.

Recommended Videos

Google’s video segmentation technique started out like most A.I.-based imaging programs — with people manually marking the background by hand on more than 10,000 images. With that data set, the group trained the program to separate the background from the foreground. (Adobe has a similar background removal tool now inside Photoshop for still images.)

Please enable Javascript to view this content

That data set, however, was trained on single images — so how did Google go from a single image to replacing the background on every frame of video? Once the software masks out the background on the first image, the program uses that same mask to predict the background in the next frame. When that next frame has only minor adjustments from the first, such as slight movement from the person talking on camera, the program will make small adjustments to the mask. When the next frame is much different from the last — like if another person joins the video — then the software will discard that mask prediction entirely and create a new mask.

While the ability to separate the background is impressive by itself, Google wanted to go one step further and make that program run on the more limited hardware on a smartphone rather than a desktop computer. The programmers behind the video segmentation then made several adjustments to the program in order to improve the speed, including segmentation, downsampling, and reducing the number of channels. The team then worked to enhance quality by adding layers to create smoother edges between the foreground and background.

Google says those changes allow the app to replace the background in real time — applying changes at over 100 fps on an iPhone 7 and over 40 fps on the Google Pixel 2. The training set, Google says, had a 94.8 percent accuracy rating. All of the examples Google shared are videos of a person — the company didn’t say if the feature works on objects.

Inside the beta test of the feature, YouTubers can change the background in the video by selecting from the different effects, from a night scene to a blank background in black and white. Some of the effects in the sample even added lighting effects, like a lens flare at one corner.

The video segmentation tool is already rolling out — but only as a beta test, so the feature isn’t yet widely available. After taking in results of that test though, Google says it plans to expand the segmentation effects along with adding the feature to other programs, including augmented reality options.

Hillary K. Grigonis
Hillary never planned on becoming a photographer—and then she was handed a camera at her first writing job and she's been…
YouTube tries new way of tackling ad blockers
Youtube video on mobile. Credits: YouTube official.

YouTube could be about to launch a widespread crackdown on folks using ad blockers.

Reports emerged last month that YouTube was deploying pop-ups to warn against the use of ad-blocking tools. But now it's taking the action one step further.

Read more
YouTube makes it easier for new creators to earn money
A young woman with a smartphone walks past signage of the Youtube logo.

The top YouTubers make eye-watering sums of money, with a Forbes list released last year revealing that the top 10 highest earners on the video streaming platform raked in a colossal $300 million between them in the space of a year.

But while the top YouTubers grab all the headlines, there are millions of other creators on the platform working diligently to build up loyal followings with carefully produced content. And while they may have fewer subscribers than YouTube’s big hitters, and get fewer views for each video, they can still earn a tidy sum that allows them to give up the day job, or at the least supplement their main income.

Read more
These are the 10 most-viewed YouTube videos of all time
The red and white YouTube logo on a phone screen. The phone is on a white background.

Being popular is about the only thing the current most-viewed YouTube videos have in common with their top-performing predecessors. Even though YouTube videos like Chocolate Rain went viral during the first few years of YouTube's content, they probably wouldn't be among the kinds of videos that go viral on the platform now.

In fact, children's programming and music videos are now among the most-viewed content on YouTube. Music videos, in particular, have enjoyed great success on the streaming site and, until recently, had been the majority of the most-viewed videos in YouTube's history. Music videos still account for 40% of the top 10 most-viewed videos, however. The other 60% is content for young children. If these view counts are anything to go by, the video-sharing site could be considered a leading platform for music videos and kid-friendly content, rather than just the memeworthy viral videos the site was known for in its early days.
What is the most-viewed YouTube video of all time?
Baby Shark Dance is the most-viewed video ever on YouTube. The children's song overtook the all-Spanish version of Despacito in November 2020.
What are the top 10 most-viewed YouTube videos?

Read more