-
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
Packet timestamp mismatch - mediapipe does not recover #5743
Comments
Hi @maikthomas, We have newer version available 0.10.18, Can you try and let us know the status now? Thank you!! |
@kuaashish apologies this was a mistake filling out the form, I have already tried with 0.10.18. |
Hi, @maikthomas I encountered a similar issue when deploying MediaPipe code on a device. The device’s time was unstable and could even be manually modified by the user. If some data is cached within the pipeline for business processing, a restart could lead to data loss. A simple and effective strategy is to use an auto-increment counter as the input for the MediaPipe timestamp. This helps maintain consistency in processing when the system time is unreliable. |
Hi, @kuaashish I found the DisableTimestamps function in the code (link: DisableTimestamps), and it seems to disable timestamp validation. However, I’m unsure about when DisableTimestamps is actually called. Is there any documentation that explains its usage? Thank you! |
I ran into the same problem with 0.10.14, when I was using |
mediapipe 0.10.18, win11, python 3.10.15
flask-socketio
VUE
|
Have I written custom code (as opposed to using a stock example script provided in MediaPipe)
Yes
OS Platform and Distribution
macOS 14.6.1
MediaPipe Tasks SDK version
I tested with
Task name (e.g. Image classification, Gesture recognition etc.)
ImageSegmenter
Programming Language and version (e.g. C++, Python, Java)
Javascript - Web
Describe the actual behavior
mediapipe throws the same error with the same timestamp when given new frames. It also offers no method to reset the timestamp.
This issue is concerning error below. I may open an issue as to why the error is occurring but for now I want to address the fact that mediapipe does not recover from this error.
I forked and adapted a codepen to show this behaviour:
https://codepen.io/maikthomas/pen/GRVbWNb
In this pen, when using the webcam, on the 11th frame I manually use a timestamp greater than the previous timestamp. I then return to using the correct timestamps. However mediapipe will continue to report the same error with the timestamps from before.
Another possible case is when it is known that the timestamp may be lower, due to different input sources (some timestamps start at 0). To avoid this I am currently using
Date.now()
. But it would be good to be able to reset the current minimum expected timestamp back to 0 if needed.Describe the expected behaviour
mediapipe uses the newly provided timestamp and recovers. And also exposes a method in order to reset timestamp manually
Standalone code/steps you may have used to try to get what you need
As a workaround for now I am calling
segmentForVideo
in a tr/catch and recreating theImageSegmenter
when it failsOther info / Complete Logs
The text was updated successfully, but these errors were encountered: