You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the Supervision issues and found no similar bug report.
Bug
I was trying to establish the performance boost of supervision's SAHI implementation in InferenceSlicer with many worker threads against obss/sahi original implementation, and I cooked up this script below to compare the two.
In my test, It appears that supervision is slower doing one iteration for 256x256 slices of a 1024x527 sample image and using various values for the worker threads. I am skipping some warmup runs, and I am avoiding overlap in both cases.
I believe obss/sahi is single threaded, therefore having worker threads should help.
Indicatively, for 4 worker threads, I get:
{'Implementation': ['obss/sahi', 'supervision'], 'Inference Time (s)': [0.4129594915053424, 1.240290361292222]}
As an aside, I'm also getting verbose SuperVision inference output that I can't find how to disable, but it shouldn't play too big of a role):
Thank you for a thorough report. It does not surprise me, as threads work weirdly when involving vision models / access to GPU. We'll look into it, but it might take some time.
Meanwhile, if you're keen on speed, we have an implementation that runs inference in bulk, on a GPU. It's not up-to-date, but if urgent, you might be able to hack it with a custom InferenceSlicer class or some monkeypatching.
I'm interested in real-time scenarios, so single image per-iteration. However if batching refers to sending the all component slice (and/or original image, like SAHI does) as a batch to the GPU, it should be more performant. I'll take a look!
Search before asking
Bug
I was trying to establish the performance boost of supervision's SAHI implementation in InferenceSlicer with many worker threads against obss/sahi original implementation, and I cooked up this script below to compare the two.
In my test, It appears that supervision is slower doing one iteration for 256x256 slices of a 1024x527 sample image and using various values for the worker threads. I am skipping some warmup runs, and I am avoiding overlap in both cases.
I believe obss/sahi is single threaded, therefore having worker threads should help.
Indicatively, for 4 worker threads, I get:
As an aside, I'm also getting verbose SuperVision inference output that I can't find how to disable, but it shouldn't play too big of a role):
Environment
Minimal Reproducible Example
Additional
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: