hellochick / ICNet-tensorflow

TensorFlow-based implementation of "ICNet for Real-Time Semantic Segmentation on High-Resolution Images".
405 stars 153 forks source link

Origin of IMG_MEAN #80

Open david-bernstein opened 5 years ago

david-bernstein commented 5 years ago

Is IMG_MEAN taken from the cityscapes dataset?

IMG_MEAN = np.array((103.939, 116.779, 123.68), dtype=np.float32)

Presumably if I train on my own dataset I would have to precompute the mean, is that correct?

Thanks, Dave

PatrickAulbach commented 5 years ago

Hi Dave,

Is IMG_MEAN taken from the cityscapes dataset?

IMG_MEAN = np.array((103.939, 116.779, 123.68), dtype=np.float32)

as far as I know this is the mean of the ImageNet dataset. This is the closest what I found https://groups.google.com/forum/#!topic/caffe-users/wmOnKLSKfpI.

Presumably if I train on my own dataset I would have to precompute the mean, is that correct?

I would say yes. Since the pretrained model was trained on a zero centered dataset, it would make sense to train it with a zero centered dataset. If you want to train from scratch, you also have to compute the mean of your own dataset.