martinsbruveris / tensorflow-image-models

TensorFlow port of PyTorch Image Models (timm) - image models with pretrained weights.
https://tfimm.readthedocs.io/en/latest/
Apache License 2.0
286 stars 25 forks source link

Improve preprocessing normalisation #78

Closed hyenal closed 1 year ago

hyenal commented 1 year ago

Right now the preprocessing function does not account for uniform images. This can results in bugs which are hard to track.

I would suggest replacing this function, by the normalisation generally done in tensorflow (Normalisation account for std =0).

martinsbruveris commented 1 year ago

I am bound to use the same preprocessing method as the one used for model training... And so I am copying whatever is present in timm.