Skip to content

Commit f12e127

Browse files
authored
update yunet to v2 (#151)
1 parent 7e062e5 commit f12e127

File tree

10 files changed

+15
-15
lines changed

10 files changed

+15
-15
lines changed

models/face_detection_yunet/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Results of accuracy evaluation with [tools/eval](../../tools/eval).
1313

1414
| Models | Easy AP | Medium AP | Hard AP |
1515
| ----------- | ------- | --------- | ------- |
16-
| YuNet | 0.8498 | 0.8384 | 0.7357 |
17-
| YuNet quant | 0.7751 | 0.8145 | 0.7312 |
16+
| YuNet | 0.8871 | 0.8710 | 0.7681 |
17+
| YuNet quant | 0.8838 | 0.8683 | 0.7676 |
1818

1919
\*: 'quant' stands for 'quantized'.
2020

models/face_detection_yunet/demo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ int main(int argc, char** argv)
112112
cv::CommandLineParser parser(argc, argv,
113113
"{help h | | Print this message}"
114114
"{input i | | Set input to a certain image, omit if using camera}"
115-
"{model m | face_detection_yunet_2022mar.onnx | Set path to the model}"
115+
"{model m | face_detection_yunet_2023mar.onnx | Set path to the model}"
116116
"{backend b | opencv | Set DNN backend}"
117117
"{target t | cpu | Set DNN target}"
118118
"{save s | false | Whether to save result image or not}"

models/face_detection_yunet/demo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
parser = argparse.ArgumentParser(description='YuNet: A Fast and Accurate CNN-based Face Detector (https://github.com/ShiqiYu/libfacedetection).')
2828
parser.add_argument('--input', '-i', type=str,
2929
help='Usage: Set input to a certain image, omit if using camera.')
30-
parser.add_argument('--model', '-m', type=str, default='face_detection_yunet_2022mar.onnx',
31-
help="Usage: Set model type, defaults to 'face_detection_yunet_2022mar.onnx'.")
30+
parser.add_argument('--model', '-m', type=str, default='face_detection_yunet_2023mar.onnx',
31+
help="Usage: Set model type, defaults to 'face_detection_yunet_2023mar.onnx'.")
3232
parser.add_argument('--backend_target', '-bt', type=int, default=0,
3333
help='''Choose one of the backend-target pair to run this demo:
3434
{:d}: (default) OpenCV implementation + CPU,

models/face_detection_yunet/face_detection_yunet_2022mar.onnx

Lines changed: 0 additions & 3 deletions
This file was deleted.

models/face_detection_yunet/face_detection_yunet_2022mar_int8.onnx

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:8f2383e4dd3cfbb4553ea8718107fc0423210dc964f9f4280604804ed2552fa4
3+
size 232589
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:ba0af078d0001f4f91cd74bf8bf78bacdb04e0b6cfa00b02bf258c30d57a0483
3+
size 99673

models/face_recognition_sface/demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
backendId=backend_id,
5858
targetId=target_id)
5959
# Instantiate YuNet for face detection
60-
detector = YuNet(modelPath='../face_detection_yunet/face_detection_yunet_2022mar.onnx',
60+
detector = YuNet(modelPath='../face_detection_yunet/face_detection_yunet_2023mar.onnx',
6161
inputSize=[320, 320],
6262
confThreshold=0.9,
6363
nmsThreshold=0.3,

models/facial_expression_recognition/demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def process(detect_model, fer_model, frame):
8686
backend_id = backend_target_pairs[args.backend_target][0]
8787
target_id = backend_target_pairs[args.backend_target][1]
8888

89-
detect_model = YuNet(modelPath='../face_detection_yunet/face_detection_yunet_2022mar.onnx')
89+
detect_model = YuNet(modelPath='../face_detection_yunet/face_detection_yunet_2023mar.onnx')
9090

9191
fer_model = FacialExpressionRecog(modelPath=args.model,
9292
backendId=backend_id,

tools/eval/eval.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@
5454
yunet=dict(
5555
name="YuNet",
5656
topic="face_detection",
57-
modelPath=os.path.join(root_dir, "models/face_detection_yunet/face_detection_yunet_2022mar.onnx"),
57+
modelPath=os.path.join(root_dir, "models/face_detection_yunet/face_detection_yunet_2023mar.onnx"),
5858
topK=5000,
5959
confThreshold=0.3,
6060
nmsThreshold=0.45),
6161
yunet_q=dict(
6262
name="YuNet",
6363
topic="face_detection",
64-
modelPath=os.path.join(root_dir, "models/face_detection_yunet/face_detection_yunet_2022mar-act_int8-wt_int8-quantized.onnx"),
64+
modelPath=os.path.join(root_dir, "models/face_detection_yunet/face_detection_yunet_2023mar_int8.onnx"),
6565
topK=5000,
6666
confThreshold=0.3,
6767
nmsThreshold=0.45),

0 commit comments

Comments
 (0)