Data augmentation requires that darknet be built with support for OpenCV.
Some notes from AlexeyAB:
From page 6 of the YOLOv4 paper:
Mosaic represents a new data augmentation method that mixes 4 training images. Thus 4 different contexts are mixed, while CutMix mixes only 2 input images. This allows detection of objects outside their normal context. In addition, batch normalization calculates activation statistics from 4 different images on each layer. This significantly reduces the need for a large mini-batch size.
Images are randomly flipped left-right. Turn this off if you are training classes that depend on left-hand and right-hand distinctions.
For example, training to recognize the letters "b"
and "d"
, or "left hand"
and "right hand"
would be problematic if flip is enabled.
To enable, add this line to the [net]
section of your .cfg file:
To disable, add this line to the [net]
section of your .cfg file:
Data augmentation may combine multiple images into a single image ("mosaic").
mosaic | ||||
---|---|---|---|---|
To enable, add this line to the [net]
section of your .cfg file:
To disable, add this line to the [net]
section of your .cfg file:
To enable, add this line to the [net]
section of your .cfg file:
To disable, add this line to the [net]
section of your .cfg file:
Data augmentation may blend multiple images together to create a new image.
mixup | ||||
---|---|---|---|---|
To enable, add this line to the [net]
section of your .cfg file:
To disable, add this line to the [net]
section of your .cfg file: