mirror of
https://github.com/yakhyo/uniface.git
synced 2025-12-30 09:02:25 +00:00
feat: Update examples and some minor changes to UniFace API (#28)
* chore: Style changes and create jupyter notebook template * docs: Update docstring for detection * feat: Keyword only for common parameters: model_name, conf_thresh, nms_thresh, input_size * chore: Update drawing and let the conf text optional for drawing * feat: add fancy bbox draw * docs: Add examples of using UniFace * feat: Add version to all examples
This commit is contained in:
committed by
GitHub
parent
6b1d2a1ce6
commit
637316f077
@@ -51,7 +51,7 @@ def run_webcam(detector, threshold: float = 0.6):
|
||||
bboxes = [f['bbox'] for f in faces]
|
||||
scores = [f['confidence'] for f in faces]
|
||||
landmarks = [f['landmarks'] for f in faces]
|
||||
draw_detections(frame, bboxes, scores, landmarks, vis_threshold=threshold)
|
||||
draw_detections(frame, bboxes, scores, landmarks, vis_threshold=threshold, draw_score=True, fancy_bbox=True)
|
||||
|
||||
cv2.putText(
|
||||
frame,
|
||||
@@ -89,6 +89,7 @@ def main():
|
||||
detector = SCRFD()
|
||||
else:
|
||||
from uniface.constants import YOLOv5FaceWeights
|
||||
|
||||
detector = YOLOv5Face(model_name=YOLOv5FaceWeights.YOLOV5M)
|
||||
|
||||
if args.webcam:
|
||||
|
||||
Reference in New Issue
Block a user