Capturing a group selfie can be a daunting task. Someone is always looking the wrong way or unhappy with their facial expression in the shot, usually resulting in a large number of unusable shots in your camera roll. Google has now developed a clever piece of AI software for its Pixel phones that should make things much easier and reduce the image waste on your device.

Photobooth is a new shutter-free mode in the Pixel 3 Camera app. With the mode activated you hit the shutter once and the camera will automatically capture a shot when the camera is stable and all subjects have good facial expressions and their eyes open.

Unlike face, smile and blink detection features of the past Photobooth does not simply rely on the shape and specific features of the human face. Smartphone processing power allows for better autonomous control of the capture process by the device. Photobooth is capable of identifying five expressions: smiles, sticking your tongue out, kisses, duck face, puffed out cheeks, and a look of surprise.

The Google engineers trained a neural network to identify these expressions in real time. After pressing the shutter button every preview frame is analyzed, looking for one of the expressions mentioned above and checking for camera shake.

In the camera app a white bar that expands and shrinks indicates how photogenic the preview scene is deemed by the algorithm, so users have some idea when the camera is likely to trigger the capture.

Some of the technology has been ported from one of Google's now terminated hardware projects, the Clips lifelogging camera.