The Role of Hyperparameters in YOLO
Understand some of the hyperparameters that are mostly modified in YOLO.
Hyperparameters play a pivotal role in the training and fine-tuning of machine learning models, including object detection systems like YOLO. While fine-tuning adjusts the internal weights of a pretrained model for a specific task, hyperparameters guide this adjustment process to ensure optimal performance.
lr0
(initial learning rate): This is the learning rate at the start of the training process. A common value for the initial learning rate is 0.01.lrf
(final learning rate): This is the learning rate used during the final stages of training. The learning rate typically decreases over time, following a schedule. A value of 0.2 indicates that the final learning rate is 20% of the initial learning rate.momentum
: This is the momentum coefficient for the optimizer (usually stochastic gradient descent with momentum or Adam). Momentum helps to accelerate convergence and reduce oscillations in the optimization process. A typical value for momentum is 0.937.warmup_epochs
: This is the number of warmup epochs. During warmup, the learning rate increases linearly from a small value to the initial learning rate. Warmup helps to prevent large weight updates during the initial stages of training, which can lead to unstable training dynamics. A value of 3.0 means that the learning rate will increase linearly over the first three epochs.box
: This is the loss weight for the bounding box coordinates. This hyperparameter controls the relative importance of the bounding box coordinate loss compared to the other loss components (objectness and class).cls
(loss weight for the object class labels): This hyperparameter controls the relative importance of the object class loss compared to the other loss components (objectness and bounding box).obj
(loss weight for the objectness score): This hyperparameter controls the relative importance of the objectness loss compared to the other loss components (bounding box and class).iou_t
(Intersection over Union threshold): This is used to assign anchor boxes during training. This hyperparameter determines the minimum IoU between an anchor box and a ground truth box required for a positive match.anchor_t
: This is the anchor box threshold for assigning ground truth boxes during training. This hyperparameter determines the minimum confidence score for an anchor box to be considered a positive match.
Get hands-on with 1400+ tech skills courses.