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

FPS measurement. #4737

Closed
hiiksu opened this issue Sep 10, 2021 · 1 comment · Fixed by #4741
Closed

FPS measurement. #4737

hiiksu opened this issue Sep 10, 2021 · 1 comment · Fixed by #4741
Labels
question Further information is requested

Comments

@hiiksu
Copy link

hiiksu commented Sep 10, 2021

❔Question

Hello, I am a student who is conducting research using your model. I'm curious about how to measure my custom data FPS regarding the study.
Is there a separate program? Or is there a way to measure it right away in "frompt"? I'll be waiting for the reply. Thank you.

Additional context

@hiiksu hiiksu added the question Further information is requested label Sep 10, 2021
@glenn-jocher glenn-jocher linked a pull request Sep 10, 2021 that will close this issue
@glenn-jocher
Copy link
Member

glenn-jocher commented Sep 10, 2021

@hiiksu good news 😃! Your original issue may now be fixed ✅ in PR #4741. This PR updates detect.py timing to allow for simpler FPS. Simply divide 1000ms by the inference speed shown to arrive at a mean FPS for all images/frames run. Below for example 1000ms / 215ms = 4.7 FPS.

$ python detect.py
YOLOv5 🚀 v5.0-419-gc5360f6 torch 1.9.0 CPU

Fusing layers... 
Model Summary: 224 layers, 7266973 parameters, 0 gradients
image 1/2 /Users/glennjocher/PycharmProjects/yolov5/data/images/bus.jpg: 640x480 4 persons, 1 bus, 1 fire hydrant, Done. (0.240s)
image 2/2 /Users/glennjocher/PycharmProjects/yolov5/data/images/zidane.jpg: 384x640 2 persons, 2 ties, Done. (0.191s)
Speed: 1.1ms pre-process, 215.5ms inference, 1.1ms NMS per image at shape (1, 3, 640, 640)  <------- NEW
Results saved to runs/detect/exp12

To receive this update:

  • Gitgit pull from within your yolov5/ directory or git clone https://github.com/ultralytics/yolov5 again
  • PyTorch Hub – Force-reload with model = torch.hub.load('ultralytics/yolov5', 'yolov5s', force_reload=True)
  • Notebooks – View updated notebooks Open In Colab Open In Kaggle
  • Dockersudo docker pull ultralytics/yolov5:latest to update your image Docker Pulls

Thank you for spotting this issue and informing us of the problem. Please let us know if this update resolves the issue for you, and feel free to inform us of any other issues you discover or feature requests that come to mind. Happy trainings with YOLOv5 🚀!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants