Skip to content

Commit 4e2be34

Browse files
committed
docs: Fix README wrong type
1 parent 0481955 commit 4e2be34

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ const frameProcessor = useFrameProcessor((frame) => {
110110
})
111111
112112
// 2. Run model with given input buffer synchronously
113-
const outputs = model.runSync([data])
113+
const input = new Uint8Array(data)
114+
const outputs = model.runSync([input])
114115
115116
// 3. Interpret outputs accordingly
116117
const detection_boxes = outputs[0]
@@ -128,7 +129,7 @@ const frameProcessor = useFrameProcessor((frame) => {
128129
const right = detection_boxes[i + 2]
129130
const bottom = detection_boxes[i + 3]
130131
const rect = SkRect.Make(left, top, right, bottom)
131-
frame.drawRect(rect, SkColors.Red)
132+
canvas.drawRect(rect, SkColors.Red)
132133
}
133134
}
134135
}, [model])

0 commit comments

Comments
 (0)