Skip to content

face_detection_yunet failed to load pretrained model as default #10

@atinfinity

Description

@atinfinity
System information (version)
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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions