Cleanup additional tensor in detection worker
All checks were successful
Build Dev PWA / Build-PWA (push) Successful in 37s
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:
@@ -78,7 +78,7 @@ async function localDetect(imageData) {
|
|||||||
const output = {
|
const output = {
|
||||||
detections: []
|
detections: []
|
||||||
}
|
}
|
||||||
let rawBoxes = []
|
let rawBoxes = []
|
||||||
let rawScores = []
|
let rawScores = []
|
||||||
let getScores, getBox, boxCalc
|
let getScores, getBox, boxCalc
|
||||||
|
|
||||||
@@ -123,6 +123,7 @@ let rawBoxes = []
|
|||||||
tf.dispose(tBoxes)
|
tf.dispose(tBoxes)
|
||||||
tf.dispose(tScores)
|
tf.dispose(tScores)
|
||||||
tf.dispose(tRes)
|
tf.dispose(tRes)
|
||||||
|
tf.dispose(resBoxes)
|
||||||
const valid_detections_data = classes_data.length
|
const valid_detections_data = classes_data.length
|
||||||
for (let i =0; i < valid_detections_data; i++) {
|
for (let i =0; i < valid_detections_data; i++) {
|
||||||
let [dLeft, dTop, dRight, dBottom] = boxes_data[i]
|
let [dLeft, dTop, dRight, dBottom] = boxes_data[i]
|
||||||
@@ -131,7 +132,6 @@ let rawBoxes = []
|
|||||||
"left": dLeft,
|
"left": dLeft,
|
||||||
"bottom": dBottom,
|
"bottom": dBottom,
|
||||||
"right": dRight,
|
"right": dRight,
|
||||||
// "label": this.detectorLabels[classes_data[i]].name,
|
|
||||||
"label": classes_data[i],
|
"label": classes_data[i],
|
||||||
"confidence": scores_data[i] * 100
|
"confidence": scores_data[i] * 100
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user