WeiTang114 / MVCNN-TensorFlow

An Multi-View CNN (MVCNN) implementation with TensorFlow.
MIT License
120 stars 67 forks source link

Where does the magic numbers of 104., 116., 122. in input.py/Shape/subtract_mean come from ? #9

Closed youkaichao closed 6 years ago

youkaichao commented 6 years ago

Where does the magic numbers of 104., 116., 122. in input.py/Shape/subtract_mean come from ? Does these numbers have special meaning?

WeiTang114 commented 6 years ago

They are mean values of R/B/G relatively. They are from the mean values of ImageNet dataset. Since the pretrained model is converted from Caffe with caffe-tensorflow, if you are feeding a natural image to the pretrained model, you need to normalize it (i.e. subtract the mean values) to get desired output.

However, because we are feeding "white rendered images over black background (0's) ", in my experiments, there is no need to subtract the values.

WeiTang114 commented 6 years ago

I'm closing this. Feel free to open this again if you find any further issue.