Skip to content
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

Inconsistent inference time #11510

Closed
1 task done
MasIgor opened this issue May 10, 2023 · 2 comments
Closed
1 task done

Inconsistent inference time #11510

MasIgor opened this issue May 10, 2023 · 2 comments
Labels
question Further information is requested Stale

Comments

@MasIgor
Copy link

MasIgor commented May 10, 2023

Search before asking

Question

Hi all! I am facing inconsistent inference times.

I am on windows, and running the inference on CPU.

The inference time is always 84/85 ms for lets say 30 pictures straight.. then there are 1 or 2 that take 125ms or even more. and then it goes back again to the usual 84 ms. its not picture related as the same picture takes 84 ms if run again.

any idea on what might be causing these inconsistencies?
there are no other programs using the cpu, just the OS.

Thank you

Best regards

------------ EDIT --------------

it is this line that has that variable time:

pred = model(im, augment=False, visualize=False)

Additional

No response

@MasIgor MasIgor added the question Further information is requested label May 10, 2023
@glenn-jocher
Copy link
Member

@MasIgor hi,

Inconsistency in inference time can be due to many factors like hardware performance, memory, CPU usage, and so on.

Our recommendation would be to profile the inference execution and check where is it spending more time. You can use python's built-in cProfile library to profile the inference execution and pstats for the analysis.

Another suggestion could be to try running the inference on GPU or a Linux machine (if possible) and see if the inconsistency is still there.

Let us know if this helps.

Best.

@github-actions
Copy link
Contributor

👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help.

For additional resources and information, please see the links below:

Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

Thank you for your contributions to YOLO 🚀 and Vision AI ⭐

@github-actions github-actions bot added the Stale label Jun 10, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested Stale
Projects
None yet
Development

No branches or pull requests

2 participants