jakowenko / double-take

Unified UI and API for processing and training images for facial recognition.
https://hub.docker.com/r/jakowenko/double-take
MIT License
1.19k stars 92 forks source link

MQTT event on detector not detecting face [FEAT] #145

Open Haloooch opened 2 years ago

Haloooch commented 2 years ago

Is your feature request related to a problem? Please describe. Currently if Frigate detects a person Double Take with pass the image to the configured detector/s and if a face is identified it will return ever the person's name if known or unknown. In turn double take will display the image in its GUI and send an MQTT message with the details of what was detected. However, if the detector/s do not detect a face, nothing happens.

Describe the solution you'd like Double take to send an MQTT message if no face is detected in an equivalent way as it does when an unknown person is detected.

Additional context I have security automation setup in HA and node-red which is listening to the double take 'camera' topics, when a message is sent it among other things sends a TTS message to my speakers saying either 'Bob had been detected in the drive' or 'Unknown person had been detected in the drive'. Issue is there are occasions Frigate detects a person, my detectors (using both deepstack and compreface) do not identify a face resulting in no camera topic being sent. Resulting in no warning that someone is in my drive :)

Worth noting it's rare for both deepstack and comreface not picking up a face, but it's most common at night when the image is dark, the exact time I want my security automation to be working.

As a result of the missing warnings, I've needed to change my automation so its listening to the frigate topic, this however doesn't allow me to work out if I know the person or not.

jakowenko commented 2 years ago

I definitely want to prioritize this feature and will try to include it in the next release. I also wanted to include the image on the UI as well.

If no matches or unknowns are found, I was going to take the image from the mid point of the event. Meaning if there are 10 images analyzed and no results are found, then the 5th image would be the one saved to the UI. I'll probably just use the label that Frigate gives, so then it can expand for other labels as well in the future.

Do you think it should go to a new MQTT topic? Or to the existing camera one? Or maybe a both?

Haloooch commented 2 years ago

For my use case having the message go to the existing camera topic would be ideal, I already have automation listening to each of the camera topics.

ozett commented 2 years ago

maybe consider to send also "misses" if the bounding-box was smaller than configured. sometims still a match... but marked red because of the box-sizes. good to get that information over mqtt as well -> https://github.com/jakowenko/double-take/issues/139

---edit: maybe also helpful to keep the frigate-event-id with that face-rec-event. to grab the whole snapshot/video from the frigate-http-api .

tungmeister commented 2 years ago

@jakowenko have you made any progress towards this? I'd love this feature as I'm trying to use double-take to reduce my alerts to only indicate unknown people, if a face isn't detected as it currently stands there's no alert from double-take so this would go unnoticed.

jakowenko commented 2 years ago

Sorry for going MIA. Going to start working on this feature this week.

Haloooch commented 1 year ago

Appreciate your very busy but wondering if you have had any more movement with this one?

Haloooch commented 1 year ago

Sorry for bringing this one back, I know I requested it sometime ago. Just wondering if there has been any progress.

clowncracker commented 1 year ago

Did this get abandoned?