We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f10f8cc commit 4d98d8aCopy full SHA for 4d98d8a
src/YOLO/index.js
@@ -71,6 +71,7 @@ class YOLOBase extends Video {
71
72
async detectInternal(imgToPredict) {
73
await this.ready;
74
+ await tf.nextFrame();
75
this.isPredicting = true;
76
const [allBoxes, boxConfidence, boxClassProbs] = tf.tidy(() => {
77
const input = imgToTensor(imgToPredict);
@@ -132,7 +133,6 @@ class YOLOBase extends Video {
132
133
results.push(resultObj);
134
});
135
- await tf.nextFrame();
136
this.isPredicting = false;
137
return results;
138
}
0 commit comments