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

Multiple instances of photos added to People after Recognize is run multiple times, people are merged or faces are added #1198

Open
Andreaux opened this issue Sep 29, 2024 · 8 comments
Labels

Comments

@Andreaux
Copy link

Andreaux commented Sep 29, 2024

Which version of recognize are you using?

8.1.0

Enabled Modes

Object recognition, Face recognition

TensorFlow mode

Normal mode

Downstream App

Memories App

Which Nextcloud version do you have installed?

30.0.0

Which Operating system do you have installed?

Ubuntu 22.04.5

Which database are you running Nextcloud on?

11.5.2-MariaDB-ubu2404

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

No response

How much RAM does your server have?

384GB

What processor Architecture does your CPU have?

x86_64

Describe the Bug

I noticed after upgrading my docker image based installation to 30.0.0 and manually running classification in Recognize because it didn't seem to be triggered automatically (I might have been a bit impatient too) that multiple instances of the exact same photos were added to People. If I went into People, I would have 4-8 copies of each picture in different series. If I open them, they are the exact same image as the filename is up in the Tab name.
I can only get rid of them manually by selecting "Remove from person" because I assume using delete would remove the single image, and I don't want that, just the multiple references.

370077414-fca475e4-1452-4cde-9bf3-6fd3e5dc70db
I marked on the attached picture which ones are valid and which are just duplicates. In all cases, the filename is exactly the same and the face recognized is also the same (see green square).

EDIT: I have noticed a couple of interesting things since my bug report:

  • the bubbles over People's index images showing how many pictures there is inside of that "person" don't take the duplicates into account. They only show the number of truly unique pictures in there.
  • If I open a person and remove duplicates manually, they get added to Recognize's clustering queue, they don't just disappear, despite being duplicate references to files already in a cluster (person).

Note: Not knowing whose fault this might be, I also filed this with pulsejet/memories.

Expected Behavior

I would expect to see 1 instance of photos for each face recognized, even if clustering is launched manually several times, this shouldn't cause severe duplication of images.

To Reproduce

I can't really suggest any exact way to reproduce, however, the common theme seems to be that:

  • running occ recognize:classify or occ recognize:cluster-faces
  • merging people
  • adding faces from the unidentified pool to people (where those pictures already probably exist)

causes the "duplication"

Debug log

No response

@Andreaux Andreaux added the bug Something isn't working label Sep 29, 2024
Copy link

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 💙

@Andreaux

This comment was marked as resolved.

@Andreaux Andreaux changed the title Multiple instances of photos added to People after Recognize is run multiple times/People are merged/Faces are added Multiple instances of photos added to People after Recognize is run multiple times, people are merged or faces are added Sep 29, 2024
@nextcloud nextcloud deleted a comment Sep 30, 2024
@marcelklehr
Copy link
Member

Could you check your nextcloud log for errors regarding recognize?

@marcelklehr
Copy link
Member

There is actually a guard in place that prevents the same picture from being processed by face detection multiple times. It can be circumvented I guess, by running multiple classifier processes in parallel, though. My guess would be that you were too impatient indeed, and multiple processes processed the same images in parallel.

@Andreaux
Copy link
Author

Andreaux commented Oct 2, 2024

There was nothing in the logs, no errors, not even a warning related to Recognize or Memories.

@marcelklehr
Copy link
Member

Could you perhaps check with the memories app which faces it has detected in the image. It could be that it just detected multiple faces in the same picture, possibly false positives that are not event real faces.

@Andreaux
Copy link
Author

If you look at the screenshot I provided, it's the same face over and over. Or did you mean something else?

@marcelklehr
Copy link
Member

Ah, indeed, I didn't look closely enough to see that it already contains the face marker. 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Triaging
Development

No branches or pull requests

2 participants