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 515ac38 commit d11d1a3Copy full SHA for d11d1a3
src/YOLO/index.js
@@ -127,8 +127,8 @@ class YOLOBase extends Video {
127
w = Math.min(imageSize, w) - x;
128
129
const resultObj = {
130
- className,
131
- classProb,
+ label: className,
+ confidence: classProb,
132
x: x / imageSize,
133
y: y / imageSize,
134
w: w / imageSize,
src/YOLO/index_test.js
@@ -38,6 +38,6 @@ describe('YOLO', () => {
38
it('detects a robin', async () => {
39
const robin = await getRobin();
40
const detection = await yolo.detect(robin);
41
- expect(detection[0].className).toBe('bird');
+ expect(detection[0].label).toBe('bird');
42
});
43
0 commit comments