efficientdet-pytorch icon indicating copy to clipboard operation
efficientdet-pytorch copied to clipboard

[FEATURE] custom augmentation

Open MichaelMonashev opened this issue 4 years ago • 4 comments

Is your feature request related to a problem? Please describe. I am using custom augmentation to train the effdet. And I don`t know good way to integrate my augmentation code to efficientdet-pytorch pipeline. I am using https://github.com/albumentations-team/albumentations

Describe the solution you'd like I am using custom training loop.

Describe alternatives you've considered I see two ways: describe how to write own training loop or describe how to integrate custom augmentation code into the efficientdet-pytorch pipeline.

MichaelMonashev avatar Dec 01 '20 08:12 MichaelMonashev

Right now you'd want to replace the contents of these two transform functions https://github.com/rwightman/efficientdet-pytorch/blob/master/effdet/data/transforms.py#L233-L275 to add own args with minimal changes.

Likely the most I'd do right now this is allow custom transform functions to be passed into the loader factory so that you don't have to change those internal functions.

Setting up transforms is fiddly work and albumentations needs a bit of massaging to work here. My next augmentation addition would be a custom mosaic impl.

rwightman avatar Dec 01 '20 18:12 rwightman

Likely the most I'd do right now this is allow custom transform functions to be passed into the loader factory so that you don't have to change those internal functions.

Great idea!

MichaelMonashev avatar Dec 02 '20 06:12 MichaelMonashev

Is your feature request related to a problem? Please describe. I am using custom augmentation to train the effdet. And I don`t know good way to integrate my augmentation code to efficientdet-pytorch pipeline. I am using https://github.com/albumentations-team/albumentations

Describe the solution you'd like I am using custom training loop.

Describe alternatives you've considered I see two ways: describe how to write own training loop or describe how to integrate custom augmentation code into the efficientdet-pytorch pipeline.

Same, I have to add some albumentations augmentations into the transforms.py of the effdet-pytorch. I also suggest to seed the workers everytime you load the data with random augmentations.

Ekta246 avatar Dec 07 '20 02:12 Ekta246

@rwightman , thank you!

MichaelMonashev avatar Dec 07 '20 17:12 MichaelMonashev