Tag Archives: Pixel

Childish Gambino dances into Playground on Pixel

Playground gives you the power to create and play through your Pixel camera using augmented reality. You can bring your photos and videos to life by adding interactive characters called Playmoji to what’s around you, and now there’s a new Playmoji inspired by recording artist Childish Gambino. You can add him to your photos or videos by simply pointing your camera and dropping him into the scene.

childish gambino 2

Examples of Playmoji inspired by recording artist Childish Gambino. 

We worked closely with Childish Gambino and his music video choreographer, Sherrie Silver, to make sure the Playmoji’s dance moves rival those of Childish Gambino himself. By using ARCore’s motion tracking, light estimation, and ability to understand the real world, his Playmoji looks and feels lifelike, whether he’s in front of you or in a selfie next to you. He even reacts to your facial expressions in real time thanks to machine learning—try smiling or frowning in selfie mode and see how he responds.

gambino_better.gif

The Childish Gambino Playmoji pack features unique moves that map to three different songs: “Redbone,” “Summertime Magic,” and “This is America.” Pixel users can start playing with them today using the camera on their Pixel, Pixel XL, Pixel 2, Pixel 2 XL, Pixel 3 and Pixel 3 XL.

Google Pixel 3 | Playmoji Dance-Off

Think you have moves too? We want to bring you in on the fun so we're inviting #teampixel to a dance challenge. When you use the Childish Gambino Playmoji, bust out your best dance moves alongside him. The #pixeldanceoff is on—get moving!

Find more balance in your life this year, with help from Google

With our phones constantly buzzing and our inboxes filling up, it can sometimes feel like we’re always logged in. It’s easy to forget the importance of making deliberate choices about when we want to use our phones, and to know when we can take a much-needed break from screens.

Looking for more balance in your life this year? Here are some tools that will help you better understand how you’re currently using your phone, get more out your tech and carve out time to be a little more zen in 2019.

1. Take a look at your Digital Wellbeing dashboard.

Android Time Spent feature

The Digital Wellbeing dashboard on Android devices helps you understand how frequently you currently use different apps, how many notifications you receive and how often you unlock your phone. By looking at your usage over time, it’s easy to think about whether you’re getting value from the time spent on each activity and make changes.

2. Cut down on all that scrolling with app timers.

Android app timer

Once you’ve identified apps you’d like to use less often, you can set up app timers so your phone will nudge you when you’re close to your self-imposed limit. The app icon button will then gray out, with a notification to remind you of your goal, when you’ve exhausted the time limit you’ve set for yourself.

3. Use Flip to Shhh on Pixel 3.

Shhh mode on Pixel

For Pixel 3 users out there, if you turn your phone over on a table — like when you’re at dinner — your device automatically enters Do Not Disturb mode so you can focus on being present, not mindlessly checking sports scores or playing a game.

4. Create more family time with Family Link and the YouTube Kids app.

Digital Wellbeing for family and kids

If you have kids, Family Link and the YouTube Kids app allow you to set the digital ground rules for everyone in the household. With Family Link, you can view your children's activity, manage their apps, find apps recommended by teachers, set screen time limits and even lock their devices when it’s dinner or “go outside and play” time.

With the YouTube Kids app, you can decide whether or not your kids can use YouTube Kids search, keep tabs on the videos they’re watching and even block videos or channels you don’t want them to see—along with setting time limits for how long they can play with the app.

5. Get stuff done quickly and focus on what matters to you.

Great technology should improve your life, not distract from it, and a bunch of Google tools are here to help. The Google Assistant offers you downtime from screens by letting you to use your voice to send messages, control smart home devices and play music when you just want to chill. Google Photos automatically stylizes your photos for you, Android Auto minimizes distractions while you’re driving and Gmail’s Smart Compose already helps people save over a billion characters every week by suggesting words and phrases for you as you write.

6. Practice mindfulness and take a break.

