valeoai / ADVENT

Adversarial Entropy Minimization for Domain Adaptation in Semantic Segmentation
https://arxiv.org/abs/1811.12833
Other
379 stars 69 forks source link

Question about caculation of image mean? #8

Closed Balabala-Hong closed 4 years ago

Balabala-Hong commented 4 years ago

I found in your code IMG_MEAN is set to [104.00698793, 116.66876762, 122.67891434], is IMG_MEAN calcuated on source domain only or target domain only or both?

tuanhungvu commented 4 years ago

Hello @Lelouch-Ice , IMG_MEAN was computed from ImageNet. T-H

soans1994 commented 2 years ago

@tuanhungvu hello authors,

i have some queries regarding your work,

  1. after mean transformation the image becomes darker. Is this correct?
  2. why is the rgb image converted to bgr in the dataloader?

Figure_2 Figure_1

i used the dataloader as follows

dst = cityscapesDataSet(DATA_DIRECTORY, DATA_LIST_PATH, max_iters=NUM_STEPS * ITER_SIZE * BATCH_SIZE,
                    crop_size=INPUT_SIZE,
                    scale=True, mirror=True, mean=(104.00698793, 116.66876762, 122.67891434))

but when i check the mean of a tensor batch it shows tensor([-41.5335, -43.1566, -60.2354])

what am i missing please help