Closed SumayyaInayat closed 8 months ago
Thank you for your interest in our work. To clarify, our min-max is applied to each volume individually because the test set might be inputted one volume at a time (we cannot assume the test set contains multiple volumes).
Thanks for your response! I am new to the field, so just trying to understand.
Shouldn't the normalization be according to whole data, I mean this way the max of whole data and the max of a volume, that can be lower than the full data max, both will be mapped to a same value. Will it be correct?
What you said is correct in some situations. For natural images (RGB, with a value range of 0-255), we can use the mean and standard deviation of the entire dataset to normalize both the training and test sets because their value range is relatively well-defined. However, for medical images (grayscale, with a value range of 0-65535), the value range of each volume can vary significantly. Some volumes may have a maximum value of 1300, while others may have a maximum value of 700, depending on the parameters set by the doctor during the imaging process.
Therefore, I suggest performing volume-wise normalization for medical images. Additionally, I recommend using percentile-based normalization for each volume (i.e., vmax = np.percentile(volume.flatten(), 99.8)) to avoid issues with outliers.
Thanks alot KaIseem ! Now I get it!!
Hi KaIseem, Hope you are doing well. I just saw that you have provided data preparation file for abdominal dataset. Can you please provide it for CrossModa data. I will be very thank full.
One more question, is the above normalization criteria valid for training data also where there are many volumes and not just one as in case of test data.
Thanks!
Hi, I update the preparation code, which is consistent with my text description in the preprocessing instruction.
Meanwhile, the volume-wise normalization should work for both training and test data. This should be a general trick, feel free to use it.
Hi Kaiseem, First of all, you have done great job, Congrats!!! Secondly thank you so much for sharing such a clean code, really appreciate it. It saves a lot of time when such clean code is available, easy to understand. My query is that, in read me file it is stated to normalize each volume to [0,1], should the min max for this normalization be the min max of whole data or just that particular volume in process?
Please verify this.
Thanks alot.