Google has announced its open sourcing a software tool that helps achieve portrait mode similar to what comes loaded on the Pixel 2. While this isn’t the same exact software as what’s on the Pixel, it should still aid anyone looking to achieve a Pixel 2-like portrait mode shot from a single camera sensor.
According to Google, it’s making something called DeepLab-v3+ available for developers and OEMs. It’s built on top of a convolutional neural network (CNN) to aid in identifying objects to keep in focus while recognizing where the background of a subject would be.
Basically, using the CNN backbone architecture, DeepLab-v3+ can recognize subjects in the foreground and preserve their original quality while blurring the rest of the photo to emulate a shallow depth of field. It’s similar to how Google does portrait mode on the Pixel 2 and what’s present in the Google Camera APK so it should produce some stellar results when put into practice.
There’s a ton that goes into how this software works, so if you’re interested in reading all the nitty-gritty, click here.