-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Getting segmentation fault when running InferenceSlicer with OBB model with thread_workers > 1 #1632
Comments
Hi @zxsk1974 👋 Thank you for reporting it. Unfortunately, many models aren't made to be run from multiple threads. We plan to shift to running in batches (linked PR), but it is unfortunately relatively low on the priority list. |
@LinasKo batching will work too, can I try it on pre-release branch? |
Not as a pre-release branch. I don't expect to merge this any time soon. However, I brought the branch up-to-date with the latest supervision version. Alternatively, you may fork it from my repo. Install it in the same way, but from your own namespace. |
Let us know if it works - that'd give more reason to revisit the PR 🙂 |
Interesting, but sometimes the Slicer with 2 threads works till the end of detection and than throws the error, but not segmentation fault. This is still released version of SV. Traceback (most recent call last): |
Could be an ultralytics version issue. Unless you need yolo11, I'd try |
@LinasKo apologies for the delay - I got pulled into another area of the project. I just tried your branch build and it worked very well. I observed 25-30% speed up from batch size 1 to batch size 10, than almost no speedup up to batch size 100+, since GPU utilization became bottle neck. I noticed that your branch was forked from 0.24.0 version, so if you merge 0.25.1 changes into your branch, I can test it again. Please let me know when it will merged into release branch. Thank you again. |
Hi @zxsk1974 👋🏻 no worries! Which version of the code you just tested? |
From this branch - batched-inference-slicer: |
Search before asking
Bug
InferenceSlicer throws Segmentation fault with thread_workers = 4:
Segmentation fault (core dumped)
Environment
Supervision 0.24.0
Python 3.11
Minimal Reproducible Example
Additional
To reproduce:
.jpg
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: