-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Faces: Improve performance and strategy for manual tagging #3124
Comments
I have am having this same issue and the command My background is mostly in python, but I tried to do some digging through the code. The Warning message
Just prior to this block of code MatchMarkers() is called. It is trying to match 1 Face to 4 other Faces with the same subj_uid, but it looks like the distance of the embeddings of the 4 others Faces is too far from the first Face to be considered a match. So none complete. Going back to the block of code shown above that means:
So it falls into the else block with a warning message, although for this case the more accurate message would be to state there were no orphaned cluster to remove. |
Running into this issue. Tried running the audit fix command with no change. I have the merge failed error for one single subject. Library has 100k+ files. Spent a week tagging faces. Would prefer not to reset faces. :-) BTW, Thanks for all your work! Photoprism is awesome! and I am a sponsor as well. TRAC[2023-02-05T19:31:33Z] config: defaults file /etc/photoprism/defaults.yml does not exist |
Signed-off-by: Michael Mayer <michael@photoprism.app>
Signed-off-by: Michael Mayer <michael@photoprism.app>
I now have a clearer idea of the underlying problem and think we can improve the situation by not matching manually labeled faces if they do not meet the constraints set for automatic clustering (more specifically, cluster core and core distance). When testing with the pictures we had been using during development, a more aggressive approach for manually labeled faces seemed to work well, but this is only feasible for faces that the model can categorize well. For example, all these faces were matched after labeling a single face in the edit dialog: |
Thank you for the update - this looks promising! What consequences would this change bring about? Meaning, what will change by not matching manually labeled faces if they do not meet the constraints set for automatic clustering? Just curious to understand the "why the original decision, what problems did it solve" and "what consequences does it have". Not urgent, by any means - just intellectual curiosity. :) Thank you, and happy Friday! |
@pjft We can't tell what the final effect will be until it's implemented. It is expected that you will have to tag a few more faces that belong to the same person before the automatic matching starts, so basically how most other apps work. Since these changes require extensive testing, we will probably wait until after the next stable release to avoid delaying it even further. The sample faces we use for testing can be downloaded here: |
Of course - appreciate the time and effort in looking into this. Let us know how we can help. |
Signed-off-by: Michael Mayer <michael@photoprism.app>
This may reduce server load and prevent disks from spinning up. We welcome tests reports! Signed-off-by: Michael Mayer <michael@photoprism.app>
Signed-off-by: Michael Mayer <michael@photoprism.app>
…sm#3124 This may reduce server load and prevent disks from spinning up. We welcome tests reports! Signed-off-by: Michael Mayer <michael@photoprism.app>
Just wanted to say that this seems to be solved in the latest builds! Awesome work :) It's a breeze to label hundreds of clusters now. |
@pjft Thank you! That's good to know, since the feedback we've received on the optimizations hasn't been very enthusiastic so far. Most users didn't seem to notice (or care about) the changes when they tested our development preview builds. |
I have no issues whatsoever, and I recall having to wait 1 min or so before having to move forward after a while. Only comment I have is that, for some reason, the "audit fix" and "optimize faces" commands seem to cause more long-lasting issues than the ones I experience without them. Unsure if temporary or not, but I have not dug into them as it's painful to go back and redo all the work 😅 |
We will change how manually labeled faces are clustered and compared in one of the upcoming releases. This should solve the remaining issues. |
Awesome:) if you need any testing at any point, by all means tag me directly. I'm always happy to help if I can. I appreciate all the work you and @graciousgrey put into making Photoprism great! Thank you so much. |
Unfortunately I still experience a delay when tagging new faces. The delay ranges from 2/3 seconds to possibly a full minute at times. Running Build 1.2306.25 |
Unfortunately, we haven't had time to work on this yet. We will reference this issue in the related commits and mention it in the release notes once the improvements are available. Alternatively, feel free to work on this and provide us with a pull request that we just need to merge. Thank you! ❤️ |
+1 on the perf issue. When I manually tag faces, it can take about 20 seconds before I can tag another one. If I try tagging it give me a "busy, try again later" error. I have found that if I navigate in the reverse order when tagging, sometimes, the tagging is faster - sub second. I get to tag about 4 or so pics and then it slows down again. not sure if this helps... |
Hi there @lastzero , the Photoprism team, and its awesome community, I have a huge amount of photos for which I manually have to tag faces to. It seems that Tensorflow does not play nicely with children growing from the baby stage, into toddlers, then kids, then teenagers. Obvious face change, but it does require more manual intervention from me. Also, going to public paces (a zoo, a museum, a restaurant, etc) catches lots of unwanted people. I often found myself having to edit many faces per photo, and find this process extremely tedious and slow. I think, in my humble opinion, and ideally, we shouold be able to do all changes in one photo (add, remove, modify face tags) and when leaving the photo, commit the changes to the DB. Again, in my humble opinion, the way it works now (make change, wait for it to be committed) it's very very slow and underperforming. Unsure if this GitHub issue is for the same purpose, but thought I'd mention it here first, before raising a new issue unnecessarily. Thank you so much for this amazing piece of software 🙏 |
I'm having this same issue. 26,000+ photos, mostly Asian family. I'm happy to provide as much info as possible, if it's helpful in resolving this issue. running version Sometimes manually tagging will take 6+ minutes (update: 8+ minutes), with usual wait times around 2 minutes. During the wait I can see 20+ messages like this:
Each with a different subject name. I've run:
I'm adept on mysql, k8s, bash, etc, so I'm completely comfortable with low-level debugging to help resolve this - just warn me before we do something that may potentially be destructive (also, would like to know where the db backup saves so I can copy it off as needed). |
Signed-off-by: Michael Mayer <michael@photoprism.app>
Signed-off-by: Michael Mayer <michael@photoprism.app>
Signed-off-by: Michael Mayer <michael@photoprism.app>
I'm having the same issue. It takes about 30-60 seconds to add faces. While it would be great to improve the performance, could it be possible to have it done by a background process? I think it shouldn't block the front end. |
We will take care of this as soon as we have released the new authentication options we are currently working on :) |
Awesome! I notice the delay when tagging manually tagging faces as well. You guys rock! TY in advance! |
Same, takes minutes with CPU usage on the server ~30%+ and then peaking at 100% right before finishing. And sometimes it takes just seconds. It seems like the server is blocking while this is going on. A bit under 150K images. |
Just wanted to add to this, and share how inconsistent it can be when manually tagging (or de-tagging) faces. As such a key part of the product for me (and to help my aging parents remember people from their past) - anything that can be done to speed things up would be amazing.. The face tagging feature is the most important feature for a number of people - thank you so much for making it available |
Let me start by saying this is a new issue that'll summarize a closed, but still happening issue. I'm creating this new issue based on @lastzero 's comment.
1. What is not working as documented?
For faces that were not added automatically, tagging people manually is slow to extremely slow. With some photos or persons (unsure), it takes a few seconds only (rare) but once that issue happens, most of the time it takes in my case between 1 and 2 minutes to tag 1 person. I've decided recently to move all my photos to photoprism so I've got quite a lot already, and quite a lot more to come. I have more than a couple hundreds pictures with unrecognized faces waiting to be tagged, but I'm not able to wait 1 to 2 mn for each, it'd be unmanageable.
It's documented as a known issue. I have tried the command
docker compose exec photoprism photoprism faces audit --fix
but it didn't help fixing the issue.2. How can we reproduce it?
I have no idea how exactly to reproduce this, but both @pjft and myself have shared parts of our database by email directly to help debug it. See pjft comment and mine. Best case scenario it's enough to debug, if not I'm more than happy to provide more info.
3. What behavior do you expect?
When a face is detected but unknown, it shouldn't take more than a few seconds to add it manually.
4. What could be the cause of your problem?
Really unsure, sorry.
5. Can you provide us with example files for testing, error logs, or screenshots?
As stated above, this has been done by email as it includes personal data.
6. Which software versions do you use?
(a) PhotoPrism Architecture & Build Number: AMD64, ARM64, ARMv7,...
Build 221118-e58fee0fb
(b) Database Type & Version: MariaDB, MySQL, SQLite,...
MariaDB
(c) Operating System Types & Versions: Linux, Windows, Android,...
Linux
(d) Browser Types & Versions: Firefox, Chrome, Safari on iPhone,...
Brave
andChrome
(e) Ad Blockers, Browser Plugins, and/or Firewall Software?
Probably irrelevant here. (I've tried to turn them off, doesn't change anything).
7. On what kind of device is PhotoPrism installed?
This is especially important if you are reporting a performance, import, or indexing issue. You can skip this if you're reporting a problem you found in our public demo, or if it's a completely unrelated issue, such as incorrect page layout.
(a) Device / Processor Type: Raspberry Pi 4, Intel Core i7-3770, AMD Ryzen 7 3800X,...
Intel(R) Core(TM) i3-3227U CPU @ 1.90GHz
(b) Physical Memory & Swap Space in GB
4gb and 4gb
(c) Storage Type: HDD, SSD, RAID, USB, Network Storage,...
SSD
(d) Anything else that might be helpful to know?
8. Do you use a Reverse Proxy, Firewall, VPN, or CDN?
Yes, I use SWAG which itself uses NGINX, but it's probably unrelated here as it used to work perfectly with that config.
I'll summarize what was found in the previous issue:
The text was updated successfully, but these errors were encountered: