MCPcopy Create free account

hub / github.com/roboflow/rf-detr / functions

Functions3,167 in github.com/roboflow/rf-detr

↓ 1 callersFunction_is_power_of_2
(n)
src/rfdetr/models/ops/modules/ms_deform_attn.py:29
↓ 1 callersFunction_keypoint_count_from_annotations
Infer keypoint count for one category from annotation vectors. Args: annotations: COCO annotation dictionaries. category_id: Cate
src/rfdetr/datasets/_keypoint_schema.py:370
↓ 1 callersMethod_keypoint_log_mean_trace
Compute log mean covariance trace for active keypoints. Args: active_keypoints: Active keypoint predictions with shape
src/rfdetr/models/postprocess.py:408
↓ 1 callersFunction_keypoint_prediction_records
Build flat keypoint prediction rows for notebook or terminal display. Args: key_points: RF-DETR keypoint prediction output. image
src/rfdetr/visualize/keypoints.py:78
↓ 1 callersMethod_keypoints_to_numpy
Convert keypoints to numpy array and validate shape. >>> import torch >>> keypoints = torch.tensor([[[10.0, 20.0, 2.0]]]) >>>
src/rfdetr/datasets/transforms.py:472
↓ 1 callersMethod_kp_tc
(self, tmp_path, **kwargs)
tests/models/test_config.py:377
↓ 1 callersFunction_line_style_for_split
Return the plotting line style for a metric split.
src/rfdetr/visualize/training.py:66
↓ 1 callersFunction_list_yolo_image_paths
List YOLO image files in a stable order.
src/rfdetr/datasets/yolo.py:92
↓ 1 callersFunction_load_cards
Load cookbook card definitions from a YAML file. Reads the YAML file and returns the ``cards`` list, which is consumed by the cookbook landin
docs/hooks/cookbooks_cards.py:14
↓ 1 callersFunction_load_coco_annotation
Load a COCO annotation JSON file. Args: annotation_path: Path to a COCO annotation JSON file. Returns: Parsed COCO annotatio
src/rfdetr/datasets/_keypoint_schema.py:288
↓ 1 callersFunction_load_pyproject
Load project metadata from a pyproject file. Reads the TOML file in binary mode, matching the parser API. The returned dictionary is used by
docs/hooks/package_version.py:18
↓ 1 callersMethod_log_train_progress_metrics
Log compact per-step convergence metrics for the progress bar only. Args: loss: Unscaled aggregate training loss. los
src/rfdetr/training/module_model.py:428
↓ 1 callersMethod_log_val_loss_metrics
Log aggregate and component validation losses. Args: loss: Aggregate weighted validation loss. loss_dict: Raw criteri
src/rfdetr/training/module_model.py:465
↓ 1 callersMethod_make_kornia_batch_with_masks
Build a batch with xyxy boxes and instance masks for segmentation tests. Returns (NestedTensor, targets) where each target includes a 'masks'
tests/training/test_module_data.py:1242
↓ 1 callersMethod_make_legacy_pth_checkpoint
Build a minimal legacy .pth checkpoint (no ``state_dict`` key). Args: pe_size_src: Source grid side length. dim: Embe
tests/training/test_module_model.py:1753
↓ 1 callersFunction_make_model_config
(**overrides)
tests/training/test_detr_shim.py:44
↓ 1 callersFunction_make_synthetic_batch
Build a minimal (samples, targets) batch for probing. Uses max_targets_per_image targets per image so memory reflects worst-case matcher and loss
src/rfdetr/training/auto_batch.py:59
↓ 1 callersFunction_make_train_config
Return a minimal TrainConfig for use in load_pretrain_weights. Returns: Minimal TrainConfig with placeholder dataset and output dirs.
tests/training/test_load_pretrain_weights.py:75
↓ 1 callersMethod_make_zip
Build an in-memory ZIP archive from a mapping of filename→content.
tests/benchmarks/test_develop_downloads.py:100
↓ 1 callersFunction_max_by_axis
Return element-wise maximums of a list of lists. Args: the_list: List of integer lists, all of the same length. Returns: Lis
src/rfdetr/utilities/tensors.py:43
↓ 1 callersMethod_metric_has_updates
Return whether a torchmetrics metric has accumulated at least one update.
src/rfdetr/training/callbacks/coco_eval.py:792
↓ 1 callersFunction_normalize_albu_params
Normalize transform params across Albumentations API variations. Currently this adapts ``RandomSizedCrop`` arguments so a config using ``height``
src/rfdetr/datasets/transforms.py:277
↓ 1 callersFunction_normalize_keypoint_name
Normalize a keypoint name for symmetry matching.
src/rfdetr/datasets/_keypoint_schema.py:225
↓ 1 callersFunction_normalize_split_ratios
Normalize split ratios parameter to a dictionary. Args: split_ratios: Can be: - DatasetSplitRatios dataclass instance
src/rfdetr/datasets/synthetic.py:68
↓ 1 callersFunction_onnx_nested_tensor_from_tensor_list
ONNX-tracing-compatible variant of ``nested_tensor_from_tensor_list``. Args: tensor_list: List of 3-D tensors (C, H, W). block_si
src/rfdetr/utilities/tensors.py:157
↓ 1 callersFunction_parse_yolo_box
Parse a YOLO center-width-height box into relative XYXY coordinates.
src/rfdetr/datasets/yolo.py:40
↓ 1 callersFunction_parse_yolo_polygon
Parse a flattened YOLO polygon into relative XY points.
src/rfdetr/datasets/yolo.py:62
↓ 1 callersFunction_parse_yolo_pose_label_line
Parse one Ultralytics YOLO pose row into pixel boxes and COCO-style keypoints.
src/rfdetr/datasets/yolo.py:260
↓ 1 callersMethod_person_coco
Return a minimal COCO-like object with a single keypoint-bearing person category.
tests/datasets/test_coco.py:867
↓ 1 callersFunction_polygon_to_mask
Rasterize a polygon into a dense boolean mask. TODO: remove once supervision ships a direct CompactMask.from_polygon factory; at that point t
src/rfdetr/datasets/yolo.py:67
↓ 1 callersFunction_polygons_to_masks
Rasterize per-instance polygons into an ``(N, H, W)`` boolean array. TODO: remove once supervision ships a direct CompactMask.from_polygon factor
src/rfdetr/datasets/yolo.py:80
↓ 1 callersMethod_postprocess_boxes
Build detection-only result dictionaries. Args: scores: Selected object scores with shape ``(B, K)``. labels: Selecte
src/rfdetr/models/postprocess.py:439
↓ 1 callersMethod_postprocess_keypoints
Select class-specific keypoints and optionally fuse object scores. Args: out_keypoints: Raw keypoint predictions with shape
src/rfdetr/models/postprocess.py:182
↓ 1 callersMethod_postprocess_masks
Attach resized segmentation masks for selected detections. Args: out_masks: Raw mask logits with shape ``(B, Q, Hm, Wm)``.
src/rfdetr/models/postprocess.py:142
↓ 1 callersMethod_pred
Single detection prediction dict for image_id.
tests/evaluation/test_coco_eval.py:343
↓ 1 callersFunction_quantize_dynamic_range
Build a dynamic-range INT8 TFLite model from the onnx2tf SavedModel. Dynamic-range quantization stores weights as INT8 and keeps activations in f
src/rfdetr/export/_tflite/converter.py:752
↓ 1 callersFunction_random_sized_crop_uses_size_param
Return whether ``RandomSizedCrop`` expects a ``size`` keyword. The Albumentations 2.x API changed ``RandomSizedCrop`` from separate ``height``/``
src/rfdetr/datasets/transforms.py:260
↓ 1 callersFunction_read_project_version
Read the package version from pyproject project metadata. Validates that the version exists and is a string before exposing it to the documen
docs/hooks/package_version.py:46
↓ 1 callersMethod_rebuild_keypoints_from_albu
Rebuild transformed keypoints and keep them synchronized with kept boxes. Args: augmented: Augmented output dict from Albumentati
src/rfdetr/datasets/transforms.py:551
↓ 1 callersFunction_replace_single_gridsample
Rewrite one GridSample ONNX node into a TFLite-safe bilinear subgraph. Replaces ``GridSample(im, grid)`` with an equivalent bilinear sampling sub
src/rfdetr/export/_tflite/converter.py:90
↓ 1 callersFunction_requests_multiple_devices
Return whether the configured devices value explicitly requests multiple devices.
src/rfdetr/training/trainer.py:120
↓ 1 callersMethod_reset_parameters
(self)
src/rfdetr/models/transformer.py:258
↓ 1 callersMethod_reset_parameters
(self)
src/rfdetr/models/ops/modules/ms_deform_attn.py:74
↓ 1 callersFunction_resolve_group_keypoint_oks_sigmas
Resolve OKS sigmas for one keypoint-count group.
src/rfdetr/evaluation/coco_eval.py:179
↓ 1 callersFunction_resolve_keypoint_oks_sigmas
Resolve OKS sigmas for faster-coco-eval keypoint evaluation.
src/rfdetr/evaluation/coco_eval.py:157
↓ 1 callersFunction_resolve_precision
()
src/rfdetr/training/trainer.py:177
↓ 1 callersMethod_resolve_trainer_device_kwargs
Map a torch-style device specifier to PTL ``accelerator``/``devices`` kwargs. Args: device: A device specifier accepted by ``torc
src/rfdetr/detr.py:593
↓ 1 callersMethod_roboflow_keypoint_annotation_path
Return the Roboflow COCO train annotation path when it exists. Args: dataset_dir: Path to the Roboflow dataset root. Ret
src/rfdetr/detr.py:1498
↓ 1 callersFunction_sanitize_preds
Return a copy of *predictions* with all tensors detached and moved to CPU. Prevents callers from inadvertently retaining CUDA memory or autograd
src/rfdetr/evaluation/keypoint_oks.py:36
↓ 1 callersFunction_save_grayscale_image
Write a small solid-colour grayscale PNG to *path*.
tests/export/test_tflite_inference.py:93
↓ 1 callersMethod_scale_loss_for_accumulation
Scale the current numerator loss by the accumulated box denominator. Args: raw_loss: Current microbatch weighted loss numerator.
src/rfdetr/training/module_model.py:311
↓ 1 callersMethod_select_topk
Select the highest scoring query/class pairs. Args: out_logits: Classification logits with shape ``(B, Q, C)``. Returns:
src/rfdetr/models/postprocess.py:94
↓ 1 callersMethod_set_aux_loss
( self, outputs_class: torch.Tensor, outputs_coord: torch.Tensor, outputs_mask
src/rfdetr/models/lwdetr.py:690
↓ 1 callersMethod_setup_fit_with_mocks
Call setup('fit') with build_dataset and cuda mocked (no CUDA → fallback).
tests/training/test_module_data.py:1427
↓ 1 callersMethod_setup_kornia_pipeline
Resolve augmentation backend and build the Kornia pipeline if applicable. Called once during ``setup("fit")``. When ``augmentation_backend``
src/rfdetr/training/module_data.py:547
↓ 1 callersMethod_should_fallback_to_deprecated_config
Return whether initialization should retry with deprecated Large config. The fallback is only for known checkpoint/config incompatibilities f
src/rfdetr/variants.py:147
↓ 1 callersMethod_source_image_path
Return a source image path for common COCO-style datasets.
src/rfdetr/training/module_data.py:536
↓ 1 callersFunction_split_metric_column
Split a CSVLogger metric column into split prefix and metric name.
src/rfdetr/visualize/training.py:58
↓ 1 callersMethod_step_lr_scheduler
Step Lightning's scheduler object when one is configured.
src/rfdetr/training/module_model.py:401
↓ 1 callersMethod_step_optimizer
Clip gradients, step optimizer and scheduler, then reset accumulation state. Args: optimizer: Optimizer returned by Lightning.
src/rfdetr/training/module_model.py:374
↓ 1 callersFunction_test_coco_class_name_mapping
Verify predict() uses sparse COCO category-ID → class-name mapping. Issue #988: RFDETRSegSmall returned "sheep" for class_id=18 instead of "dog"
tests/run_smoke_all_models.py:171
↓ 1 callersFunction_test_from_checkpoint
Round-trip a model through from_checkpoint using a temp training checkpoint. Saves the instantiated model's weights into a minimal training-style
tests/run_smoke_all_models.py:100
↓ 1 callersFunction_try_import_tensorboard_summary_writer
Probe the full tensorboard import chain to surface numpy/tensorflow incompatibilities early. When tensorboard is installed alongside a numpy-2.0-
src/rfdetr/training/trainer.py:39
↓ 1 callersFunction_validate_annotations
Validate COCO annotations container type. Args: annotations: Raw ``annotations`` value from a COCO annotation file. Returns:
src/rfdetr/datasets/_keypoint_schema.py:346
↓ 1 callersFunction_validate_categories
Validate and sort COCO categories by category id. Args: categories: Raw ``categories`` value from a COCO annotation file. Returns:
src/rfdetr/datasets/_keypoint_schema.py:315
↓ 1 callersMethod_validate_outputs
Validate mutually exclusive output heads and per-image target sizes. Args: out_logits: Classification logits with shape ``(B, Q,
src/rfdetr/models/postprocess.py:68
↓ 1 callersFunction_validate_yolo_kpt_shape
Validate and normalize a YOLO pose ``kpt_shape`` entry.
src/rfdetr/datasets/_keypoint_schema.py:147
↓ 1 callersFunction_warn_keypoint_hflip_disabled
Emit the standard warning for a disabled keypoint horizontal flip.
src/rfdetr/datasets/_aug_utils.py:20
↓ 1 callersFunction_warn_missing_rich_once
Warn once when metric table rendering is skipped because Rich is unavailable. Args: warning_emitted: Whether this warning has already bee
src/rfdetr/training/callbacks/coco_eval.py:47
↓ 1 callersFunction_weighted_mean_coco_stats
Compute category-weighted mean COCO stats, ignoring unavailable ``-1`` values.
src/rfdetr/evaluation/coco_eval.py:284
↓ 1 callersFunction_write_mixed_keypoint_coco
Write a COCO keypoint file with two categories using different keypoint counts.
tests/evaluation/test_coco_eval.py:76
↓ 1 callersFunctionaccuracy
Computes the precision@k for the specified values of k.
src/rfdetr/models/math.py:25
↓ 1 callersMethodadd_arguments_to_parser
Register argument links that share configs between module and datamodule. Linking ``model.model_config`` → ``data.model_config`` and ``model.
src/rfdetr/training/cli.py:35
↓ 1 callersFunctionbatch_dice_loss
Compute the DICE loss, similar to generalized IOU for masks. Args: inputs: A float tensor of arbitrary shape. The predictions for each ex
src/rfdetr/utilities/box_ops.py:113
↓ 1 callersFunctionbatch_sigmoid_ce_loss
Compute sigmoid cross-entropy loss for mask predictions. Args: inputs: A float tensor of arbitrary shape. The predictions for each exampl
src/rfdetr/utilities/box_ops.py:132
↓ 1 callersFunctionbox_cxcywh_to_xyxy
(x)
src/rfdetr/export/benchmark.py:67
↓ 1 callersFunctionbuild_backbone
Useful args: - encoder: encoder name - lr_encoder: - dilation - use_checkpoint: for swin only for now
src/rfdetr/models/backbone/__init__.py:61
↓ 1 callersFunctionbuild_matcher
Build a HungarianMatcher from a training argument namespace. Args: args: Namespace supplying ``focal_alpha``, ``set_cost_class``, ``set_c
src/rfdetr/models/matcher.py:301
↓ 1 callersFunctionbuild_normalize
Build a Kornia ``Normalize`` transform for GPU-side normalization. Args: mean: Per-channel mean values. Defaults to ImageNet statistics.
src/rfdetr/datasets/kornia_transforms.py:343
↓ 1 callersFunctionbuild_o365
(image_set: str, args: Any, resolution: int)
src/rfdetr/datasets/o365.py:73
↓ 1 callersFunctionbuild_position_encoding
(hidden_dim, position_embedding)
src/rfdetr/models/position_encoding.py:138
↓ 1 callersFunctioncalculate_uncertainty
We estimate uncertainty as L1 distance between 0.0 and the logit prediction in 'logits' for the foreground class in `classes`. Args:
src/rfdetr/models/heads/segmentation.py:454
↓ 1 callersMethodcommon_opt
(self, return_onnx=False)
src/rfdetr/export/_onnx/exporter.py:267
↓ 1 callersFunctiondetect_roboflow_format
Detect if a Roboflow dataset is in COCO or YOLO format. Args: dataset_dir: Path to the Roboflow dataset root directory Returns:
src/rfdetr/datasets/__init__.py:43
↓ 1 callersFunctiondrop_path
Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks). Comment by Ross Wightman: This is the same as the DropCo
src/rfdetr/models/backbone/dinov2_with_windowed_attn.py:635
↓ 1 callersMethodexpand_path
Expand and resolve the pretrain_weights path. Bare filenames (no directory component, e.g. ``rf-detr-base.pth``) are resolved to the model ca
src/rfdetr/config.py:373
↓ 1 callersMethodexport
Export the trained model to ONNX or TFLite format. See the `export documentation <https://rfdetr.roboflow.com/learn/export/>`_ for more infor
src/rfdetr/detr.py:1116
↓ 1 callersMethodexport
(self)
src/rfdetr/models/backbone/dinov2.py:151
↓ 1 callersMethodforward
(self, hidden_state: torch.Tensor)
src/rfdetr/models/backbone/dinov2_with_windowed_attn.py:680
↓ 1 callersMethodforward_post
( self, tgt: Tensor, memory: Tensor, tgt_mask: Optional[Tensor] = None,
src/rfdetr/models/transformer.py:859
↓ 1 callersMethodfuse_kv
(self, node_k, node_v, fused_kv_idx, heads, num_dynamic=0)
src/rfdetr/export/_onnx/exporter.py:578
↓ 1 callersMethodfuse_kv_insert_fmhca
(self, heads, mhca_index, sm)
src/rfdetr/export/_onnx/exporter.py:852
↓ 1 callersMethodfuse_qkv
(self, node_q, node_k, node_v, fused_qkv_idx, heads, num_dynamic=0)
src/rfdetr/export/_onnx/exporter.py:692
↓ 1 callersMethodfuse_qkv_insert_fmha
(self, heads, mha_index)
src/rfdetr/export/_onnx/exporter.py:876
↓ 1 callersFunctiongeneralized_box_iou
Generalized IoU from https://giou.stanford.edu/ The boxes should be in [x0, y0, x1, y1] format. Returns a [N, M] pairwise matrix, where N =
src/rfdetr/utilities/box_ops.py:66
↓ 1 callersFunctionget_activation
Get activation.
src/rfdetr/models/backbone/projector.py:67
↓ 1 callersMethodget_bindings
Build binddings.
src/rfdetr/export/benchmark.py:246
↓ 1 callersFunctionget_coco_api_from_dataset
(dataset: Dataset[Any])
src/rfdetr/datasets/__init__.py:32
↓ 1 callersFunctionget_config
(size, use_registers)
src/rfdetr/models/backbone/dinov2.py:45
↓ 1 callersFunctionget_dinov2_lr_decay_rate
Calculate lr decay rate for different ViT blocks. Args: name: Parameter name. lr_decay_rate: Base lr decay rate. num_laye
src/rfdetr/models/backbone/backbone.py:212
← previousnext →601–700 of 3,167, ranked by callers