MCPcopy Index your code

hub / github.com/roboflow/rf-detr / types & classes

Types & classes522 in github.com/roboflow/rf-detr

↓ 94 callersClassRFDETRBaseConfig
The configuration for an RF-DETR Base model.
src/rfdetr/config.py:419
↓ 79 callersClassBestModelCallback
Track best validation mAP and save best checkpoints during training. Extends :class:`pytorch_lightning.callbacks.ModelCheckpoint` to save strippe
src/rfdetr/training/callbacks/best_model.py:30
↓ 75 callersClassCOCOEvalCallback
Validation callback that computes mAP (via torchmetrics) and macro-F1. Accumulates predictions and targets across validation batches, then at epo
src/rfdetr/training/callbacks/coco_eval.py:84
↓ 50 callersClassTrainConfig
Training hyperparameters and auto-batching configuration. Notes: * ``auto_batch_target_effective`` is interpreted as the **per-device**
src/rfdetr/config.py:631
↓ 42 callersClass_DummyRFDETR
Weight-free RFDETR that delegates to ``_DummyModel`` for all inference. Examples: >>> m = _DummyRFDETR() >>> isinstance(m.model,
tests/inference/helpers.py:87
↓ 39 callersClassRFDETRDataModule
LightningDataModule wrapping RF-DETR dataset construction and data loading. Args: model_config: Architecture configuration (used for reso
src/rfdetr/training/module_data.py:140
↓ 38 callersClassAlbumentationsWrapper
Wrapper to apply Albumentations transforms to (image, target) tuples. This wrapper integrates Albumentations transforms with RF-DETR's data pipel
src/rfdetr/datasets/transforms.py:362
↓ 30 callersClass_FakeRFDETR
tests/inference/test_optimize_for_inference.py:39
↓ 26 callersClassMetricKeypointOKS
OKS keypoint mAP metric backed by CocoEvaluator. Plain Python facade over :class:`~rfdetr.evaluation.coco_eval.CocoEvaluator` with a :meth:`r
src/rfdetr/evaluation/keypoint_oks.py:78
↓ 26 callersClassRFDETRKeypointPreviewConfig
Configuration for the preview keypoint model.
src/rfdetr/config.py:609
↓ 26 callersClassYoloDetection
YOLO format dataset with lazy image loading and optional mask support. Both detection (``include_masks=False``) and segmentation (``include_masks
src/rfdetr/datasets/yolo.py:718
↓ 21 callersClassRFDETRModelModule
LightningModule wrapping the RF-DETR model and training loop. Args: model_config: Architecture configuration. train_config: Train
src/rfdetr/training/module_model.py:42
↓ 21 callersClass_DummyModel
Minimal model stub that returns deterministic postprocessed results. Examples: >>> m = _DummyModel(labels=[0, 1]) >>> len(m._labe
tests/inference/helpers.py:43
↓ 19 callersClassModelWeightAsset
Dataclass representing a model asset with download information. This is the standard format for model assets across rf-detr packages. Both rf-det
src/rfdetr/assets/model_weights.py:41
↓ 18 callersClassNestedTensor
Batch of tensors with variable spatial sizes, padded to a common size. Stores both the padded tensor and a boolean mask indicating padding positi
src/rfdetr/utilities/tensors.py:59
↓ 17 callersClassConvertCoco
Convert a raw COCO annotation dict into model-ready tensors. Accepts the ``(image, target)`` pair produced by ``torchvision.datasets.CocoDetectio
src/rfdetr/datasets/coco.py:284
↓ 17 callersClassRFDETREarlyStopping
Early stopping callback monitoring validation mAP for RF-DETR. Extends :class:`pytorch_lightning.callbacks.EarlyStopping` with dual-metric mo
src/rfdetr/training/callbacks/best_model.py:558
↓ 17 callersClassSegmentationTrainConfig
Training configuration for instance segmentation models. Extends :class:`TrainConfig` with segmentation-specific loss coefficients. Attribut
src/rfdetr/config.py:888
↓ 16 callersClassRFDETRSegNanoConfig
src/rfdetr/config.py:525
↓ 15 callersClassCocoEvaluator
COCO evaluator that works in distributed mode.
src/rfdetr/evaluation/coco_eval.py:337
↓ 12 callersClassRFDETREMACallback
Exponential Moving Average with optional tau-based warm-up. Drop-in replacement for ``rfdetr.util.utils.ModelEma`` implemented as a plain Lightni
src/rfdetr/training/callbacks/ema.py:20
↓ 11 callersClassDropPathCallback
Applies per-step drop-path and dropout rate schedules to the model. Computes the full schedule array in ``on_train_start`` using :func:`rfdetr.ut
src/rfdetr/training/callbacks/drop_schedule.py:18
↓ 11 callersClassHungarianMatcher
This class computes an assignment between the targets and the predictions of the network For efficiency reasons, the targets don't include the no_
src/rfdetr/models/matcher.py:38
↓ 11 callersClassKeypointTrainConfig
Training configuration for keypoint detection models. Extends :class:`TrainConfig` with keypoint-specific loss coefficients and metric-smooth
src/rfdetr/config.py:916
↓ 11 callersClassModelConfig
src/rfdetr/config.py:101
↓ 11 callersClass_FakeModule
Minimal object supporting attribute assignment for on_load_checkpoint tests.
tests/training/test_detr_shim.py:949
↓ 11 callersClass_TinyModel
Minimal real nn.Module satisfying the RFDETRModule model contract. Has a single trainable parameter so the optimizer has something to update and
tests/training/helpers.py:21
↓ 10 callersClassNormalize
src/rfdetr/datasets/transforms.py:42
↓ 10 callersClass_FakeCriterion
Callable criterion that returns a loss connected to the model output. Keeps a gradient path from the loss back to _TinyModel.dummy so that ``loss
tests/training/helpers.py:45
↓ 9 callersClassConvX
Conv-bn module.
src/rfdetr/models/backbone/projector.py:82
↓ 9 callersClass_FakeDataset
Dataset with ``(image, target)`` pairs for detection. The image is a ``(3, 32, 32)`` float tensor; the target dict includes the fields expected b
tests/training/helpers.py:64
↓ 8 callersClassDepthwiseConvBlock
r"""Simplified ConvNeXt block without the MLP subnet.
src/rfdetr/models/heads/segmentation.py:139
↓ 8 callersClassGradAccumAlignedDataset
Dataset wrapper that pads length to a multiple of ``effective_batch_size * world_size``. Workaround for https://github.com/Lightning-AI/pytorch-l
src/rfdetr/training/module_data.py:43
↓ 8 callersClassLWDETR
This is the Group DETR v3 module that performs object detection.
src/rfdetr/models/lwdetr.py:116
↓ 8 callersClassPostProcess
Convert raw RF-DETR model outputs into per-image prediction tensors. The postprocessor is shared by detection, segmentation, and keypoint inferen
src/rfdetr/models/postprocess.py:19
↓ 7 callersClassRFDETRNanoConfig
The configuration for an RF-DETR Nano model.
src/rfdetr/config.py:451
↓ 7 callersClassTransformer
Transformer with optional GroupPose keypoint decoder stream support.
src/rfdetr/models/transformer.py:145
↓ 7 callersClassWindowedDinov2WithRegistersConfig
r""" This is the configuration class to store the configuration of a [`Dinov2WithRegistersModel`]. It is used to instantiate a Dinov2WithRegis
src/rfdetr/models/backbone/dinov2_with_windowed_attn.py:141
↓ 6 callersClassCocoDetection
COCO detection dataset with optional sparse-to-contiguous category ID remapping. Extends ``torchvision.datasets.CocoDetection`` with two addition
src/rfdetr/datasets/coco.py:201
↓ 6 callersClassConditionalQueryInitializer
Initialize keypoint query tokens with adaptive layer-normalization style modulation.
src/rfdetr/models/heads/keypoints.py:67
↓ 6 callersClassMSDeformAttn
Multi-Scale Deformable Attention Module.
src/rfdetr/models/ops/modules/ms_deform_attn.py:35
↓ 6 callersClassRFDETRNano
Train an RF-DETR Nano model. Training accepts custom square integer ``resolution`` values. The value must be divisible by ``patch_size * num_
src/rfdetr/variants.py:76
↓ 6 callersClassRFDETRSegNano
Train an RF-DETR Segmentation Nano model. Training accepts custom square integer ``resolution`` values. The value must be divisible by ``patch_si
src/rfdetr/variants.py:246
↓ 6 callersClassSetCriterion
This class computes the loss for Conditional DETR. The process happens in two steps: 1) we compute Hungarian assignment between ground truth
src/rfdetr/models/criterion.py:133
↓ 6 callersClassWindowedDinov2WithRegistersEmbeddings
Construct the CLS token, mask token, register tokens, position and patch embeddings.
src/rfdetr/models/backbone/dinov2_with_windowed_attn.py:317
↓ 5 callersClass_FakeRFDETR
Concrete test double: provides a dropout-bearing model for eval-mode tests.
tests/inference/test_predict_eval_mode.py:41
↓ 5 callersClass_FakeResponse
Test double for requests responses used by the downloader. Provides headers, iterable content chunks, and optional HTTP error behavior via `raise
tests/utilities/test_file_validation.py:42
↓ 4 callersClassJoiner
src/rfdetr/models/backbone/__init__.py:20
↓ 4 callersClassRFDETRKeypointPreview
Train or run inference with the RF-DETR keypoint preview model. Training accepts custom square integer ``resolution`` values. The value must be d
src/rfdetr/variants.py:87
↓ 4 callersClassRFDETRLarge
Train an RF-DETR Large model. Training accepts custom square integer ``resolution`` values. The value must be divisible by ``patch_size * num
src/rfdetr/variants.py:137
↓ 4 callersClassWindowedDinov2WithRegistersModel
src/rfdetr/models/backbone/dinov2_with_windowed_attn.py:911
↓ 4 callersClass_DummyCoreModel
Minimal torch.nn.Module stub shared across export tests. Avoids real forward passes; returns synthetic detection (and optionally segmentation) ou
tests/export/test_export.py:45
↓ 4 callersClass_MatcherStub
Matcher stub used to avoid depending on Hungarian matching internals.
tests/models/test_criterion_keypoints.py:13
↓ 4 callersClass_TinyModule
tests/training/test_auto_batch.py:18
↓ 4 callersClass_VisualDataset
Minimal transformed dataset item for DataModule sample visualization.
tests/training/test_module_data.py:91
↓ 3 callersClassAutoBatchResult
Result of auto-batch probing: safe micro-batch size and recommended grad accumulation. Attributes: safe_micro_batch: Per-device batch siz
src/rfdetr/training/auto_batch.py:38
↓ 3 callersClassBestMetricSingle
src/rfdetr/training/model_ema.py:65
↓ 3 callersClassDatasetGridSaver
Utility for saving 3x3 image grids to visualize augmentation effects. Args: data_loader: Dataloader of the dataset to sample images from.
src/rfdetr/datasets/save_grids.py:25
↓ 3 callersClassDatasetSplitRatios
Dataclass for dataset split ratios. Attributes: train: Ratio for training set (default: 0.7) val: Ratio for validation set (defau
src/rfdetr/datasets/synthetic.py:29
↓ 3 callersClassDinoV2
src/rfdetr/models/backbone/dinov2.py:55
↓ 3 callersClassMLP
Very simple multi-layer perceptron (also called FFN)
src/rfdetr/models/math.py:69
↓ 3 callersClassRFDETRLargeConfig
src/rfdetr/config.py:488
↓ 3 callersClassWindowedDinov2WithRegistersBackbone
src/rfdetr/models/backbone/dinov2_with_windowed_attn.py:1186
↓ 3 callersClass_DropAugmentation
Sentinel used when an augmentation entry should be removed.
src/rfdetr/datasets/_aug_utils.py:91
↓ 3 callersClass_FakeBackbone
Backbone shim used to validate Joiner contract changes.
tests/models/backbone/test_backbone.py:17
↓ 3 callersClass_FakeModel
Minimal nn.Module that satisfies the optimize_for_inference contract.
tests/inference/test_optimize_for_inference.py:17
↓ 3 callersClass_FakePositionEncoding
Tiny callable that behaves like a position encoder.
tests/models/backbone/test_backbone.py:37
↓ 3 callersClass_FakePostProcess
Picklable postprocessor for ddp_spawn tests. ``MagicMock`` is not picklable and cannot survive the subprocess boundary that ``ddp_spawn`` creates
tests/training/helpers.py:98
↓ 3 callersClass_LazyYoloDetectionDataset
Lazy YOLO dataset that defers dense mask rasterization until ``__getitem__``.
src/rfdetr/datasets/yolo.py:145
↓ 3 callersClass_ModuleWithTestStep
tests/training/callbacks/test_best_model_callback.py:453
↓ 2 callersClassCocoKeypointSchema
Keypoint schema inferred from COCO category metadata. Args: class_names: Category names sorted by category id. num_keypoints_per_
src/rfdetr/datasets/_keypoint_schema.py:31
↓ 2 callersClassDinov2WithRegistersLayerScale
src/rfdetr/models/backbone/dinov2_with_windowed_attn.py:626
↓ 2 callersClassMLP
Very simple multi-layer perceptron (also called FFN).
src/rfdetr/models/transformer.py:35
↓ 2 callersClassMultiScaleProjector
This module implements MultiScaleProjector in :paper:`lwdetr`. It creates pyramid features built on top of the input feature map.
src/rfdetr/models/backbone/projector.py:162
↓ 2 callersClassRFDETRCli
LightningCLI subclass for RF-DETR training and evaluation. Wires ``RFDETRModelModule`` and ``RFDETRDataModule`` under a unified CLI, with argumen
src/rfdetr/training/cli.py:26
↓ 2 callersClassRFDETRLargeDeprecatedConfig
The configuration for an RF-DETR Large model.
src/rfdetr/config.py:439
↓ 2 callersClassRFDETRSmallConfig
The configuration for an RF-DETR Small model.
src/rfdetr/config.py:463
↓ 2 callersClassTransformerDecoder
Decoder stack used by DETR transformer.
src/rfdetr/models/transformer.py:513
↓ 2 callersClassTransformerDecoderLayer
A single decoder layer with optional keypoint subnetwork.
src/rfdetr/models/transformer.py:752
↓ 2 callersClassWindowedDinov2WithRegistersEncoder
src/rfdetr/models/backbone/dinov2_with_windowed_attn.py:783
↓ 2 callersClassYoloKeypointSchema
Keypoint schema inferred from an Ultralytics YOLO pose YAML file. Args: class_names: Class names ordered by YOLO class id. num_ke
src/rfdetr/datasets/_keypoint_schema.py:58
↓ 2 callersClass_DummyKeypointTransformer
Minimal transformer surface needed for LWDETR construction and keypoint schema resizing.
tests/models/test_lwdetr_keypoints.py:40
↓ 2 callersClass_FakeDatasetWithMasks
Like _FakeDataset but includes binary instance masks (for segmentation).
tests/training/helpers.py:89
↓ 2 callersClass_FakeModelWithDropout
Minimal module whose behavior differs between train and eval mode.
tests/inference/test_predict_eval_mode.py:19
↓ 2 callersClass_FakeSeries
Minimal series object for metric grouping tests.
tests/visualize/test_training.py:26
↓ 2 callersClass_MultiScaleCheckDDPModule
DDP-safe module that asserts on_train_batch_start mutation reaches training_step. With multi_scale=True and _FakeDataset's 32×32 images, on_train
tests/training/test_trainer_smoke.py:303
↓ 2 callersClass_ResumeTinyModule
Tiny LightningModule used to validate real ckpt_path resume behavior.
tests/training/callbacks/test_best_model_callback.py:68
↓ 2 callersClass_SimpleDataset
Simple synthetic dataset for testing augmentations and training loops. Creates synthetic images with varying numbers of bounding boxes to test ed
src/rfdetr/datasets/_develop.py:105
↓ 2 callersClass_TinyModel
Minimal model that can be exported to ONNX.
tests/export/test_onnx_notes.py:21
↓ 1 callersClassBackbone
backbone.
src/rfdetr/models/backbone/backbone.py:31
↓ 1 callersClassBottleneck
Standard bottleneck.
src/rfdetr/models/backbone/projector.py:123
↓ 1 callersClassC2f
Faster Implementation of CSP Bottleneck with 2 convolutions.
src/rfdetr/models/backbone/projector.py:139
↓ 1 callersClassConvertYolo
Converts supervision Detections to the target dict format expected by RF-DETR. Args: include_masks: whether to include segmentation masks
src/rfdetr/datasets/yolo.py:612
↓ 1 callersClassDinov2WithRegistersDropPath
Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks).
src/rfdetr/models/backbone/dinov2_with_windowed_attn.py:654
↓ 1 callersClassDinov2WithRegistersMLP
src/rfdetr/models/backbone/dinov2_with_windowed_attn.py:668
↓ 1 callersClassDinov2WithRegistersPatchEmbeddings
This class turns `pixel_values` of shape `(batch_size, num_channels, height, width)` into the initial `hidden_states` (patch embeddings) of shape
src/rfdetr/models/backbone/dinov2_with_windowed_attn.py:286
↓ 1 callersClassDinov2WithRegistersSdpaSelfAttention
src/rfdetr/models/backbone/dinov2_with_windowed_attn.py:525
↓ 1 callersClassDinov2WithRegistersSelfAttention
src/rfdetr/models/backbone/dinov2_with_windowed_attn.py:465
↓ 1 callersClassDinov2WithRegistersSelfOutput
The residual connection is defined in Dinov2WithRegistersLayer instead of here (as is the case with other models), due to the layernorm applied be
src/rfdetr/models/backbone/dinov2_with_windowed_attn.py:566
↓ 1 callersClassDinov2WithRegistersSwiGLUFFN
src/rfdetr/models/backbone/dinov2_with_windowed_attn.py:687
next →1–100 of 522, ranked by callers