Thorax 0.3.0 test
All checks were successful
Build Dev PWA / Build-PWA (push) Successful in 46s

Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
This commit is contained in:
2024-06-03 09:29:54 -07:00
parent d0dd10d807
commit 14e4ccbf2d
40 changed files with 12 additions and 11 deletions

View File

@@ -28,7 +28,8 @@ export default {
console.time('pre-process')
const [modelWidth, modelHeight] = model.inputs[0].shape.slice(1, 3)
const input = tf.tidy(() => {
return tf.image.resizeBilinear(tf.browser.fromPixels(imageData), [modelWidth, modelHeight]).div(255.0).expandDims(0)
var gTense = tf.image.rgbToGrayscale(tf.image.resizeBilinear(tf.browser.fromPixels(imageData), [modelWidth, modelHeight])).div(255.0).expandDims(0)
return tf.concat([gTense,gTense,gTense],3)
})
console.timeEnd('pre-process')