-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Accessing hand landmarks and other information in new releases #2366
Comments
Hi @izakharkin, Did you face any error while doing it with the latest version. Could you please share the logs to understand the issue with much better detail. Thanks! |
Hi @sgowroji, thanks for your reply. Yes, I face this error while doing it with the latest version (currently, it is v0.8.6). Actually, there are no logs produced, I am just running the Hands desktop example with my fork (building and running with commands I provided above) and all works fine until I move my hands outside of the input frame, so the loop awaits infinitely on the row with |
before reading the landmark packet, check it's presence, see: #850 (comment) or use ObserveOutputStream instead of AddOutputStreamPoller |
I encountered the same problem. In addition, what issues should I pay attention to when acquiring the GPU version of the hand landmark? |
@wongfei thanks a lot, the use of the However, there appeared another problem: when I move the hands inside again, it prints out the information (handedness, hand rects, landmarks) with a kind of delay, so I need to wait for some time for this info to catch up with the current real-time state of the hands. Maybe you have ideas on why does it happen? Could it be something wrong with the timestamps? |
Here are two solutions you can try: Solution 1. Try tool::AddMultiStreamCallback with setting Solution 2. Patch the following to allow OutputStreamPoller to observe timestamp bounds.
Remember to modify your hand_tracking_cpu_main.cc to have
|
Please make sure that this is a solution issue.
System information (Please provide as much relevant information as possible)
Describe the expected behavior:
I am trying to access real-time information about hand landmarks, scaled hand landmarks, handedness, and hand rects. In one of the earlier issues (#200), there was a complete guide on how to get these. It worked well until the new version, currently,
v0.8.6
introduced some new mechanisms (actually it wasv0.8.0
orv0.8.1
) of how the graphs and modules interact.The point is that the approach I used before - modification of the output streams of the hand tracking graphs, creation of the output stream pollers, and retrieval with the packets
.Get()
method in themain()
loop do not work anymore: I get endless waiting of the main loop and it sends no new output frames (becomes idle) when there are no hands in the input frame.I suppose that the issue is connected to the use of the
poller.Next()
method and could be somehow resolved with the use ofGateCalculator
s andPreviousLoopbackCalculator
s. But honestly, it turned out to be quite tricky for me to handle this new runtime logic and I am asking for help and for a piece of advice on how to solve this the most correct and convenient way.Standalone code you may have used to try to get what you need :
If there is a problem, provide a reproducible test case that is the bare minimum necessary to generate the problem. If possible, please share a link to Colab/repo link /any notebook:
My fork with all the changes needed to reproduce the issue: https://github.com/izakharkin/mediapipe. The main file is
mediapipe/examples/desktop/hand_tracking/hand_tracking_cpu_main.cc
.Build:
Run:
Other info / Complete Logs :
Include any logs or source code that would be helpful to
diagnose the problem. If including tracebacks, please include the full
traceback. Large logs and files should be attached:
Thank you very much!
The text was updated successfully, but these errors were encountered: