-
-
Notifications
You must be signed in to change notification settings - Fork 15.9k
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
Some errors when ensemble models #3075
Comments
👋 Hello @Lg955, 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. |
@Lg955 thanks for the bug report! I am able to reproduce this using your example code, I see the same error. I have a few ideas for what might be causing this, either the dataloader input stride is not synced to the P6 model in the ensemble, or the ensemble module itself is not flattening the outputs into a single list. I'll debug later and try to get a fix pushed this weekend. |
@Lg955 short term workaround seems to be to always pass the P6 model last if you have P6 models in the ensemble: |
Wow, very nice, I succeeded!!! |
@Lg955 good news 😃! Your original issue may now been fixed ✅ in PR #3082. To receive this update you can:
Thank you for spotting this issue and informing us of the problem. Please let us know if this update resolves the issue for you, and feel free to inform us of any other issues you discover or feature requests that come to mind. Happy trainings with YOLOv5 🚀! |
🐛 Bug
When using ensemble models, sometimes(ensemble yolo5x) get a error.
To Reproduce (REQUIRED)
Input:
Output:
In my 4 experiences(5x, 5x6+5l6, 5x6+5x, 5l6+5x), the first 2 are successful, others are failed.
yolo5x:
![5x - 副本](https://user-images.githubusercontent.com/69025725/117522796-d8878b80-afe7-11eb-8e45-8fc1e1c9e6f9.png)
yolo5x6+5l6:
![5x6+5l6 - 副本](https://user-images.githubusercontent.com/69025725/117522813-eb01c500-afe7-11eb-84c3-3a7451b1d358.png)
yolo5x6+5x:
![5x6+5x - 副本](https://user-images.githubusercontent.com/69025725/117522840-079dfd00-afe8-11eb-8ce7-0f7fefe40e6f.png)
yolo5l6+5x:
![5l6+5x - 副本](https://user-images.githubusercontent.com/69025725/117522829-0076ef00-afe8-11eb-9452-0e6fca9f44d9.png)
Expected behavior
I think there are some bugs in the code, but I can not find it.
Environment
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: