ONNX
Yuantao Feng commited on
Commit
987cf3d
·
1 Parent(s): 0c2230d

update sface: quantization ready (#35)

Browse files
Files changed (1) hide show
  1. demo.py +2 -2
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='face_recognition_sface_2021sep.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,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/face_detection_yunet_2021sep.onnx',
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,