Try searching for “mindfulness” in Google Play to download relaxing apps like Headspace, Calm, and many others to kickstart your wellbeing journey. You can also say to your Google Assistant, “I want to meditate” to get a bunch of app recommendations and healing sounds, and the recently updated Google Fit app now has guided breathing exercises for you, too.

7. Keep up with the #GetFitWithGoogle challenge.

With all this extra time, you might even have time to sneak in an extra run this week. We’re now three weeks into the #GetFitWithGoogle global challenge, with just one week to go as our influencer teams race to earn the most Heart Points during January with Google Fit.

Congrats to Colombia for holding onto the lead going into the final week!

Get Fit With Google leaderboard, week 3

Keep an eye on the #GetFitWithGoogle hashtag on Instagram and follow the teams below to follow their fitness journeys. Will Team Switzerland make a final dash for the line? Just one week to go before we announce the overall winners.

Don’t forget to share your own Heart Points progress using #GetFitWithGoogle to help others like you stay motivated.


Source: Android


Get more shut-eye in 2019 with help from Google

After a long day, it should be easy to hit the hay at night. But far too often, just as you’re about to drift off, you decide to check why your phone just buzzed...and you’re back to square one.

According to the National Sleep Foundation, most adults should aim to get between seven and nine hours of sleep every night. Many of us, including yours truly, usually don’t get there.

If you want a fresh start in the new year, here are some tech tips and healthy habits that will help you catch more zzzzs (and get better at counting sheep) in 2019.

1. Set up a bedtime schedule and stick to it with Wind Down.

Wind Down

If you find yourself endlessly scrolling through social feeds or trying to finish just one more level of your favorite game late at night, Wind Down on your Android phone can help you take back control. Wind Down automatically turns on Do Not Disturb and makes your phone less interesting by turning everything grayscale to help you get to sleep at the time you want.

2. Set up Quiet Hours on YouTube.

Quiet Hours on YouTube

Users on both iOS and Android devices can ask the YouTube app to silently send notifications to their phone during a specified time period each day. That means no more sounds or vibrations while you sleep. By default, all sounds and vibrations will be disabled between 10pm and 8am, but you can customize the start and end times to suit your schedule. And don’t worry, updates from your favorite creators will still be right there for you when you wake up.

3. Lull yourself to sleep with soothing sounds.

While complete silence is crucial for some people, others prefer consistent ambient noise to help them get to sleep. If you say “OK Google, help me relax”, the Google Assistant will randomly pick from more than 10 soothing sounds to quietly deliver you to the Land of Nod. You can also pick specific sounds by saying “play fireplace sounds” or “play white noise” once you work out which sounds work best for you.

4. Keep your phone out of reach, and out of mind.

Sunrise Alarm

5. Turn off your lights, and your Wi-Fi.

If you have trouble getting your kids to sleep, Google Wifi has family-friendly controls that allow you to schedule a regular Wi-Fi pause on your kids' devices. That way, your kids aren’t sneakily playing online games under the covers. (And neither are you.)

6. Keep up with the #GetFitWithGoogle challenge.

With all this extra sleep, you’ll have even more energy to spend on your other New Year resolutions like getting fit. For those following along at home from last week, here’s an update on the #GetFitWithGoogle global challenge — a four-week-long competition to see which country’s team of social influencers can earn the most Heart Points during January with Google Fit.

Congrats to Team Colombia for taking the lead on the global leaderboard after week 2!

Get Fit With Google leaderboard

Keep an eye on the #GetFitWithGoogle hashtag on Instagram and follow the teams below to follow their fitness journeys.

Don’t forget to share your own Heart Points progress using #GetFitWithGoogle to help others like you stay motivated.

On the year’s darkest day, wake up gradually with Pixel 3 and Pixel Stand

Getting out of bed on most days in the winter can be tough. But the winter solstice on December 21 makes it even harder, since the Northern Hemisphere is in the dark longer than any other day of the year. To help get you out of bed in the dark mornings of winter with a little spring in your step (pun very much intended), if you have a Pixel 3 and Pixel Stand, you can turn on Sunrise Alarm to get a more natural, brighter wake-up.

