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 93 forks source link

Missing sensors for person detection in HA #169

Closed szmidtpiotr closed 2 years ago

szmidtpiotr commented 2 years ago

Ive manage to instal DoubleTake and DeepStack as plugins in HomeAssistant Supervisor.

Manage to connect to MQTT broker, to Frigate server (standalone). Frigate is communicating with DoubleTake via MQTT correctly.

Ive created 4 person in DT and manage to learn face recognition.

image

Unfortunetly i cant see sensors for those person in HA - only unknown

image

jakowenko commented 2 years ago

Sensors for names will only show up when you have a positive match. In your above photo, the red box around deepstack means it wasn't a match. This is due to the bounding box value being too low. You can adjust this if you'd like.

LordNex commented 2 years ago

I just got finished with the install. Currently Frigate and DoubleTake are both running on Home Assistant and DeepStack is running sepratly on a Jetson nano. I plan on moving frigate to a RPi4 tomorrow.

My problem is that none of the sensors got created in HA. Ive made sure my config is good and its properly connected to all services needed. Any idea why they didnt get created and what i can do to get them created?

image

CZonin commented 2 years ago

Same issue here. I have everything up and running and Double Take trained and matched to my face, but I'm not seeing a sensor for me show up in HA.

Edit: I have a feeling this has to do with another issue I opened here: https://github.com/jakowenko/double-take/issues/176

Edit 2: It was related to this for me: https://github.com/jakowenko/double-take/issues/148

LordNex commented 2 years ago

I tried the above fix and reduced the area needed for both match and unknown to 2500 so a 50x50 px box is all that is needed. I'm seeing matches for him come through from Frigate to Double Take and Double Stack Detecting him with confidence over the threshold I have set of 70. But still, no sensor shows up.

Workaround in #148 didn't create the sensor.

LordNex commented 2 years ago

Mine finally showed up. Not sure why it took so long as there is nothing I'm seeing in the logs to indicate why even though an image was processed and recognized above the threshold and box size didn't create the sensor. But it's there now so that's what counts. I'll post more if I find more missing as I add more cameras

jakowenko commented 2 years ago

Strange they didn't show up when you had a match, that should be the trigger for creating/updating the MQTT topic. if you have any other issues with the sensors, let me know.

jakowenko commented 2 years ago

Closing due to inactivity. If you are still having an issue feel free to reopen.

LordNex commented 2 years ago

Happened again. New install of HA and DT on a new system. Frigate still running the same on RPi4 and I'm still running DeepStack on a Jetson Nano but with a much cleaner build and all of the cuda cores enabled properly.

Anyway, maybe it's just that I'm not seen as much on camera but I can't get my sensor to show up again. I went in front of the camera. It picked me up a few times but mostly unknown, trained it, but still no sensors. Might just need to walk in front of the cameras some more but it would be nice to have the ability to have a person trained and ready before they have ever been on your camera before. That way you can either surprise them with a personal greeting or warn yourself of an upcoming encounter.

This also kind of goes toward my FR to integrate with something like PhotoPrysm where you can take your collection of photos and run it through its database. It picks out faces and you give them names, then it shows you every picture that person has been in. I could see this being very handy to easily load an entire family into Double Take without the pain of trying to get everyone to come stand in front of your camera for a while.

Additionally I'd like to see it be able to do what most police are already doing and being able to tie into a large list of known individuals like sex offenders so that your system can earn you if any of these people are ever caught on your camera. Automated systems could even expand that to the Amber alert system so that all cameras have a image if the child that was abducted and could report so if seen.

Just see so many cool uses for this thing. Nice work man šŸ‘

sbelongie commented 2 years ago

I am also having this issue. If you need logs let me know and I can get what you need.

darazi commented 1 year ago

Having the same issue.

Frigate, DoopStack and Double Take all installed on a local HA (hosted in VirtualBox on Win10). Frigate picking up my face, training works like a charm. My face is detected and recognized, some at 100%. Tried box size fix and lowering threshold. Nothing helps. I cannot get any sensors form DoubleTake to show up. Not even the camera sensors themselves.

This is amazing work. Canā€™t wait to get this working. So many cool automations in mind.

Edit: Iā€™ve noticed that even when the ā€œDeepStackā€ oval turns green and identifies a face and the service shows up as green under the configuration, there is a small red circle next to ā€œDeepStackā€ under the image itself. Does this signify anything?

image
kennethgomez01 commented 1 year ago

Does anyone figured how to fix this issue about missing sensor for double take?

SivertGullbergHansen commented 1 year ago

Does anyone figured how to fix this issue about missing sensor for double take?

I figured it out! šŸŽ‰šŸ„³

First and foremost, you have to make sure your Detector badge is green as displayed by @darazi (two comments above this one)

If your badge is not green, click the badge and read the information inside the detection image. It will tell you what's missing for the detection to be valid.

Afterwards, in HASS, go to Settings -> Devices & Services Click the 3 dots next to MQTT and select "Reload" image

This should now add the missing person sensors! You can click the "x entities" in the MQTT card you just reloaded to see which sensors has been added:

image