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

Lag on video inference with Pi 4 and Coral USB #59

Open
Tylersuard opened this issue Feb 17, 2021 · 4 comments
Open

Lag on video inference with Pi 4 and Coral USB #59

Tylersuard opened this issue Feb 17, 2021 · 4 comments
Assignees
Labels
comp:thirdparty Thirdparty related issues Hardware:USB Accelerator Coral USB Accelerator issues type:performance Performance issues

Comments

@Tylersuard
Copy link

Tylersuard commented Feb 17, 2021

Hello. I am using a Pi 4B with the Coral USB. The screen reports I'm getting around 22fps, which is great, but there is a 1-second lag between action and response. For instance, I will move my arm up, and the video on screen only responds one second later. This does not happen normally (for instance when I use raspistill -p the camera operates without the lag). The one-second lag may not seem like much, but it makes the project unusable for my purposes. Do you have any recommendations for how I can get rid of that one-second lag, or at least reduce it significantly? Thank you for your help.

@Tylersuard Tylersuard changed the title Significant lag on video inference with Pi 4 and Coral USB Lag on video inference with Pi 4 and Coral USB Feb 17, 2021
@Namburger
Copy link
Contributor

hi @Tylersuard how are you running it?
is it just python3 pose_camera.py or any additional arguments?

@Tylersuard
Copy link
Author

Hi @Namburger , thank you for the quick response. I am pretty sure I just used the command with no arguments, I will double-check for you asap. Here is a video of someone else having the same issue: https://youtu.be/h8MJpsoge0Q?t=73
Notice how the frame rate is 60 FPS, but the machine takes around 1 second to respond when the user moves his hands... shouldn't it only take 1/60 of a second to respond? I'm trying to figure out a way to reduce that latency. Thank you for your help.

@Tylersuard
Copy link
Author

Tylersuard commented Mar 10, 2021

I found out the issue: the lag disappears when I draw fewer edges using svgwrite. Is there a reason you used svgwrite instead of opencv?

@manoj7410
Copy link

@Tylersuard I tested openCV with camera examples and object tracker, performance was being deteriorated with openCV.

@hjonnala hjonnala added comp:thirdparty Thirdparty related issues Hardware:USB Accelerator Coral USB Accelerator issues stat:awaiting Coral team Status - Awaiting response from Coral team type:performance Performance issues labels Aug 6, 2021
@hjonnala hjonnala assigned hjonnala and unassigned manoj7410 May 3, 2022
@hjonnala hjonnala removed the stat:awaiting Coral team Status - Awaiting response from Coral team label May 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
comp:thirdparty Thirdparty related issues Hardware:USB Accelerator Coral USB Accelerator issues type:performance Performance issues
Projects
None yet
Development

No branches or pull requests

4 participants