MCPcopy Create free account

hub / github.com/Visionary-Laboratory/holi-spatial / functions

Functions1,270 in github.com/Visionary-Laboratory/holi-spatial

↓ 2 callersMethod_draw_number_in_mask
Find proper places to draw text given a binary mask.
sam3/agent/helpers/visualizer.py:1583
↓ 2 callersMethod_draw_text_in_mask
Find proper places to draw text given a binary mask.
sam3/agent/helpers/visualizer.py:1629
↓ 2 callersMethod_embed_pixels
( self, backbone_feats: List[torch.Tensor], image_ids, encoder_hidden_states,
sam3/model/maskformer_segmentation.py:102
↓ 2 callersMethod_encode_new_memory
Encode the current image and its prediction into a memory feature.
sam3/model/sam3_tracker_base.py:797
↓ 2 callersFunction_find_mask_rle_by_path
通过 mask_path 从 mask_index.json 中查找对应的 mask RLE 数据。
qa_generation/templates_object_dpt.py:114
↓ 2 callersFunction_find_mask_rle_from_instance_encodings
fallback: 当 mask_index.json 里缺失 mask_rle 时,从 bbox json 的 instance.mask_encodings 获取。 对齐规则:优先 images 与 mask_encodings 同长度且按 index 对齐;否则尝试 base
qa_generation/templates_object_dpt.py:130
↓ 2 callersMethod_forward_ca
(self, tgt, memory, query_pos, pos, num_k_exclude_rope=0)
sam3/model/decoder.py:899
↓ 2 callersMethod_forward_sa
(self, tgt, query_pos)
sam3/model/decoder.py:891
↓ 2 callersMethod_forward_sam_heads
Forward SAM prompt encoders and mask heads. Inputs: - backbone_features: image features of [B, C, H, W] shape - poin
sam3/model/sam3_tracker_base.py:218
↓ 2 callersFunction_get_2d_bbox_from_rle
从 RLE mask 计算 2D 边界框 (x_min, y_min, x_max, y_max)。
qa_generation/templates_object_dpt.py:164
↓ 2 callersFunction_get_2d_center_from_rle
从 RLE mask 计算 2D 中心点。
qa_generation/templates_object_dpt.py:180
↓ 2 callersFunction_get_connected_components_with_padding
Get connected components from masks (possibly padding them to an even size).
sam3/model/sam3_tracker_utils.py:408
↓ 2 callersMethod_get_dummy_prompt
(self, num_prompts=1)
sam3/model/sam3_image.py:522
↓ 2 callersMethod_get_img_feats
Retrieve correct image features from backbone output.
sam3/model/sam3_image.py:117
↓ 2 callersMethod_get_processing_order
( self, inference_state, start_frame_idx, max_frame_num_to_track, reverse )
sam3/model/sam3_video_inference.py:221
↓ 2 callersMethod_get_tracker_inference_states_by_obj_ids
Get the Tracker inference states that contain the given object ids. This is used to run partial Tracker propagation on a single objec
sam3/model/sam3_video_inference.py:1324
↓ 2 callersFunction_ignore_torch_cuda_oom
A context which ignores CUDA OOM exception from pytorch.
sam3/agent/helpers/memory.py:13
↓ 2 callersMethod_initialize_metadata
Initialize metadata for the masklets.
sam3/model/sam3_video_base.py:1601
↓ 2 callersFunction_is_rle
(d)
qa_generation/templates_object_dpt.py:142
↓ 2 callersFunction_is_rle
(d)
qa_generation/templates_object_relpos.py:130
↓ 2 callersFunction_is_rle
(d)
qa_generation/templates_object_dist.py:249
↓ 2 callersFunction_load_img_as_tensor
(img_path, image_size)
sam3/model/utils/sam2_utils.py:16
↓ 2 callersFunction_load_mask_index
从 images 路径列表中推断并加载 mask_index.json 文件。 Args: scene_id: 场景 ID images: mask 图像路径列表(来自 bbox_json 的 images 字段) Returns:
qa_generation/templates_object_dpt.py:66
↓ 2 callersFunction_load_mask_index
从 images 路径列表中推断并加载 mask_index.json 文件。 Args: scene_id: 场景 ID images: mask 图像路径列表(来自 bbox_json 的 images 字段) Returns:
qa_generation/templates_object_relpos.py:71
↓ 2 callersFunction_load_matrix_4x4_txt
(file_path: str)
PGSR/scene/dataset_readers.py:602
↓ 2 callersMethod_pe_encoding
Positionally encode points that are normalized to [0,1].
sam3/sam/prompt_encoder.py:214
↓ 2 callersMethod_predict
Predict masks for the given input prompts, using the currently set image. Input prompts are batched torch tensors and are expected to
sam3/model/sam1_task_predictor.py:329
↓ 2 callersMethod_prep_prompts
( self, point_coords, point_labels, box, mask_logits, normalize_coords, img_idx=-1 )
sam3/model/sam1_task_predictor.py:298
↓ 2 callersMethod_prepare_backbone_feats
(self, inference_state, frame_idx, reverse)
sam3/model/sam3_video_inference.py:1337
↓ 2 callersFunction_project_cam
(point_cam: np.ndarray, intrinsics: Dict[str, float])
qa_generation/templates_object_dpt.py:55
↓ 2 callersFunction_project_cam
(point_cam: np.ndarray, intrinsics: Dict[str, float])
qa_generation/templates_object_mind_dpt.py:49
↓ 2 callersMethod_propogate_tracker_one_frame_local_gpu
inference_states: List of inference states, each state corresponds to a different set of objects.
sam3/model/sam3_video_base.py:1097
↓ 2 callersMethod_recombine_heads
(self, x: Tensor)
sam3/sam/transformer.py:222
↓ 2 callersMethod_reset_tracking_results
Reset all tracking inputs and results across the videos.
sam3/model/sam3_tracking_predictor.py:992
↓ 2 callersFunction_resolve_bpe_path
(bpe_path=None)
sam3/model_builder.py:58
↓ 2 callersMethod_run_memory_encoder
Run the memory encoder on `high_res_masks`. This is usually after applying non-overlapping constraints to object scores. Since their
sam3/model/sam3_tracking_predictor.py:1120
↓ 2 callersMethod_run_single_frame_inference
Perform inference on a single frame and get its inference results. This would also update `inference_state`.
sam3/model/sam3_video_inference.py:357
↓ 2 callersMethod_start_nccl_process_group
(self)
sam3/model/sam3_video_predictor.py:412
↓ 2 callersMethod_tracker_add_new_objects
Add a new object to SAM2 inference states.
sam3/model/sam3_video_base.py:1516
↓ 2 callersMethod_tracker_remove_object
Remove an object from SAM2 inference states. This would remove the object from all frames in the video.
sam3/model/sam3_video_base.py:1574
↓ 2 callersFunction_world_to_cam
(point_world: np.ndarray, c2w: Sequence[Sequence[float]])
qa_generation/templates_object_dpt.py:45
↓ 2 callersFunction_world_to_cam
(point_world: np.ndarray, c2w: Sequence[Sequence[float]])
qa_generation/templates_object_dist.py:79
↓ 2 callersFunction_world_to_cam
(point_world: np.ndarray, c2w: Sequence[Sequence[float]])
qa_generation/templates_object_mind_dpt.py:39
↓ 2 callersMethodadd_new_mask
Add new mask to a frame.
sam3/model/sam3_tracking_predictor.py:342
↓ 2 callersFunctionaxis_word
(axis: str, value: float)
qa_generation/templates_cam_translation.py:156
↓ 2 callersFunctionbox_area
Batched version of box area. Boxes should be in [x0, y0, x1, y1] format. Inputs: - boxes: Tensor of shape (..., 4) Returns: - a
sam3/model/box_ops.py:47
↓ 2 callersFunctionbox_xywh_to_xyxy
(x)
sam3/model/box_ops.py:23
↓ 2 callersFunctionbox_xyxy_to_xywh
(x)
sam3/model/box_ops.py:35
↓ 2 callersFunctionbuild_disambiguation_prompt
(ref: Ref, other_descs: List[str])
qa_generation/filter_qa_repeat_descriptions.py:312
↓ 2 callersFunctionbuild_object_relpos_entry
构造"站在物体A,面向物体B,问物体C的方位和距离"QA(MCQ格式)。 Args: instA, instB, instC: bbox实例字典,需包含 "bounding_box" 字段(8个3D点)。 rng: 随机数生成器,用于生成
qa_generation/templates_object_relpos.py:851
↓ 2 callersFunctionbuild_tracker
Build the SAM3 Tracker module for video tracking. Returns: Sam3TrackerPredictor: Wrapped SAM3 Tracker module
sam3/model_builder.py:445
↓ 2 callersFunctionbytes_to_unicode
Returns list of utf-8 byte and a corresponding list of unicode strings. The reversible bpe codes work on unicode strings. This means you
sam3/model/tokenizer_ve.py:30
↓ 2 callersMethodcal_mem_score
(self, object_score_logits, iou_score)
sam3/model/sam3_tracker_base.py:509
↓ 2 callersFunctioncameraList_from_camInfos
(cam_infos, resolution_scale, args)
PGSR/utils/camera_utils.py:54
↓ 2 callersFunctionchunk_inference
(image_files, image_names, intrinsics, extrinsics)
inference_da3_scannetppv2.py:538
↓ 2 callersFunctionclassify_dir8
分类为8个方向之一(与 mcq_direction_chatgpt.py 一致)。 Returns: (label, idx, yaw_deg) 或 (None, None, None) 如果应该跳过
qa_generation/templates_object_relpos.py:243
↓ 2 callersMethodclear_all_points_in_frame
Remove all input points or mask in a specific frame for a given object.
sam3/model/sam3_tracking_predictor.py:908
↓ 2 callersMethodclear_all_points_in_video
Remove all input points or mask in all frames throughout the video.
sam3/model/sam3_tracking_predictor.py:980
↓ 2 callersFunctioncombo_to_text
(c)
qa_generation/templates_cam_rotation.py:133
↓ 2 callersFunctioncombo_to_text
(c)
qa_generation/templates_cam_rotation_chatgpt.py.py:137
↓ 2 callersFunctioncomplex_mult
(xq_real, xq_imag, freqs_cis_real, freqs_cis_imag)
sam3/sam/rope.py:81
↓ 2 callersFunctioncompute_obb
计算 OBB(定向包围盒),返回 (transform, extents)。 Returns: transform: 4x4 变换矩阵(从 OBB 局部坐标系到世界坐标系) extents: (3,) OBB 的尺寸
3d_bounding_instance_gs_rerun_da3.py:507
↓ 2 callersFunctionconvert_qa_to_llamafactory_format
转换单个QA JSON文件为llamafactory格式
qa_generation/convert_qa_to_llamafactory.py:771
↓ 2 callersFunctioncorners_from_obb
center: (3,) R: (3,3) with columns as local axes in world coords extents_full: (3,) full lengths along each local axis returns: (8,3)
postprocess_3d_bbox_aabb.py:101
↓ 2 callersFunctioncpu_deep_copy_tuple
(input_tuple)
PGSR/submodules/diff-plane-rasterization/diff_plane_rasterization/__init__.py:17
↓ 2 callersFunctioncreate_window
(window_size, channel)
PGSR/utils/loss_utils.py:28
↓ 2 callersFunctioncrop_supervision_border
(tensor, border=12)
PGSR/train.py:81
↓ 2 callersMethoddensification_postfix
(self, new_xyz, new_knn_f, new_features_dc, new_features_rest, new_opacities, new_scaling, new_rotation)
PGSR/scene/gaussian_model.py:391
↓ 2 callersFunctiondownload_ckpt_from_hf
()
sam3/model_builder.py:651
↓ 2 callersFunctiondownsample_pointcloud
下采样点云到指定的点数 Args: points: 点云坐标 (N, 3) colors: 点云颜色 (N, 3) target_num_points: 目标点数,默认 20 million Returns
inference_da3_scannetppv2.py:469
↓ 2 callersFunctiondraw_bbox_on_image
在原图上画2D边界框
qa_generation/convert_qa_to_llamafactory.py:135
↓ 2 callersMethoddraw_box
Args: box_coord (tuple): a tuple containing x0, y0, x1, y1 coordinates, where x0 and y0 are the coordinates of th
sam3/agent/helpers/visualizer.py:1083
↓ 2 callersFunctiondraw_mask_overlay_on_image
在原图上画mask overlay(轮廓)
qa_generation/convert_qa_to_llamafactory.py:153
↓ 2 callersFunctiondraw_point_on_image
在原图上画点
qa_generation/convert_qa_to_llamafactory.py:116
↓ 2 callersFunctionedt_triton
Computes the Euclidean Distance Transform (EDT) of a batch of binary images. Args: data: A tensor of shape (B, H, W) representing a
sam3/model/edt.py:117
↓ 2 callersFunctionextract_image_name_from_mask_path
从mask路径中提取图片名称(不含扩展名) 例如: sam_masks_debug/0a7cc12c0e/DSC05865/bed.png -> DSC05865 例如: sam_masks_debug/c285c82ade/02dd3b53_DSC07112/blind_
qa_generation/generate_3d_instance_description.py:122
↓ 2 callersFunctionfilter_outliers
用中位数+MAD 计算逐轴 Z 分数,删除 |Z| 最大的 10% 点。 这样不依赖固定阈值,按比例裁掉尾部离群。
3d_bounding_instance_gs_region.py:691
↓ 2 callersFunctionfind
(labels_ptr, indices, mask)
sam3/perflib/triton/connected_components.py:49
↓ 2 callersFunctionfind_original_image_path
查找原始图片路径 scannetppv2的目录结构: scannetppv2/ data/ {scene_id}/ dslr/ resized_undistorted_images/
qa_generation/convert_qa_to_llamafactory.py:71
↓ 2 callersFunctionflash_attn_func
(q, k, v)
sam3/perflib/fa3.py:15
↓ 2 callersMethodflush
(self)
PGSR/utils/general_utils.py:134
↓ 2 callersMethodforward_with_coords
Positionally encode points that are not normalized to [0,1].
sam3/sam/prompt_encoder.py:236
↓ 2 callersFunctiongenerate_unique_suffix
为每个QA条目生成唯一的后缀,避免文件名冲突。 基于question_type、sub_question_type、marker_type、ins_id和颜色信息生成hash。
qa_generation/convert_qa_to_llamafactory.py:226
↓ 2 callersFunctiongetProjectionMatrix
(znear, zfar, fovX, fovY)
PGSR/utils/graphics_utils.py:135
↓ 2 callersMethodget_dense_pe
Returns the positional encoding used to encode point prompts, applied to a dense set of points the shape of the image encoding.
sam3/sam/prompt_encoder.py:63
↓ 2 callersFunctionget_expon_lr_func
Copied from Plenoxels Continuous learning rate decay function. Adapted from JaxNeRF The returned rate is lr_init when step=0 and lr_fina
PGSR/utils/general_utils.py:32
↓ 2 callersMethodget_image
Returns: ndarray: the visualized image of shape (H, W, 3) (RGB) in uint8 type. The shape is scale
sam3/agent/helpers/visualizer.py:328
↓ 2 callersFunctionget_image_base64_and_mime
Convert image file to base64 string and get MIME type
sam3/agent/client_llm.py:10
↓ 2 callersFunctionget_pairs
Return set of symbol pairs in a word. Word is represented as tuple of symbols (symbols being variable-length strings).
sam3/model/tokenizer_ve.py:56
↓ 2 callersFunctionget_rel_pos
Get relative positional embeddings according to the relative positions of query and key sizes. Args: q_size (int): size of qu
sam3/model/vitdet.py:142
↓ 2 callersFunctionget_shape
(obj)
sam3/perflib/compile.py:65
↓ 2 callersFunctioninverse_sigmoid
(x)
PGSR/utils/general_utils.py:18
↓ 2 callersFunctionis_right_padded
Given a padding mask (following pytorch convention, 1s for padded values), returns whether the padding is on the right or not.
sam3/model/geometry_encoders.py:16
↓ 2 callersFunctionlabel_color
根据标签生成稳定的伪随机颜色。
3d_bounding_instance_gs_rerun_da3.py:50
↓ 2 callersFunctionlabel_color
根据标签生成稳定的伪随机颜色。
3d_bounding_instance_gs_region.py:50
↓ 2 callersFunctionload_bbox_items
(json_path: Path)
qa_generation/templates_object_mind_dpt.py:13
↓ 2 callersFunctionload_json
(path: Path)
qa_generation/filter_qa_repeat_descriptions.py:46
↓ 2 callersFunctionmask_key_sorter
保证mask key顺序稳定且可读.
qa_generation/convert_qa_to_llamafactory.py:219
↓ 2 callersMethodmask_to_polygons
(self, mask)
sam3/agent/helpers/visualizer.py:129
↓ 2 callersFunctionmasks_to_boxes
Compute the bounding boxes around the provided masks The masks should be in format [N, H, W] where N is the number of masks, (H, W) are the spati
sam3/model/box_ops.py:61
← previousnext →201–300 of 1,270, ranked by callers