Skip to main content

Face Mesh Example

Code example here

Code

FaceMeshExample.py
from nkdcv.FaceMeshModule import FaceMeshDetector
import cv2

cap = cv2.VideoCapture(0)
detector = FaceMeshDetector(maxFaces=2)
while True:
success, img = cap.read()
img, faces = detector.findFaceMesh(img)
if faces:
print(faces[0])
cv2.imshow("Image", img)
cv2.waitKey(1)

Result

Face Mesh Example