Search code examples
yolodarknetdata-augmentationyolov4

How to Modify Data Augmentation in Darknet's YOLOv4


I built a digital scale reader using Darknet's YOLOv4Tiny. It is having trouble confusing 2's and 5's which leads me to believe that I am doing some unwanted data augmentation during training. (The results are mostly correct, and glare could be a factor, but I am expecting better results).

I have referenced this post: Understanding darknet's yolo.cfg config files

and the darknet github: https://github.com/AlexeyAB/darknet/wiki/CFG-Parameters-in-the-%5Bnet%5D-section

Below is a link to the yolov4-tiny.cfg that I modified for my model: https://github.com/AlexeyAB/darknet/blob/master/cfg/yolov4-tiny.cfg

And a snippet from the link above:

[net]
# Testing
#batch=1
#subdivisions=1
# Training
batch=64
subdivisions=1
width=416
height=416
channels=3
momentum=0.9
decay=0.0005
angle=0
saturation = 1.5
exposure = 1.5
hue=.1

Am I correct that angle=0 means that there is no rotation?

Are there any other possible ways I might be augmenting my data that could cause an issue?

Edit: If I wanted, how could I eliminate all data augmentation?

Or do I just need more data (currently 2484 images for 10 digit classes)?


Solution

  • horizontal flip is applied by default, add "flip=0" to disable. https://github.com/AlexeyAB/darknet