Ask Your Question

OpenCV.js Face landmark detection

asked 2019-04-09 06:17:02 -0600

kavikode gravatar image

I'm trying hard to create facial landmark detection in the web browser with OpenCV.js. I tried to use his example which is in C++, link:

I can't seem to find the "Ptr<facemark> facemark = createFacemarkKazemi());" equivalent for JavaScript

I'm able to successfully run the Face Detection using Haar Cascades, link:

Can you please help?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2020-05-15 18:19:18 -0600

kpachinger gravatar image

I had limited success with OpticalFlow. With FaceDetect I plot maybe 13 points and use distance between eyes to define z. Very brittle and not commercial-grade, but may yield face rotation and scale. Brittle, due to lighting and obscured features.

Also OpenCV, but ~30MB and maybe Python:

... or FaceMesh (3MB) result read into OpenCV?

edit flag offensive delete link more

answered 2019-04-09 06:43:50 -0600

berak gravatar image

yea unfortunately the facial landmarks are not yet wrapped into js ;(

you can take a look here to see, what's currently available

edit flag offensive delete link more


Thank you. Is there any workaround? Or, any alternative?

kavikode gravatar imagekavikode ( 2019-04-09 16:07:22 -0600 )edit

have a look at , and try to add something similar for the face module ?

berak gravatar imageberak ( 2019-04-12 06:31:43 -0600 )edit

Question Tools

1 follower


Asked: 2019-04-09 06:17:02 -0600

Seen: 1,220 times

Last updated: May 15 '20