Open zxsk1974 opened 2 days ago
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.
Feel free to install via
pip install git+https://github.com/LinasKo/supervision.git@feature/batched-inference-slicer
.
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. The error:
Traceback (most recent call last):
File "/home/sergey/Workspace/detection-tiling-custom-obb/detect-image-slicer.py", line 89, in
Could be an ultralytics version issue. Unless you need yolo11, I'd try ultralytics==8.2.103
.
Hi @zxsk1974 👋
Would you mind testing if the autodistill changes made a difference?
pip install git+https://github.com/autodistill/autodistill.git@feat/supervision-0.24.0-support
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?