feat: Add yolov5n, update docs and ruff code format

This commit is contained in:
yakhyo
2025-12-11 01:02:18 +09:00
parent 3982d677a9
commit da8a5cf35b
13 changed files with 49 additions and 18 deletions

View File

@@ -51,7 +51,15 @@ 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(image=frame, bboxes=bboxes, scores=scores, landmarks=landmarks, vis_threshold=threshold, draw_score=True, fancy_bbox=True)
draw_detections(
image=frame,
bboxes=bboxes,
scores=scores,
landmarks=landmarks,
vis_threshold=threshold,
draw_score=True,
fancy_bbox=True,
)
cv2.putText(
frame,
@@ -90,7 +98,7 @@ def main():
else:
from uniface.constants import YOLOv5FaceWeights
detector = YOLOv5Face(model_name=YOLOv5FaceWeights.YOLOV5M)
detector = YOLOv5Face(model_name=YOLOv5FaceWeights.YOLOV5N)
if args.webcam:
run_webcam(detector, args.threshold)