OpenCV.js Missing some features?

Hello, can someone explain high-level overview on how OpenCV.js ]works?

I thought it’s 1:1 port to e.g. Python implementation.

But right now I’m trying to run YuNet which requires cv.FaceDetectorYN.create() to be called but FaceDetectorYN is undefined (as of 4.6.0 version)

OpenCV: Using OpenCV.js

the implementation is rather c++, the python api is yet another wrapper …

to keep it small, the prebuilt opencv.js only contains a subset of the c++ api, you can find it here

that’s probably not required, the network should run fine with “plain” dnn code (it just encapsules some “special” pre/post-processing)

1 Like

Right, that makes sense.

Do you have some handy example on how can I utilize .onnx model (for YuNet I’m trying to use This model) with Opencv.js?

Can’t find anything usefull to my bare minimum knowledge of OpenCV.

there is a nice example (for ssd) here opencv/js_face_recognition.html at 4.x · opencv/opencv · GitHub

for yunet, however – i took a look at the actual processing code
it does no more look like a good idea, to rewrite that in js ;(

are you able to generate your own, local js bindings ?
might be less hassle to add the detector there, ,

1 Like

Ou that’s awesome! I knew about SSD but didn’t try to look it up.
That will be enough for me tbh. No need to abuse YuNet for me anymore. Thanks!

But out of curiosity - what do you mean with “generate your own local js bindings”?
You mean something like running YuNet outside js?

ah, i thought, you specially went for that, bc it also delivers landmarks for eyes, nose, mouth corners … :wink:

like, generate your own, extended version of opencv.js (emscripten, etc …)

Well yes, I’m just looking, if there is a way to get also eyes, that would be quite helpful. But since SSD is not providing these, I’m thinking of looking for eyes with haar cascades only in the box returned from SSD.
Is it reasonable or am I just creating a Frankenstein out of that? :smiley:

sure, for now, just do that …

once you got the dnn code running, there’s also a small 5 point landmarks model here

also: pico.js !!!