Answers.Body: <p>@Clement Hui</p>
  <p>Thanks for your answer, I ask AlexeyAB from Darknet the same question and he add now flag for Darknet for this type of model speed measurments:
  <a href="https://github.com/AlexeyAB/darknet/issues/4627" rel="nofollow noreferrer">https://github.com/AlexeyAB/darknet/issues/4627</a></p>
  <blockquote>
  <p>I added -benchmark flag for detector demo, now you can use command 2652263</p>
  <p><code>./darknet detector demo obj.data yolo.cfg yolo.weights test.mp4 -benchmark</code></p>
  <p>But for very fast models the bottleneck will be in the Video Capturing from file/camera, &gt;or in Video Showing (you can disable showing by using -dont_show flag).</p>
  </blockquote>
  <p>I think that it is the best solution, you only need the newest version of Darknet (from AlexeyAB).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-08T10:30:59.607Z
Answers.LastActivityDate: 2020-01-08T10:30:59.607Z
Answers.LastEditDate: 2020-06-17T09:57:20.710Z
Answers.UserDisplayName: Panicum
Answers.Body: <p>You can use the dataset test set as "frames" of video. Test the images with your model and calculate the images per second of the result and that is the same as frames per second. However you should set the batch size to 1 as in the real world scenario. You should also display each image with teh corresponding boxes after inference and remove the accuracy calculation as to imitate the real world situation. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-06T02:46:36.610Z
Answers.LastActivityDate: 2020-01-06T02:46:36.610Z
Answers.UserDisplayName: Clement
Body: <p>How to calculate mean speed in FPS for an object detection model like YOLOv3 or YOLOv3-Tiny? Different object detection models are often presented on charts like this:
  <a href="https://i.sstatic.net/hUODt.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/hUODt.png" alt="enter image description here"></a>
  I am using the DarkNet framework in my project and I want to create similar charts for my own models based on YOLOv3. Is there some easy way to get mean FPS speed for my model with the "test video"?</p>
  
Tags: <convolutional-neural-networks><object-detection><yolo>
Title: Calculation of FPS on object detection task
UserDisplayName: Panicum
ThreadText: # Calculation of FPS on object detection task
  
  (Asked by: username_0 on 2020-01-04)
  
  How to calculate mean speed in FPS for an object detection model like YOLOv3 or YOLOv3-Tiny? Different object detection models are often presented on charts like this:
  [![enter image description here](https://i.sstatic.net/hUODt.png)](https://i.sstatic.net/hUODt.png)
  I am using the DarkNet framework in my project and I want to create similar charts for my own models based on YOLOv3. Is there some easy way to get mean FPS speed for my model with the "test video"?
  
  **Tags:** convolutional-neural-networks, object-detection, yolo
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2020-01-08. Score: 0 | Accepted answer
  
  @username_1 Hui
  
  Thanks for your answer, I ask AlexeyAB from Darknet the same question and he add now flag for Darknet for this type of model speed measurments:
  <https://github.com/AlexeyAB/darknet/issues/4627>
  
  > I added -benchmark flag for detector demo, now you can use command 2652263
  >
  > `./darknet detector demo obj.data yolo.cfg yolo.weights test.mp4 -benchmark`
  >
  > But for very fast models the bottleneck will be in the Video Capturing from file/camera, >or in Video Showing (you can disable showing by using -dont\_show flag).
  
  I think that it is the best solution, you only need the newest version of Darknet (from AlexeyAB).
  
  
  ---
  
  ### Answer by username_1 on 2020-01-06. Score: 1
  
  You can use the dataset test set as "frames" of video. Test the images with your model and calculate the images per second of the result and that is the same as frames per second. However you should set the batch size to 1 as in the real world scenario. You should also display each image with teh corresponding boxes after inference and remove the accuracy calculation as to imitate the real world situation.
  
  
  ---
  
  