mediapipe_face_iris_cpp icon indicating copy to clipboard operation
mediapipe_face_iris_cpp copied to clipboard

Do you have mediapipe_hand_landmark_cpp ?

Open ShaneWay opened this issue 3 years ago • 11 comments

ShaneWay avatar Oct 29 '22 14:10 ShaneWay

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

pntt3011 avatar Oct 29 '22 16:10 pntt3011

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.

ShaneWay avatar Oct 30 '22 08:10 ShaneWay

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.

pntt3011 avatar Oct 30 '22 09:10 pntt3011

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

ShaneWay avatar Oct 30 '22 14:10 ShaneWay

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

pntt3011 avatar Oct 30 '22 15:10 pntt3011

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

ShaneWay avatar Oct 31 '22 02:10 ShaneWay

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

ShaneWay avatar Oct 31 '22 12:10 ShaneWay

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

ShaneWay avatar Oct 31 '22 13:10 ShaneWay

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

ShaneWay avatar Oct 31 '22 13:10 ShaneWay

@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 avatar Oct 31 '22 14:10 pntt3011

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

pntt3011 avatar Oct 31 '22 14:10 pntt3011