-
-
Notifications
You must be signed in to change notification settings - Fork 16.7k
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
How to get the final result by feature graph? #2353
Comments
👋 Hello @alter-xp, 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://www.ultralytics.com or email Glenn Jocher at glenn.jocher@ultralytics.com. RequirementsPython 3.8 or later with all requirements.txt dependencies installed, including $ pip install -r requirements.txt 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 (train.py), testing (test.py), inference (detect.py) and export (export.py) on MacOS, Windows, and Ubuntu every 24 hours and on every commit. |
Oh, I see |
thanks a lot. |
I have also encountered this problem. May I ask how did you solve this problem? |
@glenn-jocher This command will set model.model[-1].export=False. However,cv2.readNetFrom(model.onnx) failed when I export onnx with model.model[-1].export = False.In the actual deployment process, I have to use OpenCV. Before, I used this( https://github.com/hpc203/yolov5-dnn-cpp-python-v2) to transform the model so that onnx_model will done in Opencv. But now, I want to modify your code so that the three output(out0:[1,3,80,80,85],out1:[1,3,40,40,85],out2:[1,3,20,20,85]) could channge to just one output(shape:[25200,85]). Because of Opencv does not support slice layer,so I had modify the code in common.py in line 106
` `
` |
@glenn-jocher thanks!I already know how to modify it. I can get the correct result. Thank you very much! |
@CE-Noob can you please share the steps you did until you get a correct inference with opencv DNN? I am also getting the output (1x25200x85) as expected from opencv only if I disabled the following lines in yolo.py: (otherwise an exception is rising) |
❔Question
Hi, I am tring to inference yolov3.onnx in a special device, which does not support some operators when I export onnx with
model.model[-1].export = False
. so I have to use feature map to get the final result. I'm not sure how the three outputs [1,3,13,13,85], [1,3,26,26,85], [1,3,52,52,85] are converted into [110647,85]. Is there any example or tutorial of this?The text was updated successfully, but these errors were encountered: