clean code of face detection