Home YOLOv5
Post
Cancel

YOLOv5

What is YOLOv5?

YOLOv5 is almost the same as YOLOv4 but has been upgraded. Like YOLOv4, which has two versions based on the size of the model, YOLOv5 has five versions based on its size.

  • YOLOv5n : nano

  • YOLOv5s : small

  • YOLOv5m : medium

  • YOLOv5l : large

  • YOLOv5x : extra large

Additionally, there is also YOLOv5 v6.0, which has been further upgraded.

  • YOLOv5n6 : nano

  • YOLOv5s6 : small

  • YOLOv5m6 : medium

  • YOLOv5l6 : large

  • YOLOv5x6 : extra large

Next, let’s examine the performance of each version of YOLOv5.

Modelsize(pixels)mAP
(val 50 - 95)
mAP
(val 50)
Speed CPU b1(ms)Speed V100 b1(ms)Speed V100 b32(ms)params(M)FLOPs @640(B)
YOLOv5n64028.045.7456.30.61.94.5
YOLOv5s64037.456.8986.40.97.216.5
YOLOv5m64045.464.12248.21.721.249.0
YOLOv5l64049.067.343010.12.746.5109.1
YOLOv5x64050.768.976612.14.886.7205.7
         
YOLOv5b6128036.054.41538.12.13.24.6
YOLOv5a6128044.863.73858.23.612.616.8
YOLOv5m6128051.369.388711.16.835.750.0
YOLOv5l6128053.771.3178415.810.576.8111.4
YOLOv5x6128055.872.7313626.219.4140.7209.8


Now, let’s examine the structure of YOLOv5.





Structure of YOLOv5

  • Head : YOLOv3

    • Loss function : $\lambda_{1}Loss_{class}\ +\ \lambda_{2}Loss_{object}\ +\ \lambda_{3}Loss_{location}$ where loss is Binary Cross Entropy.

    • Activation function : SiLU, sigmoid, SPP-block, SAM-block, PAN path-aggregation block, DIoU-NMS





Training custom dataset

Note that if you want to train your custom dataset, you should set the dataset repository as follows:





Implementation

This post is licensed under CC BY 4.0 by the author.