MCPcopy Create free account

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

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

↓ 396 callersMethodappend
(self, item: list)
sam3/model/model_misc.py:411
↓ 80 callersMethodcat
Concatenates a list of Boxes into a single Boxes Arguments: boxes_list (list[Boxes]) Returns: Boxes
sam3/agent/helpers/boxes.py:292
↓ 55 callersMethodformat
(self, record)
sam3/logger.py:34
↓ 53 callersMethodto
(self, *args, **kwargs)
sam3/model/sam3_image.py:112
↓ 42 callersMethoddecode
(self, tokens)
sam3/model/tokenizer_ve.py:216
↓ 40 callersMethodto
(self, device: torch.device)
sam3/agent/helpers/boxes.py:177
↓ 39 callersMethodconvert
Args: box: can be a k-tuple, k-list or an Nxk array/tensor, where k = 4 or 5 from_mode, to_mode (BoxMode) Re
sam3/agent/helpers/boxes.py:46
↓ 26 callersMethodwrite
(self, x)
PGSR/utils/general_utils.py:127
↓ 22 callersMethodclip
Clip (in place) the boxes by limiting x coordinates to the range [0, width] and y coordinates to the range [0, height]. Args
sam3/agent/helpers/boxes.py:192
↓ 21 callersFunctionrgb_to_hex
Convert a rgb color to hex color. Args: rgb_color (tuple/list of ints): RGB color in tuple or list format. Returns: str
sam3/agent/helpers/som_utils.py:14
↓ 19 callersMethodsave
(self, iteration, mask=None)
PGSR/scene/__init__.py:143
↓ 17 callersFunctionfocal2fov
(focal, pixels)
PGSR/utils/graphics_utils.py:180
↓ 14 callersFunction_save_image
(img: Image.Image, path: Path, quality: int = 95, skip_existing: bool = False)
qa_generation/convert_qa_to_llamafactory.py:59
↓ 14 callersMethoddevice
(self)
sam3/agent/helpers/boxes.py:312
↓ 14 callersMethodencode
(self, text)
sam3/model/tokenizer_ve.py:206
↓ 13 callersMethodclone
(self)
sam3/model/geometry_encoders.py:398
↓ 13 callersMethodextract
(self, args)
PGSR/arguments/__init__.py:40
↓ 13 callersFunctionread_next_bytes
Read and unpack the next bytes from a binary file. :param fid: :param num_bytes: Sum of combination of {2, 4, 8}, e.g. 2, 6, 16, 30, etc.
PGSR/scene/colmap_loader.py:72
↓ 12 callersMethodclone
Clone the Boxes. Returns: Boxes
sam3/agent/helpers/boxes.py:168
↓ 11 callersMethod_maybe_clone
Clone a tensor if and only if `self.compile_all_components` is True.
sam3/model/sam3_tracker_base.py:1175
↓ 11 callersFunctionconcat_padded_sequences
Concatenates two right-padded sequences, such that the resulting sequence is contiguous and also right-padded. Following pytorch's conve
sam3/model/geometry_encoders.py:22
↓ 10 callersMethodto
Copy data to the specified device
sam3/model/utils/misc.py:16
↓ 9 callersFunction_build_stem_to_insts_map
构建 stem -> instances 映射,过滤 ignore_labels。
qa_generation/generate_two_view_qa_region.py:581
↓ 9 callersFunction_update_out
(out, out_name, out_value, auxiliary=True, update_aux=True)
sam3/model/sam3_image.py:26
↓ 9 callersFunctionactivation_ckpt_wrapper
Wraps a given module to enable or disable activation checkpointing. Activation checkpointing (gradient checkpointing) trades compute for mem
sam3/model/act_ckpt_utils.py:17
↓ 8 callersMethoddevice
(self)
sam3/model/sam3_image.py:108
↓ 8 callersMethodforward_image
(self, samples: torch.Tensor)
sam3/model/vl_combiner.py:78
↓ 8 callersMethodgetTrainCameras
(self, scale=1.0)
PGSR/scene/__init__.py:147
↓ 8 callersFunctionrender
Render the scene. Background tensor (bg_color) must be on GPU!
PGSR/gaussian_renderer/__init__.py:35
↓ 8 callersFunctionsample_pairs
Sample k index pairs with covisibility above covis_threshold and both valid, without repeating images. Optional motion filters (if frames provide
qa_generation/generate_two_view_qa.py:405
↓ 8 callersMethodto
(self, *args: Any, **kwargs: Any)
sam3/agent/helpers/masks.py:117
↓ 7 callersFunction_copy_image
(src: Path, dst: Path, skip_existing: bool = False)
qa_generation/convert_qa_to_llamafactory.py:65
↓ 7 callersFunction_normalize
(v: np.ndarray, eps: float = EPS)
postprocess_3d_bbox_aabb.py:58
↓ 7 callersMethod_prepare_backbone_features
Prepare and flatten visual features (same as in MDETR_API model).
sam3/model/sam3_tracker_base.py:466
↓ 7 callersMethodfrom_hex
Create a Color instance from a hex string. Args: color_hex (str): Hex string of the color. Returns:
sam3/agent/helpers/som_utils.py:101
↓ 7 callersMethodget_image
(self)
PGSR/scene/cameras.py:179
↓ 7 callersMethodoverlay_instances
Args: boxes (Boxes, RotatedBoxes or ndarray): either a :class:`Boxes`, or an Nx4 numpy array of XYXY_ABS format f
sam3/agent/helpers/visualizer.py:685
↓ 6 callersFunction_bbox_center
计算3D bbox的中心点(世界坐标)。
qa_generation/templates_object_relpos.py:310
↓ 6 callersFunction_bboxes_intersect
检查两个3D bbox是否有交集或距离过近。 Args: bbox1: 第一个bbox(8个3D点) bbox2: 第二个bbox(8个3D点) min_separation: 最小分离距离(米),如果两个bbox的最近距离小于此值,
qa_generation/templates_object_relpos.py:344
↓ 6 callersFunction_find_mask_rle_by_path
通过 mask_path 从 mask_index.json 中查找对应的 mask RLE 数据。
qa_generation/templates_object_dist.py:221
↓ 6 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_dist.py:237
↓ 6 callersFunction_find_mask_rles
(inst: Dict[str, Any], image_a_name: str, image_b_name: str)
qa_generation/templates_object_relpos.py:539
↓ 6 callersFunction_get_2d_bbox_from_rle
从 RLE mask 计算 2D 边界框 (x_min, y_min, x_max, y_max)。
qa_generation/templates_object_dist.py:271
↓ 6 callersFunction_get_2d_center_from_rle
从 RLE mask 计算 2D 中心点。
qa_generation/templates_object_dist.py:287
↓ 6 callersFunction_orthonormalize
Robustly project a near-rotation matrix to SO(3) using SVD. Ensures det(R)=+1.
postprocess_3d_bbox_aabb.py:65
↓ 6 callersMethod_separate_heads
(self, x: Tensor, num_heads: int)
sam3/sam/transformer.py:217
↓ 6 callersMethodarea
Computes the area of all the boxes. Returns: torch.Tensor: a vector with areas of each box.
sam3/agent/helpers/boxes.py:181
↓ 6 callersFunctioncompile_wrapper
( fn, *, mode="max-autotune", fullgraph=True, dynamic=False, name=None )
sam3/perflib/compile.py:35
↓ 6 callersFunctiondecode_rle_mask
解码RLE格式的mask
qa_generation/convert_qa_to_llamafactory.py:45
↓ 6 callersFunctionget_clones
(module, N)
sam3/model/model_misc.py:198
↓ 6 callersFunctionload_frame
(frame)
sam3/visualization_utils.py:932
↓ 6 callersMethodsave
Args: filepath (str): a string that contains the absolute path, including the file name, where the visualized ima
sam3/agent/helpers/visualizer.py:320
↓ 5 callersFunctionPILtoTorch
(pil_image, resolution=None)
PGSR/utils/general_utils.py:21
↓ 5 callersMethod_apply_non_overlapping_constraints
Apply non-overlapping constraints to the object scores in pred_masks. Here we keep only the highest scoring object at each spatial lo
sam3/model/sam3_tracker_base.py:1118
↓ 5 callersFunction_bbox_center
(bbox: Sequence[Sequence[float]])
qa_generation/templates_object_dist.py:24
↓ 5 callersMethod_cache_frame_outputs
( self, inference_state, frame_idx, obj_id_to_mask, suppressed_obj_ids
sam3/model/sam3_video_inference.py:523
↓ 5 callersMethod_change_color_brightness
Depending on the brightness_factor, gives a lighter or darker color i.e. a color with less or more saturation than the original color
sam3/agent/helpers/visualizer.py:1477
↓ 5 callersMethod_consolidate_temp_output_across_obj
Consolidate the per-object temporary outputs in `temp_output_dict_per_obj` on a frame into a single output for all objects, including
sam3/model/sam3_tracking_predictor.py:491
↓ 5 callersMethod_get_obj_num
Get the total number of unique object ids received so far in this session.
sam3/model/sam3_tracking_predictor.py:174
↓ 5 callersMethod_get_orig_video_res_output
Resize the object scores to the original video resolution (video_res_masks) and apply non-overlapping constraints for final output.
sam3/model/sam3_tracking_predictor.py:464
↓ 5 callersMethod_postprocess_output
( self, inference_state, out, removed_obj_ids=None, suppressed_obj_ids
sam3/model/sam3_video_inference.py:429
↓ 5 callersFunctionbox_cxcywh_to_xyxy
(x)
sam3/model/box_ops.py:11
↓ 5 callersMethodbroadcast_python_obj_cpu
(self, python_obj_list, src)
sam3/model/sam3_video_base.py:146
↓ 5 callersFunctionfetchPly
(path)
PGSR/scene/dataset_readers.py:124
↓ 5 callersMethodforward_text
( self, captions, input_boxes=None, additional_text=None, device="cuda" )
sam3/model/vl_combiner.py:121
↓ 5 callersFunctionfov2focal
(fov, pixels)
PGSR/utils/graphics_utils.py:177
↓ 5 callersFunctiongetNerfppNorm
(cam_info)
PGSR/scene/dataset_readers.py:48
↓ 5 callersMethodinit_state
Initialize an inference state from `resource_path` (an image or a video).
sam3/model/sam3_video_inference.py:54
↓ 5 callersFunctionload_bbox_items
(json_path: Path)
qa_generation/templates_object_dpt.py:19
↓ 5 callersFunctionload_mask
(mask_path: Path)
3d_bounding_instance_gs_region.py:509
↓ 5 callersFunctionproj_to_plane
(v: np.ndarray, n: np.ndarray)
postprocess_3d_bbox_aabb.py:239
↓ 5 callersMethodpropagate_in_video_preflight
Prepare inference_state and consolidate temporary outputs before tracking.
sam3/model/sam3_tracking_predictor.py:674
↓ 5 callersFunctionrender_masklet_frame
Overlays masklets and bounding boxes on a single image frame. Args: img: np.ndarray, shape (H, W, 3), uint8 or float32 in [0,255] or
sam3/visualization_utils.py:388
↓ 4 callersMethod__init__
( self, d_model: int, frozen: bool, interaction_layer, layer,
sam3/model/decoder.py:191
↓ 4 callersMethod__init__
( self, hidden_dim, num_upsampling_stages, interpolation_mode="nearest",
sam3/model/maskformer_segmentation.py:173
↓ 4 callersMethod__init__
( self, input_dim: int, hidden_dim: int, output_dim: int, num_layers:
sam3/model/model_misc.py:163
↓ 4 callersMethod__init__
(self)
PGSR/lpipsPyTorch/modules/networks.py:89
↓ 4 callersMethod_add_output_per_object
Split a multi-object output into per-object output slices and add them into `output_dict_per_obj`. The resulting slices share the sam
sam3/model/sam3_tracking_predictor.py:876
↓ 4 callersFunction_find_mask_rle_by_path
通过 mask_path 从 mask_index.json 中查找对应的 mask RLE 数据。 Args: mask_index: mask_index.json 的内容 mask_path: mask 路径(来自 instance 的 ima
qa_generation/templates_object_relpos.py:92
↓ 4 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_relpos.py:118
↓ 4 callersMethod_gather_tensor
(self, x)
sam3/model/sam3_image.py:873
↓ 4 callersFunction_get_2d_bbox_from_rle
从 RLE mask 计算 2D 边界框 (x_min, y_min, x_max, y_max)。 Args: mask_rle: RLE 格式的 mask 字典,包含 'size' 和 'counts' Returns: 2D
qa_generation/templates_object_relpos.py:175
↓ 4 callersFunction_get_2d_center_from_rle
从 RLE mask 计算 2D 中心点。 Args: mask_rle: RLE 格式的 mask 字典,包含 'size' 和 'counts' Returns: 2D 中心点 (x, y),如果解码失败则返回 None
qa_generation/templates_object_relpos.py:206
↓ 4 callersMethod_get_gpu_id_by_obj_id
Locate GPU ID for a given object.
sam3/model/sam3_video_inference.py:1314
↓ 4 callersMethod_get_session
(self, session_id)
sam3/model/sam3_video_predictor.py:253
↓ 4 callersMethod_get_session_stats
Get a statistics string for live sessions and their GPU usage.
sam3/model/sam3_video_predictor.py:261
↓ 4 callersFunction_get_shift
(x, w, w_new, w_img)
sam3/agent/helpers/zoom_in.py:57
↓ 4 callersFunction_merge_helper
( input_ptr, labels_ptr, base_offset, offsets_h, offsets_w, mask_2d, valid_current
sam3/perflib/triton/connected_components.py:140
↓ 4 callersMethod_obj_id_to_idx
Map client-side object id to model-side object index.
sam3/model/sam3_tracking_predictor.py:137
↓ 4 callersMethodadd_action_history
action_history is used to automatically decide what to do during propagation. action_type: one of ["add", "remove", "refine"] + ["pro
sam3/model/sam3_video_inference.py:1188
↓ 4 callersFunctionaxis_two_options
(axis_name: str)
qa_generation/templates_cam_rotation.py:100
↓ 4 callersFunctionaxis_two_options
(axis_name: str)
qa_generation/templates_cam_rotation_chatgpt.py.py:104
↓ 4 callersFunctionclone_output_wrapper
Clone the CUDA output tensors of a function to avoid in-place operations. This wrapper is useful when working with torch.compile to prevent
sam3/model/act_ckpt_utils.py:93
↓ 4 callersFunctionconnected_components
Computes connected components labeling on a batch of 2D tensors, using the best available backend. Args: input_tensor (torch.Tensor)
sam3/perflib/connected_components.py:53
↓ 4 callersMethoddraw_line
Args: x_data (list[int]): a list containing x values of all the points being drawn. Length of list should match t
sam3/agent/helpers/visualizer.py:1198
↓ 4 callersMethoddraw_text
Args: text (str): class label position (tuple): a tuple of the x and y coordinates to place text on image.
sam3/agent/helpers/visualizer.py:1010
↓ 4 callersFunctionfill_holes_in_mask_scores
A post processor to fill small holes in mask scores with area under `max_area`. Holes are those small connected components in either backgrou
sam3/model/sam3_tracker_utils.py:369
↓ 4 callersFunctionget_logger
A command line logger.
sam3/logger.py:39
↓ 4 callersFunctionis_object_entity
(obj: Dict[str, Any])
qa_generation/filter_qa_repeat_descriptions.py:91
↓ 4 callersFunctionmask_iou
Compute the IoU (Intersection over Union) between predicted masks and ground truth masks. Args: - pred_masks: (N, H, W) bool Tensor, co
sam3/perflib/masks_ops.py:48
next →1–100 of 1,270, ranked by callers