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

Person detector from MediaPipe Pose #179

Merged
merged 4 commits into from
Aug 8, 2023

Conversation

LaurentBerger
Copy link
Contributor

Ok that's not in the list

Copy link
Member

@WanliZhong WanliZhong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍👍👍Thanks for your contribution! Here are some code need to be modified.

models/person_detection_mediapipe/demo.cpp Outdated Show resolved Hide resolved
models/pose_estimation_mediapipe/README.md Outdated Show resolved Hide resolved
Copy link
Member

@WanliZhong WanliZhong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@LaurentBerger
Copy link
Contributor Author

LaurentBerger commented Jun 24, 2023

@fengyuentau
Copy link
Member

fengyuentau commented Jun 24, 2023

please take a look at https://forum.opencv.org/t/get-same-results-in-c-and-python-code/13656

Is it a key factor in this pull request? The only place where convertTo is used is converting landmarks to int32 at the final stage.


convertTo uses saturate_cast which follows the rounding rule, but astype from numpy just truncates anything behind the floating dot.

You can loop over all landmarks and use something like the following for a truncation convertion:

int landmark_x = static_cast<int>(results.at<float>(row, 4);

@LaurentBerger
Copy link
Contributor Author

In this PR there is only one convertTo but I have finished to translate pose_estimation_mediapipe/demo.py and change are visble in image result. It is like reading same file using videocpature or imread. input file is same but inference is not equal.
MAy be it is a detail but when you want to check result you look for an error that's does not exist

@LaurentBerger
Copy link
Contributor Author

LaurentBerger commented Jun 24, 2023

don't push there is a bug

@fengyuentau fengyuentau added the demo anything related to demo in Python / C++ label Aug 8, 2023
@fengyuentau fengyuentau merged commit 62eaa30 into opencv:main Aug 8, 2023
@WanliZhong WanliZhong added this to the 4.9.0 (first release) milestone Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
demo anything related to demo in Python / C++
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants