google-research / big_transfer

Official repository for the "Big Transfer (BiT): General Visual Representation Learning" paper.
https://arxiv.org/abs/1912.11370
Apache License 2.0
1.5k stars 174 forks source link

[doc] Clarification on the input normalisation format. #49

Open Conchylicultor opened 3 years ago

Conchylicultor commented 3 years ago

Thank you for sharing the code and models!

If I had a small suggestion, I would recommend to describe the input format in the hub description. Something like: image input should be a float32 scaled around [-1, 1]. This might seems obvious but some models normalize each channel independently with custom mean/std.

I had to dig into the source code to find out how the image was normalized : https://github.com/google-research/big_transfer/blob/49afe42338b62af9fbe18f0258197a33ee578a6b/input_pipeline_tf2_or_jax.py#L107