Yolov5: How to improve speed detection object (about 200 FPS)

Created on 28 Sep 2020  路  9Comments  路  Source: ultralytics/yolov5

I trained yolov5 on a custom dataset. I detect video and the result is about 150 FPS. I want to increase it to around 200 FPS. What should I do? Is there any way? Please just let me know.

Stale question

All 9 comments

Hello @vukien199x, thank you for your interest in our work! Please visit our Custom Training Tutorial to get started, and see our Jupyter Notebook Open In Colab, 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 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:

  • Cloud-based AI systems operating on hundreds of HD video streams in realtime.
  • Edge AI integrated into custom iOS and Android apps for realtime 30 FPS video inference.
  • Custom data training, hyperparameter evolution, and model exportation to any destination.

For more information please visit https://www.ultralytics.com.

  1. use yolov5s/yolov5m instead of larger models.
  2. don't use --augment in detection.
  3. the default image size is 640, adjust it by using --img 608 or --img 576 or even lower.
    All of these three ways will reduce mAP to varying degrees.
1. use yolov5s/yolov5m instead of larger models.

2. don't use `--augment` in detection.

3. the default image size is 640, adjust it by using `--img 608` or `--img 576` or even lower.
   All of these three ways will reduce mAP to varying degrees.

Thank you. I will try it.

Good suggestions spongebob!

Also, increase batch size.

@wudashuo how to calculate the possible image size, like as you suggested 608 and 576, how to find even lower image sizes?

@wudashuo how to calculate the possible image size, like as you suggested 608 and 576, how to find even lower image sizes?

Any size that multiples of 32. 640, 608, 576, 544, 512...
however once I typed a wrong number by mistake, but the actual inputs still were multiples of 32...

  • use yolov5s/yolov5m instead of larger models.
  • don't use --augment in detection.
  • the default image size is 640, adjust it by using --img 608 or --img 576 or even lower.
    All of these three ways will reduce mAP to varying degrees.

For step 3, are you talking about training or when detecting ?

@Zegorax I was taking about inference only and its model is working fine if the image size is multiple of 32. Thanks for clarifying.

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

we1pingyu picture we1pingyu  路  3Comments

cswwp picture cswwp  路  4Comments

jaqub-manuel picture jaqub-manuel  路  4Comments

Alex-afka picture Alex-afka  路  3Comments

maykulkarni picture maykulkarni  路  3Comments