How to get Frame(CGRECT) of face mesh(Facegeometry).)

I want the pass only face image to my coremlmodel not the entire captured image from the sceneView.session.currentFrame?.capturedImage . so for this reason i want to know the frame of face mesh so that i can crop and pass it to the coremlmodel.

Replies

You should be able to use the boundingBox of the face geometry along with projectPoint(_:orientation:viewportSize:) to determine the 2D bounding rect of your geometry.