frankkramer-lab / aucmedi

a framework for Automated Classification of Medical Images
https://frankkramer-lab.github.io/aucmedi/
GNU General Public License v3.0
38 stars 13 forks source link

SanityCheck during testing: DataAugmentation should be disabled or warned about, when used during testing #166

Open SherlockMones opened 2 years ago

SherlockMones commented 2 years ago

Problem description

Using a DataGenerator during testing, by omitting the labels param is fine. But users should be made aware, that if they give a DataAugmentation object during testing, it will be ignored, because manipulating testing images is pointless.

Favored solution


gen_val = data_generator.DataGenerator(
    samples=samples,
    path_imagedir=path_imagedir,
    image_format=image_format,
    labels=None, # testing,
    data_aug=data_aug # still giving a DataAugmentation object, which should be ignored
)