inspirit / jsfeat

JavaScript Computer Vision library.
MIT License
2.74k stars 372 forks source link

Web Workers and Canny Pruning #28

Closed blakels closed 10 years ago

blakels commented 10 years ago

Just curious whether you've considered using web workers to offload detection to another process and if so, where do you stand on that :)

Also, are you going to add canny pruning to the viola jones object detection?

inspirit commented 10 years ago

they way web workers implemented now it doesn't allow u to share memory buffers without copying. this is super slow so i'm not planning to spend time on fighting with it. u can still write wrappers around required methods to spawn tasks.

HAAR cascade face detector uses Canny pruning here: http://inspirit.github.io/jsfeat/sample_haar_face.html

jywarren commented 4 years ago

For reference, i tried this out... using webworkify -- and wasn't able to get it to run faster than a non-workerized version ☹️

https://github.com/jywarren/scrollgraph/pull/1

the difference was pretty dramatic. I'd guess it's the memory buffer copying overhead as @inspirit says, since there's not THAT much else going on here.