AlexeyAB / darknet

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

image data augmentation #871

Open kmsravindra opened 6 years ago

kmsravindra commented 6 years ago

@AlexeyAB , Went through the issue log and understood that random cropping, multi-scaling, color and lighting aspects of data augmentation has been already taken care in this repo. Wondering if there is a plan to cover other types as well enabling data aug on the fly ? like - random rotations, flips, perspective transforms etc.,? (Maybe at least rotations and flips).

AlexeyAB commented 6 years ago
kmsravindra commented 6 years ago

@AlexeyAB, I thnk rotations, vertical flips and perspective transforms could be helpful in medical imaging. Given the possibillity of camera being titled at any angle + having limited access to training data would make a good case for such augmentation.

xiaoyongzhu commented 6 years ago

@kmsravindra on a different thread, can you point me to the multi-scaling part of the code, or where is the github issue discussing this? I am interested to learn more about the multi-scale data augmentation, but cannot find any docs/issues talking about it.

Thanks!

AlexeyAB commented 6 years ago

@xiaoyongzhu


xiaoyongzhu commented 6 years ago

@AlexeyAB Very helpful! Thanks for the links!

kmsravindra commented 6 years ago

@AlexeyAB, I have implemented a standalone rotation augmentation in python. But this creates additional images in the training data thus occupying lot of storage. I wanted to incorporate this into the code that does the rotation augmentation on the fly during the training run time. Could you point me to some code in this rep where I can include my augmentation code to run it on the fly?

AlexeyAB commented 6 years ago

@kmsravindra

You should rotate both Images and Labels (bounded boxes).

  1. If OpenCV is used - 3.5x accelerated data augmentation for training on High Performance GPU - TitanV, DGX-2,...:

  1. If OpenCV isn't used: https://github.com/AlexeyAB/darknet/blob/b847f39f60eb6715325f3707e78667a0611811dd/src/data.c#L791-L842
NEELMCW commented 6 years ago

@AlexeyAB is online rotation augmentation supported in current trunk ?

deimsdeutsch commented 5 years ago

@AlexeyAB Is random rotation merged in the code ?