YanchaoYang/FDA

Subtract mean 2 times

Closed this issue · 1 comments

The readme notes that we should subtract the mean after the Fourier conversion.
However, I notice that the mean of the images are subtracted in the dataset class, method get_item.

image -= self.mean

And during the train loop, the mean is subtracted again:

FDA/train.py

Line 81 in b9a0cdf

src_img = src_in_trg.clone() - mean_img # src, src_lbl

May anyone shed some lights for this approach? Thank you for your help in advance.

I figured it out, the mean of the dataset class is set to zero.
IMG_MEAN = np.array((0.0, 0.0, 0.0)