ytfeng commited on
Commit
e77fe84
·
1 Parent(s): edcfc33

Use YuNet of fixed input shape to avoid 'parseShape' error (#45)

Browse files

* replace with yunet of fixed input shape

* update quantized yunet

* update yunet filename used in scripts

* add a note message for https://github.com/opencv/opencv_zoo/issues/44

Files changed (2) hide show
  1. README.md +1 -0
  2. demo.py +1 -1
README.md CHANGED
@@ -5,6 +5,7 @@ YuNet is a light-weight, fast and accurate face detection model, which achieves
5
  Notes:
6
  - Model source: [here](https://github.com/ShiqiYu/libfacedetection.train/blob/a61a428929148171b488f024b5d6774f93cdbc13/tasks/task1/onnx/yunet.onnx).
7
  - For details on training this model, please visit https://github.com/ShiqiYu/libfacedetection.train.
 
8
 
9
  ## Demo
10
 
 
5
  Notes:
6
  - Model source: [here](https://github.com/ShiqiYu/libfacedetection.train/blob/a61a428929148171b488f024b5d6774f93cdbc13/tasks/task1/onnx/yunet.onnx).
7
  - For details on training this model, please visit https://github.com/ShiqiYu/libfacedetection.train.
8
+ - This ONNX model has fixed input shape, but OpenCV DNN infers on the exact shape of input image. See https://github.com/opencv/opencv_zoo/issues/44 for more information.
9
 
10
  ## Demo
11
 
demo.py CHANGED
@@ -33,7 +33,7 @@ except:
33
 
34
  parser = argparse.ArgumentParser(description='YuNet: A Fast and Accurate CNN-based Face Detector (https://github.com/ShiqiYu/libfacedetection).')
35
  parser.add_argument('--input', '-i', type=str, help='Path to the input image. Omit for using default camera.')
36
- parser.add_argument('--model', '-m', type=str, default='face_detection_yunet_2021dec.onnx', help='Path to the model.')
37
  parser.add_argument('--backend', '-b', type=int, default=backends[0], help=help_msg_backends.format(*backends))
38
  parser.add_argument('--target', '-t', type=int, default=targets[0], help=help_msg_targets.format(*targets))
39
  parser.add_argument('--conf_threshold', type=float, default=0.9, help='Filter out faces of confidence < conf_threshold.')
 
33
 
34
  parser = argparse.ArgumentParser(description='YuNet: A Fast and Accurate CNN-based Face Detector (https://github.com/ShiqiYu/libfacedetection).')
35
  parser.add_argument('--input', '-i', type=str, help='Path to the input image. Omit for using default camera.')
36
+ parser.add_argument('--model', '-m', type=str, default='face_detection_yunet_2022mar.onnx', help='Path to the model.')
37
  parser.add_argument('--backend', '-b', type=int, default=backends[0], help=help_msg_backends.format(*backends))
38
  parser.add_argument('--target', '-t', type=int, default=targets[0], help=help_msg_targets.format(*targets))
39
  parser.add_argument('--conf_threshold', type=float, default=0.9, help='Filter out faces of confidence < conf_threshold.')