Apple’s new iPhone X uses a facial recognition technology dubbed Face ID to unlock the smartphone. Now you can look at your phone and it will recognize your face and automatically unlock itself.

Apple’s senior vice president of marketing Phil Schiller made the announcement at the company’s headquarters event in Cupertino, California. The Face ID technology is “the future of how we unlock your phone and protect your information,” Schiller said.

The tech takes advantage of the TrueDepth camera and its accompanying subsystem in the phone, which has a variety of sensors including infrared, floor illuminator, dot projector, proximity sensor, and ambient light sensor.

Above: Apple Face ID should be able to distinguish between you and your evil twin, thanks to a passcode.

Image Credit: Apple

When you look at the phone, it projects 30,000 invisible IR dots, the camera captures the image, and then it compares the results against your stored facial image. It happens in real time. The device taps neural networking technology and well as other sensors to be able to discern your face from another, and to figure out if someone is just holding a photo up to the phone. It can also detect if you are wearing a mask.

The tech also taps specialized hardware for recognition in the A11 processor that is also used in the iPhone 8. The A11 has neural engine for applications such as machine learning and artificial intelligence. The dual-core neural engine can handle 600 billion operations per second.

Face ID works if you change your hair or put on a hat, and if you wear glasses. It adapts if your face changes over time, like if you grow a beard. The processing happens on device, so it can be kept secure in a special enclave in the phone. You have to be actively paying attention to the phone to unlock it.

If you have an evil twin, you can protect the phone with a passcode, Schiller said.

Face ID works with Apple Pay.