Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion benchmark/config/face_detection_yunet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Benchmark:

Model:
name: "YuNet"
modelPath: "models/face_detection_yunet/face_detection_yunet_2021sep.onnx"
modelPath: "models/face_detection_yunet/face_detection_yunet_2021dec.onnx"
confThreshold: 0.6
nmsThreshold: 0.3
topK: 5000
4 changes: 2 additions & 2 deletions models/face_detection_yunet/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def str2bool(v):

parser = argparse.ArgumentParser(description='YuNet: A Fast and Accurate CNN-based Face Detector (https://github.com/ShiqiYu/libfacedetection).')
parser.add_argument('--input', '-i', type=str, help='Path to the input image. Omit for using default camera.')
parser.add_argument('--model', '-m', type=str, default='face_detection_yunet_2021sep.onnx', help='Path to the model.')
parser.add_argument('--model', '-m', type=str, default='face_detection_yunet_2021dec.onnx', help='Path to the model.')
parser.add_argument('--conf_threshold', type=float, default=0.9, help='Filter out faces of confidence < conf_threshold.')
parser.add_argument('--nms_threshold', type=float, default=0.3, help='Suppress bounding boxes of iou >= nms_threshold.')
parser.add_argument('--top_k', type=int, default=5000, help='Keep top_k bounding boxes before NMS.')
Expand All @@ -42,7 +42,7 @@ def visualize(image, results, box_color=(0, 255, 0), text_color=(0, 0, 255), fps
if fps is not None:
cv.putText(output, 'FPS: {:.2f}'.format(fps), (0, 15), cv.FONT_HERSHEY_SIMPLEX, 0.5, text_color)

for det in results:
for det in (results if results is not None else []):
bbox = det[0:4].astype(np.int32)
cv.rectangle(output, (bbox[0], bbox[1]), (bbox[0]+bbox[2], bbox[1]+bbox[3]), box_color, 2)

Expand Down
3 changes: 3 additions & 0 deletions models/face_detection_yunet/face_detection_yunet_2021dec.onnx
Git LFS file not shown
3 changes: 0 additions & 3 deletions models/face_detection_yunet/face_detection_yunet_2021sep.onnx

This file was deleted.