1.9.1

p-e-w/heretic1.9.1Aug 4, 2026by Borda

AI Summary

Maintenance release making inference and export faster and more correct. Fixes segmentation post-processing speed and export resize parity.

Key Highlights

  • Segmentation post-processing 2.6–3.0× faster.
  • `predict()` ~20% faster at 1080p (skipping discarded masks).
  • ExecuTorch / XNNPACK 2.5× faster.
  • Exported models resize exactly like `predict()`.
  • Install fixes for `[onnx]` and `[executorch]` extras.

New Features

  • Faster segmentation post-processing using index_select/expand.
  • Faster predict() via threshold-aware mask upsampling.
  • Faster ExecuTorch/XNNPACK inference.
  • Export resize parity with predict() convention.
  • Install fixes for Python version edge cases.

Full Release Notes

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.

```python
model.predict(image, threshold=0.5)  # only surviving masks are upsampled
```

### ExecuTorch / 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.

```python
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`/`expand` replace a repeated `int64` gather index; 2.6–3.0× faster at head resolution, output unchanged. (#1268)
- **`predict()` mask upsampling** — masks below `threshold` are discarded before upsampling; ~20% faster at 1080p, output unchanged. (#1265)
- **ExecuTorch export** — `AddmmToLinearTransform` recombines undelegated `addmm` into `aten.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`/`GaussNoise` builders accept a scalar or a `(min, max)` pair, matching the Albumentations path. (#1255)
- **`keypoint_flip_pairs`** — detection-only datasets with a custom `aug_config` keep horizontal-flip augmentations by passing `None` instead of `[]`. (#1248)
- **`uv sync`** — an `executorch`/`tflite` extra 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=False` preprocessing as `predict()`. The TFLite example now selects `dets` and `labels` outputs 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](https://www.linkedin.com/in/tamiladhavan)) — scalar-or-pair range parameters for the Kornia augmentation builders
- **@unaxEtxeberriaBieleDigital** — fixed `uv sync` dev-environment resolution
- **@isaacrob** ([LinkedIn](https://www.linkedin.com/in/robinsonish/)) — corrected keypoint benchmark Params and expanded `llms.txt` coverage
- **@Borda** ([LinkedIn](https://linkedin.com/in/jirka-borovec)) — `keypoint_flip_pairs` fix, ONNX docs correction, and release maintenance
- **@atikulmunna** ([LinkedIn](https://www.linkedin.com/in/aimunna/)) — stricter type-checking across `variants` and `model_weights`

---

**Full changelog**: https://github.com/roboflow/rf-detr/compare/1.9.0...1.9.1