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

[BUG] Deleted detector remains in UI #211

Open NickM-27 opened 2 years ago

NickM-27 commented 2 years ago

Describe the bug I used to use deepstack but now use compreface as my detector. The filters and also the "no results" screen still show deepstack as an option despite it not being in my config.

Version of Double Take 1.9.0 (happened on 1.8.0 as well)

Expected behavior Only shows expected detector.

Screenshots

Screen Shot 2022-05-23 at 1 35 48 PM
jakowenko commented 2 years ago

Hey Nick,

That detectors filter is based off any of the saved matches in the DB. Are there any records still or does the UI always show no files?

This is the query that's used to set that. I can dig into it a bit later to see what exactly might be happening.

SELECT json_extract(value, '$.detector') name
        FROM match, json_each(match.response)
        GROUP BY name
        ORDER BY name ASC

I will admit there's still a few things that could be handled better when switching from one detector to another, or like in my case I used to run multiple and just run ComperFace now.

NickM-27 commented 2 years ago

Oh, that's very weird, it seems there are a number of deepstack matches which don't show in the UI at all. I also do not have any trained files for deepstack anymore.

In this case easy enough to just delete the entries, I will make a copy of my current db in case it is helpful for any testing, it has been a while since I changed so I don't remember the exact steps I took.

luzik commented 2 years ago

Deleting detector also affect train view, because there is removed detector label, and user is unable to untrain/remove photo from DB. In my opinion photos labeled only by active detectors should be visible. Also consider (removing/labeling as untrain) photos that was sticked to detector that is not defined in configuration anymore

jakowenko commented 2 years ago

Deleting detector also affect train view, because there is removed detector label, and user is unable to untrain/remove photo from DB. In my opinion photos labeled only by active detectors should be visible. Also consider (removing/labeling as untrain) photos that was sticked to detector that is not defined in configuration anymore

I'm aware of this issue as well and it's on my list to eventually address. I originally kept it on there so the user would know it was still trained with that detector, even if it wasn't still in configured in Double Take. I'll try to come up with a way to handle this so it's easier to clean up some of these orphaned images.

bagobones commented 1 year ago

Deleting detector also affect train view, because there is removed detector label, and user is unable to untrain/remove photo from DB. In my opinion photos labeled only by active detectors should be visible. Also consider (removing/labeling as untrain) photos that was sticked to detector that is not defined in configuration anymore

Glad I did a search, I just did the same thing after getting frustrated with deepstack and figuring out how to setup compreface I started cleaning up the training sets as compreface won't even use some as a face (doesn't like profile pics) but I can't remove them via the UI now.

If a detector was down I can see wanting to protect these however if a detector is no longer configured I would prefer it didn't stop me from removing things or there should maybe an option / prompt to purge all DB data related to the detector.