Replies: 2 comments 1 reply
-
t.resized = tf.image.resizeBilinear(inputImage, [inputSize, inputSize]);
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 i think you might be right - care to create a pr since you found it? |
Beta Was this translation helpful? Give feedback.
1 reply
-
reviewed, you were right originally, it should be |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I think the constant.tf05 in (
human/src/face/blazeface.ts
Line 60 in 6239631
I am basing this on the google tensorflow/tfjs-models/blazeface/src/face.ts ( https://github.com/tensorflow/tfjs-models/blob/c5fcabec4cc0335bdfabeb14dc2adfd6ef0cde8c/blazeface/src/face.ts#L239)
But I could be wrong!
Beta Was this translation helpful? Give feedback.
All reactions