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 0481955 commit 4e2be34Copy full SHA for 4e2be34
README.md
@@ -110,7 +110,8 @@ const frameProcessor = useFrameProcessor((frame) => {
110
})
111
112
// 2. Run model with given input buffer synchronously
113
- const outputs = model.runSync([data])
+ const input = new Uint8Array(data)
114
+ const outputs = model.runSync([input])
115
116
// 3. Interpret outputs accordingly
117
const detection_boxes = outputs[0]
@@ -128,7 +129,7 @@ const frameProcessor = useFrameProcessor((frame) => {
128
129
const right = detection_boxes[i + 2]
130
const bottom = detection_boxes[i + 3]
131
const rect = SkRect.Make(left, top, right, bottom)
- frame.drawRect(rect, SkColors.Red)
132
+ canvas.drawRect(rect, SkColors.Red)
133
}
134
135
}, [model])
0 commit comments