MCPcopy Create free account

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

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

↓ 1 callersFunctionbuild_region_cross_dir_entry
构造 image A region + image B region 的跨图方向 QA(复用 object cross 逻辑)。
qa_generation/templates_object_dist.py:708
↓ 1 callersFunctionbuild_region_object_cross_dir_entry
构造 image A object + image B region 的跨图方向 QA(复用 object cross 逻辑)。
qa_generation/templates_object_dist.py:765
↓ 1 callersFunctionbuild_region_proxy_dir_entry
构造"给定 obj1 相对 obj2 的方向,问 Region 3 相对 obj2 的方向"QA(MCQ)。 复用 object proxy 主逻辑,并在输出语义上将 C 明确为 region。
qa_generation/templates_object_relpos.py:797
↓ 1 callersFunctionbuild_region_relpos_entry
构造"站在物体A,面向物体B,问region C的方位和距离"QA(MCQ格式)。 复用 object relpos 主逻辑,并在输出语义上将 C 明确为 region。
qa_generation/templates_object_relpos.py:1184
↓ 1 callersFunctionbuild_sam3_image_model
Build SAM3 image model Args: bpe_path: Path to the BPE tokenizer vocabulary device: Device to load the model on ('cuda' or '
sam3/model_builder.py:571
↓ 1 callersFunctionbuild_sam3_video_model
Build SAM3 dense tracking model. Args: checkpoint_path: Optional path to checkpoint file bpe_path: Path to the BPE tokenizer
sam3/model_builder.py:660
↓ 1 callersFunctionbuild_scaling_rotation
(s, r)
PGSR/utils/general_utils.py:110
↓ 1 callersFunctioncall_sam_service
Loads an image, sends it with a text prompt to the service, saves the results, and renders the visualization.
sam3/agent/client_sam3.py:50
↓ 1 callersFunctioncall_text_llm_json
(client: OpenAI, prompt: str, max_new_tokens: int = 256)
qa_generation/filter_qa_repeat_descriptions.py:235
↓ 1 callersFunctioncall_vlm_for_3d_instance_description
调用vLLM生成3D instance的描述 注意:描述应该是3D一致的,不包含2D图像中的位置信息
qa_generation/generate_3d_instance_description.py:254
↓ 1 callersFunctioncall_vlm_json
( client: OpenAI, image_path: Path, prompt: str, max_new_tokens: int = 256, max_image_side
qa_generation/filter_qa_repeat_descriptions.py:275
↓ 1 callersFunctioncamera_to_JSON
(id, camera : Camera)
PGSR/utils/camera_utils.py:62
↓ 1 callersFunctioncanonicalize_text
Returns canonicalized `text` (lowercase and punctuation removed). From: https://github.com/google-research/big_vision/blob/53f18caf27a9419231bbf08
sam3/model/tokenizer_ve.py:106
↓ 1 callersMethodcapture
(self)
PGSR/scene/gaussian_model.py:78
↓ 1 callersMethodcat
Concatenates a list of RotatedBoxes into a single RotatedBoxes Arguments: boxes_list (list[RotatedBoxes]) Retur
sam3/agent/helpers/rotated_boxes.py:487
↓ 1 callersMethodcat
Concatenates a list of BitMasks into a single BitMasks Arguments: bitmasks_list (list[BitMasks]) Returns:
sam3/agent/helpers/masks.py:255
↓ 1 callersMethodcat_tensors_to_optimizer
(self, tensors_dict)
PGSR/scene/gaussian_model.py:369
↓ 1 callersFunctionchoose_floor_up_axis
axis_method: - "zclose": choose floor axis (among its 3 axes) closest to world_up - "largest_face": choose normal of largest face ==
postprocess_3d_bbox_aabb.py:167
↓ 1 callersFunctioncleanup_debug_files
Clean up debug files when function successfully returns
sam3/agent/agent_core.py:25
↓ 1 callersMethodclear_detector_added_cond_frame_in_tracker
Clear detector added conditioning frame if it is within a predefined window of the refined frame. This allow model to update masks on these fr
sam3/model/sam3_video_inference.py:1675
↓ 1 callersMethodclose_session
Close a session. This method is idempotent and can be called multiple times on the same "session_id".
sam3/model/sam3_video_predictor.py:236
↓ 1 callersFunctioncollect_images
(image_root: Path, max_images: int)
classic_region.py:59
↓ 1 callersFunctioncollect_images
(image_root: Path, max_images: int)
classic_vllm.py:62
↓ 1 callersFunctionconcat_points
Add new points and labels to previous point inputs (add at the end).
sam3/model/sam3_tracker_base.py:1180
↓ 1 callersFunctionconcat_rel_pos
Concatenate rel pos coeffs to the q & k tensors, so that qk^T is now effectively including rel pos biases. Args: q (Tensor): q te
sam3/model/vitdet.py:239
↓ 1 callersFunctionconnected_components_cpu
(input_tensor: torch.Tensor)
sam3/perflib/connected_components.py:32
↓ 1 callersFunctionconnected_components_cpu_single
(values: torch.Tensor)
sam3/perflib/connected_components.py:18
↓ 1 callersFunctionconnected_components_triton
Computes connected components labeling on a batch of 2D integer tensors using Triton. Args: input_tensor (torch.Tensor): A BxHxW int
sam3/perflib/triton/connected_components.py:396
↓ 1 callersMethodconstruct_list_of_attributes
(self)
PGSR/scene/gaussian_model.py:236
↓ 1 callersFunctionconvert_my_tensors
(obj)
sam3/model/data_misc.py:169
↓ 1 callersFunctioncopy_data_to_device
Function that recursively copies data to a torch.device. Args: data: The data to copy to device device: The device to which the d
sam3/model/utils/misc.py:21
↓ 1 callersFunctioncount_images
Count the total number of images present in the messages history.
sam3/agent/agent_core.py:37
↓ 1 callersMethodcreate_from_pcd
(self, pcd : BasicPointCloud, spatial_lr_scale : float)
PGSR/scene/gaussian_model.py:170
↓ 1 callersFunctiondecode_rle_mask
解码RLE格式的mask
qa_generation/generate_3d_instance_description.py:50
↓ 1 callersMethoddefault
Returns a default color palette. Returns: ColorPalette: A ColorPalette instance with default colors. Example:
sam3/agent/helpers/som_utils.py:193
↓ 1 callersMethoddensify_and_clone
(self, grads, grad_threshold, scene_extent)
PGSR/scene/gaussian_model.py:465
↓ 1 callersMethoddensify_and_prune
(self, max_grad, abs_max_grad, min_opacity, extent, max_screen_size)
PGSR/scene/gaussian_model.py:498
↓ 1 callersMethoddensify_and_split
(self, grads, grad_threshold, grads_abs, grad_abs_threshold, scene_extent, max_radii2D, N=2)
PGSR/scene/gaussian_model.py:415
↓ 1 callersFunctiondepth2point_cam
(sampled_depth, ref_intrinsic)
PGSR/utils/graphics_utils.py:25
↓ 1 callersFunctiondepth2point_world
(depth_image, intrinsic_matrix, extrinsic_matrix)
PGSR/utils/graphics_utils.py:38
↓ 1 callersFunctiondepth_pcd2normal
(xyz, offset=None, gt_image=None)
PGSR/utils/graphics_utils.py:47
↓ 1 callersFunctiondepth_to_pointcloud
从深度图生成点云 Args: depth: 深度图 (N, H, W) intrinsics: 内参矩阵 (N, 3, 3) extrinsics: 外参矩阵 (N, 4, 4) - world to camera
inference_da3_scannetppv2.py:307
↓ 1 callersFunctiondepth_to_points
将整幅深度图投影到世界坐标,同时可返回颜色。 Returns: pts: (N,3) float32 cols: (N,3) uint8 或 None
3d_bounding_instance_gs_rerun_da3.py:638
↓ 1 callersFunctiondepth_to_points
将整幅深度图投影到世界坐标,同时可返回颜色。 Returns: pts: (N,3) float32 cols: (N,3) uint8 或 None
3d_bounding_instance_gs_region.py:720
↓ 1 callersMethoddevice
(self)
sam3/agent/helpers/keypoints.py:46
↓ 1 callersMethoddevice
(self)
sam3/agent/helpers/rotated_boxes.py:507
↓ 1 callersFunctiondilate
(bin_img, ksize=5)
PGSR/scene/gaussian_model.py:25
↓ 1 callersFunctiondilate
(bin_img, ksize=6)
PGSR/scene/cameras.py:23
↓ 1 callersFunctiondilate
(bin_img, ksize=5)
PGSR/utils/image_utils.py:22
↓ 1 callersFunctiondiscover_scenes
(data_root: Path, scene_names: Sequence[str] | None)
classic_region.py:38
↓ 1 callersFunctiondiscover_scenes
(data_root: Path, scene_names: Sequence[str] | None)
classic_vllm.py:50
↓ 1 callersMethoddraw_and_connect_keypoints
Draws keypoints of an instance and follows the rules for keypoint connections to draw lines between appropriate keypoints. This follo
sam3/agent/helpers/visualizer.py:864
↓ 1 callersFunctiondraw_box
(ax, box_coord, alpha=0.8, edge_color="g", line_style="-", linewidth=2.0)
sam3/agent/helpers/som_utils.py:287
↓ 1 callersMethoddraw_circle
Args: circle_coord (list(int) or tuple(int)): contains the x and y coordinates of the center of the circle.
sam3/agent/helpers/visualizer.py:1180
↓ 1 callersFunctiondraw_mask
( ax, rle, color, show_holes=True, alpha=0.15, upsample_factor=1.0, rle_upsampled=None )
sam3/agent/helpers/som_utils.py:333
↓ 1 callersMethoddraw_panoptic_seg
Draw panoptic prediction annotations or results. Args: panoptic_seg (Tensor): of shape (height, width) where the values
sam3/agent/helpers/visualizer.py:529
↓ 1 callersMethoddraw_rotated_box_with_label
Draw a rotated box with label on its top-left corner. Args: rotated_box (tuple): a tuple containing (cnt_x, cnt_y, w, h,
sam3/agent/helpers/visualizer.py:1117
↓ 1 callersMethoddraw_sem_seg
Draw semantic segmentation predictions/labels. Args: sem_seg (Tensor or ndarray): the segmentation of shape (H, W).
sam3/agent/helpers/visualizer.py:493
↓ 1 callersFunctiondraw_text
( ax, text, position, font_size=None, color="g", horizontal_alignment="left", rota
sam3/agent/helpers/som_utils.py:303
↓ 1 callersMethodencode_boxes
(self, x, y, w, h)
sam3/model/position_encoding.py:72
↓ 1 callersFunctionencode_mask
将 mask 编码为 RLE 格式,与 agent.py 中的保存方式一致
3d_bounding_instance_gs_rerun_da3.py:432
↓ 1 callersFunctionencode_mask
将 mask 编码为 RLE 格式,与 agent.py 中的保存方式一致
3d_bounding_instance_gs_region.py:514
↓ 1 callersFunctionensure_image_path
尽量兼容大小写和扩展名差异寻找图片路径。
sam3.py:48
↓ 1 callersFunctionensure_output_dir
Ensure output is a directory (create if needed).
qa_generation/generate_two_view_qa_region.py:574
↓ 1 callersFunctionensure_output_dir
Ensure output is a directory (create if needed).
qa_generation/generate_two_view_qa.py:514
↓ 1 callersFunctionerode_mask
(mask: np.ndarray, pixels: int)
3d_bounding_instance_gs_rerun_da3.py:631
↓ 1 callersFunctionerode_mask
(mask: np.ndarray, pixels: int)
3d_bounding_instance_gs_region.py:713
↓ 1 callersFunctioneval_sh
Evaluate spherical harmonics at unit directions using hardcoded SH polynomials. Works with torch/np/jnp. ... Can be 0 or more batch d
PGSR/utils/sh_utils.py:57
↓ 1 callersFunctionexport_pointcloud_and_bboxes
( points: np.ndarray, bboxes: List[Dict], output_dir: Path, scene: str, colors: Optional[n
3d_bounding_instance_gs_rerun_da3.py:863
↓ 1 callersFunctionexport_pointcloud_and_bboxes
( points: np.ndarray, bboxes: List[Dict], output_dir: Path, scene: str, colors: Optional[n
3d_bounding_instance_gs_region.py:894
↓ 1 callersFunctionextract_refs_from_entry
从 QA entry 中提取需要判别唯一性的引用(Ref)。
qa_generation/filter_qa_repeat_descriptions.py:75
↓ 1 callersFunctionextract_scene_id_from_mask_path
从mask路径中提取场景ID 例如: sam_masks_debug/0a7cc12c0e/DSC05865/bed.png -> 0a7cc12c0e
qa_generation/generate_3d_instance_description.py:109
↓ 1 callersFunctionfast_diag_box_iou
(boxes1, boxes2)
sam3/model/box_ops.py:173
↓ 1 callersFunctionfilter_outliers
用中位数+MAD 计算逐轴 Z 分数,删除 |Z| 最大的 10% 点。 这样不依赖固定阈值,按比例裁掉尾部离群。
3d_bounding_instance_gs_rerun_da3.py:609
↓ 1 callersMethodfind_farthest_color
Return the color that is the farthest from the given color. Args: img_array (np array): any *x3 np array, 3 is the RGB c
sam3/agent/helpers/som_utils.py:249
↓ 1 callersFunctionfind_mask_rle_for_instance
优先从 mask_index.json 获取 mask_rle;如果缺失(比如某些场景 mask_index.json 没有 mask_rle 字段), 则回退到 bbox json 中该 instance 的 mask_encodings(与 highest_confidence
qa_generation/generate_3d_instance_description.py:192
↓ 1 callersFunctionfind_original_image_path
根据mask路径和场景ID找到原图路径
qa_generation/generate_3d_instance_description.py:136
↓ 1 callersFunctionflash_attn_func_op
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor )
sam3/perflib/fa3.py:7
↓ 1 callersMethodforward
(self, backbone_feats: List[torch.Tensor])
sam3/model/maskformer_segmentation.py:203
↓ 1 callersMethodforward
Forward pass of the backbone combiner. :param samples: The input images :param captions: The input captions :param input_boxe
sam3/model/vl_combiner.py:48
↓ 1 callersMethodforward
(self, x)
sam3/model/model_misc.py:188
↓ 1 callersMethodforward
Process multi-level features through the transformer encoder. Args: src: List of multi-level features, each with shape (
sam3/model/encoder.py:378
↓ 1 callersMethodforward
(self, x)
sam3/model/position_encoding.py:89
↓ 1 callersMethodforward
This method is only used for benchmark eval (not used in the demo).
sam3/model/sam3_video_inference.py:907
↓ 1 callersMethodforward
Args: input: NCHW images rois: Bx5 boxes. First column is the index into N. The other 4 columns are xyxy.
sam3/agent/helpers/roi_align.py:50
↓ 1 callersMethodforward_batch
(self, img_list)
sam3/model/utils/sam1_utils.py:42
↓ 1 callersMethodforward_ffn
(self, tgt)
sam3/model/decoder.py:73
↓ 1 callersMethodforward_image
Get the image feature on the input batch.
sam3/model/sam3_tracker_base.py:443
↓ 1 callersMethodforward_pre
( self, tgt, memory, dac: bool, tgt_mask: Optional[Tensor] = None,
sam3/model/decoder.py:919
↓ 1 callersMethodforward_video_grounding_multigpu
Compute the detector's detection outputs in a distributed manner, where all GPUs process a chunk of frames (equal to the number of GP
sam3/model/sam3_image.py:701
↓ 1 callersMethodframe_filter
(self, output_dict, track_in_reverse, frame_idx, num_frames, r)
sam3/model/sam3_tracker_base.py:518
↓ 1 callersFunctiongaussian
(window_size, sigma)
PGSR/utils/loss_utils.py:24
↓ 1 callersFunctiongen_sineembed_for_position
(pos_tensor, num_feats=256)
sam3/model/model_misc.py:238
↓ 1 callersFunctiongen_virtul_cam
(cam, trans_noise=1.0, deg_noise=15.0)
PGSR/train.py:48
↓ 1 callersFunctiongenerate_colors
(n_colors=256, n_samples=5000)
sam3/visualization_utils.py:22
↓ 1 callersFunctiongenerate_image_for_entry
为QA条目生成所需的图片,返回图片路径列表和元数据。 Returns: (image_paths, metadata): 图片路径列表(相对于output_images_dir)和元数据
qa_generation/convert_qa_to_llamafactory.py:354
↓ 1 callersFunctiongenerate_masks
Generate masks by comparing rendered depth with mesh depth
PGSR/mesh2mask.py:76
↓ 1 callersFunctiongeneric_nms
A generic version of `torchvision.ops.nms` that takes a pairwise IoU matrix.
sam3/perflib/nms.py:55
↓ 1 callersFunctiongeneric_nms_cpu
A generic version of `torchvision.ops.nms` that takes a pairwise IoU matrix. (CPU implementation based on https://github.com/jwyang/faster-rc
sam3/perflib/nms.py:74
↓ 1 callersFunctionget_1d_sine_pe
Get 1D sine positional embedding as in the original Transformer paper.
sam3/model/sam3_tracker_utils.py:327
← previousnext →501–600 of 1,270, ranked by callers