Skip to content

Update rfdetr requirement from <2,>=1.8.0 to >=1.9.2,<2 - #54

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/main/rfdetr-gte-1.9.2-and-lt-2
Open

Update rfdetr requirement from <2,>=1.8.0 to >=1.9.2,<2#54
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/main/rfdetr-gte-1.9.2-and-lt-2

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Aug 19, 2026

Copy link
Copy Markdown
Contributor

Updates the requirements on rfdetr to permit the latest version.

Release notes

Sourced from rfdetr's releases.

v1.9.2: Fixed Roboflow COCO & perf. optim

RF-DETR 1.9.2 is a fix-and-performance release: one breaking change, no new public APIs. Hierarchical COCO datasets — most commonly Roboflow exports carrying a synthetic unannotated grouping category — now get a correct, shared label mapping across train/valid/test, closing a case where per-class metrics could silently corrupt on the smaller split. The matcher's compact cost-matrix path is faster and lower-memory on real batches, training-resume from BestModelCallback's lightweight checkpoints now restores per-callback state instead of restarting cold, and a handful of training/eval fixes round it out.

✨ Spotlights / highlights

Breaking: hierarchical COCO datasets get a correct, shared label space

Roboflow COCO exports prepend a synthetic root category (unannotated, supercategory: "none") that every real class lists as its own supercategory. It never carried annotations but still consumed a label slot — training such a dataset built an N+1-class head instead of N.

from rfdetr.datasets.coco import filter_parent_categories, annotated_category_ids
categories = [
{"id": 0, "name": "project-root", "supercategory": "none"},
{"id": 1, "name": "car", "supercategory": "project-root"},
{"id": 2, "name": "truck", "supercategory": "project-root"},
]
anns = {"annotations": [{"category_id": 1}, {"category_id": 2}]}
kept = filter_parent_categories(categories, annotated_category_ids(anns))
[c["name"] for c in kept]
-> ['car', 'truck']  — the unannotated root no longer takes a label slot

For datasets where a parent category does carry its own annotations, label indices are now derived once from the train split and shared into valid/test, so a grouping category annotated in one split but not another no longer shifts that split's label indices independently of the others.

⚠️ Checkpoints trained before 1.9.2 keep their old head width and label ordering. Evaluating one against a re-filtered dataset misaligns per-class metrics (an existing UserWarning fires). See the migration notes below.

Matcher: faster and lower-memory on real COCO batches

HungarianMatcher's detection-only cost matrix is now built padded to each batch's max(T_i) target count instead of the cross-image sum(T_i), when a fast eligibility check passes — identical results on eligible batches, automatic full-computation fallback otherwise.

before after change
Matcher time ~51% faster
Peak CUDA memory ~73–76% lower
Training step (A100) 288.364 ms 232.457 ms

The saving scales with target-count evenness across a batch — a batch where nearly all targets sit in one image sees little to no improvement.

Training resume restores per-callback state

Resuming from one of BestModelCallback's four lightweight checkpoints (checkpoint_best_regular.pth, checkpoint_best_ema.pth, checkpoint_best_total.pth, last_ema.pth) previously restarted best-score tracking, EMA, and early-stopping cold, silently. It now restores that state:

model.train(
    dataset_dir="my_dataset",
    resume="output/checkpoint_best_ema.pth",
    output_dir="output",  # must match the original run for best-score restore
)
</tr></table> 

... (truncated)

Changelog

Sourced from rfdetr's changelog.

[1.9.2] — 2026-08-11

