Google just made the tech behind Portrait Mode open source

Google's Pixel phones have some of the best cameras on the market. Shunning away from the dual-cam craze for a second year in a row, Pixel phones are nonetheless capable of delivering amazing results during the day and in low-light conditions. They can even do the oh-so-popular shallow depth of field simulation, otherwise reserved for dual-lens shooters, better known as "portrait mode." The remarkable thing is that Pixel phones do this entirely through software, since there's no second camera on board to help in measuring depth. And although phones with two cameras are generally better at assessing depth and separating the subject from the background, the Pixel 2 and Pixel 2 XL have thus far impressed us with what they can do.

In true Google fashion, the company has now made the tool that makes portrait mode possible through software means only open source. The code that does the magic is called DeepLab-v3+, and it uses semantic image segmentation to identify and label different objects in an image. Through machine learning, DeepLab is capable of differentiating between "person" and "sky", for example, and it labels them as such, which then helps the further segmentation of the image into "layers" that can be separately processed in various ways.

Since DeepLab-v3+ is now open source, developers can freely implement it in their own apps! What's really cool is that this tech has a lot of potential uses, with portrait mode being just one of many.

source: Google



1. antroid

Posts: 392; Member since: Jan 24, 2018

Very good news, I hope many companies would use this code to improve their camera software

2. worldpeace

Posts: 3135; Member since: Apr 15, 2016

Well, all flagships already have their version of this feature, and works just as good as google's, so it's fine to just share it.. HDR+ is a different story though.

4. maherk

Posts: 6955; Member since: Feb 10, 2012

Not even close. I have the Gcam installed on my Note 8, and the portrait pictures shot using the stock camera app are trash, especially when you compare them to those taken with the Gcam app. Even regular pictures are better, thanks to HDR+. In extreme low light conditions, I prefer the stock app, as it produces less noise than the gcam app.

7. Heisenberg

Posts: 377; Member since: Feb 11, 2015

I havent been able to successfully make G cam work on my phone. I have an s8 Exynos version running Oreo. Pls direct me. Thanks

8. maherk

Posts: 6955; Member since: Feb 10, 2012 Download it from here, then check the forum and follow their instructions and change the settings as they recommend. Good luck

3. PhoenixFirebird

Posts: 125; Member since: Oct 10, 2016

Actually, HDR+ is what I need

5. rsiders

Posts: 1975; Member since: Nov 17, 2011

HDR+ is where the magic happens. I love it on my V20. I'll love it even more on the S9+. Also for the portrait mode on the selfie and rear cameras Google camera is a beauty.

6. Whitedot

Posts: 831; Member since: Sep 26, 2017

Off topic. Any idea why non SD chips, in my case (Kirin 970), can't do HDR with APk installed on my Mate 10Pro phone?

9. maherk

Posts: 6955; Member since: Feb 10, 2012

You can, you just need a modified apk. I believe I saw one few weeks ago for the Mate 10 on XDA.

Latest Stories

This copy is for your personal, non-commercial use only. You can order presentation-ready copies for distribution to your colleagues, clients or customers at or use the Reprints & Permissions tool that appears at the bottom of each web page. Visit for samples and additional information.