-
-
Notifications
You must be signed in to change notification settings - Fork 16.5k
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
Improved detect.py
timing
#4741
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closed
Divide 1000ms by the inference speed shown to arrive at a mean FPS for all images/frames run. In the above for example: Speed: 1.1ms pre-process, 215.5ms inference, 1.1ms NMS per image at shape (1, 3, 640, 640) <------- NEW
1000ms / 215.5ms = 4.7 FPS |
Closed
Closed
CesarBazanAV
pushed a commit
to CesarBazanAV/yolov5
that referenced
this pull request
Sep 29, 2021
Sorry,Why the fps is 1000/inference_time is not (1000/(inference_time+NMS+prediction time))? |
Merged
BjarneKuehl
pushed a commit
to fhkiel-mlaip/yolov5
that referenced
this pull request
Aug 26, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updated detect.py timing to match hub and val.py formats. Allows for simpler FPS calculation for students, i.e. #4737
$ 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
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Significant refactor of timing logic in inference scripts for enhanced transparency and clarity.
📊 Key Changes
time
module indetect.py
.detect.py
andval.py
for consistency.🎯 Purpose & Impact