dlib_face_detect image processing platform allows you to use the Dlib through Home Assistant. This platform enables face detection from cameras, and can fire events with attributes.
This can be used to trigger an automation rule. Further info is on the integration page.
# Example configuration.yaml entry
- platform: dlib_face_detect
- entity_id: camera.door