AI Slop Code RIsk Monitor

facebookresearch/detectron2

Detectron2 is a platform for object detection, segmentation and other visual recognition tasks.

20.6 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for facebookresearch/detectron2, a Python project with 34,879 GitHub stars. SynthScan examined 90,817 lines of code across 793 source files, recording 1407 pattern matches distributed across 21 syntactic categories. The legacy adjusted pattern signal is 20.6 (Elevated 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.

20.6
Adjusted Signal
20.6
Raw Pattern Score
100%
Time Factor
2026-09-30
Last Push
34.9K
Stars
Python
Language
90.8K
Lines of Code
793
Files
1.4K
Pattern Hits
2026-10-12
Scan Date
0.11
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 28.9/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 27.8/100 · MEDIUM

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

Agent Over-Engineering Ratio 45.1/100 · MEDIUM

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

PR Review Velocity Impact 65.7/100 · HIGH

Which changes need focused human review? 1407 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 3HIGH 87MEDIUM 37LOW 1280

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 1407 distinct pattern matches across 21 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.

Unused Imports575 hits · 554 pts
SeverityFileLineSnippetContext
LOW…ojects/MViTv2/configs/cascade_mask_rcnn_mvitv2_s_3x.py1CODE
LOW…ojects/MViTv2/configs/cascade_mask_rcnn_mvitv2_s_3x.py1CODE
LOW…ojects/MViTv2/configs/cascade_mask_rcnn_mvitv2_s_3x.py1CODE
LOW…ojects/MViTv2/configs/cascade_mask_rcnn_mvitv2_t_3x.py8CODE
LOW…ojects/MViTv2/configs/cascade_mask_rcnn_mvitv2_t_3x.py8CODE
LOW…ojects/MViTv2/configs/cascade_mask_rcnn_mvitv2_t_3x.py8CODE
LOW…ojects/MViTv2/configs/cascade_mask_rcnn_mvitv2_t_3x.py8CODE
LOW…/MViTv2/configs/cascade_mask_rcnn_mvitv2_b_in21k_3x.py1CODE
LOW…/MViTv2/configs/cascade_mask_rcnn_mvitv2_b_in21k_3x.py1CODE
LOW…/MViTv2/configs/cascade_mask_rcnn_mvitv2_b_in21k_3x.py1CODE
LOW…/MViTv2/configs/cascade_mask_rcnn_mvitv2_b_in21k_3x.py1CODE
LOW…Tv2/configs/cascade_mask_rcnn_mvitv2_h_in21k_lsj_3x.py1CODE
LOW…Tv2/configs/cascade_mask_rcnn_mvitv2_h_in21k_lsj_3x.py1CODE
LOW…Tv2/configs/cascade_mask_rcnn_mvitv2_h_in21k_lsj_3x.py2CODE
LOW…2/configs/cascade_mask_rcnn_mvitv2_l_in21k_lsj_50ep.py7CODE
LOW…ojects/MViTv2/configs/cascade_mask_rcnn_mvitv2_b_3x.py1CODE
LOW…ojects/MViTv2/configs/cascade_mask_rcnn_mvitv2_b_3x.py1CODE
LOW…ojects/MViTv2/configs/cascade_mask_rcnn_mvitv2_b_3x.py1CODE
LOWprojects/MViTv2/configs/common/coco_loader_lsj.py2CODE
LOWprojects/TridentNet/tridentnet/__init__.py2CODE
LOWprojects/TridentNet/tridentnet/__init__.py3CODE
LOWprojects/TridentNet/tridentnet/__init__.py3CODE
LOWprojects/TridentNet/tridentnet/__init__.py3CODE
LOWprojects/TridentNet/tridentnet/__init__.py8CODE
LOWprojects/TridentNet/tridentnet/__init__.py9CODE
LOWprojects/TridentNet/tridentnet/__init__.py9CODE
LOWprojects/DensePose/setup.py6CODE
LOWprojects/DensePose/densepose/__init__.py4CODE
LOWprojects/DensePose/densepose/__init__.py5CODE
LOWprojects/DensePose/densepose/__init__.py6CODE
LOWprojects/DensePose/densepose/__init__.py6CODE
LOWprojects/DensePose/densepose/__init__.py6CODE
LOWprojects/DensePose/densepose/__init__.py6CODE
LOWprojects/DensePose/densepose/__init__.py6CODE
LOWprojects/DensePose/densepose/__init__.py6CODE
LOWprojects/DensePose/densepose/__init__.py14CODE
LOWprojects/DensePose/densepose/__init__.py14CODE
LOWprojects/DensePose/densepose/__init__.py14CODE
LOWprojects/DensePose/densepose/__init__.py15CODE
LOWprojects/DensePose/densepose/__init__.py16CODE
LOWprojects/DensePose/densepose/__init__.py17CODE
LOWprojects/DensePose/densepose/__init__.py17CODE
LOWprojects/DensePose/densepose/__init__.py21CODE
LOWprojects/DensePose/densepose/__init__.py22CODE
LOWprojects/DensePose/densepose/structures/__init__.py5CODE
LOWprojects/DensePose/densepose/structures/__init__.py6CODE
LOWprojects/DensePose/densepose/structures/__init__.py7CODE
LOWprojects/DensePose/densepose/structures/__init__.py8CODE
LOWprojects/DensePose/densepose/structures/__init__.py8CODE
LOWprojects/DensePose/densepose/structures/__init__.py8CODE
LOWprojects/DensePose/densepose/structures/__init__.py8CODE
LOWprojects/DensePose/densepose/structures/__init__.py8CODE
LOWprojects/DensePose/densepose/structures/__init__.py15CODE
LOWprojects/DensePose/densepose/structures/__init__.py16CODE
LOWprojects/DensePose/densepose/structures/__init__.py17CODE
LOWprojects/DensePose/densepose/structures/__init__.py18CODE
LOWprojects/DensePose/densepose/structures/__init__.py18CODE
LOWprojects/DensePose/densepose/structures/__init__.py19CODE
LOWprojects/DensePose/densepose/structures/__init__.py19CODE
LOWprojects/DensePose/densepose/converters/__init__.py5CODE
515 more matches not shown…
Hyper-Verbose Identifiers370 hits · 382 pts
SeverityFileLineSnippetContext
LOWtools/lightning_train_net.py124 def _process_dataset_evaluation_results(self) -> OrderedDict:CODE
LOW⚡tools/lightning_train_net.py135 def _reset_dataset_evaluators(self):CODE
LOW⚡tools/lightning_train_net.py142 def on_validation_epoch_start(self, _outputs):CODE
LOWprojects/TridentNet/tridentnet/trident_backbone.py129def build_trident_resnet_backbone(cfg, input_shape):CODE
LOWprojects/DensePose/query_db.py199 def _extract_data_for_visualizers_from_entry(STRING
LOWprojects/DensePose/densepose/config.py8def add_dataset_category_config(cfg: CN) -> None:CODE
LOWprojects/DensePose/densepose/config.py59def get_bootstrap_dataset_config() -> CN:CODE
LOWprojects/DensePose/densepose/config.py105def add_densepose_head_cse_config(cfg: CN) -> None:CODE
LOWprojects/DensePose/densepose/config.py158def add_densepose_head_config(cfg: CN) -> None:CODE
LOW…ojects/DensePose/densepose/structures/data_relative.py92 def extract_segmentation_mask(annotation):CODE
LOW…cts/DensePose/densepose/structures/chart_confidence.py12def decorate_predictor_output_class_with_confidences(BasePredictorOutput: type) -> type:CODE
LOWprojects/DensePose/densepose/structures/chart_result.py122def quantize_densepose_chart_result(result: DensePoseChartResult) -> DensePoseChartResultQuantized:CODE
LOWprojects/DensePose/densepose/structures/chart_result.py138def compress_quantized_densepose_chart_result(CODE
LOWprojects/DensePose/densepose/structures/chart_result.py165def decompress_compressed_densepose_chart_result(CODE
LOW…jects/DensePose/densepose/structures/cse_confidence.py12def decorate_cse_predictor_output_class_with_confidences(BasePredictorOutput: type) -> type:CODE
LOW…jects/DensePose/densepose/structures/transform_data.py8def normalized_coords_transform(x0, y0, w, h):CODE
LOW…e/densepose/converters/chart_output_to_chart_result.py20def resample_uv_tensors_to_bbox(CODE
LOW…e/densepose/converters/chart_output_to_chart_result.py75def densepose_chart_predictor_output_to_result(CODE
LOW…e/densepose/converters/chart_output_to_chart_result.py104def resample_confidences_to_bbox(CODE
LOW…e/densepose/converters/chart_output_to_chart_result.py166def densepose_chart_predictor_output_to_result_with_confidences(CODE
LOW…s/DensePose/densepose/converters/chart_output_hflip.py10def densepose_chart_predictor_output_hflip(CODE
LOW…s/DensePose/densepose/converters/chart_output_hflip.py43def _flip_iuv_semantics_tensor(CODE
LOW…s/DensePose/densepose/converters/chart_output_hflip.py66def _flip_segm_semantics_tensor(CODE
LOWprojects/DensePose/densepose/converters/segm_to_mask.py15def resample_coarse_segm_tensor_to_bbox(coarse_segm: torch.Tensor, box_xywh_abs: IntTupleBox):CODE
LOWprojects/DensePose/densepose/converters/segm_to_mask.py34def resample_fine_and_coarse_segm_tensors_to_bbox(CODE
LOWprojects/DensePose/densepose/converters/segm_to_mask.py67def resample_fine_and_coarse_segm_to_bbox(predictor_output: Any, box_xywh_abs: IntTupleBox):CODE
LOWprojects/DensePose/densepose/converters/segm_to_mask.py87def predictor_output_with_coarse_segm_to_mask(CODE
LOWprojects/DensePose/densepose/converters/segm_to_mask.py121def predictor_output_with_fine_and_coarse_segm_to_mask(CODE
LOWprojects/DensePose/densepose/utils/dbhelper.py96 def _parse_specifier_into_predicates(self, spec: str):CODE
LOWprojects/DensePose/densepose/modeling/build.py14def build_densepose_predictor(cfg: CfgNode, input_channels: int):CODE
LOWprojects/DensePose/densepose/modeling/build.py30def build_densepose_data_filter(cfg: CfgNode):CODE
LOWprojects/DensePose/densepose/modeling/hrnet.py475def build_pose_hrnet_backbone(cfg, input_shape: ShapeSpec):CODE
LOWprojects/DensePose/densepose/modeling/losses/mask.py25def extract_data_for_mask_loss_from_matches(CODE
LOW…nsePose/densepose/modeling/losses/cycle_shape2shape.py70 def _get_embeddings_and_geodists_for_mesh(CODE
LOW…DensePose/densepose/modeling/losses/cycle_pix2shape.py20def _create_pixel_dist_matrix(grid_size: int) -> torch.Tensor:CODE
LOW…DensePose/densepose/modeling/losses/cycle_pix2shape.py32def _sample_fg_pixels_randperm(fg_mask: torch.Tensor, sample_size: int) -> torch.Tensor:CODE
LOW…DensePose/densepose/modeling/losses/cycle_pix2shape.py42def _sample_fg_pixels_multinomial(fg_mask: torch.Tensor, sample_size: int) -> torch.Tensor:CODE
LOWprojects/DensePose/densepose/modeling/losses/chart.py141 def produce_fake_densepose_losses(self, densepose_predictor_outputs: Any) -> LossDict:CODE
LOWprojects/DensePose/densepose/modeling/losses/chart.py166 def produce_fake_densepose_losses_uv(self, densepose_predictor_outputs: Any) -> LossDict:CODE
LOWprojects/DensePose/densepose/modeling/losses/chart.py189 def produce_fake_densepose_losses_segm(self, densepose_predictor_outputs: Any) -> LossDict:CODE
LOWprojects/DensePose/densepose/modeling/losses/chart.py213 def produce_densepose_losses_uv(CODE
LOWprojects/DensePose/densepose/modeling/losses/chart.py245 def produce_densepose_losses_segm(CODE
LOW…se/densepose/modeling/losses/chart_with_confidences.py35 def produce_fake_densepose_losses_uv(self, densepose_predictor_outputs: Any) -> LossDict:CODE
LOW…se/densepose/modeling/losses/chart_with_confidences.py73 def produce_densepose_losses_uv(CODE
LOWprojects/DensePose/densepose/modeling/losses/utils.py18def _linear_interpolation_utilities(v_norm, v0_src, size_src, v0_dst, size_dst, size_z):CODE
LOWprojects/DensePose/densepose/modeling/losses/utils.py421def extract_packed_annotations_from_matches(CODE
LOW…Pose/densepose/modeling/predictors/chart_confidence.py49 def _initialize_confidence_estimation_layers(self, cfg: CfgNode, dim_in: int):CODE
LOW…sePose/densepose/modeling/predictors/cse_confidence.py48 def _initialize_confidence_estimation_layers(self, cfg: CfgNode, dim_in: int):CODE
LOWprojects/DensePose/densepose/modeling/cse/utils.py9def squared_euclidean_distance_matrix(pts1: torch.Tensor, pts2: torch.Tensor) -> torch.Tensor:CODE
LOWprojects/DensePose/densepose/modeling/cse/embedder.py95 def load_from_model_checkpoint(self, fpath: str, prefix: Optional[str] = None):CODE
LOWprojects/DensePose/densepose/vis/densepose_results.py36 def create_visualization_context(self, image_bgr: Image):CODE
LOWprojects/DensePose/densepose/vis/densepose_results.py45 def get_image_bgr_from_context(self, context):CODE
LOWprojects/DensePose/densepose/vis/densepose_results.py96 def create_visualization_context(self, image_bgr: Image):CODE
LOW⚡…jects/DensePose/densepose/vis/densepose_data_points.py71def _densepose_data_u_for_cmap(densepose_data):CODE
LOW⚡…jects/DensePose/densepose/vis/densepose_data_points.py76def _densepose_data_v_for_cmap(densepose_data):CODE
LOW⚡…jects/DensePose/densepose/vis/densepose_data_points.py81def _densepose_data_i_for_cmap(densepose_data):CODE
LOWprojects/DensePose/densepose/vis/extractor.py26def extract_scores_from_instances(instances: Instances, select=None):CODE
LOWprojects/DensePose/densepose/vis/extractor.py32def extract_boxes_xywh_from_instances(instances: Instances, select=None):CODE
LOW…ts/DensePose/densepose/vis/densepose_outputs_vertex.py99 def extract_and_check_outputs_and_boxes(self, outputs_boxes_xywh_classes):CODE
LOW…ts/DensePose/densepose/vis/densepose_outputs_vertex.py219 def generate_image_with_texture(self, bbox_image_bgr, uv_array, mask, mesh_name):CODE
310 more matches not shown…
Cross-File Repetition51 hits · 255 pts
SeverityFileLineSnippetContext
HIGHtools/plain_train_net.py0create evaluator(s) for a given dataset. this uses the special metadata "evaluator_type" associated with each builtin daSTRING
HIGHtools/train_net.py0create evaluator(s) for a given dataset. this uses the special metadata "evaluator_type" associated with each builtin daSTRING
HIGHprojects/Panoptic-DeepLab/train_net.py0create evaluator(s) for a given dataset. this uses the special metadata "evaluator_type" associated with each builtin daSTRING
HIGHprojects/PointSup/train_net.py0create evaluator(s) for a given dataset. this uses the special metadata "evaluator_type" associated with each builtin daSTRING
HIGHprojects/DeepLab/train_net.py0create evaluator(s) for a given dataset. this uses the special metadata "evaluator_type" associated with each builtin daSTRING
HIGHprojects/PointRend/train_net.py0create evaluator(s) for a given dataset. this uses the special metadata "evaluator_type" associated with each builtin daSTRING
HIGHprojects/TridentNet/train_net.py0pointrend training script. this script is a simplified version of the training script in detectron2/tools.STRING
HIGHprojects/Panoptic-DeepLab/train_net.py0pointrend training script. this script is a simplified version of the training script in detectron2/tools.STRING
HIGHprojects/TensorMask/train_net.py0pointrend training script. this script is a simplified version of the training script in detectron2/tools.STRING
HIGHprojects/DeepLab/train_net.py0pointrend training script. this script is a simplified version of the training script in detectron2/tools.STRING
HIGHprojects/PointRend/train_net.py0pointrend training script. this script is a simplified version of the training script in detectron2/tools.STRING
HIGHprojects/DensePose/densepose/modeling/losses/mask.py0fake segmentation loss used when no suitable ground truth data was found in a batch. the loss has a value 0 and is primaSTRING
HIGHprojects/DensePose/densepose/modeling/losses/segm.py0fake segmentation loss used when no suitable ground truth data was found in a batch. the loss has a value 0 and is primaSTRING
HIGH…ts/DensePose/densepose/modeling/losses/mask_or_segm.py0fake segmentation loss used when no suitable ground truth data was found in a batch. the loss has a value 0 and is primaSTRING
HIGHprojects/DensePose/densepose/evaluation/evaluator.py0args: inputs: the inputs to a lvis model (e.g., generalizedrcnn). it is a list of dict. each dict corresponds to an imagSTRING
HIGHdetectron2/evaluation/coco_evaluation.py0args: inputs: the inputs to a lvis model (e.g., generalizedrcnn). it is a list of dict. each dict corresponds to an imagSTRING
HIGHdetectron2/evaluation/rotated_coco_evaluation.py0args: inputs: the inputs to a lvis model (e.g., generalizedrcnn). it is a list of dict. each dict corresponds to an imagSTRING
HIGHdetectron2/evaluation/lvis_evaluation.py0args: inputs: the inputs to a lvis model (e.g., generalizedrcnn). it is a list of dict. each dict corresponds to an imagSTRING
HIGHprojects/DensePose/densepose/data/dataset_mapper.py0args: dataset_dict (dict): metadata of one image, in detectron2 dataset format. returns: dict: a format that builtin modSTRING
HIGH…ts/Panoptic-DeepLab/panoptic_deeplab/dataset_mapper.py0args: dataset_dict (dict): metadata of one image, in detectron2 dataset format. returns: dict: a format that builtin modSTRING
HIGHprojects/PointSup/point_sup/dataset_mapper.py0args: dataset_dict (dict): metadata of one image, in detectron2 dataset format. returns: dict: a format that builtin modSTRING
HIGHdetectron2/data/dataset_mapper.py0args: dataset_dict (dict): metadata of one image, in detectron2 dataset format. returns: dict: a format that builtin modSTRING
HIGH…ts/DensePose/densepose/data/samplers/densepose_base.py0produce a sample of indices to select data based on confidences args: values (torch.tensor): an array of size [n, k] thaSTRING
HIGH…DensePose/densepose/data/samplers/densepose_uniform.py0produce a sample of indices to select data based on confidences args: values (torch.tensor): an array of size [n, k] thaSTRING
HIGH…/densepose/data/samplers/densepose_confidence_based.py0produce a sample of indices to select data based on confidences args: values (torch.tensor): an array of size [n, k] thaSTRING
HIGHprojects/Panoptic-DeepLab/train_net.py0we use the "defaulttrainer" which contains a number pre-defined logic for standard training workflow. they may not work STRING
HIGHprojects/DeepLab/train_net.py0we use the "defaulttrainer" which contains a number pre-defined logic for standard training workflow. they may not work STRING
HIGHprojects/PointRend/train_net.py0we use the "defaulttrainer" which contains a number pre-defined logic for standard training workflow. they may not work STRING
HIGHprojects/Panoptic-DeepLab/train_net.py0it now calls :func:`detectron2.solver.build_lr_scheduler`. overwrite it if you'd like a different scheduler.STRING
HIGHprojects/DeepLab/train_net.py0it now calls :func:`detectron2.solver.build_lr_scheduler`. overwrite it if you'd like a different scheduler.STRING
HIGHdetectron2/engine/defaults.py0it now calls :func:`detectron2.solver.build_lr_scheduler`. overwrite it if you'd like a different scheduler.STRING
HIGH…ects/Panoptic-DeepLab/panoptic_deeplab/panoptic_seg.py0returns: in training, returns (none, dict of losses) in inference, returns (cxhxw logits, {})STRING
HIGHprojects/DeepLab/deeplab/semantic_seg.py0returns: in training, returns (none, dict of losses) in inference, returns (cxhxw logits, {})STRING
HIGHdetectron2/modeling/meta_arch/semantic_seg.py0returns: in training, returns (none, dict of losses) in inference, returns (cxhxw logits, {})STRING
HIGHprojects/PointSup/point_sup/mask_head.py0args: x: input 4d region feature(s) provided by :class:`roiheads`. instances (list[instances]): contains the boxes & labSTRING
HIGHdetectron2/modeling/roi_heads/mask_head.py0args: x: input 4d region feature(s) provided by :class:`roiheads`. instances (list[instances]): contains the boxes & labSTRING
HIGHdetectron2/modeling/roi_heads/keypoint_head.py0args: x: input 4d region feature(s) provided by :class:`roiheads`. instances (list[instances]): contains the boxes & labSTRING
HIGHtests/layers/test_roi_align.py00 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24STRING
HIGHtests/layers/test_deformable.py00 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24STRING
HIGHtests/layers/test_roi_align_rotated.py00 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24STRING
HIGH…ts/tracking/test_vanilla_hungarian_bbox_iou_tracker.py0convert prediction from dict to d2 instances formatSTRING
HIGHtests/tracking/test_hungarian_tracker.py0convert prediction from dict to d2 instances formatSTRING
HIGH…acking/test_iou_weighted_hungarian_bbox_iou_tracker.py0convert prediction from dict to d2 instances formatSTRING
HIGHtests/tracking/test_bbox_iou_tracker.py0convert prediction from dict to d2 instances formatSTRING
HIGHdetectron2/tracking/bbox_iou_tracker.py0args: video_height: height the video frame video_width: width of the video frame max_num_instances: maximum number of idSTRING
HIGH…ectron2/tracking/vanilla_hungarian_bbox_iou_tracker.py0args: video_height: height the video frame video_width: width of the video frame max_num_instances: maximum number of idSTRING
HIGH…n2/tracking/iou_weighted_hungarian_bbox_iou_tracker.py0args: video_height: height the video frame video_width: width of the video frame max_num_instances: maximum number of idSTRING
HIGHdetectron2/tracking/hungarian_tracker.py0args: video_height: height the video frame video_width: width of the video frame max_num_instances: maximum number of idSTRING
HIGHdetectron2/tracking/bbox_iou_tracker.py0old style initialization using cfgnode args: cfg: d2 cfgnode, config file return: dictionary storing arguments for __iniSTRING
HIGH…ectron2/tracking/vanilla_hungarian_bbox_iou_tracker.py0old style initialization using cfgnode args: cfg: d2 cfgnode, config file return: dictionary storing arguments for __iniSTRING
HIGH…n2/tracking/iou_weighted_hungarian_bbox_iou_tracker.py0old style initialization using cfgnode args: cfg: d2 cfgnode, config file return: dictionary storing arguments for __iniSTRING
Empty Error Handlers28 hits · 140 pts
SeverityFileLineSnippetContext
HIGHtools/visualize_json_results.py36except KeyError:CODE
HIGH…Pose/densepose/evaluation/densepose_coco_evaluation.py1019except Exception:CODE
HIGHtests/test_export_onnx.py188except AttributeError:CODE
HIGHtests/data/test_coco_evaluation.py79except Exception:CODE
HIGHdocs/conf.py85except:CODE
HIGHdocs/conf.py303except:CODE
HIGHdetectron2/checkpoint/detection_checkpoint.py136except ValueError:CODE
HIGHdetectron2/config/lazy.py266except Exception:CODE
HIGHdetectron2/config/lazy.py314except Exception:CODE
HIGHdetectron2/config/lazy.py369except NameError:CODE
HIGHdetectron2/config/lazy.py274except AttributeError:CODE
HIGHdetectron2/utils/env.py77except ModuleNotFoundError:CODE
HIGHdetectron2/utils/registry.py35except ImportError:CODE
HIGHdetectron2/utils/events.py134except AttributeError:CODE
HIGHdetectron2/utils/collect_env.py139except Exception:CODE
HIGHdetectron2/utils/collect_env.py198except (ImportError, AttributeError):CODE
HIGHdetectron2/utils/collect_env.py205except (ImportError, AttributeError):CODE
HIGHdetectron2/utils/collect_env.py167except Exception:CODE
HIGHdetectron2/utils/collect_env.py113except (ImportError, AttributeError):CODE
HIGHdetectron2/utils/visualizer.py849except KeyError:CODE
HIGHdetectron2/utils/visualizer.py861except KeyError:CODE
HIGHdetectron2/modeling/test_time_augmentation.py149except AttributeError:CODE
HIGHdetectron2/export/__init__.py13except ImportError:CODE
HIGHdetectron2/export/torchscript_patch.py85except AttributeError:CODE
HIGHdetectron2/export/torchscript.py88except AttributeError:CODE
HIGHdetectron2/data/build.py287except AttributeError: # class names are not available for this datasetCODE
HIGHdetectron2/data/datasets/cityscapes.py19except ImportError:CODE
HIGHdetectron2/data/transforms/transform.py23except ImportError:CODE
Decorative Section Separators30 hits · 120 pts
SeverityFileLineSnippetContext
MEDIUMsetup.py173 # ------------------------------------------------------------COMMENT
MEDIUMprojects/DensePose/densepose/modeling/hrnet.py2# ------------------------------------------------------------------------------COMMENT
MEDIUMprojects/DensePose/densepose/modeling/hrnet.py8# ------------------------------------------------------------------------------COMMENT
MEDIUMdocs/conf.py158# -------------------------COMMENT
MEDIUM⚡detectron2/checkpoint/c2_model_loading.py83 # --------------------------------------------------------------------------COMMENT
MEDIUM⚡detectron2/checkpoint/c2_model_loading.py85 # --------------------------------------------------------------------------COMMENT
MEDIUM⚡detectron2/checkpoint/c2_model_loading.py95 # --------------------------------------------------------------------------COMMENT
MEDIUM⚡detectron2/checkpoint/c2_model_loading.py97 # --------------------------------------------------------------------------COMMENT
MEDIUM⚡detectron2/checkpoint/c2_model_loading.py116 # --------------------------------------------------------------------------COMMENT
MEDIUM⚡detectron2/checkpoint/c2_model_loading.py118 # --------------------------------------------------------------------------COMMENT
MEDIUM⚡detectron2/checkpoint/c2_model_loading.py126 # --------------------------------------------------------------------------COMMENT
MEDIUM⚡detectron2/checkpoint/c2_model_loading.py128 # --------------------------------------------------------------------------COMMENT
MEDIUM⚡detectron2/checkpoint/c2_model_loading.py153 # --------------------------------------------------------------------------COMMENT
MEDIUM⚡detectron2/checkpoint/c2_model_loading.py155 # --------------------------------------------------------------------------COMMENT
MEDIUM⚡detectron2/checkpoint/c2_model_loading.py163 # --------------------------------------------------------------------------COMMENT
MEDIUM⚡detectron2/checkpoint/c2_model_loading.py165 # --------------------------------------------------------------------------COMMENT
MEDIUM⚡detectron2/checkpoint/c2_model_loading.py173 # --------------------------------------------------------------------------COMMENT
MEDIUM⚡detectron2/checkpoint/c2_model_loading.py175 # --------------------------------------------------------------------------COMMENT
MEDIUM⚡detectron2/config/defaults.py8# -----------------------------------------------------------------------------COMMENT
MEDIUM⚡detectron2/config/defaults.py10# -----------------------------------------------------------------------------COMMENT
MEDIUM⚡detectron2/config/defaults.py18# -----------------------------------------------------------------------------COMMENT
MEDIUM⚡detectron2/config/defaults.py20# -----------------------------------------------------------------------------COMMENT
MEDIUM⚡detectron2/config/defaults.py49# -----------------------------------------------------------------------------COMMENT
MEDIUM⚡detectron2/config/defaults.py51# -----------------------------------------------------------------------------COMMENT
MEDIUMdetectron2/config/defaults.py90# -----------------------------------------------------------------------------COMMENT
MEDIUMdetectron2/config/defaults.py92# -----------------------------------------------------------------------------COMMENT
MEDIUMdetectron2/config/defaults.py110# -----------------------------------------------------------------------------COMMENT
MEDIUMdetectron2/config/defaults.py112# -----------------------------------------------------------------------------COMMENT
MEDIUMdetectron2/evaluation/pascal_voc_evaluation.py122# --------------------------------------------------------COMMENT
MEDIUMdetectron2/evaluation/pascal_voc_evaluation.py126# --------------------------------------------------------COMMENT
Modern Structural Boilerplate121 hits · 120 pts
SeverityFileLineSnippetContext
LOWprojects/TridentNet/tridentnet/trident_backbone.py12__all__ = ["TridentBottleneckBlock", "make_trident_stage", "build_trident_resnet_backbone"]CODE
LOWprojects/DensePose/densepose/modeling/hrnet.py21logger = logging.getLogger(__name__)CODE
LOWprojects/DensePose/densepose/modeling/hrnet.py23__all__ = ["build_pose_hrnet_backbone", "PoseHigherResolutionNet"]CODE
LOW…ojects/DensePose/densepose/modeling/losses/__init__.py11__all__ = [CODE
LOW…Pose/densepose/evaluation/densepose_coco_evaluation.py39logger = logging.getLogger(__name__)CODE
LOWprojects/DensePose/densepose/data/build.py54__all__ = ["build_detection_train_loader", "build_detection_test_loader"]CODE
LOWprojects/DensePose/densepose/data/__init__.py27__all__ = [k for k in globals().keys() if not k.startswith("_")]CODE
LOWprojects/DensePose/densepose/data/datasets/__init__.py7__all__ = [k for k in globals().keys() if "builtin" not in k and not k.startswith("_")]CODE
LOWprojects/DensePose/densepose/data/meshes/__init__.py7__all__ = [k for k in globals().keys() if "builtin" not in k and not k.startswith("_")]CODE
LOW…ts/Panoptic-DeepLab/panoptic_deeplab/dataset_mapper.py16__all__ = ["PanopticDeeplabDatasetMapper"]CODE
LOW…ects/Panoptic-DeepLab/panoptic_deeplab/panoptic_seg.py26__all__ = ["PanopticDeepLab", "INS_EMBED_BRANCHES_REGISTRY", "build_ins_embed_branch"]CODE
LOWprojects/PointSup/point_sup/mask_head.py14__all__ = [CODE
LOWprojects/PointSup/point_sup/dataset_mapper.py14__all__ = [CODE
LOW…jects/PointSup/point_sup/register_point_annotations.py9logger = logging.getLogger(__name__)CODE
LOWprojects/TensorMask/tensormask/arch.py20__all__ = ["TensorMask"]CODE
LOWprojects/TensorMask/tensormask/layers/__init__.py4__all__ = [k for k in globals().keys() if not k.startswith("_")]CODE
LOWtests/test_model_zoo.py9logger = logging.getLogger(__name__)CODE
LOWtests/layers/test_roi_align_rotated.py11logger = logging.getLogger(__name__)CODE
LOWtests/structures/test_rotated_boxes.py15logger = logging.getLogger(__name__)CODE
LOWtests/modeling/test_roi_pooler.py10logger = logging.getLogger(__name__)CODE
LOWtests/modeling/test_anchor_generator.py10logger = logging.getLogger(__name__)CODE
LOWtests/modeling/test_roi_heads.py29logger = logging.getLogger(__name__)CODE
LOWtests/modeling/test_rpn.py18logger = logging.getLogger(__name__)CODE
LOWtests/modeling/test_fast_rcnn.py13logger = logging.getLogger(__name__)CODE
LOWtests/modeling/test_box2box_transform.py13logger = logging.getLogger(__name__)CODE
LOWtests/data/test_transforms.py17logger = logging.getLogger(__name__)CODE
LOWdetectron2/checkpoint/__init__.py10__all__ = ["Checkpointer", "PeriodicCheckpointer", "DetectionCheckpointer"]CODE
LOWdetectron2/layers/__init__.py26__all__ = [k for k in globals().keys() if not k.startswith("_")]CODE
LOWdetectron2/layers/mask_ops.py8__all__ = ["paste_masks_in_image"]CODE
LOWdetectron2/structures/__init__.py11__all__ = [k for k in globals().keys() if not k.startswith("_")]CODE
LOWdetectron2/config/config.py111def set_global_cfg(cfg: CfgNode) -> None:CODE
LOWdetectron2/config/compat.py30__all__ = ["upgrade_config", "downgrade_config"]CODE
LOWdetectron2/config/__init__.py7__all__ = [CODE
LOWdetectron2/config/instantiate.py10__all__ = ["dump_dataclass", "instantiate"]CODE
LOWdetectron2/config/lazy.py22__all__ = ["LazyCall", "LazyConfig"]CODE
LOWdetectron2/projects/__init__.py6__all__ = []CODE
LOWdetectron2/utils/colormap.py11__all__ = ["colormap", "random_color", "random_colors"]CODE
LOWdetectron2/utils/env.py12__all__ = ["seed_all_rng"]CODE
LOWdetectron2/utils/analysis.py12__all__ = [CODE
LOWdetectron2/utils/memory.py8__all__ = ["retry_if_cuda_oom"]CODE
LOWdetectron2/utils/registry.py12__all__ = ["Registry", "locate"]CODE
LOWdetectron2/utils/events.py16__all__ = [CODE
LOWdetectron2/utils/collect_env.py14__all__ = ["collect_env_info"]CODE
LOWdetectron2/utils/logger.py15__all__ = ["setup_logger", "log_first_n", "log_every_n", "log_every_n_seconds"]CODE
LOWdetectron2/utils/file_io.py5__all__ = ["PathManager", "PathHandler"]CODE
LOWdetectron2/utils/visualizer.py22logger = logging.getLogger(__name__)CODE
LOWdetectron2/utils/visualizer.py24__all__ = ["ColorMode", "VisImage", "Visualizer"]CODE
LOWdetectron2/solver/lr_scheduler.py19logger = logging.getLogger(__name__)CODE
LOWdetectron2/solver/__init__.py11__all__ = [k for k in globals().keys() if not k.startswith("_")]CODE
LOWdetectron2/model_zoo/__init__.py10__all__ = ["get_checkpoint_url", "get", "get_config_file", "get_config"]CODE
LOWdetectron2/modeling/test_time_augmentation.py26__all__ = ["DatasetMapperTTA", "GeneralizedRCNNWithTTA"]CODE
LOWdetectron2/modeling/poolers.py20__all__ = ["ROIPooler"]CODE
LOWdetectron2/modeling/__init__.py58__all__ = [k for k in globals().keys() if k not in _EXCLUDE and not k.startswith("_")]CODE
LOWdetectron2/modeling/box_regression.py17__all__ = ["Box2BoxTransform", "Box2BoxTransformRotated", "Box2BoxTransformLinear"]CODE
LOWdetectron2/modeling/mmdet_wrapper.py18logger = logging.getLogger(__name__)CODE
LOWdetectron2/modeling/sampling.py6__all__ = ["subsample_labels"]CODE
LOWdetectron2/modeling/meta_arch/rcnn.py21__all__ = ["GeneralizedRCNN", "ProposalNetwork"]CODE
LOWdetectron2/modeling/meta_arch/panoptic_fpn.py17__all__ = ["PanopticFPN"]CODE
LOWdetectron2/modeling/meta_arch/fcos.py20__all__ = ["FCOS"]CODE
LOWdetectron2/modeling/meta_arch/fcos.py22logger = logging.getLogger(__name__)CODE
61 more matches not shown…
Deep Nesting74 hits · 72 pts
SeverityFileLineSnippetContext
LOWdemo/demo.py93CODE
LOWtools/plain_train_net.py113CODE
LOWtools/deploy/export_model.py40CODE
LOWprojects/DensePose/apply_net.py162CODE
LOWprojects/DensePose/densepose/utils/logger.py7CODE
LOWprojects/DensePose/densepose/modeling/hrnet.py190CODE
LOWprojects/DensePose/densepose/modeling/cse/embedder.py95CODE
LOWprojects/DensePose/densepose/vis/densepose_results.py171CODE
LOWprojects/DensePose/densepose/vis/densepose_results.py243CODE
LOW…jects/DensePose/densepose/vis/densepose_outputs_iuv.py29CODE
LOWprojects/DensePose/densepose/vis/extractor.py41CODE
LOW…Pose/densepose/evaluation/densepose_coco_evaluation.py302CODE
LOW…Pose/densepose/evaluation/densepose_coco_evaluation.py379CODE
LOW…Pose/densepose/evaluation/densepose_coco_evaluation.py538CODE
LOW…Pose/densepose/evaluation/densepose_coco_evaluation.py583CODE
LOW…Pose/densepose/evaluation/densepose_coco_evaluation.py623CODE
LOW…Pose/densepose/evaluation/densepose_coco_evaluation.py725CODE
LOW…Pose/densepose/evaluation/densepose_coco_evaluation.py785CODE
LOW…Pose/densepose/evaluation/densepose_coco_evaluation.py930CODE
LOW…Pose/densepose/evaluation/densepose_coco_evaluation.py1225CODE
LOWprojects/DensePose/densepose/evaluation/evaluator.py90CODE
LOWprojects/DensePose/densepose/data/build.py114CODE
LOWprojects/DensePose/densepose/data/build.py508CODE
LOWprojects/DensePose/densepose/data/build.py558CODE
LOW…cts/DensePose/densepose/data/inference_based_loader.py14CODE
LOW…nsePose/densepose/data/video/video_keyframe_dataset.py25CODE
LOW…nsePose/densepose/data/video/video_keyframe_dataset.py100CODE
LOWprojects/DensePose/densepose/engine/trainer.py43CODE
LOW…ects/Panoptic-DeepLab/panoptic_deeplab/panoptic_seg.py67CODE
LOWprojects/TensorMask/tensormask/arch.py416CODE
LOWprojects/TensorMask/tensormask/arch.py503CODE
LOWprojects/TensorMask/tensormask/arch.py755CODE
LOWprojects/TensorMask/tensormask/arch.py857CODE
LOWprojects/DeepLab/deeplab/semantic_seg.py22CODE
LOWdatasets/prepare_cocofied_lvis.py96CODE
LOWtests/test_engine.py96CODE
LOWtests/test_visualizer.py195CODE
LOWtests/data/test_coco_evaluation.py21CODE
LOWdetectron2/layers/wrappers.py124CODE
LOWdetectron2/structures/instances.py154CODE
LOWdetectron2/structures/boxes.py44CODE
LOWdetectron2/structures/masks.py350CODE
LOWdetectron2/config/lazy.py375CODE
LOWdetectron2/config/lazy.py394CODE
LOWdetectron2/utils/collect_env.py55CODE
LOWdetectron2/utils/testing.py95CODE
LOWdetectron2/utils/testing.py194CODE
LOWdetectron2/utils/testing.py296CODE
LOWdetectron2/utils/visualizer.py629CODE
LOWdetectron2/model_zoo/model_zoo.py147CODE
LOWdetectron2/modeling/poolers.py120CODE
LOWdetectron2/modeling/box_regression.py310CODE
LOWdetectron2/modeling/roi_heads/roi_heads.py220CODE
LOWdetectron2/modeling/roi_heads/roi_heads.py780CODE
LOWdetectron2/modeling/backbone/vit.py369CODE
LOWdetectron2/evaluation/panoptic_evaluation.py68CODE
LOWdetectron2/evaluation/cityscapes_evaluation.py60CODE
LOWdetectron2/evaluation/pascal_voc_evaluation.py187CODE
LOWdetectron2/export/c10.py115CODE
LOWdetectron2/export/shared.py81CODE
14 more matches not shown…
AI Structural Patterns46 hits · 46 pts
SeverityFileLineSnippetContext
LOWtools/train_net.py109CODE
LOWprojects/TridentNet/tridentnet/trident_backbone.py16CODE
LOWprojects/TridentNet/tridentnet/trident_conv.py11CODE
LOWprojects/DensePose/densepose/modeling/hrnet.py60CODE
LOWprojects/DensePose/densepose/modeling/hrnet.py98CODE
LOW…Pose/densepose/modeling/predictors/chart_confidence.py179CODE
LOW…sePose/densepose/modeling/predictors/cse_confidence.py117CODE
LOWprojects/DensePose/densepose/vis/extractor.py203CODE
LOWprojects/DensePose/densepose/vis/base.py117CODE
LOWprojects/DensePose/densepose/engine/trainer.py263CODE
LOW…ts/Panoptic-DeepLab/panoptic_deeplab/dataset_mapper.py85CODE
LOW…ects/Panoptic-DeepLab/panoptic_deeplab/panoptic_seg.py501CODE
LOWprojects/PointSup/point_sup/dataset_mapper.py70CODE
LOWprojects/DeepLab/deeplab/semantic_seg.py217CODE
LOWprojects/PointRend/point_rend/mask_head.py135CODE
LOWtests/layers/test_roi_align.py153CODE
LOW…ts/tracking/test_vanilla_hungarian_bbox_iou_tracker.py73CODE
LOWtests/tracking/test_hungarian_tracker.py67CODE
LOW…acking/test_iou_weighted_hungarian_bbox_iou_tracker.py73CODE
LOWtests/tracking/test_bbox_iou_tracker.py71CODE
LOWdetectron2/checkpoint/c2_model_loading.py379CODE
LOWdetectron2/checkpoint/c2_model_loading.py406CODE
LOWdetectron2/layers/deform_conv.py317CODE
LOWdetectron2/layers/deform_conv.py414CODE
LOWdetectron2/layers/roi_align_rotated.py23CODE
LOWdetectron2/layers/aspp.py144CODE
LOWdetectron2/structures/masks.py224CODE
LOWdetectron2/modeling/postprocessing.py100CODE
LOWdetectron2/modeling/meta_arch/fcos.py30CODE
LOWdetectron2/modeling/meta_arch/retinanet.py35CODE
LOWdetectron2/modeling/roi_heads/fast_rcnn.py183CODE
LOWdetectron2/modeling/backbone/swin.py197CODE
LOWdetectron2/modeling/backbone/swin.py370CODE
LOWdetectron2/modeling/backbone/swin.py538CODE
LOWdetectron2/modeling/backbone/vit.py142CODE
LOWdetectron2/modeling/backbone/vit.py148CODE
LOWdetectron2/modeling/backbone/vit.py239CODE
LOWdetectron2/modeling/backbone/resnet.py97CODE
LOWdetectron2/modeling/backbone/resnet.py210CODE
LOWdetectron2/modeling/backbone/resnet.py327CODE
LOWdetectron2/modeling/backbone/mvit.py36CODE
LOWdetectron2/modeling/backbone/mvit.py180CODE
LOWdetectron2/modeling/backbone/mvit.py276CODE
LOWdetectron2/export/shared.py517CODE
LOWdetectron2/data/build.py294CODE
LOWdetectron2/data/datasets/builtin_meta.py247CODE
Over-Commented Block48 hits · 42 pts
SeverityFileLineSnippetContext
LOWsetup.py161 python_requires=">=3.7",COMMENT
LOWtools/deploy/torchscript_mask_rcnn.cpp1// Copyright (c) Facebook, Inc. and its affiliates.COMMENT
LOW…ojects/MViTv2/configs/cascade_mask_rcnn_mvitv2_t_3x.py41# Using NaiveSyncBatchNorm becase heads may have empty input. That is not supported byCOMMENT
LOWprojects/TridentNet/tridentnet/config.py21 _C.MODEL.TRIDENT.TRIDENT_STAGE = "res4"COMMENT
LOWprojects/DensePose/densepose/config.py21def add_evaluation_config(cfg: CN) -> None:COMMENT
LOWprojects/DensePose/densepose/config.py121 # embedding loss name, currently the following options are supported:COMMENT
LOWprojects/DensePose/densepose/config.py201 # Some registered predictors:COMMENT
LOW…Pose/densepose/evaluation/densepose_coco_evaluation.py61 I_DT_UV_0 = "idtuv0"COMMENT
LOW…Pose/densepose/evaluation/densepose_coco_evaluation.py81 # areaRng - [...] A=4 object area ranges for evaluationCOMMENT
LOW…Pose/densepose/evaluation/densepose_coco_evaluation.py101 # params - parameters used for evaluationCOMMENT
LOW…ts/DensePose/densepose/data/samplers/densepose_base.py161 .squeeze()COMMENT
LOWtests/layers/test_roi_align_rotated.py41 box = [1, 1, 3, 3]COMMENT
LOWtests/modeling/test_model_e2e.py121 instances = [get_empty_instance(200, 250), get_regular_bitmask_instances(200, 249)]COMMENT
LOWdocs/conf.py1# -*- coding: utf-8 -*-COMMENT
LOWdocs/conf.py201COMMENT
LOWdocs/conf.py221latex_elements = {COMMENT
LOWdetectron2/checkpoint/c2_model_loading.py81 layer_keys = convert_basic_c2_names(layer_keys)COMMENT
LOWdetectron2/layers/csrc/vision.cpp1// Copyright (c) Facebook, Inc. and its affiliates.COMMENT
LOWdetectron2/layers/csrc/cocoeval/cocoeval.cpp201// Convert a python list to a vectorCOMMENT
LOW…n2/layers/csrc/box_iou_rotated/box_iou_rotated_utils.h1// Copyright (c) Facebook, Inc. and its affiliates.COMMENT
LOW…n2/layers/csrc/box_iou_rotated/box_iou_rotated_utils.h221 dist[i] = dist[j];COMMENT
LOW…n2/layers/csrc/box_iou_rotated/box_iou_rotated_utils.h281 // Finally we can start the scanning process.COMMENT
LOWdetectron2/structures/rotated_boxes.py401 """COMMENT
LOWdetectron2/structures/rotated_boxes.py421 # After applying the scaling factor (sfx, sfy):COMMENT
LOWdetectron2/structures/rotated_boxes.py441 # For example,COMMENT
LOWdetectron2/config/defaults.py1# Copyright (c) Facebook, Inc. and its affiliates.COMMENT
LOWdetectron2/config/defaults.py41# Default values are the mean pixel value from ImageNet: [103.53, 116.28, 123.675]COMMENT
LOWdetectron2/config/defaults.py81# https://pillow.readthedocs.io/en/stable/handbook/concepts.html#concept-modesCOMMENT
LOWdetectron2/config/defaults.py101_C.DATASETS.PRECOMPUTED_PROPOSAL_TOPK_TRAIN = 2000COMMENT
LOWdetectron2/config/defaults.py161# ---------------------------------------------------------------------------- #COMMENT
LOWdetectron2/config/defaults.py181# Anchor aspect ratios. For each area given in `SIZES`, anchors with different aspectCOMMENT
LOWdetectron2/config/defaults.py201_C.MODEL.RPN.HEAD_NAME = "StandardRPNHead" # used by RPN_HEAD_REGISTRYCOMMENT
LOWdetectron2/config/defaults.py221_C.MODEL.RPN.BATCH_SIZE_PER_IMAGE = 256COMMENT
LOWdetectron2/config/defaults.py241# See the "find_top_rpn_proposals" function for details.COMMENT
LOWdetectron2/config/defaults.py261# Overlap threshold for an RoI to be considered background (if < IOU_THRESHOLD)COMMENT
LOWdetectron2/config/defaults.py281# Overlap threshold used for non-maximum suppression (suppress boxes withCOMMENT
LOWdetectron2/config/defaults.py381# minibatches, this has the effect of up-weighting the importance ofCOMMENT
LOWdetectron2/config/defaults.py561# May be adjusted automatically if REFERENCE_WORLD_SIZE is set.COMMENT
LOWdetectron2/config/defaults.py581# Type of gradient clipping, currently 2 values are supported:COMMENT
LOWdetectron2/config/defaults.py621_C.TEST.PRECISE_BN = CN({"ENABLED": False})COMMENT
LOWdetectron2/config/defaults.py641# precision will effectively disable tf32.COMMENT
LOWdetectron2/modeling/roi_heads/roi_heads.py241 (this is only meaningful if the proposal has a label > 0; if label = 0COMMENT
LOWdetectron2/data/datasets/coco.py101 )COMMENT
LOWdetectron2/data/datasets/cityscapes_panoptic.py141 meta["thing_colors"] = thing_colorsCOMMENT
LOWdetectron2/data/datasets/lvis_v1_categories.py1# Copyright (c) Facebook, Inc. and its affiliates.COMMENT
LOWdetectron2/data/datasets/lvis.py81 # 'file_name': 'COCO_val2014_000000001268.jpg',COMMENT
LOW…tectron2/data/datasets/lvis_v1_category_image_count.py1# Copyright (c) Facebook, Inc. and its affiliates.COMMENT
LOWdetectron2/data/datasets/lvis_v0_5_categories.py1# Copyright (c) Facebook, Inc. and its affiliates.COMMENT
Docstring Block Structure7 hits · 35 pts
SeverityFileLineSnippetContext
HIGHdetectron2/utils/memory.py27 Makes a function retry itself after encountering pytorch's CUDA OOM error. It will first retry after callinSTRING
HIGHdetectron2/modeling/backbone/resnet.py494 Create a list of blocks of the same type that forms one ResNet stage. Args: block_class (tSTRING
HIGHdetectron2/data/build.py630 Similar to `build_detection_train_loader`, with default batch size = 1, and sampler = :class:`InferenceSampler`STRING
HIGHdetectron2/data/datasets/coco.py36 Load a json file with COCO's instances annotation format. Currently supports instance detection, instance segmeSTRING
HIGHdetectron2/data/datasets/coco.py236 Load semantic segmentation datasets. All files under "gt_root" with "gt_ext" extension are treated as ground trSTRING
HIGHdetectron2/data/datasets/lvis.py42 Load a json file in LVIS's annotation format. Args: json_file (str): full path to the LVIS json annotaSTRING
HIGHdetectron2/data/transforms/augmentation.py116 Execute the policy based on input data, and decide what transform to apply to inputs. Args: STRING
Hallucination Indicators3 hits · 30 pts
SeverityFileLineSnippetContext
CRITICAL…nsePose/densepose/modeling/losses/cycle_shape2shape.py27 self.shape_names = list(cfg.MODEL.ROI_DENSEPOSE_HEAD.CSE.EMBEDDERS.keys())CODE
CRITICAL…DensePose/densepose/modeling/losses/cycle_pix2shape.py57 self.shape_names = list(cfg.MODEL.ROI_DENSEPOSE_HEAD.CSE.EMBEDDERS.keys())CODE
CRITICALprojects/DensePose/densepose/modeling/cse/embedder.py88 for mesh_name, embedder_spec in cfg.MODEL.ROI_DENSEPOSE_HEAD.CSE.EMBEDDERS.items():CODE
Excessive Try-Catch Wrapping26 hits · 26 pts
SeverityFileLineSnippetContext
LOW⚡tools/lightning_train_net.py152 except Exception as e:CODE
LOW…Pose/densepose/evaluation/densepose_coco_evaluation.py1019 except Exception:CODE
LOW…nsePose/densepose/data/video/video_keyframe_dataset.py213 except Exception as e:CODE
LOWtests/structures/test_boxes.py140 except Exception:CODE
LOWtests/structures/test_boxes.py148 except Exception:CODE
LOWtests/data/test_coco_evaluation.py79 except Exception:CODE
LOWtests/data/test_coco_evaluation.py94 except Exception as ex:CODE
LOWtests/data/test_coco_evaluation.py108 except Exception as ex:CODE
LOWdetectron2/config/instantiate.py78 except Exception:CODE
LOWdetectron2/config/lazy.py266 except Exception:STRING
LOWdetectron2/config/lazy.py297 except Exception:STRING
LOWdetectron2/config/lazy.py303 except Exception:STRING
LOWdetectron2/config/lazy.py314 except Exception:STRING
LOWdetectron2/utils/collect_env.py50 except Exception:CODE
LOWdetectron2/utils/collect_env.py139 except Exception:CODE
LOWdetectron2/utils/collect_env.py167 except Exception:CODE
LOWdetectron2/utils/collect_env.py253 except Exception as e:CODE
MEDIUMdetectron2/utils/collect_env.py17def collect_torch_env():CODE
MEDIUMdetectron2/export/shared.py561 print("Error when writing graph to image {}".format(e))CODE
LOWdetectron2/export/shared.py163 except Exception as e:CODE
LOWdetectron2/export/shared.py560 except Exception as e:CODE
LOWdetectron2/data/detection_utils.py143 except Exception: # https://github.com/facebookresearch/detectron2/issues/1885CODE
LOWdetectron2/engine/hooks.py540 except Exception as e:CODE
LOWdetectron2/engine/train_loop.py158 except Exception:CODE
LOWdetectron2/engine/train_loop.py368 except Exception:CODE
LOWdetectron2/engine/launch.py109 except Exception as e:CODE
AI Slop Vocabulary7 hits · 11 pts
SeverityFileLineSnippetContext
LOWtools/deploy/export_model.py121 inference = None # assume that we just call the model directlyCODE
LOW…jects/DensePose/densepose/evaluation/tensor_storage.py211 # TODO: overhead, pickling a bytes object, can just pass bytes in a tensor directlyCOMMENT
LOWdetectron2/layers/nms.py20 # just call it directly.COMMENT
LOW⚡detectron2/config/defaults.py40# To train on images of different number of channels, just set different mean & std.COMMENT
LOWdetectron2/modeling/roi_heads/fast_rcnn.py332 # Here we just use proposal_boxes as an arbitrary placeholder because itsCOMMENT
LOWdetectron2/export/c10.py551 # just return the keypoint heatmap for now,COMMENT
LOWdetectron2/export/caffe2_modeling.py74 # used anyway when batch size is 0, so just set them to 0.COMMENT
Slop Phrases3 hits · 10 pts
SeverityFileLineSnippetContext
MEDIUMdemo/demo.py171 # you can try other format (e.g. MPEG)COMMENT
MEDIUMconfigs/common/data/constants.py7 # Otherwise, you can use [57.375, 57.120, 58.395] (ImageNet std)COMMENT
MEDIUM⚡detectron2/config/defaults.py45# Otherwise, you can use [57.375, 57.120, 58.395] (ImageNet std)COMMENT
Verbosity Indicators5 hits · 8 pts
SeverityFileLineSnippetContext
LOW…n2/layers/csrc/box_iou_rotated/box_iou_rotated_utils.h174 // Step 1:COMMENT
LOW…n2/layers/csrc/box_iou_rotated/box_iou_rotated_utils.h186 // Step 2:COMMENT
LOW…n2/layers/csrc/box_iou_rotated/box_iou_rotated_utils.h197 // Step 3:COMMENT
LOW…n2/layers/csrc/box_iou_rotated/box_iou_rotated_utils.h264 // Step 4:COMMENT
LOW…n2/layers/csrc/box_iou_rotated/box_iou_rotated_utils.h280 // Step 5:COMMENT
Fake / Example Data5 hits · 6 pts
SeverityFileLineSnippetContext
LOWtools/benchmark.py112 dummy_data = list(itertools.islice(data_loader, 100))CODE
LOWtools/benchmark.py115 data = DatasetFromList(dummy_data, copy=False, serialize=False)CODE
LOW⚡tools/benchmark.py155 dummy_data = DatasetFromList(list(itertools.islice(data_loader, 100)), copy=False)CODE
LOW⚡tools/benchmark.py159 yield from dummy_dataCODE
LOW⚡tools/benchmark.py162 model(dummy_data[k])CODE
Self-Referential Comments2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMtools/lightning_train_net.py6# This module is still dependent on D2 logging, but could be transferred to use Lightning loggingCOMMENT
MEDIUMdetectron2/utils/events.py409 # Create a histogram with PyTorchCOMMENT
Redundant / Tautological Comments3 hits · 4 pts
SeverityFileLineSnippetContext
LOWdetectron2/config/defaults.py246# Set this to -1 to use the same number of output channels as input channels.COMMENT
LOWdetectron2/config/defaults.py629# Set seed to negative to fully randomize everything.COMMENT
LOWdetectron2/config/defaults.py630# Set seed to positive to use a fixed seed. Note that a fixed seed increasesCOMMENT
Cross-Language Confusion1 hit · 2 pts
SeverityFileLineSnippetContext
HIGHprojects/DensePose/densepose/modeling/cse/utils.py20 it contains || pts1[m] - pts2[n] ||^2STRING
TODO Padding1 hit · 2 pts
SeverityFileLineSnippetContext
LOWtests/test_export_onnx.py147 # TODO: Add tests with different batch sizes when detectron2's CICOMMENT
Structural Annotation Overuse1 hit · 2 pts
SeverityFileLineSnippetContext
LOWdetectron2/export/shared.py84 # NOTE: The input dimensions are interpreted in the form:COMMENT