rwightman / efficientdet-pytorch

A PyTorch impl of EfficientDet faithful to the original Google impl w/ ported weights
Apache License 2.0
1.59k stars 293 forks source link

[FEATURE] custom augmentation #139

Open MichaelMonashev opened 3 years ago

MichaelMonashev commented 3 years ago

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.

rwightman commented 3 years ago

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.

MichaelMonashev commented 3 years ago

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!

Ekta246 commented 3 years ago

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.

MichaelMonashev commented 3 years ago

@rwightman , thank you!