DarkMark  v1.8.20-1
Image markup for darknet machine learning.
Looking for a C++ dev who knows OpenCV?
I'm looking for work. Hire me!
Data Augmentation - Colour

This page describes how saturation, exposure, and hue are utilized during darknet's data augmentation.

  • Saturation is the intensity of a colour.
  • Exposure (lightness) is the amount of black or white that has been added to the colour.
  • Hue is a synonym for "colour".

All images on this page were initially generated with darknet and were of different sizes, but then were manually resized to better fit on this page. This makes it easier to compare and better understand how colours are altered by darknet.

This is the original image used for this demonstration:

Disabled

When all 3 colour parameters (saturation, exposure, and hue) are set to zero, this disables all colour changes:

The colours in the augmented data will then perfectly match those of the original image:

saturation=0.00, exposure=0.00, hue=0.00

Default

The default values in the original yolov3.cfg and yolov3-tiny.cfg files is the following:

saturation = 1.5
exposure = 1.5
hue=.1

In DarkMark, this looks like the following:

Visually, this results in images like these:

saturation=1.50, exposure=1.50, hue=0.10

Saturation

Saturation determines the colour intensity. The higher the value, the greater the variance, both positive and negative. So some images will seem extra-vibrant, while others may look almost black-and-white.

DarkMark allows saturation to vary from 0.0 to 10.0, while in darknet the upper range is actually even higher.

Saturation 2.50

saturation=2.50

Saturation 5.00

saturation=5.00

Saturation 7.50

saturation=7.50

Saturation 10.00

saturation=10.00

Exposure

Exposure determines the amount of black or white that is added to colours. The higher the value, the greater the variance, possibly making it appear as if the images were over- or under-exposed.

DarkMark allows exposure to vary from 0.0 to 10.0, while in darknet the upper range is actually even higher.

Exposure 2.50

exposure=2.50

Exposure 5.00

exposure=5.00

Exposure 7.50

exposure=7.50

Exposure 10.00

exposure=10.00

Hue

Hue determines the colour. The range is from 0.0 to 1.0.

Hue 0.25

hue=0.25

Hue 0.50

hue=0.50

Hue 0.75

hue=0.75

Hue 1.00

hue=1.00