Google Pixel 2 and Pixel 2 XL offer the best smartphone camera experience in the premium segment right now. What sets them apart from other premium devices is the portrait mode feature, which uses only one lens and relies on machine learning and artificial intelligence to blur the background. Despite having single lens, Google Pixel 2 produces among the best portrait shots, and it does so consistently. Now, Google is sharing some of the secrets behind that dramatic result with the rest of the tech world. The search giant has decided to open source the code for DeepLab-v3+, an AI-based image segmentation technology that helps Pixel 2 separate the foreground and the background.