Closed saeidn95 closed 7 months ago
Issue Description human/src/face/blazeface.ts t.normalized = tf.sub(t.div, constants.tf05); does not normalize to (-1, 1).
For normalization to (-1, 1) please change to t.normalized = tf.sub(t.div, constants.tf1);
t.div = tf.div(t.resized, constants.tf127); t.normalized = tf.sub(t.div, constants.tf05); normalized = image / 127 - 0.5
const normalizedImage = tf.mul(tf.sub(tf.div(resizedImage, 255), 0.5), 2); normalized = (image / 255 - 0.5) * 2
done.
Issue Description human/src/face/blazeface.ts t.normalized = tf.sub(t.div, constants.tf05); does not normalize to (-1, 1).
For normalization to (-1, 1) please change to t.normalized = tf.sub(t.div, constants.tf1);
t.div = tf.div(t.resized, constants.tf127); t.normalized = tf.sub(t.div, constants.tf05); normalized = image / 127 - 0.5
const normalizedImage = tf.mul(tf.sub(tf.div(resizedImage, 255), 0.5), 2); normalized = (image / 255 - 0.5) * 2