Detecting a hierarchy of face elements