Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Problem in run holisitic #2

Open
lucasjinreal opened this issue Feb 2, 2023 · 1 comment
Open

Problem in run holisitic #2

lucasjinreal opened this issue Feb 2, 2023 · 1 comment

Comments

@lucasjinreal
Copy link

Hi!

the wrapper works great!
But seems runing holisitic got some issue, the pose tracking not working, it was stucked at first frame.

Can u help me out? I have sent you an email, thanks so much!

@rajkundu
Copy link
Owner

rajkundu commented Feb 2, 2023

My best guess is that you need to clear the queue of the pose output stream. For example, in this repository's face mesh example, I don't just grab the next packet available in the multi_face_landmarks output stream. Instead, I clear the queue until it is empty:

libmp-example/main.cpp

Lines 29 to 38 in d682b12

// I use a unique_ptr for convenience, so that DeletePacket is called automatically
// You could also manage deletion yourself, manually:
// const void* packet = face_mesh->GetOutputPacket("multi_face_landmarks");
// mediapipe::LibMP::DeletePacket(packet);
std::unique_ptr<const void, decltype(&mediapipe::LibMP::DeletePacket)> lm_packet_ptr(nullptr, mediapipe::LibMP::DeletePacket);
// Keep getting packets from queue until empty
while (face_mesh->GetOutputQueueSize("multi_face_landmarks") > 0) {
lm_packet_ptr.reset(face_mesh->GetOutputPacket("multi_face_landmarks"));
}

Remember that if you don't use a smart pointer, then you have to delete packets yourself, otherwise they will stay in memory.

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

No branches or pull requests

2 participants