ganslate-team / ganslate

Simple and extensible GAN image-to-image translation framework. Supports natural and medical images.
https://ganslate.readthedocs.io
Other
34 stars 3 forks source link

metrics calculation not working for batch_size > 1 #70

Closed ibro45 closed 3 years ago

ibro45 commented 3 years ago

@surajpaib the ValTest metric calculation isn't compatible with bigger than 1 batch size. Problem is that the batch dimension is squeezed, which works fine for BS=1, but not otherwise. the scikit metrics don't operate on batches, so it'll be necessary to loop over the batch and average the metrics

https://github.com/Maastro-CDS-Imaging-Group/midaGAN/blob/06d6c419fca81327008d2a2cdbf92f126cff1c19/midaGAN/utils/metrics/val_test_metrics.py#L14 https://github.com/Maastro-CDS-Imaging-Group/midaGAN/blob/06d6c419fca81327008d2a2cdbf92f126cff1c19/midaGAN/utils/metrics/val_test_metrics.py#L64 Also, is this slice num alright for regular images or? @surajpaib