jeya-maria-jose / UNeXt-pytorch

Official Pytorch Code base for "UNeXt: MLP-based Rapid Medical Image Segmentation Network", MICCAI 2022
https://jeya-maria-jose.github.io/UNext-web/
MIT License
459 stars 76 forks source link

Incorrect usage of Normalize in transforms #22

Closed david-stojanovski closed 1 year ago

david-stojanovski commented 2 years ago

I found a bug:

You use the albumentations.augmentations transforms function to normalize the input images, however it uses some random values which are not the actual mean and standard deviations of the data sets. You would have to calculate the mean and standard deviation of the data set beforehand and input them as values for it to be correct. Not the end of the world, but would probably help in stability and overall performance to correct this.

jeya-maria-jose commented 1 year ago

Agreed. Thanks for pointing it out. The right way would be to calculate them for the specific dataset the network is trained on.