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

Nose, eyes and ears are mispositioned #2

Open
laolihaile opened this issue Aug 26, 2021 · 2 comments
Open

Nose, eyes and ears are mispositioned #2

laolihaile opened this issue Aug 26, 2021 · 2 comments

Comments

@laolihaile
Copy link

Great job!
Nose, eyes and ears are mispositioned
How to correct it please?
1629964961(1)

@scteam1994
Copy link

scteam1994 commented Aug 26, 2021

In main.py line 88, the frame was resized with pad. When the output was restored in line 137 and 155, the padding was not considered. You can look tfhub for more.Here is a solution:
if x > y:
new_keypoints = np.squeeze(np.multiply(keypoints_with_scores, np.array([x, x, 1])))
new_keypoints[:, 0] -= (x - y) * 0.5
else:
new_keypoints = np.squeeze(np.multiply(keypoints_with_scores, np.array([y, y, 1])))
new_keypoints[:, 0] -= (y - x) * 0.5

not beautiful D:

@laolihaile
Copy link
Author

aha,thanks a lot

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

No branches or pull requests

2 participants