You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Recognize results are lost when transferring files to other user #1118
Which Docker container are you using to run Nextcloud? (if applicable)
No response
How much RAM does your server have?
16GB
What processor Architecture does your CPU have?
x86_64
Describe the Bug
When files are transferred from one user to another user via transfer ownership, only the classification results are transferred, face detections are lost. Also, the transferred files are not added to the face detection queue for detecting the faces again.
Expected Behavior
Either keep the face recognition and run the clustering for the new user or re-run both face recognition and clustering after moving the files.
To Reproduce
Upload images to one user
let recognize do its thing
transfer ownership of these images to another user
see that face detections are lost and files are not added to face detection queue
Thank you for taking the time to open this issue with recognize. I know it's frustrating when software
causes problems. You have made the right choice to come here and open an issue to make sure your problem gets looked at
and if possible solved.
I try to answer all issues and if possible fix all bugs here, but it sometimes takes a while until I get to it.
Until then, please be patient.
Note also that GitHub is a place where people meet to make software better together. Nobody here is under any obligation
to help you, solve your problems or deliver on any expectations or demands you may have, but if enough people come together we can
collaborate to make this software better. For everyone.
Thus, if you can, you could also look at other issues to see whether you can help other people with your knowledge
and experience. If you have coding experience it would also be awesome if you could step up to dive into the code and
try to fix the odd bug yourself. Everyone will be thankful for extra helping hands!
One last word: If you feel, at any point, like you need to vent, this is not the place for it; you can go to the forum,
to twitter or somewhere else. But this is a technical issue tracker, so please make sure to
focus on the tech and keep your opinions to yourself. (Also see our Code of Conduct. Really.)
I look forward to working with you on this issue
Cheers 💙
It gets even more odd. I just realized, when I move separate files to Group Folders, they are triggered. If I move entire folders, on the other hand, the contained files are not triggered. Pretty sure this is not what's intended
PPS: Even though the files which are moved separately to Group Folders are reprocessed by recognize, the faces do not show up for the other users, but only for the one who moved them there.
Current workaround: move the files/folders via the filesystem and re-scan the directories. That way, they are reprocessed and the results show up for all users in the Group Folder.
Thank you for this detailed analysis! File transfer to other users is a relatively new feature in nextcloud, so we haven't integrated with this feature yet. I'll also look into the other issues you found.
I just found the time to test this today. Seems, it's still not fixed, as the face clustering is not triggered. When I move a file from my personal space to a group folder, it gets added to the classify and face recognitiion queues. However, after the predictions, the detected faces are not added to the clustering. In my own profile, the face recognition works, because it was already detected before moving the file to the group folder. However, other users of the group folder do not get a face recognition
Mh, that may be because group folders are not technically shares, while I've been using the share manager to enumerate users with access. I'll change that to use the mount cache instead...
Yes, we're almost there ;-) Thanks for the beta, I just tested it by uploading a picture of myself and moving it to a group folder. What happened after moving the file:
re-triggered face and imagenet classification
found face
1 face left for clustering, planned tasks: 0
So, what's left is that the clustering needs to trigger a new task after the face detection.
Also, what I found not ideal: After moving the file to the group folder, the classification labels are already available for both users before the imagenet executes again. It seems, they are already transferred with the file and another imagenet execution could be avoided for energy efficiency. Also, this makes me wonder if it would maybe be possible to transfer the face detection in a similar way, so the other group users would only need to run the clustering of the newly available faces instead of having to re-run the face detection. However, face detection is cheap, so if this is hard to implement, I won't complain
No new classification should be run when moving files :/ Are you sure that another face classification is run on the file? The face detection should just be copied.
No new classification should be run when moving files :/ Are you sure that another face classification is run on the file? The face detection should just be copied.
I think, this issue was re-introduced with NC 32. Did not test it with a ownership transfer, but by moving a file to a group folder. face detection and classification get retriggered.
It depends a bit on how the move is realized internally, I think. If the move is done by copying and deleting the old node, then there is nothing recognize can do, I think.
Uploaded to my account. Face and object detection run.
Move to group folder
Face and object detection run again
However, interestingly the object classes are already available for all the group folder users, so they are transferred over correctly. But then wrongly added to the queue.
Also the face detections seem to be copied over to the other users, because the cluster queue is already filled before the face detection is run again.
I'll open an issue on group folders to understand if this double detection runs can be avoided.
Just wanted to check in again on this issue. Current behavior: Both face and object detection run when I upload files. After I move the files to a group folder, they run again. However, face detections are only visible in the user account who uploaded the files, not in other accounts who are part of the shared folders.
I remember in earlier versions, face clustering was re-running for all users with file access. now, clustering is not re-running after moving files to a shared folder.
I just checked when this first occurred which was in January this year for me. I'm not always super fast with updates, but maybe this is a hint
Thanks for your response, much appreciated! I'll create a new nextcloud instance to test this as I don't want to mess with my productive one. Will take a few days to try this.
I just set up a new nextcloud instance. It's a nextcloud 35.0.1 with recognize 13.1.0. Is this patch intended for this version? I think, I messed something up because I now cannot even move files to a group folder anymore in this instance.
Cannot use try without catch or finally at /var/www/nextcloud/apps/recognize/lib/Db/FsActionMapper.php#240
In my productive instance, I meanwhile updated to nextcloud 35.0.1, too. There, it now seems, that other users have lost most face recognitions from the group folders :-/
Two users in the same group, sharing a team folder
Uploaded ~300 photos to user1. Recognize classified and clustered faces and objects as expected
Moved the photos to the teams folder
All files are processed by recognize again
both users have the face clusters and object tags
IIRC, In some version way back the files were not reprocessed, but the classification results were copied over instead. That would be nice to save some compute power, but is not super crucial.
Something I could not test yet, but I am wondering - maybe you could answer that. Since recently, the face recognitions of photos are only available for the person who uploaded the photos, i.e. the recognitions that were there before for all users are now deleted except for one of them. Would this patch also bring these recognitions of existing files back for all users?
Activity
github-actions commentedon Apr 4, 2024
Hello 👋
Thank you for taking the time to open this issue with recognize. I know it's frustrating when software
causes problems. You have made the right choice to come here and open an issue to make sure your problem gets looked at
and if possible solved.
I try to answer all issues and if possible fix all bugs here, but it sometimes takes a while until I get to it.
Until then, please be patient.
Note also that GitHub is a place where people meet to make software better together. Nobody here is under any obligation
to help you, solve your problems or deliver on any expectations or demands you may have, but if enough people come together we can
collaborate to make this software better. For everyone.
Thus, if you can, you could also look at other issues to see whether you can help other people with your knowledge
and experience. If you have coding experience it would also be awesome if you could step up to dive into the code and
try to fix the odd bug yourself. Everyone will be thankful for extra helping hands!
One last word: If you feel, at any point, like you need to vent, this is not the place for it; you can go to the forum,
to twitter or somewhere else. But this is a technical issue tracker, so please make sure to
focus on the tech and keep your opinions to yourself. (Also see our Code of Conduct. Really.)
I look forward to working with you on this issue
Cheers 💙
andreaskoelsch commentedon Apr 4, 2024
PS: When moving files to a Group Folder, both face detection and object classification are re-triggered. Is this intended or worth a separate issue?
andreaskoelsch commentedon Apr 6, 2024
It gets even more odd. I just realized, when I move separate files to Group Folders, they are triggered. If I move entire folders, on the other hand, the contained files are not triggered. Pretty sure this is not what's intended
andreaskoelsch commentedon Apr 16, 2024
PPS: Even though the files which are moved separately to Group Folders are reprocessed by recognize, the faces do not show up for the other users, but only for the one who moved them there.
Current workaround: move the files/folders via the filesystem and re-scan the directories. That way, they are reprocessed and the results show up for all users in the Group Folder.
marcelklehr commentedon Apr 16, 2024
Hello @andreaskoelsch
Thank you for this detailed analysis! File transfer to other users is a relatively new feature in nextcloud, so we haven't integrated with this feature yet. I'll also look into the other issues you found.
andreaskoelsch commentedon Apr 18, 2024
Great, looking forward to testing it 😊
andreaskoelsch commentedon May 23, 2024
I just found the time to test this today. Seems, it's still not fixed, as the face clustering is not triggered. When I move a file from my personal space to a group folder, it gets added to the classify and face recognitiion queues. However, after the predictions, the detected faces are not added to the clustering. In my own profile, the face recognition works, because it was already detected before moving the file to the group folder. However, other users of the group folder do not get a face recognition
fix(FileListener): Use IUserMountCache instead of Share\IManager to g…
marcelklehr commentedon May 27, 2024
Mh, that may be because group folders are not technically shares, while I've been using the share manager to enumerate users with access. I'll change that to use the mount cache instead...
marcelklehr commentedon Jun 18, 2024
Hey @andreaskoelsch
I've prepared a beta version with a potential fix. Could you try this https://github.com/nextcloud/recognize/releases/tag/v7.0.2-beta.1 and report back here?
andreaskoelsch commentedon Jun 18, 2024
Yes, we're almost there ;-) Thanks for the beta, I just tested it by uploading a picture of myself and moving it to a group folder. What happened after moving the file:
So, what's left is that the clustering needs to trigger a new task after the face detection.
Also, what I found not ideal: After moving the file to the group folder, the classification labels are already available for both users before the imagenet executes again. It seems, they are already transferred with the file and another imagenet execution could be avoided for energy efficiency. Also, this makes me wonder if it would maybe be possible to transfer the face detection in a similar way, so the other group users would only need to run the clustering of the newly available faces instead of having to re-run the face detection. However, face detection is cheap, so if this is hard to implement, I won't complain
marcelklehr commentedon Jun 19, 2024
No new classification should be run when moving files :/ Are you sure that another face classification is run on the file? The face detection should just be copied.
32 remaining items
andreaskoelsch commentedon Sep 2, 2024
Thanks for the message, it's alright for me. At least it works now by moving files instead of folders, so there is a simple workaround for the issue
marcelklehr commentedon Dec 2, 2025
This was fixed with Nextcloud 32.
andreaskoelsch commentedon Dec 17, 2025
I think, this issue was re-introduced with NC 32. Did not test it with a ownership transfer, but by moving a file to a group folder. face detection and classification get retriggered.
marcelklehr commentedon Dec 18, 2025
It depends a bit on how the move is realized internally, I think. If the move is done by copying and deleting the old node, then there is nothing recognize can do, I think.
andreaskoelsch commentedon Dec 19, 2025
I just checked again with a few files.
However, interestingly the object classes are already available for all the group folder users, so they are transferred over correctly. But then wrongly added to the queue.
Also the face detections seem to be copied over to the other users, because the cluster queue is already filled before the face detection is run again.
I'll open an issue on group folders to understand if this double detection runs can be avoided.
andreaskoelsch commentedon Sep 21, 2026
Just wanted to check in again on this issue. Current behavior: Both face and object detection run when I upload files. After I move the files to a group folder, they run again. However, face detections are only visible in the user account who uploaded the files, not in other accounts who are part of the shared folders.
I remember in earlier versions, face clustering was re-running for all users with file access. now, clustering is not re-running after moving files to a shared folder.
I just checked when this first occurred which was in January this year for me. I'm not always super fast with updates, but maybe this is a hint
marcelklehr commentedon Sep 23, 2026
Hi @andreaskoelsch
I'm sorry we haven't made much progress here. I will try to tackle this again.
marcelklehr commentedon Sep 23, 2026
Could you try the following patch? #1569
andreaskoelsch commentedon Sep 23, 2026
Thanks for your response, much appreciated! I'll create a new nextcloud instance to test this as I don't want to mess with my productive one. Will take a few days to try this.
marcelklehr commentedon Sep 24, 2026
Ah, sorry. I've revised the patch a bit more. Here is the new PR: #1572
andreaskoelsch commentedon Oct 3, 2026
I just set up a new nextcloud instance. It's a nextcloud 35.0.1 with recognize 13.1.0. Is this patch intended for this version? I think, I messed something up because I now cannot even move files to a group folder anymore in this instance.
Cannot use try without catch or finally at /var/www/nextcloud/apps/recognize/lib/Db/FsActionMapper.php#240In my productive instance, I meanwhile updated to nextcloud 35.0.1, too. There, it now seems, that other users have lost most face recognitions from the group folders :-/
andreaskoelsch commentedon Oct 22, 2026
I just had some time and tried it again, with success!
IIRC, In some version way back the files were not reprocessed, but the classification results were copied over instead. That would be nice to save some compute power, but is not super crucial.
Something I could not test yet, but I am wondering - maybe you could answer that. Since recently, the face recognitions of photos are only available for the person who uploaded the photos, i.e. the recognitions that were there before for all users are now deleted except for one of them. Would this patch also bring these recognitions of existing files back for all users?