System information (version)
- OpenCV => 4.5.4
- opencv_zoo => 6a66e0d
- Operating System / Platform => Ubuntu 20.04 64bit
- Compiler => gcc 9.3.0
- Python => 3.8.10
Detailed description
The explanation of models/face_detection_yunet/README.md is as follows.
# detect on camera input
python demo.py
# detect on an image
python demo.py --input /path/to/image
The face_detection_yunet/demo.py try to load face_detection_yunet.onnx as default.
But, this pretrained model was renamed to face_detection_yunet_2021sep.onnx by #7.
As a result, face_detection_yunet/demo.py failed to load pretrained model as default.
$ python3 demo.py
Traceback (most recent call last):
File "demo.py", line 60, in <module>
model = YuNet(modelPath=args.model,
File "/home/opencv/opencv_zoo/models/face_detection_yunet/yunet.py", line 22, in __init__
self._model = cv.FaceDetectorYN.create(
cv2.error: OpenCV(4.5.4-dev) /tmp/pip-req-build-tpkxoqhj/opencv/modules/dnn/src/onnx/onnx_importer.cpp:198: error: (-5:Bad argument) Can't read ONNX file: face_detection_yunet.onnx in function 'ONNXImporter'
Steps to reproduce
$ git lfs clone https://github.com/opencv/opencv_zoo.git
$ cd opencv_zoo/models/face_detection_yunet
$ python3 demo.py
System information (version)
Detailed description
The explanation of models/face_detection_yunet/README.md is as follows.
The
face_detection_yunet/demo.pytry to loadface_detection_yunet.onnxas default.But, this pretrained model was renamed to
face_detection_yunet_2021sep.onnxby #7.As a result,
face_detection_yunet/demo.pyfailed to load pretrained model as default.Steps to reproduce
$ git lfs clone https://github.com/opencv/opencv_zoo.git $ cd opencv_zoo/models/face_detection_yunet $ python3 demo.py