feat(inference): add full inference-models prediction backend - #1578
Closed
leeclemnet wants to merge 5 commits into
Closed
leeclemnet wants to merge 5 commits into
leeclemnet wants to merge 5 commits into
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
leeclemnet
marked this pull request as ready for review
September 30, 2026 19:11
leeclemnet
requested review from
Borda,
SkalskiP,
isaacrob and
probicheaux
as code owners
September 30, 2026 19:11
Borda
reviewed
Sep 30, 2026
|
|
||
| [project.optional-dependencies] | ||
| inference-models = [ | ||
| "inference-models>=0.39,<0.40; python_version < '3.14'", |
Member
There was a problem hiding this comment.
Shall we leave the extras managed by inference-models so for example
inference-models[trt10]
Member
|
turning as draft until #1563 lands so we can merge it to |
Borda
marked this pull request as draft
September 30, 2026 19:53
leeclemnet
force-pushed
the
feat/export-inference
branch
from
September 30, 2026 21:32
e21a3ad to
8b62581
Compare
Contributor
Author
|
closing as #1563 is going in a different direction and |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Exported prediction currently retains RF-DETR preprocessing and postprocessing, limiting end-to-end SDK acceleration. Add opt-in
RFDETR.from_export(..., backend="inference_models")to run the complete SDK pipeline for ONNX/TensorRT detection, instance segmentation, and keypoint exports.Changes
sv.Detectionsorsv.KeyPointswith float32 coordinates, int64 class IDs, and writable source images. Preserve SDK masks, keypoint confidence, and covariance.Verification
Validated
8809377onlee-t4-dev-cu128(Tesla T4, Python 3.12, Torch 2.14, inference-models 0.39.0).0.5, each runtime returns three segmented instances and one pose; threshold1.0returns empty results.7486715also passed.pre-commit run --all-files: passed, including mypy. Changed Python files pass LSP checks.The full GPU suite and authenticated live-deploy tests were not run. GPU validation covered the pretrained ONNX/TensorRT cases above. Repository test workflows do not run while this PR targets
feat/export-inference; the results above are VM runs.Performance
RF-DETR detection Small at
7486715, 512×512, FP32, Tesla T4: 20 warmups and 100 timed wholepredict()calls, includingsv.Detectionsconversion, with source capture disabled.Values are medians. Concurrent CPU jobs on the shared VM make these timings indicative.
SegSmall ONNX CUDA at
16d3a1e, threshold0.5, five warmups and 20 samples: nativepredict()36.4 ms, SDKpredict()with dense masks 44.9 ms. Direct SDK RLE plus Supervision conversion took 53.2 ms. The adapter therefore keeps dense masks. This measured segmentation case is slower with the SDK; no segmentation or keypoint acceleration claim is made. SDK 0.39 exposes no optimization-stage metadata for these task classes.Related issues
Depends on #1563; stacked on
feat/export-inference.