the prewhiten function in facenet.py:
`
def prewhiten(x):
mean = np.mean(x)
std = np.std(x)
std_adj = np.maximum(std, 1.0 / np.sqrt(x.size))
y = np.multiply(np.subtract(x, mean), 1 / std_adj)
return y
`
It looks similar as standardization, except the std_adj part. why we take max of std and 1/sqrt(N) ?
Any link or explanation about this calculation would be very thankful.
Also get confused here.
well, i think it's just the similar implement as tf.image.per_image_standardization, to protect against division by 0.
https://www.tensorflow.org/api_docs/python/tf/image/per_image_standardization
In statistics this is called Z-Score, to standardized and normalized the data.
It is capped away from zero to protect against division by 0 when handling uniform images.
Most helpful comment
well, i think it's just the similar implement as tf.image.per_image_standardization, to protect against division by 0.
https://www.tensorflow.org/api_docs/python/tf/image/per_image_standardization