-
-
Notifications
You must be signed in to change notification settings - Fork 16.3k
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
Running yolov5 on CPU #37
Comments
Hello @riadsouissi, thank you for your interest in our work! Please visit our Custom Training Tutorial to get started, and see our Jupyter Notebook , Docker Image, and Google Cloud Quickstart Guide for example environments. If this is a bug report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you. If this is a custom model or data training question, please note that Ultralytics does not provide free personal support. As a leader in vision ML and AI, we do offer professional consulting, from simple expert advice up to delivery of fully customized, end-to-end production solutions for our clients, such as:
For more information please visit https://www.ultralytics.com. |
@riadsouissi yes absolutely! I do all my development on a 2018 MacBook Pro (no CUDA devices), and if I run the webcam demo at the default --img-size 640 I get about 5 FPS on CPU: (env1) glennjocher@Glenns-MBP yolov5 % python detect.py --source 0
Namespace(agnostic_nms=False, augment=False, classes=None, conf_thres=0.4, device='', fourcc='mp4v', half=False, img_size=640, iou_thres=0.5, output='inference/output', save_txt=False, source='0', view_img=False, weights='weights/yolov5s.pt')
Using CPU
1/1: 0... success (1280x720 at 29.00 FPS).
0: 384x640 Done. (0.266s)
0: 384x640 1 persons, Done. (0.217s)
0: 384x640 1 persons, Done. (0.218s)
0: 384x640 1 persons, Done. (0.207s)
0: 384x640 1 persons, Done. (0.209s)
0: 384x640 1 persons, Done. (0.209s)
0: 384x640 1 persons, Done. (0.208s)
0: 384x640 1 persons, Done. (0.210s)
0: 384x640 1 persons, Done. (0.210s)
0: 384x640 1 persons, Done. (0.207s) If I reduce to --img-size 320 I get about 15-20 FPS on CPU: (env1) glennjocher@Glenns-MBP yolov5 % python detect.py --source 0 --img 320
Namespace(agnostic_nms=False, augment=False, classes=None, conf_thres=0.4, device='', fourcc='mp4v', half=False, img_size=320, iou_thres=0.5, output='inference/output', save_txt=False, source='0', view_img=False, weights='weights/yolov5s.pt')
Using CPU
1/1: 0... success (1280x720 at 29.00 FPS).
0: 192x320 1 persons, Done. (0.096s)
0: 192x320 1 persons, Done. (0.064s)
0: 192x320 1 persons, Done. (0.064s)
0: 192x320 1 persons, Done. (0.058s)
0: 192x320 1 persons, Done. (0.062s)
0: 192x320 1 persons, Done. (0.063s)
0: 192x320 1 persons, Done. (0.062s)
0: 192x320 1 persons, Done. (0.061s) If you download our iDetection app, you will get 30+ FPS also on the latest iPhones. All of Apple's recent mobile devices (iPads, iPhones, etc) actually run YOLOv5 much faster than Intel CPU devices like MacBooks. This is due to the ANE, which for the last two years has had about 5 TOPS of power, and is likely due for a significant boost with the fab process reduction this year to 5nm. |
Thanks for the prompt feedback! |
Hi, |
@rkinas ah, yes. This is on our TODO list. Unfortunately we are stretched pretty thin, but probably by next week we will have new y5 models exported to iDetection. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
If anyone ends up here because |
Hi.
With such high fps with the small yolov5 model, would it run decently on a cpu configuration (xeon processor for instance)?
The text was updated successfully, but these errors were encountered: