google-ai-edge / mediapipe

Cross-platform, customizable ML solutions for live and streaming media.
https://ai.google.dev/edge/mediapipe
Apache License 2.0
26.97k stars 5.1k forks source link

Mediapipe lagging behind OpenCV video stream severely on Linux #5453

Closed Crazypersonalph closed 2 months ago

Crazypersonalph commented 4 months ago

Have I written custom code (as opposed to using a stock example script provided in MediaPipe)

Yes

OS Platform and Distribution

Arch Linux

Mobile device if the issue happens on mobile device

No response

Browser and version if the issue happens on browser

No response

Programming Language and version

Python

MediaPipe version

Latest

Bazel version

No response

Solution

Pose

Android Studio, NDK, SDK versions (if issue is related to building in Android environment)

No response

Xcode & Tulsi version (if issue is related to building for iOS)

No response

Describe the actual behavior

Mediapipe lags behind OpenCV up to 7 seconds behind on capable hardware

Describe the expected behaviour

Mediapipe stays constistenly with OpenCV

Standalone code/steps you may have used to try to get what you need

https://github.com/Crazypersonalph/nerftracker.git

Other info / Complete Logs

No response

Crazypersonalph commented 4 months ago

I should add it was lagging behind with Cython, and with the Heavy Pose Landmarker model. This performance is unexpected as I was using the heavy model before, and it was running at expected speed, i.e. the same speed as lite now.

matanox commented 4 months ago

Can you provide reproducing code?

kuaashish commented 3 months ago

Hi @Crazypersonalph,

Could you please provide the code to reproduce the issue so that we can better understand it from our end?

Thank you!!

github-actions[bot] commented 3 months ago

This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.

ueihghnurthnirt commented 3 months ago

Got same energy when install same system from windows to Linux.But for me,with USB Camera,speed is unchanged. only get lagging behind when do it with ".mp4" video or rtsp.

ueihghnurthnirt commented 3 months ago

Got same energy when install same system from windows to Linux.But for me,with USB Camera,speed is unchanged. only get lagging behind when do it with ".mp4" video or rtsp.

Problem seem to be related to opencv reading frame speed. Affecting not also rtsp but even in .mp4 file or .avi. should check hardware then network then opencv.

kuaashish commented 2 months ago

Hi @Crazypersonalph,

Sorry for the delay in responding. Could you please let us know if this issue is still ongoing or if it has been resolved on your end?

Thank you!!

Crazypersonalph commented 2 months ago

Sorry about the absence of responses, I am not actively working on the project concerning mediation anymore, so I do not think this issue applies to me anymore.

Kind Regards

google-ml-butler[bot] commented 2 months ago

Are you satisfied with the resolution of your issue? Yes No