cvlib/examples/face_detection.py at master · arunponnusamy/cvlib
face-detectioncvlibpythonexamplesource-code
Abstraction: Minimal cvlib face detection example script with bounding boxes
Key points:
- Single-file example: load image, call
cv.detect_face(image), draw rectangles, display and save output cv.detect_face()returns two lists:faces(bounding box coordinates) andconfidences(float scores)- Bounding boxes are
(startX, startY, endX, endY)tuples drawn withcv2.rectangle - Output is both displayed interactively and saved to
face_detection.jpg - Demonstrates that cvlib abstracts all model loading and preprocessing into a single function call
Connections: Cvlib · Face Detection
Source: https://github.com/arunponnusamy/cvlib/blob/master/examples/face_detection.py