Skip to content

Latest commit

 

History

History
47 lines (32 loc) · 1.26 KB

README.md

File metadata and controls

47 lines (32 loc) · 1.26 KB

Face_Tracking

CVZone

Downloads Downloads Downloads

This is a Computer vision package that makes its easy to run Image processing and AI functions. At the core it uses OpenCV and Mediapipe libraries.

Installation

You can simply use pip to install the latest version of cvzone.

pip install cvzone


60 FPS Face Detection


from cvzone.FaceDetectionModule import FaceDetector
import cv2

cap = cv2.VideoCapture(0)
detector = FaceDetector()

while True:
    success, img = cap.read()
    img, bboxs = detector.findFaces(img)

    if bboxs:
        # bboxInfo - "id","bbox","score","center"
        center = bboxs[0]["center"]
        cv2.circle(img, center, 5, (255, 0, 255), cv2.FILLED)

    cv2.imshow("Image", img)
    if cv2.waitKey(1) & 0xFF == ord('q'):
        break
cap.release()
cv2.destroyAllWindows()