rcmalli / keras-squeezenet

SqueezeNet implementation with Keras Framework
MIT License
404 stars 146 forks source link

Why need to remove image mean? #2

Closed MrXu closed 7 years ago

MrXu commented 7 years ago

In the example code, I found:

# Remove image mean
im[:, :, 0] -= 104.006
im[:, :, 1] -= 116.669
im[:, :, 2] -= 122.679

May I know why we need to remove the mean of image? Thanks for your time.

rcmalli commented 7 years ago

It is the general step of ImageNet pre-trained models. You may also find it in the original repository of SqueezeNet or other pre-trained models.