memories icon indicating copy to clipboard operation
memories copied to clipboard

Group folder and recognize compability

Open karpiq24 opened this issue 3 years ago • 3 comments

With Group folders app, recognize generates face clusters for every user separately. Memories displays clusters belonging to other users if current user has access to these files and beacuse of this I'm seeing duplicate clusters.

I tried to fix this by filtering face clusters belonging to current user, which fixes this issue but also makes face clusters of shared photos not show up, which I guess is not desirable. Photos app doesn't show shared face clusters of other users at all.

https://github.com/pulsejet/memories/compare/master...karpiq24:memories:master

@pulsejet , I'm willing to work on this some more, but do you have any suggestions how this could be resolved?

karpiq24 avatar Nov 24 '22 15:11 karpiq24

This needs more thought. Recognize creates faces and clusters for each user; there are a couple of things to look out for:

  1. What happens with external storage? Does recognize create separate clusters for this too?
  2. What about shared folders? Recognize definitely doesn't create separate clusters here. So ideally we would want the people to be shared between users in shared folders. This is at odds with Group folders, apparently.

The bottom line is recognize isn't designed for a shared photo library in mind (where the faces might be shared too). So we need to nail down what's the expected / ideal behavior first.

pulsejet avatar Nov 24 '22 15:11 pulsejet

Ideally, we could exclude face clusters that belong in group folders and are assigned to other users. The latter part is easily achieved, but I don't know if we can efficiently check if files are inside a group folder - I don't know much about Nextcloud DB schema.

karpiq24 avatar Nov 26 '22 10:11 karpiq24

Is there no other case where one folder might (unintentionally) have multiple clusters from different users? In that case that'll be the right solution. I do believe getStorage() on the Folder node should allow figuring out if this is a group folder.

AFAIK the types of storage we support are:

  1. Standard user storage (no problem)
  2. Shared folder storage (no problem)
  3. External, user mounted storage (shouldn't be a problem)
  4. External, admin mounted storage (problem?)
  5. Group folders (yes, problem)
  6. What else?

pulsejet avatar Nov 26 '22 14:11 pulsejet