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 use batchgenerators for regression #29

Closed adler-j closed 5 years ago

adler-j commented 5 years ago

I'm working in inverse problems and quite commonly I have a set of inputs (e.g. noisy volumes) and some outputs (noiseless volume). batchgenerators looks like a perfect fit for data augmentation, but it seems to be designed for image -> segmentation. Is there any way to work with image -> image problems, in that case how do I call the library?

FabianIsensee commented 5 years ago

Hi, you just stack the desired output as an additional color channel in 'data'. Then you make smart use of AppendChannelsTransform. Something like this:

voila. That should do it =)

Best, Fabian

adler-j commented 5 years ago

Thank you very much, this makes perfect sense!