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

Question about "patching" #19

Closed jellis18 closed 5 years ago

jellis18 commented 5 years ago

I am coming to this package from Medical Detection Toolkit and the paper and the toolkit claim to do "patching" but it looks to me like what is called "patching" is just cropping (random or center).

Is there anyway in this toolbox to take a large image/volume and return a batch of patches (say input a 100 x 100 image and return 4 25x25 patches)?

FabianIsensee commented 5 years ago

Hi, I am not sure what you are refering to exactly, maybe @pfjaeger can help? Best, Fabian

pfjaeger commented 5 years ago

Hi,

thanks for reaching out. The batchgenerators framework receives a batch, where the patches of the image are stacked up in the batch dimension. So this framework is actually agnostic to whether the image is patched or not. Your issue concerns the medicaldetectiontoolkit, the patching is done in:

https://github.com/pfjaeger/medicaldetectiontoolkit/blob/master/experiments/lidc_exp/data_loader.py

line 384 ff.