Closed matansag closed 7 years ago
Hi @matan-insoundz, Interesting! But can you elaborate 2 sentences on what it does exactly / give an usecase example? Cheers!
Sure, in order to getting close to real time streaming i dont want to do the object detection calculation on each frame but only on some percentage of it, that way i can decide on how much of the frame calculation will be executed.
darknet support some kind of this feature
./darknet detector demo cfg/coco.data cfg/yolo.cfg yolo.weights -s 2
from what i understand -s flags controls the number of “skip_frames”, which is the number of consecutive frames that yolo won’t process
Thanks @matan-insoundz ! Sounds very useful! @OrKoN What do you think?
@matan-insoundz What will be the best behavior when the -s flag is used: should node-yolo invoke a callback with the raw frame w/o detections or omit skipped frames?
Thanks @b-g ,@OrKoN i think i will love that node-yolo will invoke the callback with the raw frame ( no detection drawn ) this way one could keep use the output stream as complete video
+1
Would then modified
and detections
be null
? (Would be good to be able to easily distinguish between callbacks with and w/o detection results) ...
sound great! detections can be also empty array
Hey @matan-insoundz I took a look how it's done in darknet's demo.c and I have done the same thing here: https://github.com/moovel/node-yolo/commit/25784a00b6e039631074f169b99f5c04ffa3bdeb Basically, it defines after how many frames the callback will be invoked. It seems that it actually does not reduce the amount of processed frames - see https://github.com/pjreddie/darknet/blob/master/src/demo.c#L185. Hope this helps.
Hi @OrKoN , i tested it and it work exactly as it work in the darknet's demo.c as you wrote. I agree with you that it didn't reduce the amount of processed frames. that is why my first thought was calling the callback every frame and calling the image-recognition only once a frame. Also thank you for the development of this feature!
YOLO have the ability to skip frames, "-s" flag, it will be very hopeful if it will be added to node-yolo as well