Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

face_detection_yunet failed to load pretrained model as default #10

Closed
atinfinity opened this issue Nov 2, 2021 · 2 comments · Fixed by #11
Closed

face_detection_yunet failed to load pretrained model as default #10

atinfinity opened this issue Nov 2, 2021 · 2 comments · Fixed by #11
Assignees
Labels
bug Something isn't working

Comments

@atinfinity
Copy link

atinfinity commented Nov 2, 2021

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
@fengyuentau
Copy link
Member

Thanks for the feedback. Models are renamed #7, but I forgot to change demo scripts accordingly.

@fengyuentau
Copy link
Member

#11 is created to correct default values of models filenames in demo scripts. You can help review changes.

@fengyuentau fengyuentau added the bug Something isn't working label Nov 2, 2021
@fengyuentau fengyuentau self-assigned this Nov 2, 2021
@fengyuentau fengyuentau linked a pull request Nov 2, 2021 that will close this issue
@fengyuentau fengyuentau added this to the 4.9.0 (first release) milestone Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants