Skip to content

Update rfdetr requirement from <2,>=1.6.0 to >=1.7.0,<2 - #34

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

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

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github May 27, 2026

Copy link
Copy Markdown
Contributor

Updates the requirements on rfdetr to permit the latest version.

Changelog

Sourced from rfdetr's changelog.

[1.7.0] — 2026-04-29

Added

  • augmentation_backend field on TrainConfig ("cpu" / "auto" / "gpu"): opt-in GPU-side augmentation via Kornia applied in RFDETRDataModule.on_after_batch_transfer after the batch is resident on the GPU. CPU path is unchanged and remains the default. Install with pip install 'rfdetr[kornia]'. Supports detection and segmentation (see below). (#1003)
  • Kornia GPU augmentation now supports instance segmentation: images, boxes, and per-instance masks are augmented in sync on the GPU. New public helper collate_masks packs [N_i, H, W] boolean masks into a [B, N_max, H, W] float32 tensor for Kornia; build_kornia_pipeline gains a with_masks: bool = False parameter; unpack_boxes gains an optional masks_aug tensor that re-binarises and filters masks in sync with boxes. Previously augmentation_backend="gpu"/"auto" was silently ignored for segmentation models; now it works identically to detection. Note: the mask buffer is [B, N_max, H, W] float32 — approximately 500 MB at B=8, N_max=50, H=W=560; use augmentation_backend="cpu" on cards with limited VRAM. (#1003, closes #997)
  • BuilderArgs — a @runtime_checkable typing.Protocol documenting the minimum attribute set consumed by build_model(), build_backbone(), build_transformer(), and build_criterion_and_postprocessors(). Enables static type-checker support for custom builder integrations. Exported from rfdetr.models. (#841)
  • build_model_from_config(model_config, train_config=None, defaults=MODEL_DEFAULTS) — config-native alternative to build_model(build_namespace(mc, tc)); accepts Pydantic config objects directly and constructs the internal namespace automatically. Exported from rfdetr.models. (#845)
  • build_criterion_from_config(model_config, train_config, defaults=MODEL_DEFAULTS) — config-native alternative to build_criterion_and_postprocessors(build_namespace(mc, tc)); returns a (SetCriterion, PostProcess) tuple. Exported from rfdetr.models. (#845)
  • ModelDefaults dataclass — exposes the 35 hardcoded architectural constants previously buried inside build_namespace(). Pass a dataclasses.replace(MODEL_DEFAULTS, ...) override to the new config-native builders to customise individual constants. Note: fields may be promoted to ModelConfig/TrainConfig in future phases. Exported from rfdetr.models. (#845)
  • MODEL_DEFAULTS — the canonical ModelDefaults singleton with production defaults. Exported from rfdetr.models. (#845)
  • RFDETR.predict(include_source_image=...) — opt-out flag (default True) to skip storing the source image in detections.metadata["source_image"]; set to False to reduce memory use when the image is not needed for annotation. (#912)
  • model_name is now stored in checkpoint files during training so that RFDETR.from_checkpoint() can resolve the correct model class directly from the checkpoint, without requiring the caller to know or pass a class hint. strip_checkpoint() preserves this key. Backward-compatible: checkpoints without model_name continue to resolve via pretrain_weights filename matching. (#895)
  • rfdetr_version is now stored in checkpoint files during training for provenance tracking and compatibility hints. strip_checkpoint() preserves this key. The key is omitted gracefully when the package version cannot be resolved (e.g. editable install without metadata). Backward-compatible: checkpoints without rfdetr_version continue to load normally. (#918)
  • notes parameter on RFDETR.train() and RFDETR.export() — embed arbitrary JSON-serialisable provenance metadata (labeller, date, class names, etc.) into best-model .pth checkpoints (under checkpoint["args"]["notes"]) and ONNX files (under the "rfdetr_notes" metadata property). String values are stored verbatim; all other types are JSON-encoded. (#1025, closes #1021)
  • RF_HOME environment variable controls where pretrained model weights are cached (default: ~/.roboflow/models). Bare filenames passed as pretrain_weights (e.g. "rf-detr-base.pth") are now resolved relative to this directory; paths with a directory component are used as-is with parent directories created automatically. (#130)
  • Grayscale and multispectral imagery support: RF-DETR models now accept inputs with any number of channels (not just 3). The pretrained DINOv2 patch-embedding weights are automatically adapted to the specified channel count at model construction time — no additional dependencies required. (#180, closes #75)
  • Training configuration is now saved to training_config.json in the output directory after training completes. The file captures the full TrainConfig, ModelConfig, effective training parameters, class names, and number of classes — useful for reproducibility and debugging predictions from older checkpoints. (#194)
  • dinov2_registers_windowed_small backbone is now available as a config option in ModelConfig.encoder. (#236)
  • rfdetr.from_checkpoint(path) — new top-level convenience function that loads a checkpoint and infers the correct model subclass automatically, without requiring the caller to specify a class. Equivalent to RFDETR.from_checkpoint(path) but importable directly from the rfdetr package. (#664)
  • ONNX export filenames now include the model variant name (e.g. rfdetr-medium.onnx) instead of the generic inference_model.onnx. Exporting multiple variants to the same directory no longer overwrites previous exports. (#910)
  • Background images (images without a matching label file) are now included in YOLO detection datasets as empty-detection samples instead of being silently dropped. Both detection and segmentation paths now use _LazyYoloDetectionDataset for consistent behaviour. (#915)
  • TFLite export via model.export(format="tflite"). Converts through ONNX using onnx2tf; FP32 and FP16 outputs are always produced, INT8 quantization is available with a calibration image directory: model.export(format="tflite", quantization="int8", calibration_data="path/to/images/"). Requires pip install 'rfdetr[onnx,tflite]'. (#920)
  • PyTorch Lightning .ckpt files are now accepted as pretrain_weights. Keys are automatically normalized from PTL format (state_dict with model.-prefixed keys, hyper_parametersargs) so that load_pretrain_weights, class-name extraction, and compatibility checks work without manual conversion. (#951)
  • skip_best_epochs parameter for RFDETR.train() and TrainConfig: the first N epochs are excluded from best-checkpoint selection and early-stopping comparison, preventing strong pretrained weights or resumed checkpoints from locking in a suboptimal early score. (#1000, closes #789)
  • TFLite inference now decodes segmentation mask outputs into sv.Detections.mask. Mask logits are upsampled to the source image size using Pillow bilinear resampling and thresholded at zero, matching the behaviour of PostProcess.forward. The mask tensor is detected by output name ("masks" substring) with a rank-4 shape fallback. (#1053)
  • PretrainWeightsCompatibilityWarning — new warning class emitted when a ModelConfig override (e.g. custom encoder, num_queries, or num_feature_levels) risks breaking pretrained weight loading. Importable as from rfdetr.config import PretrainWeightsCompatibilityWarning for targeted filtering. (#1017)

Changed

  • peft is no longer installed as part of the default rfdetr package. It has moved to the [lora] and [train] optional extras. If you use LoRA fine-tuning, install with pip install 'rfdetr[lora]'. (#838)
  • Native RLE annotation support in the COCO segmentation pipeline: convert_coco_poly_to_mask now explicitly detects and decodes both compressed (string counts) and uncompressed (int-list counts) RLE formats alongside existing polygon support. Malformed annotations now raise instead of being silently swallowed. (#897)
  • Pinned PyTorch Lightning to exclude known-compromised versions. (#1020)

Deprecated

  • build_namespace(model_config, train_config) — no longer used internally and deprecated in this release; use build_model_from_config, build_criterion_from_config, or _namespace_from_configs directly. It will be removed in v1.9 and currently emits a DeprecationWarning on use. (#845)
  • load_pretrain_weights(nn_model, model_config, train_config) — the train_config positional argument is deprecated and will be removed in v1.9; it is no longer used internally. Omit it: load_pretrain_weights(nn_model, model_config). Passing a non-None value emits a DeprecationWarning. (#845)
  • TrainConfig.group_detr (architecture decision → ModelConfig), TrainConfig.ia_bce_loss (loss type tied to architecture family → ModelConfig), TrainConfig.segmentation_head (architecture flag → ModelConfig), TrainConfig.num_select (postprocessor count → ModelConfig; SegmentationTrainConfig users: remove the num_select override — the model config value is always used), ModelConfig.cls_loss_coef (training hyperparameter → TrainConfig) — each now emits DeprecationWarning when set on the wrong config object and will be removed in v1.9. (#841)
  • RFDETRBase — use RFDETRNano, RFDETRSmall, RFDETRMedium, or RFDETRLarge instead. Emits FutureWarning on instantiation; scheduled for removal in v2.0. (#900)
  • RFDETRSegPreview — use RFDETRSegNano, RFDETRSegSmall, RFDETRSegMedium, or RFDETRSegLarge instead. Emits FutureWarning on instantiation; scheduled for removal in v2.0. (#900)
  • rfdetr.util and rfdetr.deploy sub-modules are deprecated and will be removed in v1.9. A __getattr__ hook on the rfdetr package now emits a clear ImportError with migration guidance when these legacy paths are accessed. (#839)

Fixed

  • Fixed TFLite export (format="tflite") producing detection scores that collapse to ~0.02 (vs ~0.62 from ONNX) on real inputs. Root cause is a long-standing onnx2tf bug (PINTO0309/onnx2tf#274) where the GridSample lowering diverges numerically from ONNX while onnx2tf's own validator silently passes. RF-DETR's deformable cross-attention uses F.grid_sample once per decoder layer; drift compounds and is amplified by the attention softmax. The converter now detects onnx2tf's GridSample → pseudo-GridSample replacement kwarg at runtime (introspecting convert() via inspect.signature) and passes it as True; a warning is logged when the kwarg is absent. (#1041)

  • WindowedDinov2WithRegistersEmbeddings.forward() now raises ValueError (instead of silently failing under -O) when input spatial dimensions are not divisible by patch_size * num_windows, with a clear message identifying the divisor and actual shape. (#167)

  • Fixed _namespace.py: num_select in the builder namespace now always reads from ModelConfig, eliminating a regression where TrainConfig.num_select (default 300) silently overrode model-specific values of 100–200 for segmentation variants (RFDETRSegNano, RFDETRSegSmall, RFDETRSegMedium, RFDETRSegLarge, RFDETRSegPreview). Post-processing now uses the correct top-k count for each model. (#841)

... (truncated)

Commits
  • e77de66 releasing 1.7.0 (#1010)
  • d5962b7 chore(pre-commit): add docformatter hook with 120-char wrap (#1057)
  • 65d2d9a refactor: consolidate _IS_RFDETR_PLUS_AVAILABLE (#1056)
  • ad5a336 docs(docstrings): unwrap short prose lines (#1055)
  • 21d0854 chore(tflite): rewrite GridSample to Gather for TFLite correctness (#1054)
  • 8ae6767 feat(tflite): decode segmentation masks in TFLite inference (#1053)
  • 6769f30 fix(predict): correct class_name for pretrained COCO models (#1051)
  • 8162a4c ci(docs): add workflow_dispatch with target input (#1050)
  • 7ad9cc6 docs(nav): move install + migration to getting-started/ (#1048)
  • e83cf60 docs(chlog): inline CHANGELOG.md, fix /latest/ alias, fix meta ts artifact (#...
  • 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.6.0...1.7.0)

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

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

dependabot Bot commented on behalf of github May 27, 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.

@Borda

Borda commented May 28, 2026

Copy link
Copy Markdown
Member

Seems we need to patch the loading...

@dependabot @github

dependabot Bot commented on behalf of github May 28, 2026

Copy link
Copy Markdown
Contributor Author

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot
dependabot Bot deleted the dependabot/pip/main/rfdetr-gte-1.7.0-and-lt-2 branch May 28, 2026 21:26
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.

1 participant