YijinHuang / SSiT

SSiT: Saliency-guided Self-supervised Image Transformer for Diabetic Retinopathy Grading
23 stars 4 forks source link

data.py: mean and std #6

Closed Wadha-Almattar closed 1 year ago

Wadha-Almattar commented 1 year ago

One of the earlier issue that I have faced is the mean and std for the training [EyePACS] at data_transforms function. Your original training is based on EyePACS mean and std. In my case I trained the model on a portion of APTOS dataset. So, I changed the mean and std to be corresponding to APTOS. I used the mean and std from the funcs.py file , get_dataset_stats function.

Let's say, I have joint more that dataset in the training, what is the best way to set the mean and std ? How it's differ and effective from different dataset?

YijinHuang commented 1 year ago

Generally, the best way is computing the mean and std using your entire new datasets. However, in the case of retinal datasets, where the mean and std are similar, the difference in results between using mean and standard deviation computed from different retinal datasets is small.