Yuantao Feng
commited on
Commit
·
aebf101
1
Parent(s):
8ac861c
update sface: quantization ready (#35)
Browse files
benchmark/config/face_recognition_sface.yaml
CHANGED
@@ -13,4 +13,4 @@ Benchmark:
|
|
13 |
|
14 |
Model:
|
15 |
name: "SFace"
|
16 |
-
modelPath: "models/face_recognition_sface/
|
|
|
13 |
|
14 |
Model:
|
15 |
name: "SFace"
|
16 |
+
modelPath: "models/face_recognition_sface/face_recognition_sface_2021dec.onnx"
|
models/face_recognition_sface/demo.py
CHANGED
@@ -27,7 +27,7 @@ parser = argparse.ArgumentParser(
|
|
27 |
description="SFace: Sigmoid-Constrained Hypersphere Loss for Robust Face Recognition (https://ieeexplore.ieee.org/document/9318547)")
|
28 |
parser.add_argument('--input1', '-i1', type=str, help='Path to the input image 1.')
|
29 |
parser.add_argument('--input2', '-i2', type=str, help='Path to the input image 2.')
|
30 |
-
parser.add_argument('--model', '-m', type=str, default='
|
31 |
parser.add_argument('--dis_type', type=int, choices=[0, 1], default=0, help='Distance type. \'0\': cosine, \'1\': norm_l1.')
|
32 |
parser.add_argument('--save', '-s', type=str, default=False, help='Set true to save results. This flag is invalid when using camera.')
|
33 |
parser.add_argument('--vis', '-v', type=str2bool, default=True, help='Set true to open a window for result visualization. This flag is invalid when using camera.')
|
@@ -37,7 +37,7 @@ if __name__ == '__main__':
|
|
37 |
# Instantiate SFace for face recognition
|
38 |
recognizer = SFace(modelPath=args.model, disType=args.dis_type)
|
39 |
# Instantiate YuNet for face detection
|
40 |
-
detector = YuNet(modelPath='../face_detection_yunet/
|
41 |
inputSize=[320, 320],
|
42 |
confThreshold=0.9,
|
43 |
nmsThreshold=0.3,
|
|
|
27 |
description="SFace: Sigmoid-Constrained Hypersphere Loss for Robust Face Recognition (https://ieeexplore.ieee.org/document/9318547)")
|
28 |
parser.add_argument('--input1', '-i1', type=str, help='Path to the input image 1.')
|
29 |
parser.add_argument('--input2', '-i2', type=str, help='Path to the input image 2.')
|
30 |
+
parser.add_argument('--model', '-m', type=str, default='face_recognition_sface_2021dec.onnx', help='Path to the model.')
|
31 |
parser.add_argument('--dis_type', type=int, choices=[0, 1], default=0, help='Distance type. \'0\': cosine, \'1\': norm_l1.')
|
32 |
parser.add_argument('--save', '-s', type=str, default=False, help='Set true to save results. This flag is invalid when using camera.')
|
33 |
parser.add_argument('--vis', '-v', type=str2bool, default=True, help='Set true to open a window for result visualization. This flag is invalid when using camera.')
|
|
|
37 |
# Instantiate SFace for face recognition
|
38 |
recognizer = SFace(modelPath=args.model, disType=args.dis_type)
|
39 |
# Instantiate YuNet for face detection
|
40 |
+
detector = YuNet(modelPath='../face_detection_yunet/face_detection_yunet_2021dec.onnx',
|
41 |
inputSize=[320, 320],
|
42 |
confThreshold=0.9,
|
43 |
nmsThreshold=0.3,
|