Darknet: image data augmentation

Created on 22 May 2018  路  9Comments  路  Source: AlexeyAB/darknet

@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).

want enhancement

Most helpful comment

@AlexeyAB
Is random rotation merged in the code ?

All 9 comments

  • horizontal flips - aready implemented, and enabled by default. To disable use flip=0 in the [net]-section in cfg-file

  • vertical flips - I do not know where it could help.

  • rotations - is in the plans, but has not yet found the datasets in which it was required, except satellite imagery

  • perspective transforms - since this will change the entire image, it will create disproportional distortions for near and far objects. I do not know the datasets for which this could help.

@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.

@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 Very helpful! Thanks for the links!

@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?

@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

@AlexeyAB is online rotation augmentation supported in current trunk ?

@AlexeyAB
Is random rotation merged in the code ?

Was this page helpful?
0 / 5 - 0 ratings