Sunrise Alarm GIF

Scientists have proven that waking up to soft light helps ease you out of your sleep rhythm for  a less jarring wake-up, which in turn sets you out on the right path for your day. In places like the Nordics, where it stays darker longer during the winter, wake-up lights have been popular for years. Engineers on #teampixel were inspired by these lamps and sought a way to create the same effects of an “artificial dawn” to help Pixel users get out of bed each morning. Once you turn on Sunrise Alarm, Pixel 3’s screen will slowly brighten in the 15 minutes leading up to the alarm going off, changing from a deep red to orange, then finally, to soft yellow—recreating the beauty of a real dawn to ease you into a better wake-up.


When docked on Pixel Stand, you can use Pixel 3 to customize your settings to help disconnect from technology gradually before bed. Try out features like Wind Down, automatic Do Not Disturb and more of the Digital Wellbeing suite available on Pixel.


Now, #teampixel can get their day started on the right foot—even if it’s in the dark—with Sunrise Alarm.

Top Shot on Pixel 3



Life is full of meaningful moments — from a child’s first step to an impromptu jump for joy — that one wishes could be preserved with a picture. However, because these moments are often unpredictable, missing that perfect shot is a frustrating problem that smartphone camera users face daily. Using our experience from developing Google Clips, we wondered if we could develop new techniques for the Pixel 3 camera that would allow everyone to capture the perfect shot every time.

Top Shot is a new feature recently launched with Pixel 3 that helps you to capture precious moments precisely and automatically at the press of the shutter button. Top Shot saves and analyzes the image frames before and after the shutter press on the device in real-time using computer vision techniques, and recommends several alternative high-quality HDR+ photos.
Examples of Top Shot on Pixel 3. On the left, a better smiling shot is recommended. On the right, a better jump shot is recommended. The recommended images are high-quality HDR+ shots.
Capturing Multiple Moments
When a user opens the Pixel 3 Camera app, Top Shot is enabled by default, helping to capture the perfect moment by analyzing images taken both before and after the shutter press. Each image is analyzed for some qualitative features (e.g., whether the subject is smiling or not) in real-time and entirely on-device to preserve privacy and minimize latency. Each image is also associated with additional signals, such as optical flow of the image, exposure time, and gyro sensor data to form the input features used to score the frame quality.

When you press the shutter button, Top Shot captures up to 90 images from 1.5 seconds before and after the shutter press, selecting up to two alternative shots to save in high resolution — the original shutter frame and high-res alternatives for you to review (other lower-res frames can also be reviewed as desired). The shutter frame is processed and saved first. The best alternative shots are saved afterwards. Google’s Visual Core on Pixel 3 is used to process these top alternative shots as HDR+ images with a very small amount of extra latency, and are embedded into the file of the Motion Photo.
Top-level diagram of Top Shot capture.
Given Top Shot runs in the camera as a background process, it must have very low power consumption. As such, Top Shot uses a hardware-accelerated MobileNet-based single shot detector (SSD). The execution of such optimized models is also throttled by power and thermal limits.

