I had an issue with how to visualize the ILSVRC mean image. I just wanted to look at it and see how much does it differ from using pixel-wise mean subtraction instead of image-wise mean subtraction.
I assume that you have already downloaded the
CaffeNet pretrained and model definition files.
The trick is to initialize two networks, one with mean file set (called
net_mean) and the other one without mean file (called
net). Then create a fake all 1 image. Use the
net_mean to preprocess the fake image for data layer and save the result as
fake_pre. Then use the
net to deprocess
fake_pre for data layer and save it as
fake_re. If the two networks
net_mean were the same then
fake_re would be equal to
fake, but since we have not set any mean file for
net then we can visualize the mean image using
1 - fake_re. Take a look at the code.
The result looks like this:
![ILSVRC mean image](https://gist.github.com/yassersouri/f617bf7eff9172290b4f/raw/863971c47470204234017b91196b5e94a6fe