v1.9.1: Faster Inference & Export, Correct Export Resize
RF-DETR v1.9.1 is a maintenance release that makes inference and export both faster and more correct — with no breaking changes and no code changes required. Segmentation post-processing is 2.6–3.0× faster, predict() is ~20% faster at 1080p by skipping masks it would discard, and on-device ExecuTorch/XNNPACK is 2.5× faster. Exported ONNX/TFLite/INT8 models now resize exactly like predict(), closing a silent confidence and calibration drift. A handful of install fixes round it out on the Python-version edges.
✨ Spotlights / highlights
Segmentation post-processing 2.6–3.0× faster
PostProcess no longer materialises a repeated int64 gather index (21–84 MiB per image for the mask head) — it selects rows with index_select/expand instead. Output is bit-for-bit identical.
| mask head, K=300 | before | after | speedup |
|---|---|---|---|
| 96² | 8.79 ms | 3.40 ms | 2.6× |
| 192² | 79.99 ms | 27.09 ms | 3.0× |
predict() ~20% faster at 1080p
Segmentation masks below the caller's threshold are dropped before upsampling instead of after, so ~97% of the resize work on typical COCO images disappears. The saving scales with image area (bigger at 4K, neutral at 640 px); output is unchanged.
model.predict(image, threshold=0.5) # only surviving masks are upsampledExecuTorch / XNNPACK 2.5× faster
Export recombines the addmm operations XNNPACK leaves undelegated back into aten.linear. RFDETRNano on Apple silicon: 119.9 → 48.3 ms median; outputs match to ~1e-4.
model.export(format="executorch", backend="xnnpack")Exported models resize exactly like predict()
ONNX inference, TFLite inference, INT8 calibration, and the benchmark path now use predict()'s resize convention (bilinear, half-pixel centers, antialias=False) rather than PIL's antialiased filters, which diverged on downscale.
⚠️ If you ship INT8 TFLite models, re-export them to recalibrate against the corrected pixel distribution.
📝 Notable changes
🌱 Changed
- Segmentation post-process —
index_select/expandreplace a repeatedint64gather index; 2.6–3.0× faster at head resolution, output unchanged. (#1268) predict()mask upsampling — masks belowthresholdare discarded before upsampling; ~20% faster at 1080p, output unchanged. (#1265)- ExecuTorch export —
AddmmToLinearTransformrecombines undelegatedaddmmintoaten.linear; ~2.5× faster XNNPACK inference. (#1262)
🔧 Fixed
- Export resize parity — ONNX/TFLite inference, INT8 calibration, and benchmark paths now match
predict()'s resize convention; re-export INT8 TFLite models to recalibrate. (#1269) [onnx]/[executorch]install — extras are gated to interpreters that ship wheels, fixing[onnx]on Python 3.10 and[executorch]on Python 3.14. (#1267)- Kornia range params —
GaussianBlur/GaussNoisebuilders accept a scalar or a(min, max)pair, matching the Albumentations path. (#1255) keypoint_flip_pairs— detection-only datasets with a customaug_configkeep horizontal-flip augmentations by passingNoneinstead of[]. (#1248)uv sync— anexecutorch/tfliteextra conflict that blocked dev-environment creation is resolved. (#1253)
📚 Documentation
- Updated ONNX, TFLite, ExecuTorch, CoreML, and INT8 calibration examples to use the same tensor-first,
antialias=Falsepreprocessing aspredict(). The TFLite example now selectsdetsandlabelsoutputs by name. (#1269) - Corrected keypoint model Params (126.4 → 40.7 M), added a Params column to the keypoint benchmarks, and clarified that the SAM 3 RF100-VL result is author-reported, not measured by RF-DETR/SAB. (#1258, #1261)
- Fixed the ONNX Runtime example to include the missing decode step. (#1251)
- Added keypoint coverage to
llms.txt/llms-full.txt. (#1260)
🏆 Contributors
- @JESUSROYETH — faster segmentation post-processing, threshold-aware mask upsampling, and export resize parity
- @chmjkb — 2.5× faster ExecuTorch / XNNPACK inference (React Native ExecuTorch team)
- @Vedanshu7 — gated the
[onnx]/[executorch]extras to interpreters that ship wheels - @adhavan18 (LinkedIn) — scalar-or-pair range parameters for the Kornia augmentation builders
- @unaxEtxeberriaBieleDigital — fixed
uv syncdev-environment resolution - @isaacrob (LinkedIn) — corrected keypoint benchmark Params and expanded
llms.txtcoverage - @Borda (LinkedIn) —
keypoint_flip_pairsfix, ONNX docs correction, and release maintenance - @atikulmunna (LinkedIn) — stricter type-checking across
variantsandmodel_weights
Full changelog: 1.9.0...1.9.1