qurator-spk / sbb_pixelwise_segmentation

Pixelwise segmentation for document images
Apache License 2.0
10 stars 10 forks source link

augmentation: control degradation rate #13

Open bertsky opened 3 years ago

bertsky commented 3 years ago

IIUC, in the current implementation, the rate between original images and augmented variants will be a fixed 1 : N for N kinds of augmentation that have been enabled:

https://github.com/qurator-spk/sbb_pixelwise_segmentation/blob/63fcb961898540f95cb347d43f8965ae65b8be3f/utils.py#L92

This makes it hard to control what kind of degradation to learn how fast. IMHO the precomputed files should be somehow indexed in such a way that the randomized generator can mix in augmented images (of any kind) at a well-defined rate. You would then be able to configure, say, rotation at p = 0.2. Think imgaug!

Also, I believe it should at least be possible to increase that rate throughout the training procedure.