Recognizing Top Moments
When we set out to understand how to enable people to capture the best moments with their camera, we focused on three key attributes: 1) functional qualities like lighting, 2) objective attributes (are the subject's eyes open? Are they smiling?), and 3) subjective qualities like emotional expressions. We designed a computer vision model to recognize these attributes while operating in a low-latency, on-device mode.

During our development process, we started with a vanilla MobileNet model and set out to optimize for Top Shot, arriving at a customized architecture that operated within our accuracy, latency and power tradeoff constraints. Our neural network design detects low-level visual attributes in early layers, like whether the subject is blurry, and then dedicates additional compute and parameters toward more complex objective attributes like whether the subject's eyes are open, and subjective attributes like whether there is an emotional expression of amusement or surprise. We trained our model using knowledge distillation over a large number of diverse face images using quantization during both training and inference.

We then adopted a layered Generalized Additive Model (GAM) to provide quality scores for faces and combine them into a weighted-average “frame faces” score. This model made it easy for us to interpret and identify the exact causes of success or failure, enabling rapid iteration to improve the quality and performance of our attributes model. The number of free parameters was on the order of dozens, so we could optimize these using Google's black box optimizer, Vizier, in tandem with any other parameters that affected selection quality.

Frame Scoring Model
While Top Shot prioritizes for face analysis, there are good moments in which faces are not the primary subject. To handle those use cases, we include the following additional scores in the overall frame quality score:
  • Subject motion saliency score — the low-resolution optical flow between the current frame and the previous frame is estimated in ISP to determine if there is salient object motion in the scene.
  • Global motion blur score — estimated from the camera motion and the exposure time. The camera motion is calculated from sensor data from the gyroscope and OIS (optical image stabilization).
  • “3A” scores — the status of auto exposure, auto focus, and auto white balance, are also considered.
All the individual scores are used to train a model predicting an overall quality score, which matches the frame preference of human raters, to maximize end-to-end product quality.

End-to-End Quality and Fairness
Most of the above components are each evaluated for accuracy independently However, Top Shot presents requirements that are uniquely challenging since it’s running real-time in the Pixel Camera. Additionally, we needed to ensure that all these signals are combined in a system with favorable results. That means we need to gauge our predictions against what our users perceive as the “top shot.”

To test this, we collected data from hundreds of volunteers, along with their opinions of which frames (out of up to 90!) looked best. This donated dataset covers many typical use cases, e.g. portraits, selfies, actions, landscapes, etc.

Many of the 3-second clips provided by Top Shot had more than one good shot, so it was important for us to engineer our quality metrics to handle this. We used some modified versions of traditional Precision and Recall, some classic ranking metrics (such as Mean Reciprocal Rank), and a few others that were designed specifically for the Top Shot task as our objective. In addition to these metrics, we additionally investigated causes of image quality issues we saw during development, leading to improvements in avoiding blur, handling multiple faces better, and more. In doing so, we were able to steer the model towards a set of selections people were likely to rate highly.

Importantly, we tested the Top Shot system for fairness to make sure that our product can offer a consistent experience to a very wide range of users. We evaluated the accuracy of each signal used in Top Shot on several different subgroups of people (based on gender, age, ethnicity, etc), testing for accuracy of each signal across those subgroups.

Conclusion
Top Shot is just one example of how Google leverages optimized hardware and cutting-edge machine learning to provide useful tools and services. We hope you’ll find this feature useful, and we’re committed to further improving the capabilities of mobile phone photography!

Acknowledgements
This post reflects the work of a large group of Google engineers, research scientists, and others including: Ari Gilder, Aseem Agarwala, Brendan Jou, David Karam, Eric Penner, Farooq Ahmad, Henri Astre, Hillary Strickland, Marius Renn, Matt Bridges, Maxwell Collins, Navid Shiee, Ryan Gordon, Sarah Clinckemaillie, Shu Zhang, Vivek Kesarwani, Xuhui Jia, Yukun Zhu, Yuzo Watanabe and Chris Breithaupt.

Source: Google AI Blog


Most likely to win the creativity contest: meet Jake, Pixel’s biggest fan

One Bay Area boy is Pixel’s biggest fan. Using cardboard, markers and creativity, Jake Orchanian designed and built a Pixel 3 costume to wear for Halloween this year. Not only was his design astonishingly accurate—Android weather widget and all—but in addition to building his custom costume, Jake has also built out his life plan: he plans to go to college and work at Google someday.


We recently invited Jake and his family to Google’s Mountain View campus, where Jake and I sat down to talk about design, his Pixel costume, Google career goals and how to get started in the tech industry.


Max:What do you like about the Pixel 3 that inspired your to dress up as it for Halloween?

Jake: I love all of the camera features, especially Top Shot. Night Sight is pretty cool too. I especially love the screen size and the fingerprint scanner. Plus, it has unlimited phone storage.


Max: If you came to work at Google, what would be the first project you’d start? 

Jake: I would work on a product, maybe the new Pixel phone, or the Pixel Slate, or Pixelbook. When I see a Google commercial, I’m in awe. I even follow the Google Youtube channel!


Max:Wait, how old are you? 

Jake: 11 years old.


Max:Okay, so let’s see, maybe you would be working on the Pixel 15. Now that 2018 is coming to an end, are you already planning your Halloween costume for next year? Any hints for us on what it will be?

Jake: I’m thinking about being the Android logo next year!


Jake: What did you study in college in order to work at Google and a designer on Pixel?

Max:I studied Industrial Design, which is different from engineering. I always had an interest in creating and building things when I was younger.


Jake:What is the hardest part about your job, and what was the hardest part about designing the Pixel phone?

Max:One of the hardest things to figure out is what we’re going to make next. We’re always putting in new features and creating a new look and feel. When we try to figure out what to do next, we’re essentially creating the future. We hope to design something really great that millions of people will love. When you work in product development you’re always thinking about what to do tomorrow. It’s really a fun discovery process for the entire design team.


Jake:What do you do on an average day at work?

Max:On any given day, the team is doing sketches and drawings of products. We use lots of computer tools and software, like CAD software, to sketch and build models and designs. Once we make the models, we discuss as a group to figure out what is the best model and best design.


Jake: Why do you like working at Google?

Max:For me, the great part about working at Google is that is it such a wonderful place for a curious minds. We are always wondering what the next big thing is, and what we can invent and bring to the world that will make people’s lives better. This discovery process makes it really fun to work here.


Jake: What is your favorite feature on the Pixel phone?

Max: I’d have to say the camera as well. I think all of the camera features are so cool. Especially Top Shot and Wide Angle Selfie.


We’re looking forward to seeing what Jake creates next!


Selfie

To wrap the interview, Jake and Max used their favorite feature—Pixel 3’s camera—to take a selfie, before Jake and his family got a tour of our Mountain View campus.

On the 12th day of holiday shopping, Made by Google gave to me…

On the final days of holiday shopping, Made by Google gave to me … lots of awesome gift options.

Twelve ways (at least!) to make your home smarter and safer

Holiday lights are aglow when you turn them on with Google Home (and a compatible smart plug). And to turn on the rest of the lights using just your voice, get our Smart Home Starter Kit. A Nest Hello video doorbell will help you spot holiday visitors at your front door and our Nest Cam will reveal who’s eating Santa’s cookies.


Eleven personalized My Cases

With My Case, gift-giving gets personal. Create a case from your saved photos, a favorite map location, or pick one of our curated collections from various artists. It’s the perfect stocking stuffer for anyone on #teampixel. And while we love a good ugly sweater, all images for My Cases are subject to our copyright and content policy.


Ten levels of volume on Google Home Max

Blast the holiday music with Google Home Max. If you have your hands full making cookies or decorating the tree, you can use your voice to tell it to play your next tune (you may need a subscription to hear your favorite song).


Nine decades of Mickey Mouse

To celebrate 90 years of Mickey, we teamed up with Disney and Otterbox to make your Google Home Mini look like your favorite mouse with a custom base accessory. You can also make storytime more magical with Read Along, which adds sound effects and music to stories like “Mickey’s Christmas Carol.” Parents can create an account for kids under 13 through Family Link, and then link their Google Account and voice to Google Home.


Eight gigs of Pixelbook RAM

This one is a bit harder to wrap, but it’s the gift that keeps on giving. With 8GB of RAM on your Pixelbook, you can do multi-task with multiple tabs open. And, Pixelbook’s battery lasts all Silent Night.


Seven colors of Nest Thermostats

Our Nest thermostats come in two versions and seven colors. So turn up the heater in style this holiday season, and get the peace of mind that you’re saving energy while celebrating.


Six uses for Pixel Stand

You can do countless things with Pixel Stand, but here are six of our favorites: it provides Pixel 3 with a fast (up to 10W) wireless charge, you can check the weather before you head out, rock out to your favorite carol, get out of bed on dark December days with Sunrise Alarm, check on packages with Nest Hello (sold separately), and display your favorite holiday memories with Google Photos.


Five years of Chromecast

It’s the perfect time of year to snuggle up inside and binge watch your favorite show (but you may need a subscription). Chromecast brings countless hours of entertainment to your TV-loving friend or family member. And isn’t that really the holiday gift that keeps on giving?

Four colors of Google Home Hub

Who needs elves when you’ve got Google Home Hub to bring you help at a glance? With the Google Assistant built-in, you can use your voice to get the best of Google—Calendar, Maps, Search, YouTube, Google Photos, and more—right on Google Home Hub’s display. Compact, and available in four colors —Chalk, Charcoal, Aqua and Sand—Hub’s right for any room at home.


Three generations of Pixel

The best things in life come in threes. This year, we introduced the Pixel 3 and Pixel 3 XL, with the power of Google Assistant. Pixel’s award-winning camera gives you the ability to capture your holiday magic in style. And, Pixel 3 brings the best premium smartphone experience to Android, in—you guessed it—three beautiful colors, including the new Not Pink.


Two accessories to use with Pixel Slate

Pixel Slate—our first Made by Google Chrome OS tablet—is a touchscreen experience that brings the best Google design and Chrome OS functionality together. Whether you’re typing your letter to Santa on the Pixel Slate Keyboard or writing out your holiday wish list using Pixelbook Pen, these two gifts are the perfect stocking stuffers to go along with Pixel Slate.


One place to buy it all

The Google Store is a one-stop shop for all things Made by Google. In addition to the perfect holiday gifts mentioned above, the Google Store also features products from our Made for Google partners. And perfect for the holiday season, you can send gifts on Google Store with custom gift messages printed on Google-branded greeting cards. Check out all of the amazing holiday deals at store.google.com.


Six ways to take Playground home for the holidays with Pixel

In October, we launched Playground on the Pixel 3 and Pixel 3 XL, giving you the power to create and play with the world around you through your camera. Playground helps you bring more of your imagination to your photos and videos with interactive Playmoji—characters that react to each other and to you—and tell a richer story by adding animated stickers and creative captions. Starting today, Playground is available on Pixel, Pixel XL, Pixel 2 and Pixel 2 XL, so now all of #teampixel can join in on the fun.

Just in time for the holidays, we’re also introducing festive new Playmoji and stickers soon that can help bring your photos and videos to life. Whether you’re celebrating at home or hitting the road, here are six ways you can take Playground home for the holidays with the Pixel camera.

1. Share your journey.Whether your holiday travels take you away on a plane, train or automobile, getting there is all the fun with the speedy new Travel Playmoji pack. Document your adventures from the window seat, or spice up snaps from your road trip.

SunnySanta _ Device Frame.gif

2. Send a virtual postcard. Wish loved ones a happy holiday from wherever you are with Playmoji, stickers and captions. Or say it all in a selfie by posing with characters who react to you. Once you’ve lined up the perfect shot, sharing with Playground is easy—just a few taps straight from the camera.

winter

3. Let your creativity snow. Brrr! Chillier temperatures mean a chance to use snowy Weather Playmoji and the Winter Playmoji pack during your favorite seasonal activities like ice skating and hockey.

Oy to the World

4. Put your spin on a scene. Oh, dreidel, dreidel, dreidel! We made you out of…pixels. Hanukkah may be over, but you can use these themed stickers year-round, complete with dancing menorah candles, spinning dreidels and latkes galore.

ar ornaments

5. Deck the halls. Make an old tradition new again by challenging your family to a tree decorating contest with Playground. One tree, endless possibilities!

christmascheer

6. Tell an imaginative story. Add some flair to holiday scenes with the jolly new “Christmas Cheer” stickers. Throw a Santa hat on your friend, stick mistletoe where it belongs or place a one-of-a-kind “gift” under the tree.

holiday hello

You can spread the holiday cheer with Playground this season by sharing your creations with #teampixel. We can’t wait to see what you create!

Bringing eSIM to more networks around the world

With eSIM,  getting wireless service is as easy as turning on your phone. Gone are the days of going to the store to get a SIM card and fumbling around to try and place it into a small slot. With eSIM, we hope to bring you instant connectivity across more carrier networks, and devices in the Google ecosystem—from Android smartphones to Chromebooks to Wear OS smartwatches.

Pixel 2 was the first major smartphone with eSIM, and now, on Pixel 3,  we’re expanding eSIM support to more carriers. If you’re in the U.S. and would like to purchase a phone that has eSIM, head over to Google Fi or the Google Store. If you’re in Germany, look out for the ability to purchase Pixel 3 with eSIM functionality from Deutsche Telekom and Vodafone soon. Sprint in the U.S., EE in the UK, Airtel and Reliance Jio in India, and Truphone and Gigsky in various countries will also roll out eSIM support for Pixel 3 in the coming months.

To enable a consistent and simple experience across the ecosystem, we’re also creating a program that allows Android device makers to build eSIM-capable smartphones. We look forward to continuing our work with our partners on the potential benefits of eSIM—whether that’s getting you connected to a phone, watch, tablet, or laptop—in the future.

Source: Android


Learning to Predict Depth on the Pixel 3 Phones



Portrait Mode on the Pixel smartphones lets you take professional-looking images that draw attention to a subject by blurring the background behind it. Last year, we described, among other things, how we compute depth with a single camera using its Phase-Detection Autofocus (PDAF) pixels (also known as dual-pixel autofocus) using a traditional non-learned stereo algorithm. This year, on the Pixel 3, we turn to machine learning to improve depth estimation to produce even better Portrait Mode results.
Left: The original HDR+ image. Right: A comparison of Portrait Mode results using depth from traditional stereo and depth from machine learning. The learned depth result has fewer errors. Notably, in the traditional stereo result, many of the horizontal lines behind the man are incorrectly estimated to be at the same depth as the man and are kept sharp.
(Mike Milne)
A Short Recap
As described in last year’s blog post, Portrait Mode uses a neural network to determine what pixels correspond to people versus the background, and augments this two layer person segmentation mask with depth information derived from the PDAF pixels. This is meant to enable a depth-dependent blur, which is closer to what a professional camera does.

PDAF pixels work by capturing two slightly different views of a scene, shown below. Flipping between the two views, we see that the person is stationary, while the background moves horizontally, an effect referred to as parallax. Because parallax is a function of the point’s distance from the camera and the distance between the two viewpoints, we can estimate depth by matching each point in one view with its corresponding point in the other view.
The two PDAF images on the left and center look very similar, but in the crop on the right you can see the parallax between them. It is most noticeable on the circular structure in the middle of the crop.
However, finding these correspondences in PDAF images (a method called depth from stereo) is extremely challenging because scene points barely move between the views. Furthermore, all stereo techniques suffer from the aperture problem. That is, if you look at the scene through a small aperture, it is impossible to find correspondence for lines parallel to the stereo baseline, i.e., the line connecting the two cameras. In other words, when looking at the horizontal lines in the figure above (or vertical lines in portrait orientation shots), any proposed shift of these lines in one view with respect to the other view looks about the same. In last year’s Portrait Mode, all these factors could result in errors in depth estimation and cause unpleasant artifacts.

Improving Depth Estimation
With Portrait Mode on the Pixel 3, we fix these errors by utilizing the fact that the parallax used by depth from stereo algorithms is only one of many depth cues present in images. For example, points that are far away from the in-focus plane appear less sharp than ones that are closer, giving us a defocus depth cue. In addition, even when viewing an image on a flat screen, we can accurately tell how far things are because we know the rough size of everyday objects (e.g. one can use the number of pixels in a photograph of a person’s face to estimate how far away it is). This is called a semantic cue.

Designing a hand-crafted algorithm to combine these different cues is extremely difficult, but by using machine learning, we can do so while also better exploiting the PDAF parallax cue. Specifically, we train a convolutional neural network, written in TensorFlow, that takes as input the PDAF pixels and learns to predict depth. This new and improved ML-based method of depth estimation is what powers Portrait Mode on the Pixel 3.
Our convolutional neural network takes as input the PDAF images and outputs a depth map. The network uses an encoder-decoder style architecture with skip connections and residual blocks.
Training the Neural Network
In order to train the network, we need lots of PDAF images and corresponding high-quality depth maps. And since we want our predicted depth to be useful for Portrait Mode, we also need the training data to be similar to pictures that users take with their smartphones.

To accomplish this, we built our own custom “Frankenphone” rig that contains five Pixel 3 phones, along with a Wi-Fi-based solution that allowed us to simultaneously capture pictures from all of the phones (within a tolerance of ~2 milliseconds). With this rig, we computed high-quality depth from photos by using structure from motion and multi-view stereo.
Left: Custom rig used to collect training data. Middle: An example capture flipping between the five images. Synchronization between the cameras ensures that we can calculate depth for dynamic scenes, such as this one. Right: Ground truth depth. Low confidence points, i.e., points where stereo matches are not reliable due to weak texture, are colored in black and are not used during training. (Sam Ansari and Mike Milne)
The data captured by this rig is ideal for training a network for the following main reasons:
  • Five viewpoints ensure that there is parallax in multiple directions and hence no aperture problem.
  • The arrangement of the cameras ensures that a point in an image is usually visible in at least one other image resulting in fewer points with no correspondences.
  • The baseline, i.e., the distance between the cameras is much larger than our PDAF baseline resulting in more accurate depth estimation.
  • Synchronization between the cameras ensure that we can calculate depth for dynamic scenes like the one above.
  • Portability of the rig ensures that we can capture photos in the wild simulating the photos users take with their smartphones.
However, even though the data captured from this rig is ideal, it is still extremely challenging to predict the absolute depth of objects in a scene — a given PDAF pair can correspond to a range of different depth maps (depending on lens characteristics, focus distance, etc). To account for this, we instead predict the relative depths of objects in the scene, which is sufficient for producing pleasing Portrait Mode results.

Putting it All Together
This ML-based depth estimation needs to run fast on the Pixel 3, so that users don’t have to wait too long for their Portrait Mode shots. However, to get good depth estimates that makes use of subtle defocus and parallax cues, we have to feed full resolution, multi-megapixel PDAF images into the network. To ensure fast results, we use TensorFlow Lite, a cross-platform solution for running machine learning models on mobile and embedded devices and the Pixel 3’s powerful GPU to compute depth quickly despite our abnormally large inputs. We then combine the resulting depth estimates with masks from our person segmentation neural network to produce beautiful Portrait Mode results.

Try it Yourself
In Google Camera App version 6.1 and later, our depth maps are embedded in Portrait Mode images. This means you can use the Google Photos depth editor to change the amount of blur and the focus point after capture. You can also use third-party depth extractors to extract the depth map from a jpeg and take a look at it yourself. Also, here is an album showing the relative depth maps and the corresponding Portrait Mode images for traditional stereo and the learning-based approaches.

Acknowledgments
This work wouldn’t have been possible without Sam Ansari, Yael Pritch Knaan, David Jacobs, Jiawen Chen, Juhyun Lee and Andrei Kulik. Special thanks to Mike Milne and Andy Radin who captured data with the five-camera rig.

Source: Google AI Blog