open-mmlab / mmdetection

OpenMMLab Detection Toolbox and Benchmark
https://mmdetection.readthedocs.io
Apache License 2.0
29.01k stars 9.36k forks source link

Integrate augmentation into pipeline #998

Closed mosheliv closed 4 years ago

mosheliv commented 5 years ago

Describe the feature Please add augmentation "hooks" in configuration that are completely in "user space"

Motivation Currently adding augmentation requires changing mmdetection code. This is not great both because of :

  1. rapid development pace
  2. non persistence of docker
  3. difficulties with keeping reproducible results as you have to record the augmentation used

Related resources

Additional context a simple "augmentaion" section in the config with one or more user python functions that will be called with dataset or stage name (to differenciate between val and train for example), image/s to augment. bbox list and segmentaion list, returning images, bbox and seg to be used something like:


augmentation = dict(
    modules_to_load = ['/home/m/my_module.py'],
    pipeline = ['my_module.aug1', 'my_module.aug2']
)
dsuess commented 5 years ago

This should probably be addressed by #923

mosheliv commented 5 years ago

true, but #923 does not address the user level integration. It still assumes everything will be dropped into the codebase. This is not the right approach for this, I think.

hellock commented 5 years ago

Thanks for your suggestions! The perspective is that mmdetection can act as a framework and users can develop their own methods using the components and apis without touching the codebase. With the registry mechanism, #923 will allow users to define custom transforms/augmentations and use them in the pipeline.