Tagging Missing Objects/Faces/Clips repeats the same photos?
Hey folks,
After setting up immich_machine_learning (it's awesome!) I wanted immich to go over and tag my photos with objects/faces/clips.
I went into the job status page and clicked on
missing
for each one of these categories.
Immich got a list of photos, tagged them, everything worked beautifully.
At the end, each category had 2-8 failures - so I thought I could retry by clicking missing
again at the job level. To my surprise - it looked like immich started processing a large number of files similar to the initial jobs.
I then repeated the same thing this morning - and again - immich generated a few thousand files for the tag objects/faces jobs.
My expectation was that it would only process the delta, did I set up something wrong here?23 Replies
hi! could you share some of the logs for the immich_machine_learning container?
Looking at it now - it just looks like a ton of detect-faces and tag-image - all of them with a 200 status
if they were successful then it's possible that it's rerunning images that didn't get any tags assigned to them
Got it, there's no negative cache?
I just did the same thing with objects:
- Ran it, waited for completion.
- Ran it again - it started from the exact same number.
if you want to test if this is the reason why, then set MACHINE_LEARNING_MIN_TAG_SCORE=0.0 in your .env and restart the ml container
it should pass through all tags from the model without filtering them so all images are guaranteed to get tags
I see - once the tags are populated though I'd have no way of removing them I guess?
i believe if you run "all" it should replace the existing tags
I see. Well, since t's working and this behavior seems like immich is working as intended, I think the best thing to do would be to stop messing with it 🙂
It would be nice to cache this information, maybe on the database, so as long as the ML parameters don't change re-running these operations would result in a no-op.
ah, found the snippet that's causing this
not sure why that's there tbh
i'll see if i can make a pr to remove it
I guess there's no distinction between having no tags to not even attempting to tag the image?
sorry, I haven't looked at the code for this 🙂
so jobs return true or false on completion, true meaning success and false meaning no-op/failure
ah, I got it now.
we treat no tags as a failure...
lol we take "missing" a bit literally
yup 🙂
I guess it makes sense for the situation where you tweaked the ml settings like you suggested - then missing would only do the deltas
But if I tweaked them I probably want to do everything - not partial
Otherwise you’d get search inconsistencies
true. even better would be to just store the tags and scores and filter internally. that way you wouldn't need to rerun ml at all even if you changed the score threshold.
Totally agree - you also need to keep the version of the model in case it changes
ooh, fair point
I think the easiest thing is to pass it as params to the ml container and worst case it just returns a noop
i plan on making some of the ml settings adjustable from the dashboard. that's probably a good time to make some of these changes since the ml settings would be stored in the server.
Awesome 🙂
Thanks a ton for the help on this and the other issues!
np! ml is changing a lot at the moment so I'm listening pretty closely to feedback
I take back what I said about sending the params btw, it would create a lot of network traffic just sending the images
yeah probably better if the ml server can just focus on inference