Apple might have played with the idea and explored the lands of facial recognition and “face unlock” since 2010 but the truth is that it was Google that included the feature in its platform as of version 4.0 Ice Cream Sandwich.
Turns out there’s an Apple patent application called “Electronic Device Operation Adjustment Based on Face Detection” describing the usage of a front facing camera on a device in order to both recognize the face and calculate its orientation towards the device itself. Once a face has been recognized, the device would unlock; else, the user would be presented with a password input screen. Aside from unlocking the phone or tablet, the patent also describes a custom set of actions based on face recognition (such as opening an application). Also, if a face is not detected for a certain period of time, the system could automatically go into sleep mode or lock.
Additionally, “the electronic device can determine if the orientation of the presented visual content, is substantially the same, or different, than the orientation of the human face”. Imagine that feature in your iPhoto application!