Cleanup additional tensor in detection worker
All checks were successful
Build Dev PWA / Build-PWA (push) Successful in 37s

Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
This commit is contained in:
2024-10-12 15:25:53 -07:00
parent 21e46713a7
commit 8bf74e51ea

View File

@@ -78,7 +78,7 @@ async function localDetect(imageData) {
const output = {
detections: []
}
let rawBoxes = []
let rawBoxes = []
let rawScores = []
let getScores, getBox, boxCalc
@@ -123,6 +123,7 @@ let rawBoxes = []
tf.dispose(tBoxes)
tf.dispose(tScores)
tf.dispose(tRes)
tf.dispose(resBoxes)
const valid_detections_data = classes_data.length
for (let i =0; i < valid_detections_data; i++) {
let [dLeft, dTop, dRight, dBottom] = boxes_data[i]
@@ -131,7 +132,6 @@ let rawBoxes = []
"left": dLeft,
"bottom": dBottom,
"right": dRight,
// "label": this.detectorLabels[classes_data[i]].name,
"label": classes_data[i],
"confidence": scores_data[i] * 100
})