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

fix(server): People count after updating recognized faces count #13288

Closed
wants to merge 3 commits into from

Conversation

jedi04
Copy link
Contributor

@jedi04 jedi04 commented Oct 8, 2024

This PR fixes #13245

It updates the query used to fetch the total count of people keeping in consideration the recognized faces setting.

@jedi04 jedi04 requested a review from danieldietzler as a code owner October 8, 2024 16:52
@jedi04 jedi04 changed the title Fix People count after updating recognized faces count fix(server) People count after updating recognized faces count Oct 8, 2024
@alextran1502 alextran1502 changed the title fix(server) People count after updating recognized faces count fix(server): People count after updating recognized faces count Oct 9, 2024
@alextran1502
Copy link
Contributor

Thank you for the PR. Can you please run make sql from the root of the project?

@jedi04
Copy link
Contributor Author

jedi04 commented Oct 9, 2024

Thank you for the PR. Can you please run make sql from the root of the project?

Sure. I have run the command from root of project.

Thank you

@hitech95
Copy link
Contributor

@jedi04 This open another series of issues.
@alextran1502 Imho this is a workaround on a deeper issue. See #13551

@zackpollard
Copy link
Contributor

Hey @jedi04, I appreciate this has been open for quite a while. Just trying to go through some of our older PRs and cleanup. Is this ready to merge? I did a quick look through and I didn't really understand why you changed the SQL to have a subquery. From a brief look I feel like you could've just changed the HAVING statement to handle the minimum faces setting. Is there any other advantage to changing the query in this way?

@zackpollard
Copy link
Contributor

@jedi04 This open another series of issues.

Could you expand on what other issues this opens in your eyes?

@hitech95
Copy link
Contributor

@jedi04 This open another series of issues.

Could you expand on what other issues this opens in your eyes?

See #13551

@zackpollard
Copy link
Contributor

@jedi04 This open another series of issues.

Could you expand on what other issues this opens in your eyes?

See #13551

I saw that issue but it isn't really clear to me why this fix is directly a problem. It sounds like there are more issues in this area, but this PR feels like a bug regardless, it doesn't need to fix all of the problems. I think it's fine to look to merge this change but also look at a broader solution to the problems you mention separately.

@hitech95
Copy link
Contributor

@jedi04 This open another series of issues.

Could you expand on what other issues this opens in your eyes?

See #13551

I saw that issue but it isn't really clear to me why this fix is directly a problem. It sounds like there are more issues in this area, but this PR feels like a bug regardless, it doesn't need to fix all of the problems. I think it's fine to look to merge this change but also look at a broader solution to the problems you mention separately.

This only fix the returned counte of the people, by limiting the real count to those that only have a at least N faces.
it does not fix teh underlaying issue that the person is created but the faces are not attached to it.

If I have a person Y with 3 faces the person is created. if I delete one of the pictures the person Y still exist. but the counter will return a lower count (as it dont meet the threshold). I could have already named the person.
The result would be still out of sink. As I can still navigate to the person and fetch the related pictures from the timeline.

IMHO: limiting the count is not the correct way to fix this, the correct way is to ensure that the DB is consistent with the data.

@zackpollard
Copy link
Contributor

@jedi04 This open another series of issues.

Could you expand on what other issues this opens in your eyes?

See #13551

I saw that issue but it isn't really clear to me why this fix is directly a problem. It sounds like there are more issues in this area, but this PR feels like a bug regardless, it doesn't need to fix all of the problems. I think it's fine to look to merge this change but also look at a broader solution to the problems you mention separately.

This only fix the returned counte of the people, by limiting the real count to those that only have a at least N faces. it does not fix teh underlaying issue that the person is created but the faces are not attached to it.

If I have a person Y with 3 faces the person is created. if I delete one of the pictures the person Y still exist. but the counter will return a lower count (as it dont meet the threshold). I could have already named the person. The result would be still out of sink. As I can still navigate to the person and fetch the related pictures from the timeline.

IMHO: limiting the count is not the correct way to fix this, the correct way is to ensure that the DB is consistent with the data.

I now understand the issue. In that case I agree, and it's probably better to fix that underlying issue then. In which case I think I will close this issue as it is a bandaid to the wider issue.

@mlinko6
Copy link

mlinko6 commented Nov 25, 2024

Hi,

I have the same issue, but I'm totally lost in finding a solution... What should I do in this case? My minimal face recognition is set to 3... How can I solve the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

People count doesn't respect minimum recognized faces
6 participants