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.23k stars 98 forks source link

recent match found, even if new faces appear in sequential following frames #32

Closed erikarenhill closed 3 years ago

erikarenhill commented 3 years ago

When a camera detects a match it's getting paused, even if the following snapshots on the same event contain new faces. Testing this with a friend today it first matched on my face and when I told him to get in front of the camera as well it didn't detect him. Testing the latest snapshot from frigate manually in compreface it detects both his and my face, though his below the confidence so it should still be saved as I run double-take with save_unknown=true

The logs show "paused processing CAMERA_NAME, recent match found" but I think it should try and keep processing as new faces can appear.

jakowenko commented 3 years ago

Hey Erik, I can remove that extra check. I had originally included it to help limit the amount of processing the detectors had to do if a match was found from the camera recently. But you make a good point and there's a chance faces could be missed if a recent match was found.

Do you think there's value in keeping this as a configurable option or just remove it completely?

erikarenhill commented 3 years ago

Hey Erik, I can remove that extra check. I had originally included it to help limit the amount of processing the detectors had to do if a match was found from the camera recently. But you make a good point and there's a chance faces could be missed if a recent match was found.

Do you think there's value in keeping this as a configurable option or just remove it completely?

Maybe (if possible) the processing could continue, but during that same event only send new matches/mqtt events on any changes,

For example if processing 4 images for the same event:

Image 1: Erik - send event for match on Erik Image 2: Erik, David- send event for match on David because Erik was already detected on image 1 Image 3: Erik - no events Image 4: Erik, David - no events

However it would be awesome if one could actually store all images temporarily and then only keep the ones with the highest match, e.g. if Image 1 matches Erik for 77% and image 4 matches Erik for 92% only image 4 will be saved to disk for match on Eriks face.