fix posenet

pull/356/head
Vladimir Mandic 2021-12-18 12:24:01 -05:00
parent 44ad8c6d4d
commit 4d8feaff3e
1 changed files with 1 additions and 1 deletions

View File

@ -164,7 +164,7 @@ export async function predict(input: Tensor, config: Config): Promise<BodyResult
const normalized = tf.sub(tf.div(tf.cast(resized, 'float32'), 127.5), 1.0);
const results: Array<Tensor> = model.execute(normalized, poseNetOutputs) as Array<Tensor>;
const results3d = results.map((y) => tf.squeeze(y, [0]));
results3d[1] = results3d[1].sigmoid(); // apply sigmoid on scores
results3d[1] = tf.sigmoid(results3d[1]); // apply sigmoid on scores
return results3d;
});