Skip to content

Commit 4d98d8a

Browse files
committed
1 parent f10f8cc commit 4d98d8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/YOLO/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ class YOLOBase extends Video {
7171

7272
async detectInternal(imgToPredict) {
7373
await this.ready;
74+
await tf.nextFrame();
7475
this.isPredicting = true;
7576
const [allBoxes, boxConfidence, boxClassProbs] = tf.tidy(() => {
7677
const input = imgToTensor(imgToPredict);
@@ -132,7 +133,6 @@ class YOLOBase extends Video {
132133
results.push(resultObj);
133134
});
134135

135-
await tf.nextFrame();
136136
this.isPredicting = false;
137137
return results;
138138
}

0 commit comments

Comments
 (0)