rcmalli / keras-vggface

VGGFace implementation with Keras Framework
MIT License
928 stars 417 forks source link

about Zero-center by mean pixel #10

Open joffery opened 7 years ago

joffery commented 7 years ago

TF order aka 'channel-last' x = x[:, :, :, ::-1] Zero-center by mean pixel x[:, 0, :, :] -= 93.5940 x[:, 1, :, :] -= 104.7624 x[:, 2, :, :] -= 129.1863

the last three rows shouldn't be the following?: x[:, : , :, 0] -= 93.5940 x[:, : , :, 1] -= 104.7624 x[:, : , :, 2] -= 129.1863 it makes no sense to do zero-center for the first three rows of an image.

monktastic commented 6 years ago

Yes, this looks correct for tf. The code given was for theano ordering (channels_first).