Skip to content
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

Contents of shared Group Folders get re-classified for each user #916

Closed
mipro98 opened this issue Jul 20, 2023 · 0 comments · Fixed by #939
Closed

Contents of shared Group Folders get re-classified for each user #916

mipro98 opened this issue Jul 20, 2023 · 0 comments · Fixed by #939
Labels
bug Something isn't working

Comments

@mipro98
Copy link

mipro98 commented Jul 20, 2023

Which version of recognize are you using?

4.3.0

Enabled Modes

Object recognition, Face recognition

TensorFlow mode

Normal mode

Which Nextcloud version do you have installed?

27.0.0

Which Operating system do you have installed?

Arch Linux

Which Docker container are you using to run Nextcloud? (if applicable)

27-apache

How much RAM does your server have?

32GB

What processor Architecture does your CPU have?

x86

Describe the Bug

When using the Group Folders app and having a shared folder setup for multiple users and running recognize:classify, the contents of the group folder get classified for each user who has access to this group folder. This results in multiple redundant classifications of the same files.

I know this issue is related to another third-party application but especially with large group folders it is very unhandy to have recognize enabled. There's also no way to circumvent the issue e.g. by temporarily deactivating access to group folders for all but one user, since when re-adding access to other users later, the files get scheduled through cron.

Expected Behavior

The contents of a group folder should only be classified once instead of as many times as there are users who have access to the folder.

Maybe a more intelligent mechanism for detecting which files already have been classified might be a solution. For example, by default, classifiy could skip already classified files (having tags attached) and a flag (e.g. --force) might re-classify all files.

As a side note, the Preview Generator app does handle group folders correctly and only generates previews for files in group folders once. I don't know the internals but this app seems to parse directory structure for the files (there is even a --path command line flag) rather than the folders which a user has access to (as it seems to be the case for recognize).

To Reproduce

  1. Install the Group Folders app app.
  2. Create a new group folder through the admin panel and give multiple users permissions to view the contents.
  3. Place some image files in the shared Group folder.
  4. Install recognize, enable face and object classification and run occ recognize:classify (or wait after recrawl until the cronjob schedules the queues).
  5. See that when running classify for every user with access to the group folder, the shared folder gets parsed and its content classified although it already has been classified before (and the tags are already there)

Debug log

No response

Edit: This bug might be related to #905 . Also, it does not only seem to affect Group folders but also external storage.

@mipro98 mipro98 added the bug Something isn't working label Jul 20, 2023
marcelklehr added a commit that referenced this issue Aug 5, 2023
fixes #916

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
marcelklehr added a commit that referenced this issue Aug 5, 2023
fixes #916

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant