AI Slop Code RIsk Monitor

roboflow/rf-detr

RF-DETR is a real-time object detection and segmentation model architecture developed by Roboflow, SOTA on COCO, designed for fine-tuning. [ICLR 2026]

59.1 High pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for roboflow/rf-detr, a Python project with 9,766 GitHub stars. SynthScan examined 199,888 lines of code across 497 source files, recording 7614 pattern matches distributed across 23 syntactic categories. The legacy adjusted pattern signal is 59.1 (High pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

59.1
Adjusted Signal
59.1
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
9.8K
Stars
Python
Language
199.9K
Lines of Code
497
Files
7.6K
Pattern Hits
2026-10-12
Scan Date
1.11
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 81.9/100 · CRITICAL

Can maintainers explain intent, assumptions, and trade-offs? 5864 finding(s).

Hallucinated Dependency & Supply Chain Risk 10.2/100 · LOW

Are imports declared and package/API names verified? 345 finding(s).

Agent Over-Engineering Ratio 88.3/100 · CRITICAL

Are wrappers, guards, and repeated structures necessary? 6539 finding(s).

PR Review Velocity Impact 96.2/100 · CRITICAL

Which changes need focused human review? 7614 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 7HIGH 546MEDIUM 1316LOW 5745

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 7614 distinct pattern matches across 23 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Decorative Section Separators1302 hits · 4370 pts
SeverityFileLineSnippetContext
MEDIUMAGENTS.md161# ------------------------------------------------------------------------COMMENT
MEDIUMAGENTS.md165# ------------------------------------------------------------------------COMMENT
MEDIUMtests/run_smoke_all_models.py2# ------------------------------------------------------------------------COMMENT
MEDIUMtests/run_smoke_all_models.py6# ------------------------------------------------------------------------COMMENT
MEDIUMtests/conftest.py1# ------------------------------------------------------------------------COMMENT
MEDIUMtests/conftest.py5# ------------------------------------------------------------------------COMMENT
MEDIUMtests/__init__.py1# ------------------------------------------------------------------------COMMENT
MEDIUMtests/__init__.py5# ------------------------------------------------------------------------COMMENT
MEDIUMtests/_online.py1# ------------------------------------------------------------------------COMMENT
MEDIUMtests/_online.py5# ------------------------------------------------------------------------COMMENT
MEDIUMtests/_markers.py1# ------------------------------------------------------------------------COMMENT
MEDIUMtests/_markers.py5# ------------------------------------------------------------------------COMMENT
MEDIUMtests/test_weekly_metrics.py1# ------------------------------------------------------------------------COMMENT
MEDIUMtests/test_weekly_metrics.py5# ------------------------------------------------------------------------COMMENT
MEDIUMtests/test_main.py1# ------------------------------------------------------------------------COMMENT
MEDIUMtests/test_main.py5# ------------------------------------------------------------------------COMMENT
MEDIUMtests/training/test_metrics_csv.py1# ------------------------------------------------------------------------COMMENT
MEDIUMtests/training/test_metrics_csv.py5# ------------------------------------------------------------------------COMMENT
MEDIUMtests/training/test_metrics_csv.py31# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/training/test_metrics_csv.py33# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/training/test_metrics_csv.py90# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/training/test_metrics_csv.py92# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/training/test_metrics_csv.py113# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/training/test_metrics_csv.py115# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/training/test_auto_batch.py1# ------------------------------------------------------------------------COMMENT
MEDIUMtests/training/test_auto_batch.py5# ------------------------------------------------------------------------COMMENT
MEDIUMtests/training/test_gradient_clipping.py1# ------------------------------------------------------------------------COMMENT
MEDIUMtests/training/test_gradient_clipping.py5# ------------------------------------------------------------------------COMMENT
MEDIUMtests/training/conftest.py1# ------------------------------------------------------------------------COMMENT
MEDIUMtests/training/conftest.py5# ------------------------------------------------------------------------COMMENT
MEDIUMtests/training/conftest.py16# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/training/conftest.py19# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/training/conftest.py91# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/training/conftest.py93# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/training/test_trainer_smoke.py61# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/training/test_trainer_smoke.py63# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/training/test_trainer_smoke.py1# ------------------------------------------------------------------------COMMENT
MEDIUMtests/training/test_trainer_smoke.py5# ------------------------------------------------------------------------COMMENT
MEDIUMtests/training/test_trainer_smoke.py39# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/training/test_trainer_smoke.py41# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/training/test_trainer_smoke.py343# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/training/test_trainer_smoke.py345# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/training/test_grad_accumulation.py1# ------------------------------------------------------------------------COMMENT
MEDIUMtests/training/test_grad_accumulation.py5# ------------------------------------------------------------------------COMMENT
MEDIUMtests/training/test_coco_map.py1# ------------------------------------------------------------------------COMMENT
MEDIUMtests/training/test_coco_map.py5# ------------------------------------------------------------------------COMMENT
MEDIUMtests/training/test_coco_map_streaming.py1# ------------------------------------------------------------------------COMMENT
MEDIUMtests/training/test_coco_map_streaming.py5# ------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/training/test_detr_shim.py185# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/training/test_detr_shim.py187# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/training/test_detr_shim.py700# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/training/test_detr_shim.py702# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/training/test_detr_shim.py1397# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/training/test_detr_shim.py1399# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/training/test_detr_shim.py1# ------------------------------------------------------------------------COMMENT
MEDIUMtests/training/test_detr_shim.py5# ------------------------------------------------------------------------COMMENT
MEDIUMtests/training/test_detr_shim.py43# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/training/test_detr_shim.py45# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/training/test_detr_shim.py484# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/training/test_detr_shim.py486# ---------------------------------------------------------------------------COMMENT
1242 more matches not shown…
Hyper-Verbose Identifiers5113 hits · 4016 pts
SeverityFileLineSnippetContext
LOWtests/run_smoke_all_models.py171def _test_coco_class_name_mapping(model_instance: object) -> None:CODE
LOWtests/conftest.py167def synthetic_shape_dataset_dir(tmp_path_factory: pytest.TempPathFactory) -> Generator[Path, Any, None]:CODE
LOWtests/conftest.py183def synthetic_shape_segmentation_dataset_dir(CODE
LOW⚡tests/test_weekly_metrics.py331 def test_rendered_metadata_round_trips_complete_state(self) -> None:CODE
LOW⚡tests/test_weekly_metrics.py340 def test_parser_rejects_malformed_checkpoint_json(self) -> None:CODE
LOW⚡tests/test_weekly_metrics.py347 def test_parser_rejects_negative_downloads(self) -> None:CODE
LOWtests/test_weekly_metrics.py85 def test_thursday_selects_previous_completed_week(self) -> None:CODE
LOWtests/test_weekly_metrics.py96 def test_sums_exact_completed_week(self) -> None:CODE
LOWtests/test_weekly_metrics.py118 def test_rejects_incomplete_week(self) -> None:CODE
LOWtests/test_weekly_metrics.py132 def test_rejects_non_calendar_week(self) -> None:CODE
LOWtests/test_weekly_metrics.py147 def test_first_observation_establishes_unknown_delta_baseline(self) -> None:CODE
LOWtests/test_weekly_metrics.py160 def test_next_observation_records_star_delta(self) -> None:CODE
LOWtests/test_weekly_metrics.py175 def test_gap_establishes_unknown_delta_baseline(self) -> None:CODE
LOWtests/test_weekly_metrics.py190 def test_same_period_replaces_observation_without_resetting_delta(self) -> None:CODE
LOWtests/test_weekly_metrics.py214 def test_same_period_rerun_keeps_delta_at_minimum_history_limit(self) -> None:CODE
LOWtests/test_weekly_metrics.py234 def test_rejects_period_older_than_checkpoint(self) -> None:CODE
LOWtests/test_weekly_metrics.py248 def test_next_observation_records_zero_star_delta(self) -> None:CODE
LOWtests/test_weekly_metrics.py267 def test_retains_only_configured_latest_history(self) -> None:CODE
LOWtests/test_weekly_metrics.py295 def test_checked_in_svg_contains_post_correction_backfill(self) -> None:CODE
LOWtests/test_weekly_metrics.py319 def test_load_state_rejects_oversized_existing_svg(self, tmp_path: Path) -> None:CODE
LOWtests/test_weekly_metrics.py365 def test_metadata_escapes_xml_characters_and_round_trips(self) -> None:CODE
LOWtests/test_weekly_metrics.py379 def test_baseline_does_not_claim_zero_weekly_star_growth(self) -> None:CODE
LOWtests/test_weekly_metrics.py388 def test_baseline_week_draws_no_download_mark(self) -> None:CODE
LOWtests/test_weekly_metrics.py406 def test_renders_zero_downloads_week_without_dividing_by_zero(self) -> None:CODE
LOWtests/test_weekly_metrics.py418 def test_chart_uses_display_window_and_latest_summary(self) -> None:CODE
LOWtests/test_weekly_metrics.py453 def test_reports_connection_failure_as_metrics_error(self, error: Exception, match: str) -> None:CODE
LOWtests/test_weekly_metrics.py472 def test_reports_body_read_failure_as_metrics_error(self, read_error: Exception) -> None:CODE
LOWtests/test_weekly_metrics.py493 def test_reports_invalid_body_as_metrics_error(self, body: bytes, match: str) -> None:CODE
LOWtests/test_weekly_metrics.py510 def test_fetch_star_count_uses_repository_api_and_token_header(self) -> None:CODE
LOWtests/test_weekly_metrics.py522 def test_fetch_daily_downloads_reads_without_mirrors_series(self) -> None:CODE
LOWtests/test_weekly_metrics.py541 def test_fetch_daily_downloads_rejects_duplicate_dates(self) -> None:CODE
LOWtests/test_weekly_metrics.py606 def test_fetch_daily_downloads_rejects_malformed_response(self, payload: dict, match: str) -> None:CODE
LOWtests/test_weekly_metrics.py624 def test_first_update_writes_fetch_results_as_embedded_baseline(self, tmp_path: Path) -> None:CODE
LOWtests/test_weekly_metrics.py657 def test_cli_writes_custom_output(self, tmp_path: Path) -> None:CODE
LOWtests/test_weekly_metrics.py680 def test_same_week_rerun_is_byte_identical(self, tmp_path: Path) -> None:CODE
LOWtests/test_weekly_metrics.py705 def test_malformed_existing_svg_is_not_overwritten(self, tmp_path: Path) -> None:CODE
LOWtests/test_weekly_metrics.py722 def test_failed_write_removes_its_temporary_file(self, tmp_path: Path) -> None:CODE
LOWtests/test_weekly_metrics.py744 def test_script_entry_point_executes_after_all_helpers_are_defined(self, tmp_path: Path) -> None:CODE
LOWtests/test_main.py18 def test_dispatches_to_cli_main_when_run_as_script(self) -> None:CODE
LOWtests/test_main.py31 def test_skips_cli_main_when_imported_as_a_module(self) -> None:CODE
LOW⚡tests/training/test_metrics_csv.py121 def test_base_metrics_present_without_ema(self, base_model_config, base_train_config):CODE
LOWtests/training/test_metrics_csv.py134 def test_ema_metrics_present_with_ema_enabled(self, base_model_config, base_train_config):CODE
LOWtests/training/test_metrics_csv.py147 def test_train_loss_is_unscaled(self, base_model_config, base_train_config):CODE
LOWtests/training/test_metrics_csv.py252 def test_history_preserved_across_resume(self, base_model_config, base_train_config):CODE
LOWtests/training/test_metrics_csv.py284 def test_reused_output_dir_with_empty_resume_resets_history(self, base_model_config, base_train_config):CODE
LOWtests/training/test_metrics_csv.py307 def test_reused_output_dir_without_resume_resets_history(self, base_model_config, base_train_config):CODE
LOWtests/training/test_auto_batch.py26def test_recommend_grad_accum_steps_rounds_up():CODE
LOWtests/training/test_auto_batch.py30def test_probe_max_micro_batch_uses_exponential_then_binary_search():CODE
LOWtests/training/test_auto_batch.py56def test_probe_max_micro_batch_raises_if_one_is_not_safe():CODE
LOWtests/training/test_auto_batch.py75def test_probe_max_micro_batch_reprobes_batch_one_with_state_resident():CODE
LOWtests/training/test_auto_batch.py111def test_probe_max_micro_batch_warms_up_state_before_exponential_search():CODE
LOWtests/training/test_auto_batch.py143def test_probe_max_micro_batch_raises_before_building_shadow_optimizer_when_no_trainable_params():CODE
LOWtests/training/test_auto_batch.py170def test_probe_step_raises_when_loss_keys_do_not_overlap_weight_keys():CODE
LOWtests/training/test_auto_batch.py215def test_probe_step_rejects_trainable_params_shadow_args_passed_positionally():CODE
LOWtests/training/test_auto_batch.py305 def test_does_not_mutate_real_model_parameters(self) -> None:CODE
LOWtests/training/test_auto_batch.py336 def test_populates_shadow_optimizer_state(self) -> None:CODE
LOWtests/training/test_auto_batch.py349 def test_shadow_optimizer_state_reused_not_reallocated_across_iterations(self) -> None:CODE
LOWtests/training/test_auto_batch.py377 def test_shadow_grad_cleared_after_step(self) -> None:CODE
LOWtests/training/test_auto_batch.py387 def test_shadow_grad_cleared_when_step_itself_ooms(self) -> None:CODE
LOWtests/training/test_auto_batch.py457def test_probe_max_micro_batch_drives_real_search_loop_end_to_end():CODE
5053 more matches not shown…
Docstring Block Structure518 hits · 2588 pts
SeverityFileLineSnippetContext
HIGHtests/_online.py14Report whether *host* accepts a TCP connection on *port* within *timeout_s*. Args: host: Hostname or IP addSTRING
HIGHtests/training/test_coco_map.py1425Ground truth shaped to exercise the columnar builder's edge cases, not just its happy path. Args: seed: TorSTRING
HIGHtests/training/test_coco_map.py1480Return one filled-rectangle mask per box, on the fixture's fixed canvas. Args: boxes: ``(N, 4)`` boxes in `STRING
HIGHtests/training/test_coco_map.py2025Return two images of axis-aligned rectangle masks that fill their boxes exactly, so box and mask areas agree. Args:STRING
HIGHtests/training/test_module_data.py1053Build one (image, target) pair shaped exactly as the COCO reader produces for a segmentation model: ``masks`` isSTRING
HIGHtests/training/test_coco_map_masks.py54Return a ``(K, H, W)`` mask stack for one COCO RLE edge case. ``background`` and ``foreground`` are single-run maskSTRING
HIGHtests/training/test_coco_map_masks.py121Wrap a mask stack as one image of predictions, with the mirrored stack as that image's ground truth. Args: STRING
HIGHtests/training/test_coco_map_masks.py220Return one image of predictions and ground truth exercising one rule of TorchMetrics' stored state. ``crowd_and_areSTRING
HIGHtests/training/test_coco_map_masks.py289Update *metric* with one image of identical detections and report whether it warned about too many. Args: mSTRING
HIGHtests/training/test_coco_map_dataset.py24Return a boolean ``_CANVAS`` x ``_CANVAS`` mask that is set on one rectangle. Args: top: First masked row. STRING
HIGHtests/training/test_coco_map_dataset.py122Return a per-class metric on ``backend`` that has seen :func:`_records`. Args: backend: The ``eval_backend`STRING
HIGHtests/training/test_coco_map_dataset.py239Return a stand-in hotcoco module whose ``COCO`` type carries only the given attributes. Args: **symSTRING
HIGHtests/training/test_fused_adamw_ema.py42Run the wrapped model. Args: inputs: Model input. Returns: The wrapped model'sSTRING
HIGHtests/training/test_fused_adamw_ema.py66Run one head, leaving the other without a gradient. Args: inputs: Model input. use_firsSTRING
HIGHtests/training/test_fused_adamw_ema.py146Build one arm of the production comparison: module, trainer stand-in, optimizer, EMA callback, parameters. Args: STRING
HIGHtests/training/test_fused_adamw_ema.py183Fit the production module with a real Lightning ``Trainer``, optionally resuming a checkpoint. Two micro-batches peSTRING
HIGHtests/training/callbacks/test_best_model_callback.py37Create a minimal mock Trainer with controllable callback_metrics. Sets the attributes required by ModelCheckpoint aSTRING
HIGHtests/datasets/test_kornia_transforms.py2268Shift a ``(C, H, W)`` array right by ``tx`` and down by ``ty`` pixels, filling from the border. This is the referenSTRING
HIGHtests/datasets/test_kornia_transforms.py2299Build a pixel-translation transform and fix its sampled per-image offsets. The transform comes from the public builSTRING
HIGHtests/datasets/test_keypoint_schema.py31Write a minimal COCO annotation file. Args: path: Destination JSON path. categories: COCO category STRING
HIGHtests/datasets/test_coco.py252Build a builder namespace carrying the image-pipeline options the dataset builders require. The builders read theseSTRING
HIGHtests/datasets/test_coco.py1572Write a Roboflow-style COCO split whose category list starts with a synthetic root node. Args: directory: SSTRING
HIGHtests/datasets/test_builder_options.py37Build the merged model/train namespace passed to dataset builders. Args: model_config: Architecture config STRING
HIGHtests/datasets/test_builder_options.py69Run the standard COCO builder with external dataset operations mocked. Args: args: Namespace forwarded to tSTRING
HIGHtests/datasets/test_builder_options.py110Run the Roboflow COCO builder with external dataset operations mocked. Args: args: Namespace forwarded to tSTRING
HIGHtests/datasets/test_builder_options.py151Run the YOLO builder with filesystem and dataset operations mocked. Args: args: Namespace forwarded to the STRING
HIGHtests/datasets/test_builder_options.py189Run the Object365 builder with dataset and transform operations mocked. Args: args: Namespace forwarded to STRING
HIGHtests/datasets/test_augmentations.py35Report whether the installed Albumentations exports a transform. Albumentations is imported inside the call, not atSTRING
HIGHtests/datasets/test_webdataset.py86Write a synthetic COCO split to disk and return its ``(image_dir, annotations_path)``. Args: tmp_path: RootSTRING
HIGHtests/datasets/test_webdataset.py1396Build the merged model/train namespace :func:`~rfdetr.datasets.webdataset.load.build_webdataset` expects. Args:STRING
HIGHtests/legacy/test_checkpoint_compat.py99Parse a versions file and return a list of version strings. Args: versions_file: Path to the versions file.STRING
HIGHtests/legacy/test_checkpoint_compat.py131Return the expected checkpoint path for *version*. Args: version: rfdetr version string, e.g. ``"1.5.0"``. STRING
HIGHtests/legacy/test_checkpoint_compat.py151Return the artifact path for a legacy checkpoint prediction image. Args: version: Legacy RF-DETR version enSTRING
HIGHtests/legacy/generate_checkpoint.py79Download (once) and return the path to the fixed reference test image. Caches the file in a stable temp directory aSTRING
HIGHtests/legacy/generate_checkpoint.py118Extract the highest-confidence detection as a plain, picklable reference. ``class_id`` (not ``class_name``) is the STRING
HIGHtests/legacy/generate_checkpoint.py170Extract the bare model state-dict from an rfdetr facade instance. Tries the current layout (``model.model.model.staSTRING
HIGHtests/legacy/generate_checkpoint.py213Extract patch_size from an rfdetr facade instance. Args: model: An rfdetr facade instance. Returns: STRING
HIGHtests/legacy/generate_checkpoint.py239Instantiate an rfdetr model, falling back through available classes. Tries *preferred_class* first, then ``RFDETRBaSTRING
HIGHtests/legacy/generate_checkpoint.py319Best-effort check for whether *exc* looks like a network/infra failure, not a code bug. Walks the exception's ``__cSTRING
HIGHtests/models/test_transformer_onnx_two_stage.py56Return the decoder hidden states. Args: src: Feature map of shape ``(B, C, H, W)``. posSTRING
HIGHtests/models/test_transformer_onnx_two_stage.py145Return the names of ``Concat`` nodes with exactly one input — the shape CoreML rejects. Args: graph: An ONNSTRING
HIGHtests/models/test_transformer_onnx_two_stage.py165Return the names of ``Concat`` nodes with a zero-sized float input — the other shape CoreML rejects. Only float datSTRING
HIGHtests/models/test_model.py14Return the patch-embedding projection layer for an RF-DETR model. RFDETR wrappers are not nn.Module; the underlyingSTRING
HIGHtests/models/_transformer_support.py61Spy on ``function.apply``: record every call's arguments and still run the real autograd function. Args: moSTRING
HIGHtests/models/test_criterion.py1213Build one random detection batch with a different ground-truth count per image. Args: seed: Seed for the baSTRING
HIGHtests/models/test_criterion.py1249Build a criterion on the production classification branch. ``SetCriterion`` defaults ``ia_bce_loss`` to False whileSTRING
HIGHtests/models/test_criterion.py1290Build detection output layers and their per-image targets. Optional masks cover the segmentation case. Target boxesSTRING
HIGHtests/models/test_assignment.py28Solve one ungrouped compact cost matrix per-image with SciPy directly. Ground truth for ``group_detr=1`` cases: no STRING
HIGHtests/models/test_transformer_keypoints.py28Build minimal synthetic multi-scale inputs for `Transformer.forward`. Examples: >>> srcs, masks, pos_embedsSTRING
HIGHtests/models/test_transformer.py130Build minimal valid inputs for ms_deform_attn_core_pytorch. Examples: >>> value, spatial_shapes, sampling_lSTRING
HIGHtests/models/test_transformer.py1548Build batch=1 per-position class scores with `picks` as the strictly descending top-k winners. Args: total_STRING
HIGHtests/models/test_transformer.py1696Build a two-stage ``Transformer`` whose group heads are the concrete types LWDETR constructs. ``Transformer.__init_STRING
HIGHtests/models/test_transformer.py2295Build a decoder-free, two-stage ``Transformer`` with GroupPose keypoint heads enabled. ``num_decoder_layers=0`` isoSTRING
HIGHtests/models/test_transformer.py2558Reproduce Transformer.forward's two-stage box construction from a bbox-delta MLP output. Args: delta: Raw `STRING
HIGHtests/models/test_platform_models.py28Execute a fresh copy of ``rfdetr.platform.models`` against a fake ``rfdetr_plus``. The shipped module decides what STRING
HIGHtests/models/heads/test_segmentation_head.py637Return mask logits for one decoder layer's query features at a fixed 4x4 image size. Args: spatial_STRING
HIGHtests/models/heads/test_detection_head.py26Construct the smallest viable LWDETR without loading pretrained weights. Uses a MagicMock backbone and transformer STRING
HIGHtests/models/heads/test_detection_head.py61Construct a minimal keypoint-capable LWDETR with detection head resized to num_classes+1. Mirrors what happens afteSTRING
HIGHtests/models/heads/test_detection_head.py104Build a zero keypoint prediction tensor with the shape expected by _aggregate_keypoint_class_logits. The second-to-STRING
HIGHtests/utilities/test_imports.py28Map each flag a module assigns from ``is_installed("<package>")`` to its literal package name. The names come from STRING
458 more matches not shown…
Unused Imports319 hits · 292 pts
SeverityFileLineSnippetContext
LOWtests/_online.py8CODE
LOWtests/_markers.py8CODE
LOWtests/training/test_metrics_csv.py16CODE
LOWtests/training/test_gradient_clipping.py23CODE
LOWtests/training/test_grad_accumulation.py18CODE
LOWtests/training/test_checkpoint_cadence.py15CODE
LOWtests/training/test_fused_adamw_ema.py8CODE
LOWtests/training/test_cuda_graph_te.py8CODE
LOWtests/training/test_cuda_graph_step.py8CODE
LOWtests/training/test_module_model_encoder_weights.py8CODE
LOWtests/training/test_cli.py25CODE
LOWtests/training/test_trainer.py8CODE
LOWtests/training/helpers.py14CODE
LOWtests/training/test_fused_adamw_ema_routing.py8CODE
LOW…ing/callbacks/test_gpu_memory_progress_bar_callback.py8CODE
LOWtests/training/callbacks/test_ema_callback.py8CODE
LOWtests/training/callbacks/test_best_model_callback.py8CODE
LOWtests/training/callbacks/test_drop_path_callback.py8CODE
LOWtests/datasets/test_o365.py13CODE
LOWtests/datasets/test__torchvision.py8CODE
LOWtests/legacy/test_checkpoint_compat.py23CODE
LOWtests/legacy/generate_checkpoint.py36CODE
LOWtests/legacy/test_generate_checkpoint.py13CODE
LOWtests/models/test_transformer_onnx_two_stage.py14CODE
LOWtests/models/test_safe_torch_load.py11CODE
LOWtests/models/_transformer_support.py8CODE
LOWtests/models/test_assignment.py16CODE
LOWtests/models/test_transformer_rewrites.py12CODE
LOWtests/models/test_math.py8CODE
LOWtests/models/test_defaults.py14CODE
LOWtests/models/ops/functions/test_ms_deform_attn_func.py8CODE
LOWtests/models/backbone/test_backbone.py8CODE
LOWtests/models/backbone/test_backbone_registry.py8CODE
LOWtests/models/backbone/test_projector.py8CODE
LOWtests/models/backbone/test_base.py8CODE
LOWtests/visualize/test_training.py8CODE
LOWtests/utilities/test_decorators.py8CODE
LOWtests/utilities/test_imports.py8CODE
LOWtests/utilities/test_logger.py19CODE
LOWtests/inference/test_predict_cuda_transfer.py14CODE
LOWtests/inference/test_model_device_move.py14CODE
LOWtests/inference/test_from_checkpoint.py15CODE
LOWtests/inference/helpers.py14CODE
LOWtests/export/test_onnx_inference.py14CODE
LOWtests/export/test_registry.py13CODE
LOWtests/export/test_coreml_ane.py23CODE
LOWtests/export/test_executorch_coreml.py22CODE
LOWtests/export/conftest.py16CODE
LOWtests/export/test_neural_engine.py8CODE
LOWtests/export/test_tensorrt_int8.py14CODE
LOWtests/export/test_tensorrt_metadata.py14CODE
LOWtests/export/test_runtime_decode.py14CODE
LOWtests/export/test_topk_selection_parity.py22CODE
LOWtests/export/test_openvino_export.py21CODE
LOWtests/export/test_executorch_xnnpack.py8CODE
LOWtests/export/test_litert_sampling.py8CODE
LOWtests/export/test_roboflow_deploy_e2e.py30CODE
LOWtests/export/test_class_layout.py8CODE
LOWtests/export/test_public_facades.py13CODE
LOWtests/export/test_parity_helpers.py13CODE
259 more matches not shown…
Over-Commented Block107 hits · 92 pts
SeverityFileLineSnippetContext
LOWmkdocs.yaml101 edit: material/pencilCOMMENT
LOWpyproject.toml61 # resolves its COCO helpers from a closed backend-name enum that has no hotcoco member. The floor is 1.2.1.COMMENT
LOWpyproject.toml81 # The ceiling keeps the parity-tested 0.1 line until the next series is verified against the adapter. TheCOMMENT
LOWpyproject.toml161executorch = [COMMENT
LOWpyproject.toml181]COMMENT
LOWpyproject.toml221# cannot express "equal minor", so we pin BOTH to the current known-good pair (2.9) — bump the twoCOMMENT
LOWpyproject.toml481 "e2e_roboflow: live deploy_to_roboflow() upload + train-status validation (issue #1116); requires ROBOFLOW_API_KEY (COMMENT
LOWtests/__init__.py1# ------------------------------------------------------------------------COMMENT
LOWtests/training/__init__.py1# ------------------------------------------------------------------------COMMENT
LOWtests/training/callbacks/__init__.py1# ------------------------------------------------------------------------COMMENT
LOWtests/datasets/__init__.py1# ------------------------------------------------------------------------COMMENT
LOWtests/legacy/__init__.py1# ------------------------------------------------------------------------COMMENT
LOWtests/legacy/checkpoint_versions.txt1# RF-DETR versions to include in backward-compatibility checkpoint matrix.COMMENT
LOWtests/legacy/frozen_dependencies/req-1.7.txt1# Frozen dependency set for generating the rfdetr~=1.7.0 legacy checkpointCOMMENT
LOWtests/legacy/frozen_dependencies/req-1.6.txt1# Frozen dependency set for generating the rfdetr~=1.6.0 legacy checkpointCOMMENT
LOWtests/legacy/frozen_dependencies/req-1.4.txt1# Frozen dependency set for generating the rfdetr~=1.4.0 legacy checkpointCOMMENT
LOWtests/legacy/frozen_dependencies/req-1.5.txt1# Frozen dependency set for generating the rfdetr~=1.5.0 legacy checkpointCOMMENT
LOWtests/legacy/frozen_dependencies/req-1.8.txt1# Frozen dependency set for generating the rfdetr~=1.8.0 legacy checkpointCOMMENT
LOWtests/models/__init__.py1# ------------------------------------------------------------------------COMMENT
LOWtests/models/heads/__init__.py1# ------------------------------------------------------------------------COMMENT
LOWtests/models/ops/__init__.py1# ------------------------------------------------------------------------COMMENT
LOWtests/models/ops/functions/__init__.py1# ------------------------------------------------------------------------COMMENT
LOWtests/models/backbone/__init__.py1# ------------------------------------------------------------------------COMMENT
LOWtests/cli/__init__.py1# ------------------------------------------------------------------------COMMENT
LOWtests/utilities/__init__.py1# ------------------------------------------------------------------------COMMENT
LOWtests/inference/__init__.py1# ------------------------------------------------------------------------COMMENT
LOWtests/evaluation/__init__.py1# ------------------------------------------------------------------------COMMENT
LOWtests/export/__init__.py1# ------------------------------------------------------------------------COMMENT
LOWtests/export/test_coreml_export.py761 # Keypoints are preview-only and therefore XLarge at resolution 576 — several times the work of theCOMMENT
LOWtests/assets/__init__.py1# ------------------------------------------------------------------------COMMENT
LOW.github/workflows/ci-integrations.yml61 # list/`.`, and the SAME job timeout, so a format silently drifting onto too-narrow a testCOMMENT
LOW.github/workflows/ci-integrations.yml81 format: ["openvino", "litert", "onnx"]COMMENT
LOW.github/workflows/ci-tests-xla.yml1name: XLA tests WorkflowCOMMENT
LOW.github/workflows/publish-docs.yml1# Build and deploy MkDocs documentation to GitHub Pages (https://rfdetr.roboflow.com/)COMMENT
LOWsrc/rfdetr/detr.py501#: that two threads reaching a never-moved module together cannot create two different locks over its storage.COMMENT
LOWsrc/rfdetr/detr.py601 if isinstance(target, str):COMMENT
LOWsrc/rfdetr/detr.py1141 # "" — pretrain_weights key absent entirelyCOMMENT
LOWsrc/rfdetr/detr.py1341 _inferred_nc,COMMENT
LOWsrc/rfdetr/detr.py1501 self._align_keypoint_schema_from_dataset(config)COMMENT
LOWsrc/rfdetr/detr.py1621 # metadata, and per-callback state only when the resumed callback configurationCOMMENT
LOWsrc/rfdetr/detr.py2621 # The request holds up; now the host must too. A missing install is refused here rather than inside theCOMMENT
LOWsrc/rfdetr/detr.py3301 if not isinstance(images, (list, tuple)):COMMENT
LOWsrc/rfdetr/detr.py3381 # ``.copy()``, not ``np.ascontiguousarray``: NumPy ignores the stride of a length-1 axis whenCOMMENT
LOWsrc/rfdetr/detr.py3621 # by far the largest of the group in a crowded/high-detection-count frame).COMMENT
LOWsrc/rfdetr/config.py1241 # Gradient accumulation is an explicit opt-in, not a silent default: max out batch_size for the GPU firstCOMMENT
LOWsrc/rfdetr/config.py1301 multi_scale: MultiScale = MultiScale.PER_BATCHCOMMENT
LOWsrc/rfdetr/config.py1501 # device is intentionally absent: PTL auto-detects accelerator via Trainer(accelerator="auto").COMMENT
LOWsrc/rfdetr/training/coco_map.py501 # vernier evaluates on its own API, reaching neither the COCO dataset and evaluator surfaces norCOMMENT
LOWsrc/rfdetr/training/module_data.py401 # a machine without CUDA/kornia would strip CPU Normalize from datasetsCOMMENT
LOWsrc/rfdetr/training/module_model.py401 # Manual optimization is enabled only for keypoint models so that the box-countCOMMENT
LOWsrc/rfdetr/training/module_model.py421 # loss; emitted from on_validation_epoch_start on the first real (non-sanity) validation epoch only.COMMENT
LOWsrc/rfdetr/training/module_model.py501 # (a validation batch of another shape recompiles once). PositionalCOMMENT
LOWsrc/rfdetr/training/module_model.py541 logger.warning(COMMENT
LOWsrc/rfdetr/training/module_model.py1621 else:COMMENT
LOWsrc/rfdetr/training/trainer.py61COMMENT
LOWsrc/rfdetr/training/trainer.py601 # into the required XLA plugin after applying caller-provided Trainer arguments. UsesCOMMENT
LOWsrc/rfdetr/training/trainer.py641 if tpu_accelerator and amp_dtype in {"bf16", "auto"}:COMMENT
LOWsrc/rfdetr/training/trainer.py661 # no GradScaler.scale/unscale/update overhead per optimizer step.COMMENT
LOWsrc/rfdetr/training/trainer.py781 )COMMENT
LOWsrc/rfdetr/training/trainer.py821 # step on 2x L4/NCCL (5 runs, real detection model, find_unused_parameters=True kept alongsideCOMMENT
47 more matches not shown…
Hallucination Indicators7 hits · 90 pts
SeverityFileLineSnippetContext
CRITICALtests/training/callbacks/test_ema_callback.py387 cb._average_model.module.model.weight.fill_(5.0)CODE
CRITICALtests/training/callbacks/test_ema_callback.py413 source_callback._average_model.module.model.weight.fill_(5.0)CODE
CRITICALtests/training/callbacks/test_ema_callback.py444 cb._average_model.module.model.weight.fill_(5.0)CODE
CRITICAL⚡tests/models/backbone/test_windowed_dino.py494 before = [layer.attention.attention.query.weight.clone() for layer in model.encoder.layer]CODE
CRITICAL⚡tests/models/backbone/test_windowed_dino.py509 key_before = [layer.attention.attention.key.weight.clone() for layer in model.encoder.layer]CODE
CRITICAL⚡tests/models/backbone/test_windowed_dino.py510 val_before = [layer.attention.attention.value.weight.clone() for layer in model.encoder.layer]CODE
CRITICAL⚡tests/models/backbone/test_windowed_dino.py527 dense_before = [layer.attention.output.dense.weight.clone() for layer in model.encoder.layer]CODE
Modern Structural Boilerplate53 hits · 58 pts
SeverityFileLineSnippetContext
LOWtests/training/test_detr_shim.py1484 def _set_class_names(mock_self: MagicMock, class_names: list[str]) -> None:CODE
LOW⚡tests/training/test_module_model.py340 def update_drop_path(self, *args, **kwargs) -> None:CODE
LOW⚡tests/training/test_module_model.py343 def update_dropout(self, *args, **kwargs) -> None:CODE
LOW⚡tests/training/test_build_trainer.py1296 def update_drop_path(self, *args, **kwargs) -> None:CODE
LOW⚡tests/training/test_build_trainer.py1299 def update_dropout(self, *args, **kwargs) -> None:CODE
LOW⚡tests/training/helpers.py35 def update_drop_path(self, *args, **kwargs) -> None:CODE
LOW⚡tests/training/helpers.py38 def update_dropout(self, *args, **kwargs) -> None:CODE
LOWtests/training/callbacks/test_ema_callback.py58 def set_extra_state(self, state: object) -> None:CODE
LOWtests/training/callbacks/test_best_model_callback.py3003 def set_extra_state(self, state: object) -> None:CODE
LOWtests/inference/test_trt_inference.py571 def set_stream(self, stream: object) -> None:CODE
LOWtests/export/test_benchmark_coco.py84def _set_image_field(annotations_path: Path, image_id: int, key: str, value: str) -> None:CODE
LOWtests/export/test_prepare.py167 def set_export_shape(self, shape: tuple[int, int]) -> None:CODE
LOWsrc/rfdetr/detr.py379__all__ = ["RFDETR", "ModelContext", *_VARIANT_EXPORTS]CODE
LOWsrc/rfdetr/config.py38__all__ = [CODE
LOW⚡src/rfdetr/variants.py15__all__ = [CODE
LOWsrc/rfdetr/__init__.py64__all__ = [CODE
LOW⚡src/rfdetr/inference.py10__all__ = ["ModelContext"]CODE
LOWsrc/rfdetr/training/module_data.py952 def _setup_kornia_pipeline(self) -> None:CODE
LOWsrc/rfdetr/training/fused_adamw_ema.py110 def set_max_grad_norm(self, value: float | None) -> None:CODE
LOWsrc/rfdetr/training/checkpoint.py29logger = logging.getLogger(__name__)CODE
LOWsrc/rfdetr/training/checkpoint.py31__all__ = ["convert_legacy_checkpoint"]CODE
LOWsrc/rfdetr/training/model_ema.py184__all__ = [CODE
LOWsrc/rfdetr/training/__init__.py36__all__ = [CODE
LOWsrc/rfdetr/training/callbacks/ema.py357 def _update_ema_for_step(self, pl_module: LightningModule, global_step: int) -> None:CODE
LOWsrc/rfdetr/training/callbacks/__init__.py17__all__ = [CODE
LOWsrc/rfdetr/training/callbacks/coco_eval.py1253 def _update_keypoint_oks_metric(self, trainer: Any, outputs: Mapping[str, Any], split: str) -> None:CODE
LOWsrc/rfdetr/datasets/aug_config.py32__all__ = [CODE
LOWsrc/rfdetr/datasets/_keypoint_schema.py21__all__ = [CODE
LOW⚡src/rfdetr/models/__init__.py24__all__ = [CODE
LOWsrc/rfdetr/models/weights.py41__all__ = ["load_pretrain_weights", "apply_lora", "interpolate_position_embeddings"]CODE
LOWsrc/rfdetr/models/lwdetr.py778 def update_drop_path(self, drop_path_rate: float, vit_encoder_num_layers: int) -> None:CODE
LOWsrc/rfdetr/models/lwdetr.py809 def update_dropout(self, drop_rate: float) -> None:CODE
LOW⚡src/rfdetr/models/heads/__init__.py11__all__ = [CODE
LOWsrc/rfdetr/models/heads/keypoints.py601__all__ = [CODE
LOW⚡src/rfdetr/models/ops/functions/__init__.py18__all__ = [CODE
LOW⚡src/rfdetr/models/ops/modules/__init__.py15__all__ = [CODE
LOWsrc/rfdetr/models/backbone/dinov2_with_windowed_attn.py975 def set_attn_implementation(self, attn_implementation: str) -> None: # type: ignore[override]STRING
LOWsrc/rfdetr/models/backbone/dinov2_with_windowed_attn.py1376__all__ = [STRING
LOWsrc/rfdetr/models/backbone/backbone.py33__all__ = ["Backbone"]CODE
LOW⚡src/rfdetr/cli/__init__.py12__all__ = ["main"]CODE
LOW⚡src/rfdetr/visualize/__init__.py11__all__ = [CODE
LOW⚡src/rfdetr/utilities/compiler.py12__all__ = ["cuda_autocast_dtype", "is_compiling", "is_tracing"]CODE
LOWsrc/rfdetr/utilities/__init__.py35__all__ = [CODE
LOW⚡src/rfdetr/utilities/keypoints.py15__all__ = [CODE
LOW⚡src/rfdetr/utilities/decorators.py14__all__ = ["TargetMode", "deprecated", "void"]CODE
LOW⚡src/rfdetr/evaluation/__init__.py14__all__ = [CODE
LOWsrc/rfdetr/export/benchmark.py37__all__ = ["BenchmarkResult", "MemoryResult", "measure_latency", "measure_memory"]CODE
LOWsrc/rfdetr/export/prepare.py83 def set_export_shape(self, shape: tuple[int, int]) -> None:CODE
LOWsrc/rfdetr/export/_openvino/__init__.py16__all__ = ["_IS_OPENVINO_AVAILABLE"]CODE
LOWsrc/rfdetr/export/_litert/__init__.py16__all__ = ["_IS_LITERT_AVAILABLE"]CODE
LOWsrc/rfdetr/export/_tflite/__init__.py16__all__ = ["TFLiteExporter", "_IS_ONNX2TF_AVAILABLE"]CODE
LOWsrc/rfdetr/export/_executorch/__init__.py19__all__ = ["ExecuTorchExporter"]CODE
LOW⚡src/rfdetr/assets/__init__.py14__all__ = [CODE
Empty Error Handlers12 hits · 58 pts
SeverityFileLineSnippetContext
HIGHtests/models/conftest.py25except AttributeError:CODE
HIGHtests/export/test_executorch_export.py219except Exception:CODE
HIGHtests/export/test_executorch_export.py231except Exception:CODE
HIGHtests/export/test_tflite_export.py827except RuntimeError:CODE
HIGHtests/export/test_tflite_export.py912except RuntimeError:CODE
HIGHsrc/rfdetr/detr.py69except Exception:CODE
HIGHsrc/rfdetr/detr.py2814except WebDatasetSplitUnavailableError:CODE
HIGHsrc/rfdetr/training/module_model.py814except RuntimeError:CODE
HIGHsrc/rfdetr/utilities/files.py105except FileNotFoundError:CODE
HIGHsrc/rfdetr/utilities/io.py75except (RuntimeError, pickle.UnpicklingError):CODE
HIGHsrc/rfdetr/utilities/io.py88except (RuntimeError, pickle.UnpicklingError):CODE
HIGHsrc/rfdetr/export/_executorch/exporter.py160except importlib.metadata.PackageNotFoundError:CODE
Deep Nesting67 hits · 48 pts
SeverityFileLineSnippetContext
LOWtests/run_smoke_all_models.py230CODE
LOWtests/training/test_coco_map.py1741CODE
LOWtests/training/test_detr_shim.py835CODE
LOWtests/training/test_coco_map_masks.py53CODE
LOWtests/training/test_fused_adamw_ema.py256CODE
LOWtests/training/test_cuda_graph_step.py278CODE
LOWtests/models/test_criterion.py180CODE
LOWtests/models/test_transformer.py1889CODE
LOWtests/models/test_transformer.py1926CODE
LOWtests/models/test_transformer.py3091CODE
LOWtests/models/test_transformer.py3373CODE
LOWtests/export/test_tensorrt_int8.py1769CODE
LOWtests/export/test_export.py2529CODE
LOWsrc/rfdetr/detr.py649CODE
LOWsrc/rfdetr/detr.py783CODE
LOWsrc/rfdetr/detr.py926CODE
LOWsrc/rfdetr/detr.py1435CODE
LOWsrc/rfdetr/detr.py1729CODE
LOWsrc/rfdetr/detr.py1889CODE
LOWsrc/rfdetr/detr.py2986CODE
LOWsrc/rfdetr/detr.py3165CODE
LOWsrc/rfdetr/config.py232CODE
LOWsrc/rfdetr/config.py792CODE
LOWsrc/rfdetr/training/module_data.py377CODE
LOWsrc/rfdetr/training/module_data.py1114CODE
LOWsrc/rfdetr/training/module_model.py676CODE
LOWsrc/rfdetr/training/module_model.py1556CODE
LOWsrc/rfdetr/training/module_model.py1776CODE
LOWsrc/rfdetr/training/module_model.py1878CODE
LOWsrc/rfdetr/training/param_groups.py203CODE
LOWsrc/rfdetr/training/param_groups.py259CODE
LOWsrc/rfdetr/training/trainer.py537CODE
LOWsrc/rfdetr/training/trainer.py629CODE
LOWsrc/rfdetr/training/auto_batch.py552CODE
LOWsrc/rfdetr/training/callbacks/best_model.py174CODE
LOWsrc/rfdetr/datasets/coco.py647CODE
LOWsrc/rfdetr/datasets/coco.py775CODE
LOWsrc/rfdetr/datasets/transforms.py443CODE
LOWsrc/rfdetr/datasets/transforms.py802CODE
LOWsrc/rfdetr/datasets/transforms.py831CODE
LOWsrc/rfdetr/datasets/kornia_transforms.py313CODE
LOWsrc/rfdetr/datasets/yolo.py351CODE
LOWsrc/rfdetr/datasets/_develop.py209CODE
LOWsrc/rfdetr/datasets/_develop.py258CODE
LOWsrc/rfdetr/datasets/webdataset/load.py533CODE
LOWsrc/rfdetr/models/matcher.py911CODE
LOWsrc/rfdetr/models/postprocess.py173CODE
LOWsrc/rfdetr/models/transformer.py886CODE
LOWsrc/rfdetr/models/transformer.py1291CODE
LOWsrc/rfdetr/models/transformer.py1646CODE
LOWsrc/rfdetr/models/criterion.py617CODE
LOWsrc/rfdetr/models/weights.py315CODE
LOWsrc/rfdetr/models/backbone/dinov2_with_windowed_attn.py1146CODE
LOWsrc/rfdetr/models/backbone/dinov2_with_windowed_attn.py1271CODE
LOWsrc/rfdetr/models/backbone/projector.py197CODE
LOWsrc/rfdetr/visualize/training.py90CODE
LOWsrc/rfdetr/utilities/files.py145CODE
LOWsrc/rfdetr/utilities/tensors.py437CODE
LOWsrc/rfdetr/evaluation/coco_eval.py441CODE
LOWsrc/rfdetr/evaluation/matching.py262CODE
7 more matches not shown…
Cross-File Repetition6 hits · 30 pts
SeverityFileLineSnippetContext
HIGHtests/export/test_onnx_preprocess_parity.py0mirror of the pytorch predict() preprocessing: to_tensor -> resize(antialias=false) -> normalize. examples: >>> import nSTRING
HIGHtests/export/test_infer_preprocess_parity.py0mirror of the pytorch predict() preprocessing: to_tensor -> resize(antialias=false) -> normalize. examples: >>> import nSTRING
HIGHtests/export/test_tflite_inference_parity.py0mirror of the pytorch predict() preprocessing: to_tensor -> resize(antialias=false) -> normalize. examples: >>> import nSTRING
HIGHtests/export/test_onnx_preprocess_parity.py0deterministic synthetic rgb image with structure (not pure noise) so resize filtering matters. examples: >>> img = _makeSTRING
HIGHtests/export/test_infer_preprocess_parity.py0deterministic synthetic rgb image with structure (not pure noise) so resize filtering matters. examples: >>> img = _makeSTRING
HIGHtests/export/test_tflite_inference_parity.py0deterministic synthetic rgb image with structure (not pure noise) so resize filtering matters. examples: >>> img = _makeSTRING
Excessive Try-Catch Wrapping31 hits · 25 pts
SeverityFileLineSnippetContext
LOWtests/run_smoke_all_models.py275 except Exception as ex:CODE
LOWtests/conftest.py48 except Exception as exc:CODE
LOWtests/legacy/generate_checkpoint.py292 except Exception as exc:CODE
LOW⚡tests/export/test_executorch_export.py219 except Exception:CODE
LOW⚡tests/export/test_executorch_export.py231 except Exception:CODE
LOWtests/export/test_coreml_op_coverage.py166 except Exception:CODE
LOWtests/export/test_coreml_op_coverage.py198 except Exception:CODE
LOWsrc/rfdetr/detr.py69except Exception:CODE
LOWsrc/rfdetr/detr.py287 except Exception as exc:CODE
LOWsrc/rfdetr/detr.py835 except Exception:CODE
LOWsrc/rfdetr/detr.py1604 except Exception:CODE
LOWsrc/rfdetr/detr.py2091 except Exception:CODE
LOWsrc/rfdetr/training/checkpoint.py51 except Exception:CODE
LOWsrc/rfdetr/training/checkpoint.py95 except Exception:CODE
LOWsrc/rfdetr/training/cuda_graph_step.py182 except Exception as exc:CODE
LOWsrc/rfdetr/training/trainer.py616 except Exception: # defensive parity with the rfdetr.detr import-time guardCODE
LOWsrc/rfdetr/datasets/transforms.py1189 except Exception as e:CODE
LOWsrc/rfdetr/models/weights.py382 except Exception:CODE
LOWsrc/rfdetr/utilities/files.py192 except Exception:CODE
LOWsrc/rfdetr/utilities/files.py208 except Exception:CODE
LOWsrc/rfdetr/export/_openvino/exporter.py308 except Exception as e:CODE
LOWsrc/rfdetr/export/_coreml/exporter.py376 except Exception as exc:CODE
LOWsrc/rfdetr/export/_coreml/op_coverage.py41 except Exception:CODE
LOWsrc/rfdetr/export/_coreai/exporter.py278 except Exception as exc:CODE
LOWsrc/rfdetr/export/_litert/exporter.py266 except Exception as e:CODE
LOWsrc/rfdetr/export/_tensorrt/exporter.py661 except Exception:CODE
LOWsrc/rfdetr/export/_tensorrt/exporter.py1627 except Exception:CODE
LOWsrc/rfdetr/export/_tflite/exporter.py486 except Exception as exc:CODE
LOWsrc/rfdetr/export/_tflite/exporter.py750 except Exception:CODE
LOWsrc/rfdetr/export/_tflite/exporter.py1254 except Exception as exc:CODE
LOWsrc/rfdetr/export/_executorch/exporter.py547 except Exception as exc:CODE
Magic Placeholder Names5 hits · 25 pts
SeverityFileLineSnippetContext
HIGHdocs/learn/deploy.md29 api_key="<YOUR_API_KEY>",CODE
HIGHdocs/learn/deploy.md29 api_key="<YOUR_API_KEY>",CODE
HIGHdocs/learn/deploy.md42 api_key="<YOUR_API_KEY>",CODE
HIGHdocs/learn/deploy.md42 api_key="<YOUR_API_KEY>",CODE
HIGHdocs/root-static/llms-full.txt255 api_key="YOUR_API_KEY"CODE
Self-Referential Comments8 hits · 22 pts
SeverityFileLineSnippetContext
MEDIUM⚡tests/training/callbacks/test_coco_eval_callback.py964 # Create a fake callback whose class name is RichProgressBar soCOMMENT
MEDIUMtests/assets/test_downloads.py192 # Create a mock asset without MD5COMMENT
MEDIUMtests/assets/test_downloads.py206 # Create a mock asset without MD5COMMENT
MEDIUMsrc/rfdetr/datasets/yolo.py1039 >>> # Create a sample image and targetSTRING
MEDIUMsrc/rfdetr/models/backbone/dinov2.py127 # Create the encoderCOMMENT
MEDIUMsrc/rfdetr/models/backbone/dinov2.py255 # Create a new Parameter with the new sizeCOMMENT
MEDIUMsrc/rfdetr/models/backbone/projector.py192 """This module implements MultiScaleProjector in :paper:`lwdetr`.STRING
MEDIUMsrc/rfdetr/utilities/state_dict.py220 # Create the temp file in the destination directory so os.replace stays on the same filesystem (atomic).COMMENT
Cross-Language Confusion5 hits · 18 pts
SeverityFileLineSnippetContext
HIGH⚡tests/training/test_detr_shim.py2814 """An index the reader rejects (ValueError from ShardIndex.from_json) degrades to null, never an exception."""STRING
HIGH⚡tests/training/test_detr_shim.py2846 """A bg-first keypoint run killed in fit() leaves class_names null, not the detection-basis ['person']."""STRING
HIGH⚡tests/inference/test_trt_inference.py1604 old ones, which TensorRT leaves undefined; that includes what ``dynamic_batch=True`` exports.STRING
HIGH⚡tests/export/test_tensorrt_export.py3362 between replays, which TensorRT leaves undefined, so the real engine's profile must be read as varying.STRING
HIGHsrc/rfdetr/export/_litert/sampling.py62 Coordinates must be finite: for a NaN coordinate the result is undefined, and the ``.tflite`` may failSTRING
Structural Annotation Overuse9 hits · 17 pts
SeverityFileLineSnippetContext
LOW⚡tests/inference/test_trt_inference.py913 # Step 2: batch 1 -- the smallest legal batch, right after the largest.COMMENT
LOW⚡tests/inference/test_trt_inference.py920 # Step 3: batch 3 -- a third, different size, still on the same runtime object.COMMENT
LOWtests/inference/test_trt_inference.py902 # Step 1: batch 4 -- fills the whole profile-max buffer. ``execute_v2`` reports launch success as a boolCOMMENT
LOWdocs/learn/how-it-works.md57### Step 1: from pixels to tokensCOMMENT
LOWdocs/learn/how-it-works.md72### Step 2: a backbone that already knows what things look likeCOMMENT
LOW⚡docs/learn/how-it-works.md88### Step 3: the projectorCOMMENT
LOW⚡docs/learn/how-it-works.md97### Step 4: choosing where to lookCOMMENT
LOW⚡docs/learn/how-it-works.md103### Step 5: the decoder, where queries look and negotiateCOMMENT
LOWdocs/learn/how-it-works.md117### Step 6: reading the answerCOMMENT
Example Usage Blocks11 hits · 16 pts
SeverityFileLineSnippetContext
LOWconfigs/rfdetr_seg_small.yaml2# Usage:COMMENT
LOWconfigs/rfdetr_seg_2xlarge.yaml2# Usage:COMMENT
LOWconfigs/rfdetr_seg_large.yaml2# Usage:COMMENT
LOWconfigs/rfdetr_seg_nano.yaml2# Usage:COMMENT
LOWconfigs/rfdetr_seg_xlarge.yaml2# Usage:COMMENT
LOWconfigs/rfdetr_base.yaml2# Usage:COMMENT
LOWconfigs/rfdetr_medium.yaml2# Usage:COMMENT
LOWconfigs/rfdetr_seg_medium.yaml2# Usage:COMMENT
LOWconfigs/rfdetr_small.yaml2# Usage:COMMENT
LOWconfigs/rfdetr_nano.yaml2# Usage:COMMENT
LOWconfigs/rfdetr_large.yaml2# Usage:COMMENT
AI Structural Patterns21 hits · 15 pts
SeverityFileLineSnippetContext
LOWtests/training/test_cuda_graph_te.py73CODE
LOWtests/inference/helpers.py52CODE
LOWsrc/rfdetr/detr.py2196CODE
LOWsrc/rfdetr/training/coco_map.py749CODE
LOWsrc/rfdetr/training/auto_batch.py339CODE
LOWsrc/rfdetr/training/callbacks/coco_eval.py206CODE
LOWsrc/rfdetr/datasets/coco.py1223CODE
LOWsrc/rfdetr/datasets/coco.py1332CODE
LOWsrc/rfdetr/datasets/webdataset/load.py533CODE
LOWsrc/rfdetr/models/matcher.py134CODE
LOWsrc/rfdetr/models/transformer.py524CODE
LOWsrc/rfdetr/models/transformer.py1251CODE
LOWsrc/rfdetr/models/transformer.py1331CODE
LOWsrc/rfdetr/models/transformer.py1514CODE
LOWsrc/rfdetr/models/transformer.py1748CODE
LOWsrc/rfdetr/models/transformer.py1930CODE
LOWsrc/rfdetr/models/lwdetr.py121CODE
LOWsrc/rfdetr/models/backbone/dinov2_with_windowed_attn.py682CODE
LOWsrc/rfdetr/models/backbone/dinov2_with_windowed_attn.py235CODE
LOWsrc/rfdetr/models/backbone/dinov2.py101CODE
LOWsrc/rfdetr/models/backbone/backbone.py39CODE
AI Slop Vocabulary5 hits · 10 pts
SeverityFileLineSnippetContext
LOW⚡tests/training/test_drop_path.py140 # Should not raise an error, just return earlyCOMMENT
MEDIUMtests/inference/test_predict.py2675 """``predict()`` URL handling: robust HTTP fetch and correct local-path classification."""STRING
MEDIUMtests/export/test_executorch_export.py931# random weights); the bound keeps modest headroom, robust to BLAS/XNNPACK build differences while stillCOMMENT
MEDIUMsrc/rfdetr/export/_onnx/inference.py165 # Match by name so the code is robust to output reordering.COMMENT
MEDIUMsrc/rfdetr/export/_tflite/inference.py213 # Match by name so the code is robust to onnx2tf output reordering.COMMENT
Verbosity Indicators3 hits · 6 pts
SeverityFileLineSnippetContext
LOW⚡tests/inference/test_trt_inference.py913 # Step 2: batch 1 -- the smallest legal batch, right after the largest.COMMENT
LOW⚡tests/inference/test_trt_inference.py920 # Step 3: batch 3 -- a third, different size, still on the same runtime object.COMMENT
LOWtests/inference/test_trt_inference.py902 # Step 1: batch 4 -- fills the whole profile-max buffer. ``execute_v2`` reports launch success as a boolCOMMENT
Fake / Example Data9 hits · 4 pts
SeverityFileLineSnippetContext
LOWtests/training/test_detr_shim.py1517 api_key="dummy-key",CODE
LOWtests/training/test_detr_shim.py1550 api_key="dummy-key",CODE
LOWtests/training/test_detr_shim.py1582 api_key="dummy-key",CODE
LOWtests/training/test_detr_shim.py1610 api_key="dummy-key",CODE
LOWtests/training/test_detr_shim.py1636 api_key="dummy-key",CODE
LOWtests/training/test_detr_shim.py1663 api_key="dummy-key",CODE
LOWtests/training/test_detr_shim.py1682 api_key="dummy-key",CODE
LOWtests/training/test_detr_shim.py1742 api_key="dummy-key",CODE
LOWtests/training/test_detr_shim.py1921 load_classes_patch = patch.object(RFDETR, "_load_classes", return_value=["placeholder"])CODE
Modern AI Meta-Vocabulary1 hit · 4 pts
SeverityFileLineSnippetContext
MEDIUM⚡tests/export/test_export.py1143 # patch_size=14, num_windows=3 → block_size=42; scaffold sets resolution=84 (42*2) which is validCOMMENT
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOWsrc/rfdetr/assets/model_weights.py430 # Check if we have a hash for this modelCOMMENT
Dead Code1 hit · 1 pts
SeverityFileLineSnippetContext
MEDIUMsrc/rfdetr/export/_tensorrt/exporter.py1424CODE