The repository provides code for running inference and finetuning with the Meta Segment Anything Model 3 (SAM 3), links for downloading the trained model checkpoints, and example notebooks that show how to use the model.
This report presents the forensic synthetic code analysis of facebookresearch/sam3, a Python project with 11,173 GitHub stars. SynthScan v2.0 examined 89,045 lines of code across 224 source files, recording 1300 pattern matches distributed across 19 syntactic categories. The overall adjusted score of 30.5 places this repository in the Strong AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 1300 distinct pattern matches across 19 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | sam3/model/sam3_multiplex_base.py | 2235 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | sam3/model/sam3_multiplex_base.py | 2237 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | sam3/model/sam3_multiplex_base.py | 2247 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | sam3/model/sam3_multiplex_base.py | 2249 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | sam3/model/sam3_multiplex_base.py | 2276 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | sam3/model/sam3_multiplex_base.py | 2278 | # ============================================================================ | COMMENT |
| MEDIUM | sam3/model/sam3_multiplex_base.py | 2131 | # ============================================================================ | COMMENT |
| MEDIUM | sam3/model/sam3_multiplex_base.py | 2133 | # ============================================================================ | COMMENT |
| MEDIUM | sam3/model/sam3_multiplex_base.py | 2167 | # ============================================================================ | COMMENT |
| MEDIUM | sam3/model/sam3_multiplex_base.py | 2169 | # ============================================================================ | COMMENT |
| MEDIUM | sam3/model/sam3_multiplex_base.py | 2212 | # ============================================================================ | COMMENT |
| MEDIUM | sam3/model/sam3_multiplex_base.py | 2214 | # ============================================================================ | COMMENT |
| MEDIUM | sam3/model/sam3_multiplex_base.py | 2311 | # ============================================================================ | COMMENT |
| MEDIUM | sam3/model/sam3_multiplex_base.py | 2313 | # ============================================================================ | COMMENT |
| MEDIUM | sam3/model/sam3_multiplex_base.py | 2327 | # ============================================================================ | COMMENT |
| MEDIUM | sam3/model/sam3_multiplex_base.py | 2329 | # ============================================================================ | COMMENT |
| MEDIUM | sam3/model/sam3_multiplex_base.py | 2358 | # ============================================================================ | COMMENT |
| MEDIUM | sam3/model/sam3_multiplex_base.py | 2360 | # ============================================================================ | COMMENT |
| MEDIUM | sam3/model/sam3_base_predictor.py | 47 | # ── Request dispatch ────────────────────────────────────────────── | COMMENT |
| MEDIUM | sam3/model/sam3_base_predictor.py | 117 | # ── Session management ──────────────────────────────────────────── | COMMENT |
| MEDIUM | sam3/train/configs/eval_base.yaml | 18 | # ============================================================================ | COMMENT |
| MEDIUM | sam3/train/configs/eval_base.yaml | 20 | # ============================================================================ | COMMENT |
| MEDIUM | sam3/train/configs/eval_base.yaml | 45 | # ============================================================================ | COMMENT |
| MEDIUM | sam3/train/configs/eval_base.yaml | 47 | # ============================================================================ | COMMENT |
| MEDIUM | sam3/train/configs/eval_base.yaml | 146 | # ============================================================================ | COMMENT |
| MEDIUM | sam3/train/configs/eval_base.yaml | 148 | # ============================================================================ | COMMENT |
| MEDIUM | sam3/train/configs/eval_base.yaml | 260 | # ============================================================================ | COMMENT |
| MEDIUM | sam3/train/configs/eval_base.yaml | 262 | # ============================================================================ | COMMENT |
| MEDIUM | …m3/train/configs/roboflow_v100/roboflow_v100_eval.yaml | 5 | # ============================================================================ | COMMENT |
| MEDIUM | …m3/train/configs/roboflow_v100/roboflow_v100_eval.yaml | 7 | # ============================================================================ | COMMENT |
| MEDIUM | …m3/train/configs/roboflow_v100/roboflow_v100_eval.yaml | 156 | # ============================================================================ | COMMENT |
| MEDIUM | …m3/train/configs/roboflow_v100/roboflow_v100_eval.yaml | 158 | # ============================================================================ | COMMENT |
| MEDIUM | …m3/train/configs/roboflow_v100/roboflow_v100_eval.yaml | 239 | # ============================================================================ | COMMENT |
| MEDIUM | …m3/train/configs/roboflow_v100/roboflow_v100_eval.yaml | 241 | # ============================================================================ | COMMENT |
| MEDIUM | …m3/train/configs/roboflow_v100/roboflow_v100_eval.yaml | 411 | # ============================================================================ | COMMENT |
| MEDIUM | …m3/train/configs/roboflow_v100/roboflow_v100_eval.yaml | 413 | # ============================================================================ | COMMENT |
| MEDIUM | …m3/train/configs/roboflow_v100/roboflow_v100_eval.yaml | 435 | # ============================================================================ | COMMENT |
| MEDIUM | …m3/train/configs/roboflow_v100/roboflow_v100_eval.yaml | 437 | # ============================================================================ | COMMENT |
| MEDIUM | …gs/roboflow_v100/roboflow_v100_full_ft_100_images.yaml | 5 | # ============================================================================ | COMMENT |
| MEDIUM | …gs/roboflow_v100/roboflow_v100_full_ft_100_images.yaml | 7 | # ============================================================================ | COMMENT |
| MEDIUM | …gs/roboflow_v100/roboflow_v100_full_ft_100_images.yaml | 156 | # ============================================================================ | COMMENT |
| MEDIUM | …gs/roboflow_v100/roboflow_v100_full_ft_100_images.yaml | 158 | # ============================================================================ | COMMENT |
| MEDIUM | …gs/roboflow_v100/roboflow_v100_full_ft_100_images.yaml | 239 | # ============================================================================ | COMMENT |
| MEDIUM | …gs/roboflow_v100/roboflow_v100_full_ft_100_images.yaml | 241 | # ============================================================================ | COMMENT |
| MEDIUM | …gs/roboflow_v100/roboflow_v100_full_ft_100_images.yaml | 411 | # ============================================================================ | COMMENT |
| MEDIUM | …gs/roboflow_v100/roboflow_v100_full_ft_100_images.yaml | 413 | # ============================================================================ | COMMENT |
| MEDIUM | …gs/roboflow_v100/roboflow_v100_full_ft_100_images.yaml | 435 | # ============================================================================ | COMMENT |
| MEDIUM | …gs/roboflow_v100/roboflow_v100_full_ft_100_images.yaml | 437 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | …figs/saco_video_evals/saco_veval_yt1b_test_noheur.yaml | 5 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | …figs/saco_video_evals/saco_veval_yt1b_test_noheur.yaml | 7 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | …figs/saco_video_evals/saco_veval_yt1b_test_noheur.yaml | 17 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | …figs/saco_video_evals/saco_veval_yt1b_test_noheur.yaml | 19 | # ============================================================================ | COMMENT |
| MEDIUM | …figs/saco_video_evals/saco_veval_yt1b_test_noheur.yaml | 59 | # ============================================================================ | COMMENT |
| MEDIUM | …figs/saco_video_evals/saco_veval_yt1b_test_noheur.yaml | 61 | # ============================================================================ | COMMENT |
| MEDIUM | …figs/saco_video_evals/saco_veval_yt1b_test_noheur.yaml | 156 | # ============================================================================ | COMMENT |
| MEDIUM | …figs/saco_video_evals/saco_veval_yt1b_test_noheur.yaml | 158 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | …igs/saco_video_evals/saco_veval_smartglasses_test.yaml | 5 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | …igs/saco_video_evals/saco_veval_smartglasses_test.yaml | 7 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | …igs/saco_video_evals/saco_veval_smartglasses_test.yaml | 17 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | …igs/saco_video_evals/saco_veval_smartglasses_test.yaml | 19 | # ============================================================================ | COMMENT |
| 216 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | sam3/model/decoder.py | 153 | # pyre-fixme[61]: `tgt_o2m` is undefined, or not always defined. | COMMENT |
| HIGH | sam3/model/decoder.py | 762 | # pyre-fixme[61]: `normed_output` is undefined, or not always defined. | COMMENT |
| HIGH | sam3/model/decoder.py | 883 | # pyre-fixme[61]: `other_tgt` is undefined, or not always defined. | COMMENT |
| HIGH⚡ | sam3/model/sam3_multiplex_base.py | 1774 | # pyre-fixme[61]: `out_frame_idx` is undefined, or not always defined. | COMMENT |
| HIGH⚡ | sam3/model/sam3_multiplex_base.py | 1776 | # pyre-fixme[61]: `out_frame_idx` is undefined, or not always defined. | COMMENT |
| HIGH⚡ | sam3/model/sam3_multiplex_base.py | 1779 | # pyre-fixme[61]: `out_obj_ids` is undefined, or not always defined. | COMMENT |
| HIGH⚡ | sam3/model/sam3_multiplex_base.py | 1784 | # pyre-fixme[61]: `out_obj_ids` is undefined, or not always defined. | COMMENT |
| HIGH | sam3/model/sam3_multiplex_base.py | 1802 | # pyre-fixme[61]: `out_obj_ids` is undefined, or not | COMMENT |
| HIGH | sam3/model/sam3_multiplex_base.py | 1826 | # pyre-fixme[61]: `out_obj_ids` is undefined, or not always defined. | COMMENT |
| HIGH | sam3/model/sam3_multiplex_base.py | 1828 | # pyre-fixme[61]: `out_obj_ids` is undefined, or not always defined. | COMMENT |
| HIGH | sam3/model/sam3_multiplex_base.py | 2573 | # pyre-fixme[61]: `object_idx_assignment` is undefined, or not | COMMENT |
| HIGH | sam3/model/sam3_multiplex_base.py | 2622 | # pyre-fixme[61]: `local_image_features` is undefined, or | COMMENT |
| HIGH | sam3/model/sam3_multiplex_base.py | 2627 | # pyre-fixme[61]: `local_image_pos_enc` is undefined, or not | COMMENT |
| HIGH⚡ | sam3/model/video_tracking_multiplex.py | 1608 | # pyre-fixme[61]: `to_cat_image_feat` is undefined, or not always defined. | COMMENT |
| HIGH⚡ | sam3/model/video_tracking_multiplex.py | 1609 | # pyre-fixme[61]: `to_cat_image_pos_embed` is undefined, or not always | COMMENT |
| HIGH⚡ | sam3/model/video_tracking_multiplex.py | 1615 | # pyre-fixme[61]: `to_cat_image_feat` is undefined, or not always defined. | COMMENT |
| HIGH⚡ | sam3/model/video_tracking_multiplex.py | 1617 | # pyre-fixme[61]: `to_cat_image_pos_embed` is undefined, or not always | COMMENT |
| HIGH⚡ | sam3/model/video_tracking_multiplex.py | 3275 | # pyre-fixme[61]: `existing_pointers` is undefined, or not always defined. | COMMENT |
| HIGH⚡ | sam3/model/video_tracking_multiplex.py | 3405 | # pyre-fixme[61]: `existing_pointers` is undefined, or not always defined. | COMMENT |
| HIGH⚡ | sam3/model/video_tracking_multiplex.py | 3407 | # pyre-fixme[61]: `existing_pointers` is undefined, or not always defined. | COMMENT |
| HIGH | sam3/model/video_tracking_multiplex.py | 931 | # pyre-fixme[61]: `obj_ptr` is undefined, or not always defined. | COMMENT |
| HIGH | sam3/model/video_tracking_multiplex.py | 1017 | # pyre-fixme[61]: `object_score_logits` is undefined, or not always defined. | COMMENT |
| HIGH | sam3/model/video_tracking_multiplex.py | 1021 | # pyre-fixme[61]: `obj_ptr` is undefined, or not always defined. | COMMENT |
| HIGH | sam3/model/video_tracking_multiplex.py | 1378 | # pyre-fixme[61]: `valid_indices` is undefined, or not always | COMMENT |
| HIGH | sam3/model/video_tracking_multiplex.py | 1382 | # pyre-fixme[61]: `valid_indices` is undefined, or not always | COMMENT |
| HIGH | sam3/model/video_tracking_multiplex.py | 1515 | # pyre-fixme[61]: `valid_indices` is undefined, or not | COMMENT |
| HIGH | sam3/model/video_tracking_multiplex.py | 1519 | # pyre-fixme[61]: `valid_indices` is undefined, or not | COMMENT |
| HIGH | sam3/model/video_tracking_multiplex.py | 1791 | # pyre-fixme[61]: `unconditioning_objects` is undefined, or not | COMMENT |
| HIGH | sam3/model/video_tracking_multiplex.py | 1794 | # pyre-fixme[61]: `unconditioning_objects` is undefined, or not | COMMENT |
| HIGH | sam3/model/video_tracking_multiplex.py | 2416 | # pyre-fixme[61]: `obj_ptr` is undefined, or not always defined. | COMMENT |
| HIGH | sam3/model/video_tracking_multiplex.py | 2417 | # pyre-fixme[61]: `interact_obj_ptr` is undefined, or not always | COMMENT |
| HIGH | sam3/model/video_tracking_multiplex.py | 2456 | # pyre-fixme[61]: `obj_ptr` is undefined, or not always defined. | COMMENT |
| HIGH⚡ | sam3/model/sam3_video_base.py | 850 | # pyre-fixme[61]: `new_det_fa_inds` is undefined, or not always defined. | COMMENT |
| HIGH⚡ | sam3/model/sam3_video_base.py | 852 | # pyre-fixme[61]: `new_det_obj_ids` is undefined, or not always defined. | COMMENT |
| HIGH⚡ | sam3/model/sam3_video_base.py | 854 | # pyre-fixme[61]: `new_det_gpu_ids` is undefined, or not always defined. | COMMENT |
| HIGH⚡ | sam3/model/sam3_video_base.py | 857 | # pyre-fixme[61]: `unmatched_trk_obj_ids` is undefined, or not | COMMENT |
| HIGH⚡ | sam3/model/sam3_video_base.py | 860 | # pyre-fixme[61]: `det_to_matched_trk_obj_ids` is undefined, or not | COMMENT |
| HIGH⚡ | sam3/model/sam3_video_base.py | 863 | # pyre-fixme[61]: `obj_ids_newly_removed` is undefined, or not | COMMENT |
| HIGH⚡ | sam3/model/sam3_video_base.py | 866 | # pyre-fixme[61]: `num_obj_dropped_due_to_limit` is undefined, or | COMMENT |
| HIGH⚡ | sam3/model/sam3_video_base.py | 869 | # pyre-fixme[61]: `trk_id_to_max_iou_high_conf_det` is undefined, or | COMMENT |
| HIGH⚡ | sam3/model/sam3_video_base.py | 905 | # pyre-fixme[61]: `new_det_fa_inds` is undefined, or not always defined. | COMMENT |
| HIGH⚡ | sam3/model/sam3_video_base.py | 907 | # pyre-fixme[61]: `new_det_obj_ids` is undefined, or not always defined. | COMMENT |
| HIGH⚡ | sam3/model/sam3_video_base.py | 909 | # pyre-fixme[61]: `new_det_gpu_ids` is undefined, or not always defined. | COMMENT |
| HIGH⚡ | sam3/model/sam3_video_base.py | 911 | # pyre-fixme[61]: `unmatched_trk_obj_ids` is undefined, or not always | COMMENT |
| HIGH⚡ | sam3/model/sam3_video_base.py | 914 | # pyre-fixme[61]: `det_to_matched_trk_obj_ids` is undefined, or not | COMMENT |
| HIGH⚡ | sam3/model/sam3_video_base.py | 917 | # pyre-fixme[61]: `obj_ids_newly_removed` is undefined, or not always | COMMENT |
| HIGH⚡ | sam3/model/sam3_video_base.py | 920 | # pyre-fixme[61]: `num_obj_dropped_due_to_limit` is undefined, or not | COMMENT |
| HIGH⚡ | sam3/model/sam3_video_base.py | 923 | # pyre-fixme[61]: `trk_id_to_max_iou_high_conf_det` is undefined, or not | COMMENT |
| HIGH⚡ | sam3/model/sam3_video_base.py | 991 | # pyre-fixme[61]: `trk_id_to_max_iou_high_conf_det` is undefined, or not | COMMENT |
| HIGH⚡ | sam3/model/sam3_video_base.py | 1001 | # pyre-fixme[61]: `trk_id_to_max_iou_high_conf_det` is undefined, or | COMMENT |
| HIGH⚡ | sam3/model/sam3_video_base.py | 1040 | # pyre-fixme[61]: `new_det_obj_ids` is undefined, or not always defined. | COMMENT |
| HIGH⚡ | sam3/model/sam3_video_base.py | 1041 | # pyre-fixme[61]: `new_det_gpu_ids` is undefined, or not always defined. | COMMENT |
| HIGH⚡ | sam3/model/sam3_video_base.py | 1048 | # pyre-fixme[61]: `obj_ids_newly_removed` is undefined, or not always | COMMENT |
| HIGH⚡ | sam3/model/sam3_video_base.py | 1052 | # pyre-fixme[61]: `obj_ids_newly_removed` is undefined, or not | COMMENT |
| HIGH⚡ | sam3/model/sam3_video_base.py | 1055 | # pyre-fixme[61]: `obj_ids_newly_removed` is undefined, or not | COMMENT |
| HIGH⚡ | sam3/model/sam3_video_base.py | 1068 | # pyre-fixme[61]: `new_det_obj_ids` is undefined, or not always defined. | COMMENT |
| HIGH⚡ | sam3/model/sam3_video_base.py | 1071 | # pyre-fixme[61]: `new_det_obj_ids` is undefined, or not always defined. | COMMENT |
| HIGH⚡ | sam3/model/sam3_video_base.py | 1072 | # pyre-fixme[61]: `new_det_fa_inds` is undefined, or not always defined. | COMMENT |
| HIGH⚡ | sam3/model/sam3_video_base.py | 1078 | # pyre-fixme[61]: `new_det_obj_ids` is undefined, or not always defined. | COMMENT |
| HIGH⚡ | sam3/model/sam3_video_base.py | 1079 | # pyre-fixme[61]: `new_det_fa_inds` is undefined, or not always defined. | COMMENT |
| 10 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/test_io_utils.py | 30 | def test_mov_extension_routes_to_video_loader( | CODE |
| LOW | test/test_io_utils.py | 43 | def test_extensionless_oil_path_routes_to_video_loader( | CODE |
| LOW | test/test_io_utils.py | 57 | def test_extensionless_bare_hash_routes_to_video_loader( | CODE |
| LOW | test/test_io_utils.py | 71 | def test_extensionless_path_raises_on_decode_failure( | CODE |
| LOW | test/test_io_utils.py | 86 | def test_directory_routes_to_image_folder_loader( | CODE |
| LOW | test/test_io_utils.py | 111 | def test_unknown_extension_routes_to_video_loader( | CODE |
| LOW | scripts/extract_roboflow_vl100_results.py | 201 | def extract_config_parameters(config_path: str, keys: List[str]) -> Dict[str, Any]: | CODE |
| LOW | scripts/extract_roboflow_vl100_results.py | 275 | def analyze_experiment_results(config_path: str) -> None: | CODE |
| LOW | scripts/eval/veval/saco_yt1b_frame_prep_util.py | 59 | def _get_yt_video_id_map_info(self): | CODE |
| LOW | scripts/eval/veval/saco_yt1b_downloader.py | 19 | def download_and_extract_frames(saco_yt1b_id, args): | CODE |
| LOW | scripts/eval/silver/download_preprocess_nga.py | 62 | def remove_non_compliant_image(item, output_folder): | CODE |
| LOW | sam3/visualization_utils.py | 207 | def visualize_formatted_frame_output( | CODE |
| LOW | sam3/visualization_utils.py | 512 | def prepare_masks_for_visualization(frame_to_output): | CODE |
| LOW | sam3/visualization_utils.py | 523 | def convert_coco_to_masklet_format( | CODE |
| LOW | sam3/visualization_utils.py | 584 | def save_side_by_side_visualization(img, gt_anns, pred_anns, noun_phrase): | CODE |
| LOW | sam3/visualization_utils.py | 695 | def get_all_annotations_for_frame( | CODE |
| LOW | sam3/model_builder.py | 66 | def _create_position_encoding(precompute_resolution=None): | CODE |
| LOW | sam3/model_builder.py | 125 | def _create_transformer_encoder(use_fa3=False) -> TransformerEncoderFusion: | CODE |
| LOW | sam3/model_builder.py | 165 | def _create_transformer_decoder(use_fa3=False) -> TransformerDecoder: | CODE |
| LOW | sam3/model_builder.py | 203 | def _create_dot_product_scoring(): | CODE |
| LOW | sam3/model_builder.py | 217 | def _create_segmentation_head(compile_mode=None, use_fa3=False): | CODE |
| LOW | sam3/model_builder.py | 344 | def _create_tracker_maskmem_backbone(): | CODE |
| LOW | sam3/model_builder.py | 380 | def _create_tracker_transformer(): | CODE |
| LOW | sam3/model_builder.py | 823 | def _create_multiplex_maskmem_backbone(multiplex_count=16): | CODE |
| LOW | sam3/model_builder.py | 863 | def _create_multiplex_transformer(use_fa3=False, use_rope_real=False): | CODE |
| LOW | sam3/model_builder.py | 920 | def _create_multiplex_tri_backbone( | CODE |
| LOW | sam3/sam/mask_decoder.py | 263 | def _dynamic_multimask_via_stability(self, all_mask_logits, all_iou_scores): | CODE |
| LOW⚡ | sam3/agent/agent_core.py | 56 | def _prune_messages_for_next_round( | CODE |
| LOW | sam3/agent/inference.py | 11 | def run_single_image_inference( | CODE |
| LOW | sam3/agent/helpers/boxes.py | 408 | def pairwise_point_box_distance(points: torch.Tensor, boxes: Boxes): | CODE |
| LOW | sam3/agent/helpers/masks.py | 44 | def rasterize_polygons_within_box( | CODE |
| LOW | sam3/agent/helpers/mask_overlap_removal.py | 67 | def _decode_masks_to_torch_bool(pred_masks: List, h: int, w: int) -> torch.Tensor: | CODE |
| LOW | sam3/agent/helpers/visualizer.py | 418 | def draw_instance_predictions(self, predictions): | CODE |
| LOW | sam3/agent/helpers/visualizer.py | 824 | def overlay_rotated_instances(self, boxes=None, labels=None, assigned_colors=None): | CODE |
| LOW | sam3/agent/helpers/visualizer.py | 866 | def draw_and_connect_keypoints(self, keypoints): | CODE |
| LOW | sam3/agent/helpers/visualizer.py | 1119 | def draw_rotated_box_with_label( | CODE |
| LOW | sam3/agent/helpers/visualizer.py | 1294 | def draw_binary_mask_with_number( | CODE |
| LOW | sam3/model/sam3_tracker_base.py | 465 | def _prepare_backbone_features(self, backbone_out): | CODE |
| LOW | sam3/model/sam3_tracker_base.py | 481 | def _prepare_backbone_features_per_frame(self, img_batch, img_ids): | CODE |
| LOW | sam3/model/sam3_tracker_base.py | 559 | def _prepare_memory_conditioned_features( | CODE |
| LOW | sam3/model/sam3_tracker_base.py | 1115 | def _apply_non_overlapping_constraints(self, pred_masks): | CODE |
| LOW | sam3/model/vl_combiner.py | 87 | def _forward_image_no_act_ckpt(self, samples): | CODE |
| LOW | sam3/model/vl_combiner.py | 135 | def _forward_text_no_ack_ckpt( | CODE |
| LOW | sam3/model/vl_combiner.py | 209 | def _forward_image_tri_no_act_ckpt( | CODE |
| LOW | sam3/model/sam3_multiplex_detector_utils.py | 185 | def _batched_generic_nms_mask( | CODE |
| LOW | sam3/model/sam3_multiplex_base.py | 374 | def all_gather_python_obj_cpu(self, object_list, python_obj): | CODE |
| LOW | sam3/model/sam3_multiplex_base.py | 477 | def _det_track_one_frame_impl( | CODE |
| LOW | sam3/model/sam3_multiplex_base.py | 647 | def run_backbone_and_detection( | CODE |
| LOW | sam3/model/sam3_multiplex_base.py | 1019 | def run_tracker_update_planning_phase( | CODE |
| LOW | sam3/model/sam3_multiplex_base.py | 1425 | def _suppress_overlapping_based_on_recent_occlusion( | CODE |
| LOW | sam3/model/sam3_multiplex_base.py | 1517 | def _create_planning_metadata(self, tracker_metadata_prev): | CODE |
| LOW | sam3/model/sam3_multiplex_base.py | 1527 | def _post_execution_phase_hook(self, tracker_states_local, tracker_metadata_new): | CODE |
| LOW | sam3/model/sam3_multiplex_base.py | 1636 | def _get_objects_to_suppress_based_on_most_recently_occluded( | CODE |
| LOW | sam3/model/sam3_multiplex_base.py | 1732 | def _propogate_tracker_one_frame_local_gpu( | CODE |
| LOW | sam3/model/sam3_multiplex_base.py | 2830 | def update_masklet_confirmation_status( | CODE |
| LOW | sam3/model/box_ops.py | 148 | def fast_diag_generalized_box_iou(boxes1, boxes2): | CODE |
| LOW⚡ | sam3/model/sam3_tracking_predictor.py | 1333 | def _suppress_object_pw_area_shrinkage(self, pred_masks): | CODE |
| LOW⚡ | sam3/model/sam3_tracking_predictor.py | 1349 | def _apply_object_wise_non_overlapping_constraints( | CODE |
| LOW | sam3/model/sam3_tracking_predictor.py | 465 | def _get_orig_video_res_output(self, inference_state, any_res_masks): | CODE |
| LOW | sam3/model/sam3_tracking_predictor.py | 492 | def _consolidate_temp_output_across_obj( | CODE |
| 210 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/extract_odinw_results.py | 52 | CODE | |
| LOW | scripts/eval/silver/download_fathomnet.py | 17 | CODE | |
| LOW | scripts/eval/silver/download_videos.py | 92 | CODE | |
| LOW | scripts/eval/silver/download_videos.py | 246 | CODE | |
| LOW | sam3/visualization_utils.py | 207 | CODE | |
| LOW | sam3/visualization_utils.py | 682 | CODE | |
| LOW | sam3/model_builder.py | 1070 | CODE | |
| LOW | sam3/agent/client_llm.py | 37 | CODE | |
| LOW | sam3/agent/client_llm.py | 131 | CODE | |
| LOW | sam3/agent/agent_core.py | 39 | CODE | |
| LOW | sam3/agent/agent_core.py | 124 | CODE | |
| LOW | sam3/agent/helpers/boxes.py | 48 | CODE | |
| LOW | sam3/agent/helpers/masks.py | 369 | CODE | |
| LOW | sam3/agent/helpers/visualizer.py | 1294 | CODE | |
| LOW | sam3/model/decoder.py | 430 | CODE | |
| LOW | sam3/model/data_misc.py | 228 | CODE | |
| LOW | sam3/model/sam3_tracker_base.py | 559 | CODE | |
| LOW | sam3/model/sam3_multiplex_base.py | 433 | CODE | |
| LOW | sam3/model/sam3_multiplex_base.py | 868 | CODE | |
| LOW | sam3/model/sam3_multiplex_base.py | 1019 | CODE | |
| LOW | sam3/model/sam3_multiplex_base.py | 1636 | CODE | |
| LOW | sam3/model/sam3_multiplex_base.py | 1732 | CODE | |
| LOW | sam3/model/sam3_multiplex_base.py | 2502 | CODE | |
| LOW | sam3/model/sam3_base_predictor.py | 50 | CODE | |
| LOW | sam3/model/sam3_tracking_predictor.py | 492 | CODE | |
| LOW | sam3/model/sam3_multiplex_tracking.py | 45 | CODE | |
| LOW | sam3/model/sam3_multiplex_tracking.py | 301 | CODE | |
| LOW | sam3/model/sam3_multiplex_tracking.py | 1363 | CODE | |
| LOW | sam3/model/sam3_multiplex_tracking.py | 1874 | CODE | |
| LOW | sam3/model/sam3_multiplex_tracking.py | 2296 | CODE | |
| LOW | sam3/model/sam3_multiplex_tracking.py | 2539 | CODE | |
| LOW | sam3/model/sam3_multiplex_tracking.py | 2747 | CODE | |
| LOW | sam3/model/sam3_multiplex_tracking.py | 3162 | CODE | |
| LOW | sam3/model/vitdet.py | 969 | CODE | |
| LOW | sam3/model/vitdet.py | 1033 | CODE | |
| LOW | sam3/model/sam3_image.py | 387 | CODE | |
| LOW | sam3/model/model_misc.py | 90 | CODE | |
| LOW | sam3/model/model_misc.py | 1062 | CODE | |
| LOW | sam3/model/sam3_video_inference.py | 253 | CODE | |
| LOW | sam3/model/sam3_video_inference.py | 653 | CODE | |
| LOW | sam3/model/sam3_video_inference.py | 1000 | CODE | |
| LOW | sam3/model/sam3_video_inference.py | 1226 | CODE | |
| LOW | sam3/model/sam3_video_inference.py | 1404 | CODE | |
| LOW | sam3/model/act_ckpt_utils.py | 19 | CODE | |
| LOW | sam3/model/act_ckpt_utils.py | 49 | CODE | |
| LOW | sam3/model/necks.py | 16 | CODE | |
| LOW | sam3/model/necks.py | 134 | CODE | |
| LOW | sam3/model/multiplex_utils.py | 149 | CODE | |
| LOW | sam3/model/sam3_multiplex_detector.py | 861 | CODE | |
| LOW | sam3/model/io_utils.py | 128 | CODE | |
| LOW | sam3/model/io_utils.py | 248 | CODE | |
| LOW | sam3/model/io_utils.py | 641 | CODE | |
| LOW | sam3/model/io_utils.py | 654 | CODE | |
| LOW | sam3/model/sam3_video_predictor.py | 256 | CODE | |
| LOW | sam3/model/video_tracking_multiplex.py | 656 | CODE | |
| LOW | sam3/model/video_tracking_multiplex.py | 935 | CODE | |
| LOW | sam3/model/video_tracking_multiplex.py | 1304 | CODE | |
| LOW | sam3/model/video_tracking_multiplex.py | 1649 | CODE | |
| LOW | sam3/model/video_tracking_multiplex.py | 1950 | CODE | |
| LOW | sam3/model/video_tracking_multiplex.py | 2863 | CODE | |
| 82 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | sam3/visualization_utils.py | 25 | # Step 1: Random RGB samples | COMMENT |
| LOW⚡ | sam3/visualization_utils.py | 28 | # Step 2: Convert to LAB for perceptual uniformity | COMMENT |
| LOW⚡ | sam3/visualization_utils.py | 32 | # Step 3: k-means clustering in LAB | COMMENT |
| LOW⚡ | sam3/visualization_utils.py | 38 | # Step 4: Convert LAB back to RGB | COMMENT |
| LOW | sam3/model/sam3_tracker_base.py | 584 | # Step 1: condition the visual features of the current frame on previous memories | COMMENT |
| LOW | sam3/model/sam3_tracker_base.py | 778 | # Step 2: Concatenate the memories and forward through the transformer encoder | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 503 | # Step 1: run backbone and FA in a distributed manner -- this is done via Sam3MultiplexDetector, | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 520 | # Step 2: each GPU propagates its local SAM2 states to get the SAM2 prediction masks. | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 554 | # Step 3: based on detection outputs and the propagated SAM2 prediction masks, we make plans | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 583 | # Step 4: based on `sam2_update_plan`, each GPU executes the update w.r.t. its local SAM2 inference states | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 599 | # Step 5: finally, build the outputs for this frame (it only needs to be done on GPU 0 since | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 658 | # Step 1: if text feature is not cached in `feature_cache`, compute and cache it | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 670 | # Step 2: run backbone, FA detection, and post-processing with NMS | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 758 | # Step 3: build SAM2 backbone features and store them in `feature_cache` | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 820 | # Step 1: propagate the local SAM2 states to get the current frame's prediction | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 837 | # Step 2: all-gather `low_res_masks_local` into `low_res_masks_global` | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 1039 | # Step 1: make the update plan and resolve heuristics on GPU 0 | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 1179 | # Step 4: Run SAM2 memory encoder on the current frame's prediction masks | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 1225 | # Step 4: update the SAM2 metadata based on the update plan | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 2405 | # Step 1: log the frame index where each object ID first appears | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 2435 | # Step 2: removed tracks that has not matched with detections for `hotstart_unmatch_thresh` frames with hotstart | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 2465 | # Step 3: removed tracks that overlaps with another track for `hotstart_dup_thresh` frames | COMMENT |
| LOW⚡ | sam3/model/sam3_tracking_predictor.py | 1343 | # NOTE: The output of this function can be a no op if none of the masks shrinked by a large factor. | COMMENT |
| LOW | sam3/model/sam3_tracking_predictor.py | 1205 | # Step 0: clear the input on those frames where this object id has point or mask input | COMMENT |
| LOW | sam3/model/sam3_tracking_predictor.py | 1220 | # Step 1: Update the object id mapping (note that it must be done after Step 0, | COMMENT |
| LOW | sam3/model/sam3_tracking_predictor.py | 1234 | # Step 2: For per-object tensor storage, we shift their obj_idx in the dict keys. | COMMENT |
| LOW | sam3/model/sam3_tracking_predictor.py | 1250 | # Step 3: For packed tensor storage, we index the remaining ids and rebuild the per-object slices. | COMMENT |
| LOW | sam3/model/sam3_tracking_predictor.py | 1277 | # Step 4: Further collect the outputs on those frames in `obj_input_frames_inds`, which | COMMENT |
| LOW⚡ | sam3/model/sam3_multiplex_tracking.py | 3344 | # Step 2: Remove the object from the source state | COMMENT |
| LOW⚡ | sam3/model/sam3_multiplex_tracking.py | 3349 | # Step 3: Create a new singleton inference state | COMMENT |
| LOW⚡ | sam3/model/sam3_multiplex_tracking.py | 3357 | # Step 4: Set up the singleton state structure for the extracted object | COMMENT |
| LOW⚡ | sam3/model/sam3_multiplex_tracking.py | 3363 | # Step 5: Restore all the extracted state | COMMENT |
| LOW⚡ | sam3/model/sam3_multiplex_tracking.py | 3428 | # Step 8: Add the new singleton state to the list | COMMENT |
| LOW⚡ | sam3/model/sam3_multiplex_tracking.py | 3431 | # Step 9: If the source state is now empty, remove it | COMMENT |
| LOW | sam3/model/sam3_multiplex_tracking.py | 3186 | # Step 1: Extract all the object's state data before removing it | COMMENT |
| LOW | sam3/model/sam3_multiplex_tracking.py | 3384 | # Step 6: Rebuild the consolidated output_dict for the singleton state | COMMENT |
| LOW | sam3/model/sam3_multiplex_tracking.py | 3414 | # Step 7: Copy other important state if it exists | COMMENT |
| LOW | sam3/model/sam3_image.py | 752 | # Step 1: fetch the detector outputs in the current chunk from buffer | COMMENT |
| LOW | sam3/model/sam3_image.py | 781 | # Step 2: remove detection outputs of the previous chunk from cache to save GPU memory | COMMENT |
| LOW | sam3/model/sam3_image.py | 795 | # Step 3: compute and cache detection outputs of the next chunk ahead of time | COMMENT |
| LOW | sam3/model/sam3_multiplex_detector.py | 408 | # Step 1: fetch the FA outputs in the current chunk from buffer | COMMENT |
| LOW | sam3/model/sam3_multiplex_detector.py | 450 | # Step 2: remove FA outputs of the previous chunk from cache to save GPU memory | COMMENT |
| LOW | sam3/model/sam3_multiplex_detector.py | 464 | # Step 3: compute and cache FA outputs of the next chunk ahead of time | COMMENT |
| LOW⚡ | sam3/model/video_tracking_multiplex.py | 3204 | # Step 2: Encode the incoming masks | COMMENT |
| LOW⚡ | sam3/model/video_tracking_multiplex.py | 3213 | # Step 3: Merge the existing state with new encoded features | COMMENT |
| LOW⚡ | sam3/model/video_tracking_multiplex.py | 3279 | # Step 4: Update the set of conditioning objects at this frame. | COMMENT |
| LOW⚡ | sam3/model/video_tracking_multiplex.py | 3282 | # Step 5: Re-encode the spatial memory if needed | COMMENT |
| LOW⚡ | sam3/model/video_tracking_multiplex.py | 3346 | # Step 1: Encode the incoming masks | COMMENT |
| LOW⚡ | sam3/model/video_tracking_multiplex.py | 3355 | # Step 2: Merge the existing state with new encoded features | COMMENT |
| LOW⚡ | sam3/model/video_tracking_multiplex.py | 3410 | # Step 3: Update the set of conditioning objects at this frame | COMMENT |
| LOW⚡ | sam3/model/video_tracking_multiplex.py | 3413 | # Step 4: Re-encode the spatial memory if needed | COMMENT |
| LOW | sam3/model/video_tracking_multiplex.py | 1341 | # Step 1: condition the visual features of the current frame on previous memories | COMMENT |
| LOW | sam3/model/video_tracking_multiplex.py | 1593 | # Step 2: Concatenate the memories and forward through the transformer encoder | COMMENT |
| LOW | sam3/model/video_tracking_multiplex.py | 3191 | # Step 1: Inform the multiplex state that we are adding new objects | COMMENT |
| LOW⚡ | sam3/model/video_tracking_multiplex_demo.py | 466 | # Step 3: Create new singleton inference state | COMMENT |
| LOW⚡ | sam3/model/video_tracking_multiplex_demo.py | 474 | # Step 4: Set up singleton state structure | COMMENT |
| LOW⚡ | sam3/model/video_tracking_multiplex_demo.py | 496 | # Step 5: Create new singleton multiplex state (even for 1 object, needed for obj_ptr) | COMMENT |
| LOW⚡ | sam3/model/video_tracking_multiplex_demo.py | 506 | # Step 6: Remux extracted tensors into the singleton multiplex space | COMMENT |
| LOW | sam3/model/video_tracking_multiplex_demo.py | 207 | # Step 1: Extract all object data BEFORE removing it | COMMENT |
| LOW | sam3/model/video_tracking_multiplex_demo.py | 448 | # Step 2: Remove the object from source state | COMMENT |
| 35 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | sam3/visualization_utils.py | 25 | # Step 1: Random RGB samples | COMMENT |
| LOW⚡ | sam3/visualization_utils.py | 28 | # Step 2: Convert to LAB for perceptual uniformity | COMMENT |
| LOW⚡ | sam3/visualization_utils.py | 32 | # Step 3: k-means clustering in LAB | COMMENT |
| LOW⚡ | sam3/visualization_utils.py | 38 | # Step 4: Convert LAB back to RGB | COMMENT |
| LOW | sam3/model/sam3_tracker_base.py | 584 | # Step 1: condition the visual features of the current frame on previous memories | COMMENT |
| LOW | sam3/model/sam3_tracker_base.py | 778 | # Step 2: Concatenate the memories and forward through the transformer encoder | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 503 | # Step 1: run backbone and FA in a distributed manner -- this is done via Sam3MultiplexDetector, | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 520 | # Step 2: each GPU propagates its local SAM2 states to get the SAM2 prediction masks. | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 554 | # Step 3: based on detection outputs and the propagated SAM2 prediction masks, we make plans | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 583 | # Step 4: based on `sam2_update_plan`, each GPU executes the update w.r.t. its local SAM2 inference states | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 599 | # Step 5: finally, build the outputs for this frame (it only needs to be done on GPU 0 since | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 658 | # Step 1: if text feature is not cached in `feature_cache`, compute and cache it | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 670 | # Step 2: run backbone, FA detection, and post-processing with NMS | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 758 | # Step 3: build SAM2 backbone features and store them in `feature_cache` | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 820 | # Step 1: propagate the local SAM2 states to get the current frame's prediction | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 837 | # Step 2: all-gather `low_res_masks_local` into `low_res_masks_global` | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 1039 | # Step 1: make the update plan and resolve heuristics on GPU 0 | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 1179 | # Step 4: Run SAM2 memory encoder on the current frame's prediction masks | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 1225 | # Step 4: update the SAM2 metadata based on the update plan | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 2405 | # Step 1: log the frame index where each object ID first appears | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 2435 | # Step 2: removed tracks that has not matched with detections for `hotstart_unmatch_thresh` frames with hotstart | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 2465 | # Step 3: removed tracks that overlaps with another track for `hotstart_dup_thresh` frames | COMMENT |
| LOW | sam3/model/sam3_tracking_predictor.py | 1205 | # Step 0: clear the input on those frames where this object id has point or mask input | COMMENT |
| LOW | sam3/model/sam3_tracking_predictor.py | 1220 | # Step 1: Update the object id mapping (note that it must be done after Step 0, | COMMENT |
| LOW | sam3/model/sam3_tracking_predictor.py | 1234 | # Step 2: For per-object tensor storage, we shift their obj_idx in the dict keys. | COMMENT |
| LOW | sam3/model/sam3_tracking_predictor.py | 1250 | # Step 3: For packed tensor storage, we index the remaining ids and rebuild the per-object slices. | COMMENT |
| LOW | sam3/model/sam3_tracking_predictor.py | 1277 | # Step 4: Further collect the outputs on those frames in `obj_input_frames_inds`, which | COMMENT |
| LOW⚡ | sam3/model/sam3_multiplex_tracking.py | 3344 | # Step 2: Remove the object from the source state | COMMENT |
| LOW⚡ | sam3/model/sam3_multiplex_tracking.py | 3349 | # Step 3: Create a new singleton inference state | COMMENT |
| LOW⚡ | sam3/model/sam3_multiplex_tracking.py | 3357 | # Step 4: Set up the singleton state structure for the extracted object | COMMENT |
| LOW⚡ | sam3/model/sam3_multiplex_tracking.py | 3363 | # Step 5: Restore all the extracted state | COMMENT |
| LOW⚡ | sam3/model/sam3_multiplex_tracking.py | 3428 | # Step 8: Add the new singleton state to the list | COMMENT |
| LOW⚡ | sam3/model/sam3_multiplex_tracking.py | 3431 | # Step 9: If the source state is now empty, remove it | COMMENT |
| LOW | sam3/model/sam3_multiplex_tracking.py | 3186 | # Step 1: Extract all the object's state data before removing it | COMMENT |
| LOW | sam3/model/sam3_multiplex_tracking.py | 3384 | # Step 6: Rebuild the consolidated output_dict for the singleton state | COMMENT |
| LOW | sam3/model/sam3_multiplex_tracking.py | 3414 | # Step 7: Copy other important state if it exists | COMMENT |
| LOW | sam3/model/sam3_image.py | 752 | # Step 1: fetch the detector outputs in the current chunk from buffer | COMMENT |
| LOW | sam3/model/sam3_image.py | 781 | # Step 2: remove detection outputs of the previous chunk from cache to save GPU memory | COMMENT |
| LOW | sam3/model/sam3_image.py | 795 | # Step 3: compute and cache detection outputs of the next chunk ahead of time | COMMENT |
| LOW | sam3/model/sam3_multiplex_detector.py | 408 | # Step 1: fetch the FA outputs in the current chunk from buffer | COMMENT |
| LOW | sam3/model/sam3_multiplex_detector.py | 450 | # Step 2: remove FA outputs of the previous chunk from cache to save GPU memory | COMMENT |
| LOW | sam3/model/sam3_multiplex_detector.py | 464 | # Step 3: compute and cache FA outputs of the next chunk ahead of time | COMMENT |
| LOW⚡ | sam3/model/video_tracking_multiplex.py | 3204 | # Step 2: Encode the incoming masks | COMMENT |
| LOW⚡ | sam3/model/video_tracking_multiplex.py | 3213 | # Step 3: Merge the existing state with new encoded features | COMMENT |
| LOW⚡ | sam3/model/video_tracking_multiplex.py | 3279 | # Step 4: Update the set of conditioning objects at this frame. | COMMENT |
| LOW⚡ | sam3/model/video_tracking_multiplex.py | 3282 | # Step 5: Re-encode the spatial memory if needed | COMMENT |
| LOW⚡ | sam3/model/video_tracking_multiplex.py | 3346 | # Step 1: Encode the incoming masks | COMMENT |
| LOW⚡ | sam3/model/video_tracking_multiplex.py | 3355 | # Step 2: Merge the existing state with new encoded features | COMMENT |
| LOW⚡ | sam3/model/video_tracking_multiplex.py | 3410 | # Step 3: Update the set of conditioning objects at this frame | COMMENT |
| LOW⚡ | sam3/model/video_tracking_multiplex.py | 3413 | # Step 4: Re-encode the spatial memory if needed | COMMENT |
| LOW | sam3/model/video_tracking_multiplex.py | 1341 | # Step 1: condition the visual features of the current frame on previous memories | COMMENT |
| LOW | sam3/model/video_tracking_multiplex.py | 1593 | # Step 2: Concatenate the memories and forward through the transformer encoder | COMMENT |
| LOW | sam3/model/video_tracking_multiplex.py | 3191 | # Step 1: Inform the multiplex state that we are adding new objects | COMMENT |
| LOW⚡ | sam3/model/video_tracking_multiplex_demo.py | 466 | # Step 3: Create new singleton inference state | COMMENT |
| LOW⚡ | sam3/model/video_tracking_multiplex_demo.py | 474 | # Step 4: Set up singleton state structure | COMMENT |
| LOW⚡ | sam3/model/video_tracking_multiplex_demo.py | 496 | # Step 5: Create new singleton multiplex state (even for 1 object, needed for obj_ptr) | COMMENT |
| LOW⚡ | sam3/model/video_tracking_multiplex_demo.py | 506 | # Step 6: Remux extracted tensors into the singleton multiplex space | COMMENT |
| LOW | sam3/model/video_tracking_multiplex_demo.py | 207 | # Step 1: Extract all object data BEFORE removing it | COMMENT |
| LOW | sam3/model/video_tracking_multiplex_demo.py | 448 | # Step 2: Remove the object from source state | COMMENT |
| LOW | sam3/model/video_tracking_multiplex_demo.py | 557 | # Step 1: Add object mappings at new index | COMMENT |
| 33 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/eval/silver/utils.py | 8 | CODE | |
| LOW | scripts/eval/silver/utils.py | 12 | CODE | |
| LOW | scripts/eval/silver/utils.py | 13 | CODE | |
| LOW | scripts/eval/silver/utils.py | 16 | CODE | |
| LOW | scripts/eval/silver/download_fathomnet.py | 6 | CODE | |
| LOW | scripts/eval/silver/download_videos.py | 7 | CODE | |
| LOW | scripts/eval/silver/download_videos.py | 17 | CODE | |
| LOW | sam3/model_builder.py | 5 | CODE | |
| LOW | sam3/model_builder.py | 47 | CODE | |
| LOW | sam3/__init__.py | 5 | CODE | |
| LOW | sam3/__init__.py | 5 | CODE | |
| LOW | sam3/sam/__init__.py | 4 | CODE | |
| LOW | sam3/sam/__init__.py | 5 | CODE | |
| LOW | sam3/sam/__init__.py | 6 | CODE | |
| LOW | sam3/agent/helpers/rotated_boxes.py | 5 | CODE | |
| LOW | sam3/agent/helpers/rotated_boxes.py | 5 | CODE | |
| LOW | sam3/agent/helpers/rotated_boxes.py | 5 | CODE | |
| LOW | sam3/agent/helpers/rotated_boxes.py | 5 | CODE | |
| LOW | sam3/model/decoder.py | 11 | CODE | |
| LOW | sam3/model/data_misc.py | 8 | CODE | |
| LOW | sam3/model/data_misc.py | 9 | CODE | |
| LOW | sam3/model/data_misc.py | 10 | CODE | |
| LOW | sam3/model/data_misc.py | 11 | CODE | |
| LOW | sam3/model/data_misc.py | 11 | CODE | |
| LOW | sam3/model/vl_combiner.py | 15 | CODE | |
| LOW | sam3/model/sam3_multiplex_base.py | 1 | CODE | |
| LOW | sam3/model/sam3_multiplex_base.py | 6 | CODE | |
| LOW | sam3/model/sam3_multiplex_base.py | 8 | CODE | |
| LOW | sam3/model/sam3_multiplex_base.py | 28 | CODE | |
| LOW | sam3/model/sam3_base_predictor.py | 15 | CODE | |
| LOW | sam3/model/sam3_base_predictor.py | 226 | CODE | |
| LOW | sam3/model/sam3_multiplex_tracking.py | 2 | CODE | |
| LOW | sam3/model/sam3_multiplex_tracking.py | 3 | CODE | |
| LOW | sam3/model/sam3_multiplex_tracking.py | 23 | CODE | |
| LOW | sam3/model/sam3_multiplex_tracking.py | 30 | CODE | |
| LOW | sam3/model/sam3_multiplex_tracking.py | 33 | CODE | |
| LOW | sam3/model/sam3_multiplex_video_predictor.py | 13 | CODE | |
| LOW | sam3/model/sam3_multiplex_video_predictor.py | 13 | CODE | |
| LOW | sam3/model/vitdet.py | 17 | CODE | |
| LOW | sam3/model/encoder.py | 6 | CODE | |
| LOW | sam3/model/sam3_multiplex_detector.py | 10 | CODE | |
| LOW | sam3/model/sam3_multiplex_detector.py | 10 | CODE | |
| LOW | sam3/model/sam3_video_predictor.py | 6 | CODE | |
| LOW | sam3/model/sam3_video_predictor.py | 12 | CODE | |
| LOW | sam3/model/sam3_video_predictor.py | 15 | CODE | |
| LOW | sam3/model/sam3_video_predictor.py | 15 | CODE | |
| LOW | sam3/model/sam3_video_base.py | 13 | CODE | |
| LOW | sam3/model/sam3_video_base.py | 20 | CODE | |
| LOW | sam3/train/optim/optimizer.py | 9 | CODE | |
| LOW | sam3/train/data/sam3_video_dataset.py | 6 | CODE | |
| LOW | sam3/train/data/sam3_video_dataset.py | 7 | CODE | |
| LOW | sam3/train/data/sam3_video_dataset.py | 10 | CODE | |
| LOW | sam3/train/data/sam3_video_dataset.py | 11 | CODE | |
| LOW | sam3/train/data/sam3_video_dataset.py | 13 | CODE | |
| LOW | sam3/train/data/sam3_video_dataset.py | 14 | CODE | |
| LOW | sam3/train/data/sam3_video_dataset.py | 14 | CODE | |
| LOW | sam3/train/data/sam3_video_dataset.py | 14 | CODE | |
| LOW | sam3/train/data/sam3_video_dataset.py | 14 | CODE | |
| LOW | sam3/train/data/sam3_video_dataset.py | 14 | CODE | |
| LOW | sam3/train/data/sam3_video_dataset.py | 14 | CODE | |
| 36 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | sam3/model_builder.py | 462 | # Create the Tracker module | COMMENT |
| MEDIUM | sam3/model_builder.py | 635 | # Create the SAM3 model | COMMENT |
| MEDIUM | sam3/model_builder.py | 713 | # Create main dot product scoring | COMMENT |
| MEDIUM | sam3/agent/client_llm.py | 83 | # Create the proper image_url structure with base64 data | COMMENT |
| MEDIUM | sam3/agent/agent_core.py | 442 | # Create a new filename based on the original path to avoid filename length issues | COMMENT |
| MEDIUM | sam3/model/sam3_multiplex_base.py | 318 | # Initialize profiling variables | COMMENT |
| MEDIUM | sam3/model/sam3_multiplex_base.py | 2694 | # Create a new state if needed | COMMENT |
| MEDIUM | sam3/model/sam3_multiplex_tracking.py | 1757 | """This method is only used for benchmark eval (not used in the demo).""" | STRING |
| MEDIUM | sam3/model/sam1_task_predictor.py | 181 | """This function is very similar to predict(...), however it is used for batched mode, when the model is expecte | STRING |
| MEDIUM | sam3/model/sam3_video_inference.py | 910 | """This method is only used for benchmark eval (not used in the demo).""" | STRING |
| MEDIUM | sam3/model/act_ckpt_utils.py | 60 | # Create a mapping of parameter names to their default values | COMMENT |
| MEDIUM⚡ | sam3/model/multiplex_utils.py | 353 | # Create a transition matrix for muxing | COMMENT |
| MEDIUM⚡ | sam3/model/multiplex_utils.py | 361 | # Create a transition matrix for demuxing | COMMENT |
| MEDIUM | sam3/model/video_tracking_multiplex.py | 1713 | # Create a 1D conditioning mask on GPU and broadcast it | COMMENT |
| MEDIUM | sam3/model/sam3_video_base.py | 2053 | """This method is only used for benchmark eval (not used in the demo).""" | STRING |
| MEDIUM | sam3/train/transforms/basic_for_api.py | 986 | # Create a color jitter transformation params | COMMENT |
| MEDIUM | sam3/train/transforms/basic_for_api.py | 1081 | # Create a random affine transformation | COMMENT |
| MEDIUM | sam3/train/transforms/basic_for_api.py | 1197 | # Create a random crop transformation | COMMENT |
| MEDIUM | sam3/train/transforms/basic_for_api.py | 1207 | # Create a random crop transformation | COMMENT |
| MEDIUM | sam3/eval/coco_reindex.py | 168 | # Create a test COCO file | COMMENT |
| MEDIUM | sam3/eval/coco_eval_offline.py | 150 | # Creating the result file | COMMENT |
| MEDIUM | sam3/eval/coco_eval.py | 201 | # This function is used for "oracle" type evaluation. | COMMENT |
| MEDIUM | sam3/eval/demo_eval.py | 525 | # This function is used for "oracle" type evaluation. | COMMENT |
| MEDIUM | sam3/eval/cgf1_eval.py | 666 | # This function is used for "oracle" type evaluation. | COMMENT |
| MEDIUM | sam3/perflib/triton/connected_components.py | 78 | # This function implements a disjoint-set union | COMMENT |
| MEDIUM | sam3/perflib/triton/connected_components.py | 93 | # Define the mask for lanes that still need work in this iteration | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | scripts/extract_roboflow_vl100_results.py | 173 | print(f"Error: Failed to parse JSON in {file_path}: {e}") | CODE |
| LOW⚡ | scripts/extract_roboflow_vl100_results.py | 175 | except Exception as e: | CODE |
| MEDIUM⚡ | scripts/extract_roboflow_vl100_results.py | 176 | print(f"Error: Failed to read {file_path}: {e}") | CODE |
| LOW | scripts/extract_roboflow_vl100_results.py | 231 | except Exception as e: | CODE |
| MEDIUM | scripts/extract_roboflow_vl100_results.py | 232 | print(f"Error: Failed to parse config file {config_path}: {e}") | CODE |
| LOW | scripts/extract_roboflow_vl100_results.py | 376 | except Exception as e: | CODE |
| MEDIUM | scripts/extract_roboflow_vl100_results.py | 377 | print(f"Error analyzing {config_file}: {e}") | CODE |
| MEDIUM | scripts/extract_odinw_results.py | 76 | print(f"Error reading {val_stats_path}: {e}") | CODE |
| LOW | scripts/bench_compile.py | 152 | except Exception as e: | CODE |
| LOW | scripts/eval/veval/saco_yt1b_frame_prep_util.py | 119 | except Exception as e: | CODE |
| LOW | scripts/eval/silver/utils.py | 65 | except Exception: | CODE |
| MEDIUM | scripts/eval/silver/utils.py | 61 | def is_valid_image(img_path): | CODE |
| MEDIUM | scripts/eval/silver/download_fathomnet.py | 34 | print(f"Error downloading {image.url}: {e}") | CODE |
| LOW | scripts/eval/silver/download_videos.py | 63 | except Exception as e: | CODE |
| LOW | scripts/eval/silver/download_videos.py | 88 | except Exception as e: | CODE |
| MEDIUM | scripts/eval/silver/download_videos.py | 67 | def download_youtube_video(youtube_id, output_path=None): | CODE |
| LOW | sam3/agent/client_llm.py | 32 | except Exception as e: | CODE |
| MEDIUM | sam3/agent/client_llm.py | 33 | print(f"Error converting image to base64: {e}") | CODE |
| LOW | sam3/agent/client_llm.py | 97 | except Exception as e: | CODE |
| LOW | sam3/agent/client_llm.py | 126 | except Exception as e: | CODE |
| LOW | sam3/agent/client_llm.py | 179 | except Exception as e: | CODE |
| LOW | sam3/agent/client_llm.py | 206 | except Exception as e: | CODE |
| LOW | sam3/agent/client_sam3.py | 137 | except Exception as e: | CODE |
| LOW⚡ | sam3/agent/agent_core.py | 35 | except Exception as e: | CODE |
| LOW | sam3/agent/helpers/mask_overlap_removal.py | 12 | except Exception: | CODE |
| LOW | sam3/model/io_utils.py | 186 | except Exception as e: | CODE |
| LOW | sam3/model/io_utils.py | 425 | except Exception as e: | CODE |
| LOW | sam3/model/io_utils.py | 670 | except Exception as e: | CODE |
| LOW | sam3/model/io_utils.py | 683 | except Exception as e: | CODE |
| MEDIUM | sam3/model/io_utils.py | 418 | def _load_frames(): | CODE |
| LOW | sam3/model/sam3_video_predictor.py | 316 | except Exception as e: | CODE |
| LOW | sam3/model/utils/sam2_utils.py | 67 | except Exception as e: | CODE |
| MEDIUM | sam3/model/utils/sam2_utils.py | 63 | def _load_frames(): | CODE |
| LOW | sam3/model/utils/sam1_utils.py | 108 | except Exception as e: | CODE |
| LOW | sam3/train/train.py | 54 | except Exception as e: | CODE |
| LOW | sam3/train/train.py | 117 | except Exception as e: | CODE |
| LOW | sam3/eval/postprocessors.py | 199 | except Exception as e: | CODE |
| LOW | sam3/eval/teta_eval_toolkit/eval.py | 69 | except Exception as err: | CODE |
| LOW⚡ | sam3/eval/teta_eval_toolkit/datasets/_base_dataset.py | 228 | except Exception: | CODE |
| LOW⚡ | sam3/eval/teta_eval_toolkit/datasets/_base_dataset.py | 236 | except Exception: | CODE |
| MEDIUM⚡ | sam3/eval/teta_eval_toolkit/datasets/_base_dataset.py | 237 | print("Error loading file: %s, printing traceback." % file) | CODE |
| LOW | sam3/eval/hota_eval_toolkit/trackeval/eval.py | 364 | except Exception as err: | CODE |
| LOW⚡ | …/hota_eval_toolkit/trackeval/datasets/_base_dataset.py | 228 | except Exception: | CODE |
| LOW⚡ | …/hota_eval_toolkit/trackeval/datasets/_base_dataset.py | 236 | except Exception: | CODE |
| MEDIUM⚡ | …/hota_eval_toolkit/trackeval/datasets/_base_dataset.py | 237 | print("Error loading file: %s, printing traceback." % file) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | sam3/model_builder.py | 573 | CODE | |
| LOW | sam3/model_builder.py | 676 | CODE | |
| LOW | sam3/model_builder.py | 937 | CODE | |
| LOW | sam3/model_builder.py | 1070 | CODE | |
| LOW | sam3/model_builder.py | 1244 | CODE | |
| LOW | sam3/sam/transformer.py | 265 | CODE | |
| LOW | sam3/sam/transformer.py | 360 | CODE | |
| LOW | sam3/sam/mask_decoder.py | 15 | CODE | |
| LOW | sam3/agent/helpers/masks.py | 237 | CODE | |
| LOW | sam3/agent/helpers/visualizer.py | 687 | CODE | |
| LOW | sam3/model/decoder.py | 1067 | CODE | |
| LOW | sam3/model/decoder.py | 82 | CODE | |
| LOW | sam3/model/decoder.py | 209 | CODE | |
| LOW | sam3/model/decoder.py | 430 | CODE | |
| LOW | sam3/model/decoder.py | 693 | CODE | |
| LOW | sam3/model/decoder.py | 852 | CODE | |
| LOW | sam3/model/decoder.py | 900 | CODE | |
| LOW | sam3/model/decoder.py | 965 | CODE | |
| LOW | sam3/model/decoder.py | 1143 | CODE | |
| LOW | sam3/model/sam3_tracker_base.py | 27 | CODE | |
| LOW | sam3/model/vl_combiner.py | 122 | CODE | |
| LOW | sam3/model/vl_combiner.py | 322 | CODE | |
| LOW | sam3/model/vl_combiner.py | 336 | CODE | |
| LOW | sam3/model/sam3_multiplex_base.py | 43 | CODE | |
| LOW | sam3/model/sam3_multiplex_base.py | 197 | CODE | |
| LOW | sam3/model/text_encoder_ve.py | 170 | CODE | |
| LOW | sam3/model/text_encoder_ve.py | 260 | CODE | |
| LOW | sam3/model/memory.py | 30 | CODE | |
| LOW | sam3/model/sam3_base_predictor.py | 149 | CODE | |
| LOW | sam3/model/sam3_tracking_predictor.py | 57 | CODE | |
| LOW | sam3/model/sam3_multiplex_tracking.py | 1655 | CODE | |
| LOW | sam3/model/sam3_multiplex_tracking.py | 2693 | CODE | |
| LOW | sam3/model/vitdet.py | 391 | CODE | |
| LOW | sam3/model/vitdet.py | 652 | CODE | |
| LOW | sam3/model/vitdet.py | 766 | CODE | |
| LOW | sam3/model/sam3_image.py | 39 | CODE | |
| LOW | sam3/model/model_misc.py | 90 | CODE | |
| LOW | sam3/model/model_misc.py | 475 | CODE | |
| LOW | sam3/model/multiplex_utils.py | 403 | CODE | |
| LOW | sam3/model/multiplex_utils.py | 425 | CODE | |
| LOW | sam3/model/sam3_multiplex_detector.py | 356 | CODE | |
| LOW | sam3/model/sam3_multiplex_detector.py | 661 | CODE | |
| LOW | sam3/model/geometry_encoders.py | 102 | CODE | |
| LOW | sam3/model/sam3_video_predictor.py | 26 | CODE | |
| LOW | sam3/model/video_tracking_multiplex.py | 97 | CODE | |
| LOW | sam3/model/video_tracking_multiplex.py | 3438 | CODE | |
| LOW | sam3/model/video_tracking_multiplex_demo.py | 2652 | CODE | |
| LOW | sam3/model/sam3_video_base.py | 266 | CODE | |
| LOW | sam3/model/multiplex_mask_decoder.py | 17 | CODE | |
| LOW | sam3/train/matcher.py | 445 | CODE | |
| LOW | sam3/train/trainer.py | 150 | CODE | |
| LOW | sam3/train/loss/sam3_loss.py | 38 | CODE | |
| LOW | sam3/train/loss/loss_fns.py | 267 | CODE | |
| LOW | sam3/train/loss/loss_fns.py | 576 | CODE | |
| LOW | sam3/train/transforms/point_sampling.py | 196 | CODE | |
| LOW | sam3/train/data/sam3_video_dataset.py | 29 | CODE | |
| LOW | sam3/train/data/sam3_image_dataset.py | 148 | CODE | |
| LOW | sam3/train/data/sam3_image_dataset.py | 443 | CODE | |
| LOW | sam3/eval/saco_veval_evaluators.py | 338 | CODE | |
| LOW | sam3/eval/postprocessors.py | 35 | CODE | |
| 8 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | sam3/model/sam3_multiplex_tracking.py | 1652 | self.tracker.transformer.encoder.forward.set_logging(True) | CODE |
| CRITICAL | sam3/model/sam3_video_inference.py | 836 | self.tracker.transformer.encoder.forward.set_logging(True) | CODE |
| CRITICAL | sam3/model/sam3_image_processor.py | 64 | self.model.inst_interactive_predictor.model.sam_mask_decoder.conv_s0( | CODE |
| CRITICAL | sam3/model/sam3_image_processor.py | 69 | self.model.inst_interactive_predictor.model.sam_mask_decoder.conv_s1( | CODE |
| CRITICAL | sam3/model/sam3_image_processor.py | 102 | self.model.inst_interactive_predictor.model.sam_mask_decoder.conv_s0( | CODE |
| CRITICAL | sam3/model/sam3_image_processor.py | 107 | self.model.inst_interactive_predictor.model.sam_mask_decoder.conv_s1( | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/extract_roboflow_vl100_results.py | 317 | # Print results summary | COMMENT |
| LOW | scripts/extract_odinw_results.py | 79 | # Print results | COMMENT |
| LOW | scripts/qualitative_test.py | 287 | # Print results | COMMENT |
| LOW | scripts/eval/veval/saco_yt1b_frame_prep_util.py | 93 | # Check if the output file already exists | COMMENT |
| LOW⚡ | sam3/agent/agent_core.py | 43 | # Check if message has content (should be a list) | COMMENT |
| LOW⚡ | sam3/agent/agent_core.py | 47 | # Check if content item is a dict with type "image" | COMMENT |
| LOW | sam3/agent/agent_core.py | 232 | # Check if this text_prompt has been used before | COMMENT |
| LOW | sam3/agent/inference.py | 39 | # Check if output already exists and skip | COMMENT |
| LOW | sam3/model/sam3_multiplex_detector_utils.py | 76 | # Check if input is batched (has batch dimension) | COMMENT |
| LOW⚡ | sam3/model/sam3_multiplex_base.py | 2287 | # Check if objects are within hotstart window | COMMENT |
| LOW | sam3/model/sam3_multiplex_tracking.py | 2794 | # Check if this is a batched state (contains multiple objects) | COMMENT |
| LOW | sam3/model/act_ckpt_utils.py | 69 | # Set arg to default value if it's not in kwargs. Useful for primitive types or args that default to | COMMENT |
| LOW | sam3/model/multiplex_utils.py | 276 | # Check if all objects in this bucket are removed or are paddings | COMMENT |
| LOW⚡ | sam3/model/video_tracking_multiplex.py | 3218 | # Check if prev_output needs resolution adjustment | COMMENT |
| LOW | sam3/model/video_tracking_multiplex_demo.py | 221 | # Check if this frame has valid data for this object | COMMENT |
| LOW | sam3/model/video_tracking_multiplex_demo.py | 706 | # Check if singleton features are in multiplexed format and demux if needed | COMMENT |
| LOW | sam3/model/video_tracking_multiplex_demo.py | 749 | # Check if singleton pos_enc is in multiplexed format and demux if needed | COMMENT |
| LOW | sam3/model/video_tracking_multiplex_demo.py | 878 | # Check if singleton features are in multiplexed format and demux if needed | COMMENT |
| LOW | sam3/model/video_tracking_multiplex_demo.py | 900 | # Check if features are in multiplex format before demuxing | COMMENT |
| LOW | sam3/model/video_tracking_multiplex_demo.py | 974 | # Check if singleton pos_enc is in multiplexed format and demux if needed | COMMENT |
| LOW | sam3/model/video_tracking_multiplex_demo.py | 990 | # Check if pos_enc is in multiplex format before demuxing | COMMENT |
| LOW | sam3/model/video_tracking_multiplex_demo.py | 2020 | # Check if this object has point inputs on this frame | COMMENT |
| LOW | sam3/model/video_tracking_multiplex_demo.py | 2030 | # Check if this object has mask inputs on this frame | COMMENT |
| LOW | sam3/model/video_tracking_multiplex_demo.py | 2119 | # Check if this object index exists in temp/output dicts (it may not if object was just added) | COMMENT |
| LOW | sam3/model/video_tracking_multiplex_demo.py | 2214 | # Check if we have ANY valid per-object outputs | COMMENT |
| LOW | sam3/train/nms_helper.py | 9 | # Check if Numba is available | COMMENT |
| LOW | sam3/train/nms_helper.py | 280 | if len(remaining_bboxes) > 0: # Check if there are any remaining boxes | CODE |
| LOW | sam3/train/trainer.py | 1058 | # Check if there are any duplicates | COMMENT |
| LOW | sam3/train/transforms/filter_query_transforms.py | 228 | # Check if height or width of bounding box is zero | COMMENT |
| LOW | sam3/eval/coco_reindex.py | 133 | # Check if reindexing is needed | COMMENT |
| LOW | sam3/eval/saco_veval_evaluators.py | 800 | # Set category_id to 1 for class-agnostic | COMMENT |
| LOW | sam3/perflib/triton/nms.py | 49 | # Check if current box is still kept | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | sam3/agent/helpers/rotated_boxes.py | 441 | # A(-w / 2, -h / 2), B(w / 2, -h / 2), C(w / 2, h / 2), D(-w / 2, h / 2) | COMMENT |
| LOW | sam3/agent/helpers/rotated_boxes.py | 461 | # For example, | COMMENT |
| LOW | sam3/agent/helpers/visualizer.py | 761 | areas = np.asarray([x.area() for x in masks]) | COMMENT |
| LOW | sam3/model/sam3_tracker_base.py | 41 | # whether to output multiple (3) masks for the first click on initial conditioning frames | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 201 | ckpt_path=None, | COMMENT |
| LOW | sam3/model/sam3_multiplex_base.py | 1861 | # obj_ids_local might not be sorted, which is problematic because | COMMENT |
| LOW | sam3/model/sam3_base_predictor.py | 341 | so the response reflects the post-cleanup state and the freed | COMMENT |
| LOW | sam3/model/sam3_base_predictor.py | 361 | # | COMMENT |
| LOW | sam3/model/sam3_tracking_predictor.py | 21 | def __init__( | COMMENT |
| LOW | sam3/model/sam3_multiplex_tracking.py | 2941 | sprinkle_removal_area=self.sprinkle_removal_area, | COMMENT |
| LOW | sam3/model/video_tracking_multiplex.py | 141 | # we only cross-attend to the temporally closest `max_cond_frames_in_attn` conditioning frames in the encoder wh | COMMENT |
| LOW | sam3/model/video_tracking_multiplex.py | 161 | # (instead of using the transformer encoder) | COMMENT |
| LOW | sam3/model/video_tracking_multiplex.py | 181 | # whether to feed the previously predicted low-res mask logits as a mask prompt into the SAM mask decoder during | COMMENT |
| LOW | sam3/model/video_tracking_multiplex.py | 201 | max_obj_ptrs_in_encoder: int = 16, | COMMENT |
| LOW | sam3/model/video_tracking_multiplex.py | 241 | share_necks: bool = False, # share the interactive and sam2_backbone necks | COMMENT |
| LOW | sam3/model/video_tracking_multiplex_demo.py | 3281 | inference_state["output_dict_per_obj"] = {} | COMMENT |
| LOW | sam3/model/sam3_video_base.py | 901 | ) | COMMENT |
| LOW | sam3/model/utils/__init__.py | 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved | COMMENT |
| LOW | sam3/train/loss/loss_fns.py | 721 | # def __init__( | COMMENT |
| LOW | sam3/train/loss/loss_fns.py | 741 | # Unlike `Masks`, here the "multistep_pred_masks" can have multiple channels, each | COMMENT |
| LOW | sam3/train/loss/loss_fns.py | 761 | # src_masks, | COMMENT |
| LOW | sam3/train/loss/loss_fns.py | 781 | COMMENT | |
| LOW | sam3/train/loss/loss_fns.py | 801 | # ): | COMMENT |
| LOW | sam3/train/loss/loss_fns.py | 821 | COMMENT | |
| LOW | sam3/train/loss/loss_fns.py | 841 | # target_masks = target_masks[keep] | COMMENT |
| LOW | sam3/train/loss/loss_fns.py | 861 | # loss_multimask = sigmoid_focal_loss( | COMMENT |
| LOW | sam3/train/loss/loss_fns.py | 881 | # device=loss_multimask.device, | COMMENT |
| LOW | sam3/train/loss/loss_fns.py | 901 | # loss_on_multimask=True, | COMMENT |
| LOW | sam3/train/loss/loss_fns.py | 921 | # else: | COMMENT |
| LOW | sam3/train/loss/loss_fns.py | 941 | # def __init__( | COMMENT |
| LOW | sam3/train/loss/loss_fns.py | 961 | # ) | COMMENT |
| LOW | sam3/train/loss/sigmoid_focal_loss.py | 41 | sig = tl.sigmoid(inputs) | COMMENT |
| LOW | sam3/train/configs/eval_base.yaml | 1 | # @package _global_ | COMMENT |
| LOW | …m3/train/configs/roboflow_v100/roboflow_v100_eval.yaml | 101 | pad_scale_pos: 1.0 | COMMENT |
| LOW | …m3/train/configs/roboflow_v100/roboflow_v100_eval.yaml | 121 | # loss_bbox: 5.0 | COMMENT |
| LOW | …m3/train/configs/roboflow_v100/roboflow_v100_eval.yaml | 141 | # compute_aux: false | COMMENT |
| LOW | …gs/roboflow_v100/roboflow_v100_full_ft_100_images.yaml | 101 | pad_scale_pos: 1.0 | COMMENT |
| LOW | …gs/roboflow_v100/roboflow_v100_full_ft_100_images.yaml | 121 | # loss_bbox: 5.0 | COMMENT |
| LOW | …gs/roboflow_v100/roboflow_v100_full_ft_100_images.yaml | 141 | # compute_aux: false | COMMENT |
| LOW | sam3/train/data/sam3_video_dataset.py | 41 | # the maximum number of find queries (for each frame) to keep in a video; if the datapoint | COMMENT |
| LOW | sam3/eval/coco_eval.py | 681 | # def convert_instances_to_cpp(instances, is_det=False): | COMMENT |
| LOW | sam3/eval/coco_eval.py | 701 | # detected_instances = [ | COMMENT |
| LOW | sam3/eval/coco_eval.py | 721 | COMMENT | |
| LOW | sam3/eval/coco_eval.py | 901 | return | COMMENT |
| LOW | sam3/eval/demo_eval.py | 581 | outs[f"coco_eval_bbox_{prefix}{DEMO_METRICS[i]}"] = value | COMMENT |
| LOW | sam3/eval/demo_eval.py | 601 | # self.coco_evals[0]["bbox"].stats | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | sam3/model/sam3_multiplex_tracking.py | 0 | warm up the model by running a dummy inference to compile the model. this is useful to avoid the compilation overhead in | STRING |
| HIGH | sam3/model/sam3_video_inference.py | 0 | warm up the model by running a dummy inference to compile the model. this is useful to avoid the compilation overhead in | STRING |
| HIGH | sam3/model/video_tracking_multiplex_demo.py | 0 | warm up the model by running a dummy inference to compile the model. this is useful to avoid the compilation overhead in | STRING |
| HIGH | sam3/model/sam3_multiplex_tracking.py | 0 | this method is only used for benchmark eval (not used in the demo). | STRING |
| HIGH | sam3/model/sam3_video_inference.py | 0 | this method is only used for benchmark eval (not used in the demo). | STRING |
| HIGH | sam3/model/sam3_video_base.py | 0 | this method is only used for benchmark eval (not used in the demo). | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | sam3/agent/helpers/memory.py | 30 | Makes a function retry itself after encountering pytorch's CUDA OOM error. It will first retry after callin | STRING |
| HIGH | sam3/train/optim/optimizer.py | 113 | Return parameters which match the intersection of parameter constraints. Note that this returns the parameters them | STRING |
| HIGH | sam3/train/optim/optimizer.py | 134 | Produce parameter groups corresponding to all the scheduler configs. Takes all the scheduler configs, each of which | STRING |
| HIGH | sam3/eval/coco_reindex.py | 17 | Convert 0-indexed COCO JSON file to 1-indexed and save to temporary location. Args: input_json_path: P | STRING |
| HIGH | sam3/eval/saco_veval_evaluators.py | 26 | Find the index of a metric in CGF1_METRICS by name and IoU threshold. Args: metric_name: Name of the m | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/eval/veval/saco_yt1b_annot_update.py | 12 | logger = logging.getLogger(__name__) | CODE |
| LOW | scripts/eval/veval/saco_yt1b_frame_prep_util.py | 14 | logger = logging.getLogger(__name__) | CODE |
| LOW | scripts/eval/veval/saco_yt1b_downloader.py | 16 | logger = logging.getLogger(__name__) | CODE |
| LOW | sam3/model_builder.py | 54 | def _setup_tf32() -> None: | CODE |
| LOW | sam3/__init__.py | 9 | __all__ = ["build_sam3_image_model", "build_sam3_predictor"] | CODE |
| LOW | sam3/agent/helpers/memory.py | 11 | __all__ = ["retry_if_cuda_oom"] | CODE |
| LOW | sam3/agent/helpers/color_map.py | 14 | __all__ = ["colormap", "random_color", "random_colors"] | CODE |
| LOW | sam3/agent/helpers/visualizer.py | 28 | logger = logging.getLogger(__name__) | CODE |
| LOW | sam3/agent/helpers/visualizer.py | 31 | __all__ = ["ColorMode", "VisImage", "Visualizer"] | CODE |
| LOW | sam3/model/vitdet.py | 456 | def _setup_rel_pos(self, rel_pos_zero_init: bool = True) -> None: | CODE |
| LOW | sam3/model/vitdet.py | 483 | def _setup_rope_freqs(self) -> None: | CODE |
| LOW | sam3/model/multiplex_utils.py | 17 | logger = logging.getLogger(__name__) | CODE |
| LOW⚡ | sam3/train/trainer.py | 275 | def _setup_env_variables(self, env_variables_conf) -> None: | CODE |
| LOW⚡ | sam3/train/trainer.py | 280 | def _setup_torch_dist_and_backend(self, cuda_conf, distributed_conf) -> None: | CODE |
| LOW⚡ | sam3/train/utils/distributed.py | 373 | def set_cuda_device_index(idx: int) -> None: | CODE |
| LOW⚡ | sam3/train/utils/distributed.py | 379 | def set_cpu_device() -> None: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | sam3/model/sam3_multiplex_tracking.py | 2346 | # if fetch just return from output | COMMENT |
| LOW | sam3/model/sam3_video_inference.py | 1045 | # if fetch just return from output | COMMENT |
| LOW | sam3/model/video_tracking_multiplex.py | 1745 | # we simply add a projected embedding for each empty object | COMMENT |
| LOW | sam3/model/video_tracking_multiplex.py | 2958 | # Importantly, we cannot simply use valid_idx_per_frame[stage_id-1] because it might be a conditional frame. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | sam3/model/edt.py | 176 | # don't forget to take sqrt at the end | COMMENT |
| LOW | sam3/model/edt.py | 176 | # don't forget to take sqrt at the end | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | sam3/model/sam3_base_predictor.py | 50 | def handle_request(self, request): | CODE |
| LOW | sam3/model/sam3_video_predictor.py | 143 | def handle_request(self, request): | CODE |