Facial recognition returned to the latest Google Pixel phones on Thursday after a short hiatus due to challenges on cost and performance, according to three former employees at the Alphabet Inc unit knowledgeable about the efforts.

The feature on the new Pixel 7 is not as good Apple Inc's Face ID unlocking mechanism, as it can struggle in low light and is more vulnerable to being spoofed. In addition, Google has said it is not secure enough to enable signing into apps or making payments.

The return comes after Google became stricter about launching products with facial recognition, in part due to questions about its performance on darker skin. The company took time to review its approach to training and testing facial recognition since the previous Pixel with the capability launched in 2019, one of the sources said.

Google declined to comment on several specific questions about its history with face unlock. It said generally, "Thanks to advanced machine learning models for face recognition, Pixel 7 and Pixel 7 Pro feature Face Unlock, but we’re doing it a little differently." It added, "We achieve good facial accuracy performance with the front-facing camera."

Google's pursuit of face unlock for Android smartphones spans at least a decade, but it came under greater pressure when Apple released Face ID in September 2017, the sources said.

To that point, Google struggled to devise a system that both performed quickly and was impervious to spoofing, or the use of photos or hyper-realistic costumes to fool someone else's phone into unlocking, one of the sources said. Engineers toyed with requiring a smile or a blink - proving a person's "liveness" - to combat spoofing but it was awkward and slow, the source said.

Another source noted that after the arrival of Apple's Face ID, which uses a depth-sensing and infrared camera called TrueDepth to map a face, Google executives signed off on a comparable technology. Google's Pixel 4, released in 2019, called its infrared depth-sensing setup uDepth.

It performed well, including in dark conditions, with no more than a 1-in-50,000 chance that it would unlock a phone for an unauthorized face, according to Google.

But the gear was expensive. And while Apple sells 240 million iPhones annually, Google has topped out at a few million, preventing it from buying parts at the volume discounts Apple does.

Google dropped uDepth in the Pixel 5 in 2020 due to costs, the sources said.

Face masking because of the pandemic gave Google reason to exclude the feature from last year's Pixel 6 and additional research time, two sources said.

Face unlock on the new phones relies on a typical front camera. But unlike the previous system, it cannot securely unlock apps and payments because Google says spoofing chances - such as by holding up a user's photo - are greater than 20%, above the 7% threshold it requires to be considered most "secure."

Low light and sunglasses also can cause trouble, Google says, noting fingerprint unlock remains an alternative. (Reporting by Paresh Dave; Editing by Kenneth Li and Leslie Adler)