AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.68k stars 7.96k forks source link

About data augmentation in [tiny] yolo #6130

Open spinlud opened 4 years ago

spinlud commented 4 years ago

Hi guys! I am using yolov3-tiny and yolov4-tiny to train a custom model. For my current task I don't need any rotation, horizontal/vertical flip and skewness on the training images. Do I need to change anything in the .cfg file to disable these types of data augmentation or are they already disabled?

Looking for example inside the yolov4-tiny.cfg file I see angle=0, does this mean that rotation augmentation is disabled? And what about horizontal/vertical flip and skewness, do I need to do anything? Is there a list of the parameters used in yolo with a description about what they do?

Thanks for any info!

AlexeyAB commented 4 years ago

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

spinlud commented 4 years ago

Thank you @AlexeyAB, exactly what I was looking for! Hope you don't mind, I have some doubts about the following:

  1. scale_x_y, resize and jitter, what is the difference?
  2. angle=0 means that no rotation augmentation is added, is this right?
  3. adversarial_lr=1.0 this is very fascinating and mysterious, could you elaborate a bit what does it mean Changes all detected objects to make it unlike themselves from neural network point of view? In practice what happens?
  4. All the augmentation parameters (hue, saturation, mosaic, blur, etc) must be placed in the [net] layer, correct?
sealedtx commented 4 years ago

@spinlud Here is how I understand these params:

  1. scale_x_y is used to eliminate grid sensitivity, you can read more here #3293 resize - randomly resizes image in range: 1/1.5 - 1.5 with KEEPING aspect ratio of image jitter - randomly crops and resizes images with CHANGING aspect ratio of image
  2. yes, 0 - means no rotation added
  3. adversarial_lr - makes model more stable to adversarial-attacks, read more here #5117
  4. correct, read more wiki
spinlud commented 4 years ago

Thanks a lot!