Closed lightonthefloor closed 1 year ago
@lightonthefloor you don't need any fallback, normal inference command runs, but yes the MPS model is differing from the CPU model. There may some MPS issue here.
You should put breakpoints in the model to debug where the differences start. This may be an issue that needs to be raised with the torch team if you can isolate the cause of the difference.
Oops, and my detections of demo is right.
@lightonthefloor are you sure? I get incorrect results on MPS, even though MPS inference runs without error.
Sorry, I check again. I get the correct answer when I run on cpu.
I tested PYTORCH_ENABLE_MPS_FALLBACK=1 classify/predict.py
, and this works correctly, so it seems perhaps an issue with Detect(), maybe grids that MPS is not converting correctly.
👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs.
Access additional YOLOv5 🚀 resources:
Access additional Ultralytics ⚡ resources:
Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!
Thank you for your contributions to YOLOv5 🚀 and Vision AI ⭐!
FYI another detector https://github.com/microsoft/CameraTraps which uses YOLOv5 works on MPS with GPU acceleration with no issues, so it appears detect.py may be the issue, not PyTorch.
See here microsoft/CameraTraps#297
Also having this issue, was any progress made in finding the cause @lightonthefloor?
👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs.
Access additional YOLOv5 🚀 resources:
Access additional Ultralytics ⚡ resources:
Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!
Thank you for your contributions to YOLOv5 🚀 and Vision AI ⭐!
Search before asking
YOLOv5 Component
No response
Bug
When running on --source 0, there are multiple detections. ![Uploading 截屏2022-09-26 20.48.03.png…]()
Environment
Minimal Reproducible Example
No response
Additional
No response
Are you willing to submit a PR?