Closed patvdleer closed 7 years ago
Dlib was bumped to 0.2.0 in 0.49. Can you please check if the issue is fixed in 0.49 and report..thanks!
Yeah look like a bug. I try to fix it for 0.49.1
@pvizeli I've started some work already on this as mentioned at https://community.home-assistant.io/t/question-on-dlib-component/17352/15?u=tchellomello.
On my tests at https://github.com/tchellomello/home-assistant/tree/dlib_troubleshooting instead fixing the method async_process_faces
directly on microsoft
components, I moved to dlib itself to don't break the microsoft one.
Also I thought and started extending the dlib componenet so it can save images during the configuration/troubleshooting process.
Another problem that I noticed is that the face attribute is not displaying the face[ATTR_NAME] but an object instead.
@patvdleer @pvizeli created a PR #8515 based on some tests and work that I was already playing with. Please let me know what you think.
What a progress!
@tchellomello will test this tonight when I get home.
Seems like the detection does work now but the event isn't triggered.
hass --version
0.50.0.dev0
CONFIG
homeassistant:
# Name of the location where Home Assistant is running
name: Home
latitude: !secret latitude
longitude: !secret longitude
elevation: 63
unit_system: metric
time_zone: Europe/Amsterdam
frontend:
http:
recorder:
updater:
config:
discovery:
conversation:
history:
logbook:
notify:
- name: PushBullet
platform: pushbullet
api_key: !secret pushbullet_api_key
automation:
- id: face_detect_my_file
alias: Someone is in the file
trigger:
- event_data:
entity_id: image_processing.my_file
event_type: image_processing.detect_face
platform: event
action:
- service: notify.pushbullet
data:
message: Someone is at the door
title: Someone is at the door
camera:
- platform: local_file
name: my_file
file_path: /tmp/image.jpg
image_processing:
- platform: dlib_face_detect
source:
- entity_id: camera.my_file
zone 1:
name: Home
latitude: !secret latitude
longitude: !secret longitude
radius: 100
icon: mdi:home
INFO:homeassistant.components.http:Serving /api/camera_proxy/camera.my_file to 127.0.0.1 (auth: True)
INFO:homeassistant.core:Bus:Handling <Event state_changed[L]: entity_id=image_processing.dlib_face_my_file, old_state=<state image_processing.dlib_face_my_file=0; total_faces=0, friendly_name=Dlib Face my_file, device_class=face @ 2017-07-17T22:10:10.136448+02:00>, new_state=<state image_processing.dlib_face_my_file=3; total_faces=3, friendly_name=Dlib Face my_file, device_class=face @ 2017-07-17T22:10:31.138673+02:00>>
INFO:homeassistant.core:Bus:Handling <Event state_changed[L]: entity_id=image_processing.dlib_face_my_file, old_state=<state image_processing.dlib_face_my_file=3; total_faces=3, friendly_name=Dlib Face my_file, device_class=face @ 2017-07-17T22:12:14.655277+02:00>, new_state=<state image_processing.dlib_face_my_file=2; total_faces=2, friendly_name=Dlib Face my_file, device_class=face @ 2017-07-17T22:13:28.891326+02:00>>
Make sure you are running the latest version of Home Assistant before reporting an issue.
You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:
Home Assistant release (
hass --version
): 0.48.1Python release (
python3 --version
): Python 3.5.2Component/platform: image_processing/dlib_face_detect
Description of problem: Error in code for automation
Expected:
Problem-relevant
configuration.yaml
entries and steps to reproduce:Traceback (if applicable):
Additional info: https://community.home-assistant.io/t/question-on-dlib-component/17352/14