We taught the application to detect a smile at different positions of the face in the photo, regardless of lighting, face type, skin color, or the presence of other objects in the shot. We were able to achieve a natural teeth whitening effect without damaging the original image.