Closed stvogel closed 6 years ago
That's interesting, it seems like the model is running successfully (though a bit slow). Just to sanity check: you or the objects you're trying are being held still for ~5 seconds in front of your webcam? It could be potentially a lighting/image quality issue as well.
You can clone the demo, and try using tf.fromPixels
on a static image and see if it'll properly detect objects. You can do that by swapping out the <video>
element with <img>
in index.html
, and passing in the img
element into the Webcam constructor in index.js
, and probably commenting out webcam.setup()
The static image should have 416 dimension at all?
The input image should be 416x416(x3 for channels). @senthil090 are you running into the same issue of no objects being detected?
@MikeShi42 yes i got a same issue.
@senthil090 If possible, can you try detecting on this static image and letting me know if you get any detections? Just to eliminate any possibility of it being an image quality issue. https://i.imgur.com/Ojk3PB4.jpg
(Assuming you're testing with tfjs-yolo-tiny-demo) You can detect on a static image by replacing the video
element in index.html
with an img
element with the src
pointing to the above image. You can then pass the img
element into the Webcam constructor and comment out the webcam.setup()
in line 19.
@MikeShi42 i checked with the image given by you and replaced the video element. this time i got Error: Indices must be of dtype int32
error in console.
@senthil090 If someone encounters the int32 error, I solved this by adding .toInt() to occurrences of: tf.tensor1d(keep_indx) tf.tensor1d(indices_arr) Becomes: tf.tensor1d(keep_indx).toInt() tf.tensor1d(indices_arr).toInt()
Thanks for this great repo. This was exactly what I was searching for. But when I start the demo no objects are marked. I see the message: "YOLO inference took 4899.555000000001 milliseconds." on the console and tried with the usual classes: "person", "cup", "mobile", "keyboard" ... but nothing is detected. Is there something special to be done?