“We wanted to turn what was a cold transaction into a really welcoming moment,” said Jay Schneider, who runs the Miami company’s digital operations. The goal is to get passengers “from car to bar in 10 minutes.”

Royal Caribbean Cruises is hardly alone. Facial recognition technology is used to spot friends on Facebook and unlock your iPhone. It’s been rolled out in airports, at cash registers and on home security systems. It may soon be inescapable.

How neural networks work

In a training phase, neural networks scrutinize vast numbers of images of faces, learning on their own what’s important in the recognition process. It’s more accurate than the old way, with programmers describing what eyes, noses and mouths look like.

“Some layers capture color and texture and gradients,” said Amit Roy-Chowdhury, chair of electrical and computer engineering at the University of California, Riverside. “As you go deeper, they capture the shape of different parts of the object and ultimately the shape of the object itself.”

To work well, facial recognition systems need images with well-illuminated, clear faces that give a neural network detailed, accurate data. That’s why passport photos require even lighting, plain backgrounds, neutral expressions and subjects facing straight toward the camera. “You try to make your input as consistent as possible so your analysis can be easier,” said Raj Minhas, leader of Xerox’s PARC Interaction and Analytics Lab.