Key takeaways
- Windows Hello face sign-in needs an infrared camera; developers build recognition from detection, alignment, embeddings and matching.
- Face ID uses 3D infrared depth and rejects photos, while camera-only Android unlock is weaker.
- Twins and some sunglasses can defeat face unlock, so keep a passcode or second factor.
- Attention checks stop phones unlocking while you sleep, so keep them on.
- Shop and celebrity recognition raise privacy issues and need consent, notices and human review.
Face recognition identifies or verifies a person by comparing a face image with stored face data, and it now unlocks phones and laptops, screens shop entrances and powers photo apps. Its behaviour depends heavily on the hardware and liveness checks behind it. I built FaceVision, which runs detection, recognition and liveness in the browser with ONNX Runtime Web and stores embeddings, never images, so this page covers computers, Python libraries, phones, shops, photos, twins, sunglasses, sleeping, failures and celebrity lookups.
How do you do face recognition on a computer?
To unlock a Windows PC with your face, use Windows Hello with a compatible infrared camera, set up under Settings, Accounts, Sign-in options. To build face recognition yourself, use Python libraries with OpenCV or run models in the browser.
Also asked as: how to do face recognition on computer
Windows Hello face sign-in needs an infrared camera, which many business laptops and some external webcams include; ordinary webcams are not supported for it. Macs do not offer Face ID and use Touch ID instead. For projects, a typical pipeline detects faces with a model such as RetinaFace or YuNet, aligns them, computes embeddings with a model such as ArcFace, and compares embeddings using cosine similarity against enrolled users. FaceVision runs this whole pipeline in the browser with ONNX Runtime Web, so the server receives only embeddings.
What is the face recognition library in Python?
face_recognition, by Adam Geitgey, is a popular Python library built on dlib that detects faces, finds landmarks and computes 128-dimensional encodings, letting you compare faces in a few lines of code.
Also asked as: what is face recognition library python
It is easy to start with but older and less accurate than modern deep models, and installing dlib can be tricky on Windows. Alternatives include DeepFace, which wraps several recognition models such as ArcFace and FaceNet behind one API; InsightFace, which provides strong ArcFace models and RetinaFace detection; and OpenCV's built-in YuNet detector with the SFace recogniser. For production, prefer modern models, run them through ONNX Runtime for speed, add liveness detection, and store embeddings securely with clear consent and deletion policies.
How does face recognition work on a phone?
Phones capture your face, create a mathematical template during setup, and compare new captures with it when you unlock. iPhones use the TrueDepth camera to build a 3D depth map, while most Android phones rely on the front camera's 2D image.
Also asked as: how does face recognition work on phone
Face ID projects thousands of infrared dots and reads them with an infrared camera, so it works in the dark and resists photos. The template stays in the Secure Enclave and is never uploaded, and Apple states the chance of a random person unlocking Face ID is less than one in a million. Many Android phones use camera-only face unlock, which is convenient but less secure, so banking apps may require a fingerprint or PIN instead. Some Android phones meet stronger biometric classes using advanced sensors or models.
How does face recognition work in shops?
Shop systems capture faces with cameras near entrances, convert them into templates, and compare them against a watchlist, such as people previously linked to theft or violence. A match alerts staff, who decide how to respond.
Some systems instead count visitors or estimate age without identifying anyone, and some stores trial face payment at checkout. Watchlist systems are controversial because of misidentification, bias and privacy, and data protection laws such as the GDPR treat biometric data as sensitive, requiring a strong legal basis, signage and limited retention. Regulators and courts have challenged deployments in several countries. Responsible use requires human review of every match, clear notices, short retention of non-matching faces, regular accuracy audits and a way for people to contest decisions.
Can you use a picture for face recognition?
Secure systems such as Face ID and Windows Hello reject printed photos and screens because they use infrared and depth sensing with liveness checks. Simple camera-only face unlock on some Android phones can be fooled by a good photo.
Also asked as: can i use a picture for face recognition
That is why Android classifies camera-only face unlock as a weaker biometric that cannot authorise payments on many devices. For enrolment, many apps and services, such as photo libraries or ID verification, do use a picture, but verification services add liveness checks, asking you to turn your head or blink, to prove a real person is present. FaceVision includes liveness detection for this reason. If you build a system, never trust a single static image for authentication; combine liveness, device signals and a fallback such as a PIN.
Can face recognition be fooled by twins?
Sometimes, yes. Identical twins have very similar facial geometry, and Apple notes that the probability of a false match is different for twins and siblings who look alike, recommending a passcode in those cases.
Twin confusion is a known weakness across face recognition, examined in evaluations such as NIST's Face Recognition Vendor Test, which reports how algorithms handle twins and lookalikes. Modern models perform better than older ones, especially on subtle features, but no system is perfect. For high-security uses, combine face recognition with another factor, such as a PIN, card or fingerprint, which differs between twins. In photo apps, twins may be merged into one person, so manually correcting groups helps the app learn their differences over time.
Can face recognition work with sunglasses?
Often yes. Face ID works with many sunglasses because infrared light passes through most lenses, but some sunglasses block infrared and prevent unlocking. Camera-only Android systems struggle more, since dark lenses hide the eyes.
Face ID with a mask requires your eyes to be visible, so sunglasses do not work in that mode. If your sunglasses block unlocking, try registering an alternate appearance while wearing them, or turn off attention requirements, though that slightly reduces security. In surveillance and attendance systems, sunglasses and caps significantly lower accuracy because the eye region carries much identity information. Polarised or mirrored lenses cause the most trouble. When face unlock fails outdoors, use your passcode or fingerprint rather than retrying repeatedly.
Why does face recognition stop working?
Common causes include a dirty or blocked camera or sensor, a screen protector or case covering it, changes in appearance, poor lighting, a software bug after an update, or hardware damage, especially after screen repairs.
iPhones also require the passcode after a restart, after five failed attempts, or if the phone has not been unlocked for 48 hours, which can feel like Face ID stopped working. Clean the sensor area, remove covers, restart the phone and install updates. Reset and re-register Face ID or face unlock, and add an alternate appearance if you often wear glasses or masks. If Face ID reports it is unavailable, the TrueDepth hardware may be damaged and need authorised repair. On Samsung, delete face data and register again in good lighting.
Can face recognition work while you are sleeping?
Face ID's default attention setting requires your eyes to be open and looking at the phone, so it should not unlock while you sleep. If attention detection is turned off, someone could potentially unlock it with your sleeping face.
Also asked as: can face recognition work while sleeping
Keep Require Attention for Face ID enabled unless you need it off for accessibility reasons. Samsung offers a similar option requiring open eyes for face recognition, which you should enable. Camera-only systems without such checks are more vulnerable. If you worry about someone unlocking your phone while you sleep, use a strong passcode and consider turning face unlock off at night; on iPhone, holding the side button with a volume button until the power-off screen appears also disables Face ID until the passcode is entered.
How does celebrity face recognition tell you who that celebrity is?
Celebrity recognition tools compare a face in your photo with a database of public figures. Google Lens and Bing Visual Search can suggest who a well-known person is, and services such as Amazon Rekognition offer a celebrity recognition API for developers.
Also asked as: who is that celebrity face recognition
These tools work best for widely photographed public figures and clear, front-facing images, and they can still mislabel lookalikes. Use them for curiosity, journalism or media tagging, not to identify private individuals. Face search engines that find a stranger's photos across the web raise serious privacy, stalking and consent concerns, and some face restrictions or challenges from regulators. Several large companies have limited their face recognition offerings for these reasons. When building any recognition feature, design for consent, purpose limits and data minimisation, as FaceVision does by storing embeddings rather than images.





