Face Detection with OpenCV, jweb-mediapipe or alternative

Connector's icon

I want to create Jitter projects with face detection of a webcam stream in "realtime" at high resolution.

In one patch for example i am using OpenCV - cv.jit objects to cut out the face from the webcam stream:

CutOutFace.maxpat
Max Patch

but it seems to be too slow i only get a framefrate about 3 fps and the patch responds delayed.

I also have detected the jweb-mediapipe for example: https://github.com/robtherich/jweb-mediapipe This option has a great performance, high resolution, and very good face-landmarkers...

But as far as i understand i am not able to feed the jweb object with a jitter matrix from my webcam or get a jitter matrix out of the jweb object.

I would need the original webcam stream and the detected facemesh, face-landmarker data to work with in my jitter patches.

Is there a possibility to do that in with the jweb-mediapipe?

Are there alternative solutions which deal with high quality and good performance face detection that could be used inside jitter?