Changed

  • HungarianMatcher's detection-only cost matrix is now built padded to each batch's max(T_i) target count and diagonal-extracted, instead of padding to the cross-image sum(T_i), whenever the batch's targets and predictions pass a fast eligibility check; ineligible batches fall back to the previous full-cartesian computation with identical results. The matcher runs inside the training-step criterion under torch.no_grad(), so this is a training-time, not inference-time, saving: on real COCO batches matcher time drops ~51% and peak CUDA memory ~73-76%, and the measured end-to-end training step goes from 288.364 ms to 232.457 ms on an A100. The saving scales with target-count evenness r = sum(T_i) / max(T_i) (capped at the batch size) with a 1 - 1/r ceiling, so a batch where one image holds nearly all the targets (r close to 1) sees little to no improvement. The compact path now also copies only the diagonal cost blocks to CPU before assignment instead of the full-size matrix, and its safety gate batches its box/label finiteness sweeps into one synchronization instead of one per image. (#1297, #1281, #1312)
  • seed_all() now escalates to torch.use_deterministic_algorithms(True, warn_only=True) after setting the cuDNN flags, so every op with a deterministic kernel uses it; ops without one (some scatter / grid_sample CUDA kernels) warn at execution time instead of raising, and a failure to enable determinism is caught and logged rather than propagating out of seed_all. This is user-visible as new runtime warnings and a possible slight performance cost. (#1307)
  • RFDETR.predict() pins CPU image tensors before the CUDA transfer. (#1313)
  • Two-stage query selection avoids materialising repeated top-k gather indices. (#1278)
  • Evaluation matching counts labels on the host instead of the device. (#1276)
  • Keypoint decode skips redundant CUDA presence checks in postprocessing. (#1282)

Fixed

  • Loading a detection checkpoint published before keypoint support no longer warns that _kp_active_mask is a "model parameter not in checkpoint (left at random init)". The key is a deterministic schema buffer the model always rebuilds from the configured keypoint schema — empty for detection-only variants — not a learned parameter, so its absence never affected the loaded weights. Affects Nano, Small, Large (2026) and SegSmall. The filter matches the exact terminal key, so a similarly-named real parameter still warns, and an unexpected _kp_active_mask in a checkpoint still warns; the filtered key is now recorded at debug level. (#1302)
  • Resuming training from one of BestModelCallback's four lightweight checkpoints (checkpoint_best_regular.pth, checkpoint_best_ema.pth, checkpoint_best_total.pth, last_ema.pth) now restores per-callback state instead of silently restarting it cold. Those files intentionally omit optimizer/LR-scheduler state, and a warning now says so explicitly, distinguishing them from checkpoints that predate callback-state persistence entirely (where best-score tracking, EMA, and early-stopping all restart cold too). Best-score restore additionally requires the original output_dir to match. (#1318)
  • Training-time log calls no longer corrupt or duplicate the completed Rich epoch progress bar when RichProgressBar(leave=True) is active. A new stream handler tracks the log target by name and re-resolves stdout/stderr on every emit, following Rich's redirect proxies instead of capturing the pre-redirect stream once at import time. (#1316)
  • An index-less torch.device("cuda") is normalised to the current device index before the deferred-move guard compares it against a placed parameter's device — previously the comparison never matched an indexed device like cuda:0, so every call re-moved every parameter. (#1311)
  • The legacy query-embedding fallback now only warns when it actually truncates weights, instead of on every load. (#1301)
  • Under eval_ema_only, a run previously logged no validation output at all when the base metric was empty. EMA metrics are now computed and logged in that case (val/ema_mAP_50_95, val/ema_mAP_50, val/ema_mAR, per-class AP, and a val (ema) summary table), and val/F1 is no longer silently dropped. The eval_ema_only contract is now: val/mAP_50_95 stays unpopulated, so point monitor_ema at val/ema_mAP_50_95 — a prior comment claiming otherwise has been corrected. (#1289)
  • ModelContext.reinitialize_detection_head() now raises a clear RuntimeError instead of an AttributeError: 'NoneType' after RFDETR.inference(inplace=True) has cleared the weights, and does so before args.num_classes is mutated so a rejected call cannot leave the context half-updated. (#1283)
  • evaluate() now builds its datamodule from the resolution-override config. (#1280)

Breaking Changes

  • COCO datasets that contain an unannotated grouping category no longer spend a model output slot on it. Roboflow COCO exports prepend a synthetic root category (id 0, supercategory: "none", named after the project) that every real class then lists as its own supercategory; it carries no annotations, but it previously took label index 0 and an extra class channel. CocoDetection.cat2label, the auto-detected num_classes and RFDETR._load_classes() now share one filter (rfdetr.datasets.coco.filter_parent_categories), so training such a dataset builds an N-class head instead of N+1 and every real class shifts down one label index. A parent category that owns annotations keeps its slot, and flat datasets are unaffected. Checkpoints trained before this change keep their N+1-class head — evaluating one against the same dataset now misaligns per-class metrics (the existing class-count UserWarning fires); retrain. Passing num_classes explicitly preserves the checkpoint's N+1-class head width so the weights still load, but it does not restore the old label indices — CocoDetection drops the grouping category whenever remap_category_ids=True, so every real class still shifts down one slot and the pretrained head is misaligned against the new labels. The keypoint remapping path (_build_keypoint_cat2label) is unchanged, so keypoint datasets still include the grouping category. For hierarchical datasets, the train/valid/test splits now share one label mapping — always derived from the train split — so a grouping category annotated in only some splits no longer shifts that split's label indices out from under the others. (#1303)

[1.9.1] — 2026-08-03

Changed

  • PostProcess now selects boxes, masks, and keypoints with index_select/expand instead of materialising a repeated int64 gather index — an allocation that reached 21–84 MiB per image for the segmentation mask head. Mask post-processing at head resolution is 2.6–3.0× faster; the output is bit-for-bit identical. (#1268)
  • RFDETR.predict() no longer upsamples segmentation masks whose scores fall below the caller's threshold before discarding them — on typical COCO images only a few of the num_select masks survive threshold=0.5. End-to-end predict() is ~20% faster at 1080p (the saving scales with image area, and is neutral at 640 px); the output is unchanged. (#1265)
  • ExecuTorch export lowers the addmm operations the XNNPACK partitioner leaves undelegated back into aten.linear via AddmmToLinearTransform, which runs ~100× faster for those shapes. RFDETRNano on XNNPACK / Apple silicon is ~2.5× faster (119.9 → 48.3 ms median); outputs match the previous lowering to ~1e-4. (#1262)

Fixed

  • keypoint_flip_pairs no longer silently disables horizontal-flip augmentations (HorizontalFlip, Flip, D4) on detection-only datasets when a custom aug_config is supplied. AlbumentationsWrapper.from_config treats an empty keypoint_flip_pairs as "keypoint pipeline with no flip pairs defined" and drops flip transforms for annotation safety; detection pipelines must pass None instead of [] to keep flips enabled. (#1248)
  • Export inference and INT8 calibration now resize with RFDETR.predict()'s exact convention (bilinear, half-pixel centers, antialias=False) across the ONNX inference, TFLite inference, INT8 TFLite calibration, and benchmark/traced-example paths. These paths previously resized through PIL's antialiased BILINEAR/BICUBIC filters, which diverge from predict() on downscale and shift exported-model confidence scores and INT8 calibration ranges. A shared torch-free _bilinear_resize_half_pixel NumPy kernel (rfdetr/export/_resize.py) mirrors the convention wherever torchvision is unavailable. Re-export any INT8 TFLite model to recalibrate against the corrected pixel distribution. (#1269)
  • pip install 'rfdetr[onnx]' on Python 3.10 and pip install 'rfdetr[executorch]' on Python 3.14 no longer fail during install. Each extra previously resolved to a version (onnxruntime, executorch) that ships no wheel for that interpreter and has no source distribution to fall back on; the extras are now gated to interpreters that publish wheels. (#1267)
  • The Kornia augmentation builders (GaussianBlur, GaussNoise) accept either a scalar or a (min, max) pair for range parameters, matching the Albumentations path. A custom aug_config that is valid under Albumentations no longer raises a bare TypeError when augmentation_backend="cpu"/"auto" resolves to Kornia (Kornia installed and CUDA available). (#1255)
  • uv sync now resolves the development environment cleanly; an executorch/tflite extra conflict previously blocked .venv creation. (#1253)

Documentation

  • Corrected RF-DETR Keypoint Preview's parameter count (126.4 M → 40.7 M), added deployment parameter-count columns to the keypoint benchmark tables, and clarified that the new SAM 3 RF100-VL result is author-reported rather than measured in SAB. (#1258, #1261)
  • Documented ONNX Runtime raw-output decoding and expanded the LLM keypoint task/model/benchmark/API reference. (#1251, #1260)

[1.9.0] — 2026-07-27

  • Default dataset augmentations now use torchvision-native transforms unless Albumentations is installed, in which case augmentation_backend="auto"/"cpu" (the default) auto-selects Albumentations instead — identical user code can therefore resolve to a different resize backend (and slightly different pixel values / mAP) purely based on whether rfdetr[augment] is installed. Pass augmentation_backend="torchvision" to pin torchvision regardless of what is installed. Non-empty custom aug_config dictionaries use the optional Albumentations integration and Kornia GPU backend, both via pip install 'rfdetr[augment]'. The [train] extra no longer installs Albumentations or Kornia. See the migration guide's "Upgrade 1.8 → 1.9" section for remediation steps. (#1112)

... (truncated)

Commits
  • 2c05ea2 releasing 1.9.2
  • d4e60f7 fix(training): remove stale mypy type: ignore in module_data.py
  • cbaa59e fix(training): restore callback state when resuming from BestModelCallback'...
  • cad85af fix(training): leave completed Rich epoch bars in terminal history without co...
  • 3ec72e2 perf(inference): pin CPU image tensors before the CUDA transfer in predict() ...
  • 80b6ad5 perf(matcher): vectorize the compact-path safety gate's box/label sweeps (#1312)
  • 77c8200 fix(inference): normalise the index-less cuda device before the deferred-move...
  • 8424ad7 fix(coco): drop unannotated grouping categories (#1303)
  • 055c7c2 refactor: enable mypy strict checking for rfdetr.datasets.save_grids (#1304)
  • a80b0e2 fix(weights): only warn about the legacy query fallback when it actually trun...
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [rfdetr](https://github.com/roboflow/rf-detr) to permit the latest version.
- [Release notes](https://github.com/roboflow/rf-detr/releases)
- [Changelog](https://github.com/roboflow/rf-detr/blob/develop/CHANGELOG.md)
- [Commits](roboflow/rf-detr@1.8.0...1.9.2)

---
updated-dependencies:
- dependency-name: rfdetr
  dependency-version: 1.9.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot @github

dependabot Bot commented on behalf of github Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

Labels

The following labels could not be found: dependencies. Please create it before Dependabot can add it to a pull request.

Please fix the above issues or remove invalid values from dependabot.yml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants