MIC-DKFZ / batchgenerators

A framework for data augmentation for 2D and 3D image classification and segmentation
Apache License 2.0
1.09k stars 221 forks source link

How to implement customized enhancment function? #53

Closed awp4211 closed 4 years ago

awp4211 commented 4 years ago

In some situation, we need to implement our own enhancement algorithm, such as top hat contrast enhancement algorithm. How to implement it and embed into class MultiThreadedAugmenter?

FabianIsensee commented 4 years ago

Hi, please have a look at any of the transforms that already exist. Multithreadedaugmenter is not the right place to implement custom augmentations. Best, Fabain

FabianIsensee commented 4 years ago

For example https://github.com/MIC-DKFZ/batchgenerators/blob/400390d37b7a3898de08fdd925ede18627ae50c8/batchgenerators/transforms/color_transforms.py#L21