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

Do you have mediapipe_hand_landmark_cpp ? #21

Open
lexidliny opened this issue Oct 29, 2022 · 11 comments
Open

Do you have mediapipe_hand_landmark_cpp ? #21

lexidliny opened this issue Oct 29, 2022 · 11 comments

Comments

@lexidliny
Copy link

No description provided.

@pntt3011
Copy link
Owner

HI @lexidliny, i have a separate branch for it. https://github.com/pntt3011/mediapipe_face_iris_cpp/tree/HandLandmark. Hope this help.

@lexidliny
Copy link
Author

Thank you ! I have tested this code on my computer and I get "Segmentation fault (core dumped)". How do I fix this fault?
The face_landmark_cpp program works well on my computer with ubuntu 18.04.

@pntt3011
Copy link
Owner

Can you show your detailed error? I tested on my computer and it ran normally.
Did you compile Debug or Release mode? If you compile with Debug mode, try again with Release mode.

@lexidliny
Copy link
Author

I have tried again, and I located this error in the my::DetectionPostProcess::getHighestScoreDetection function.

@pntt3011
Copy link
Owner

@lexidliny, did you change the define values in DetectionPostProcess.hpp? They are different from those of Face landmark model.

@lexidliny
Copy link
Author

I found that I forgot to modfy the path to anchors.csv. Now it works well. Thank you !

@lexidliny
Copy link
Author

It seems that the accuracy is not as good as mediapipe. Is it caused by palm_detection_without_custom_layer.tflite ?

1 similar comment
@lexidliny
Copy link
Author

It seems that the accuracy is not as good as mediapipe. Is it caused by palm_detection_without_custom_layer.tflite ?

@lexidliny
Copy link
Author

Screenshot from 2022-10-31 21-01-53

@pntt3011
Copy link
Owner

@lexidliny, if i remember correctly, the landmark model works best with straight up hand.
Therefore, from the detection model, you should:

  • Retrieve the 5 (or 6?) main landmarks
  • Calculate the rotate angle from the straight up direction
  • Rotate the hand bounding box the opposite of that angle
  • Crop the bounding box
    Then you can feed it to the landmark model.

@pntt3011
Copy link
Owner

You can get the straight up direction from palm and middle finger landmark (2 of the output landmarks from detection model)

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