ModelDepot / tfjs-yolo-tiny

In-Browser Object Detection using Tiny YOLO on Tensorflow.js
https://modeldepot.io/mikeshi/tiny-yolo-in-javascript
MIT License
530 stars 92 forks source link

getting a different response structure for yolo() method. while using in Angular 6 #18

Closed soumikp02 closed 6 years ago

soumikp02 commented 6 years ago

I checked the parameters they are same as the demo. One thing is different that i am using it with Angular 6. Is there any other dependencies, i need to install apart from

the response is coming as:

j {_c: Array(0), _a: undefined, _s: 0, _d: false, _v: undefined, …}
_a: undefined
_c: Array(0)
length: 0
__proto__: Array(0)
_d: true
_h: 0
_n: false
_s: 1
_v: Array(1)
0: {className: "person", classProb: 0.4481939375400543, bottom: 416, top: 40.27252960205078, left: 3.116252899169922, …}
length: 1
__proto__: Array(0)
__proto__: Promise
soumikp02 commented 6 years ago

the value is coming in _v which we cant access directly.

soumikp02 commented 6 years ago

got the answer the fact is the response is a promise so have to handle it in that way.

MikeShi42 commented 6 years ago

I should clarify the response is a promise :) Thanks for filing the issue