Snapchat is innovating on complex ML algorithms that are able to perceive facial features on an image captured by the camera. These algorithms try to learn the facial features and then try to create a mask with key facial feature points. This mask can then be used to juxtapose with funny graphics to create images left to the imagination and creativity of users.