-
-
Notifications
You must be signed in to change notification settings - Fork 16.6k
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
Error occurred with python detect.py --weights yolov5s.onnx --dnn
whose yolov5s.onnx
was exported with export.py
#10575
Comments
👋 Hello @ChrisVicky, thank you for your interest in YOLOv5 🚀! Please visit our ⭐️ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution. If this is a 🐛 Bug Report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you. If this is a custom training ❓ Question, please provide as much information as possible, including dataset images, training logs, screenshots, and a public link to online W&B logging if available. For business inquiries or professional support requests please visit https://ultralytics.com or email support@ultralytics.com. RequirementsPython>=3.7.0 with all requirements.txt installed including PyTorch>=1.7. To get started: git clone https://github.com/ultralytics/yolov5 # clone
cd yolov5
pip install -r requirements.txt # install EnvironmentsYOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
StatusIf this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training, validation, inference, export and benchmarks on MacOS, Windows, and Ubuntu every 24 hours and on every commit. |
@glenn-jocher do you know about this issue? |
Thanks to Issue #8439 , I managed to export
But still, I would like to know whether it is possible to export
|
@ChrisVicky @AyushExel ONNX works correctly under any combination of torch and cv2, but DNN inference depends on a the exact cv2 and torch versions used, so you may need to experiment some. In any case if you have an ONNX model you'll get much better performance using ONNX inference than DNN inference on both CPU and GPU. |
@ChrisVicky also I'd raise this issue directly with cv2 as errors generated there are outside of our control. |
Thanks a lot! |
@ChrisVicky you're welcome! If you have any more questions or run into issues, feel free to ask. We're here to help! |
Search before asking
YOLOv5 Component
Export
Bug
When I run
detect.py
withyolov5s.onnx
, Error occurred.Environment
Minimal Reproducible Example
Additional
Success with another
.onnx
model.I did some search and tried
detect.py
with another.onnx
model downloaded from This Repo which is recommended in Issue 251The output seems ok.
Success without
--dnn
optionAddtionally, I tried to run
detect.py
on the exported.onnx
model without--dnn
option and it works fine.Results:
export.py
file. However, I'm not capable to debug the file and figure it out.Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: