MCPcopy Create free account

hub / github.com/PolyU-ChenLab/UniPixel / functions

Functions437 in github.com/PolyU-ChenLab/UniPixel

↓ 2 callersFunctionremove_small_regions
Removes small disconnected regions and holes in a mask. Returns the mask and an indicator of if the mask has been modified.
sam2/utils/amg.py:251
↓ 2 callersFunctionrle_to_mask
Compute a binary mask from an uncompressed RLE.
sam2/utils/amg.py:136
↓ 2 callersFunctionsigmoid_focal_loss
Loss used in RetinaNet for dense detection: https://arxiv.org/abs/1708.02002. Args: inputs: A float tensor of arbitrary shape.
sam2/loss_fns.py:49
↓ 2 callersMethodtrack_step
( self, frame_idx, is_init_cond_frame, current_vision_feats, current_v
sam2/sam2_train.py:389
↓ 2 callersFunctionuncrop_boxes_xyxy
(boxes: torch.Tensor, crop_box: List[int])
sam2/utils/amg.py:223
↓ 1 callersMethod__init__
( self, fill_hole_area=0, # whether to apply non-overlapping constraints on the output
sam2/sam2_video_predictor.py:20
↓ 1 callersMethod__init__
( self, d_model: int, pos_enc_at_input: bool, layer: nn.Module
sam2/modeling/memory_attention.py:104
↓ 1 callersMethod__init__
Initialize the neck :param trunk: the backbone :param position_encoding: the positional encoding to use :param d_model: the di
sam2/modeling/backbones/image_encoder.py:65
↓ 1 callersMethod__init__
(self, data_types, group_size, seed)
unipixel/train/custom_trainer.py:59
↓ 1 callersMethod_build_debug_logger
(self)
unipixel/train/custom_trainer.py:127
↓ 1 callersMethod_build_sam_heads
Build SAM-style prompt encoder and mask decoder.
sam2/modeling/sam2_base.py:205
↓ 1 callersMethod_compile_all_components
(self)
sam2/sam2_video_predictor.py:1042
↓ 1 callersMethod_draw_number_in_mask
Find proper places to draw text given a binary mask.
unipixel/utils/visualizer.py:554
↓ 1 callersMethod_draw_text_in_mask
Find proper places to draw text given a binary mask.
unipixel/utils/visualizer.py:747
↓ 1 callersMethod_dynamic_multimask_via_stability
When outputting a single mask, if the stability score from the current single-mask output (based on output token 0) falls below a thr
sam2/modeling/sam/mask_decoder.py:240
↓ 1 callersMethod_embed_boxes
Embeds box prompts.
sam2/modeling/sam/prompt_encoder.py:104
↓ 1 callersMethod_embed_masks
Embeds mask inputs.
sam2/modeling/sam/prompt_encoder.py:113
↓ 1 callersMethod_embed_points
Embeds point prompts.
sam2/modeling/sam/prompt_encoder.py:77
↓ 1 callersMethod_encode_new_memory
Identical to the corresponding method in the parent (SAM2VideoPredictor), but cloning the memories and their pos enc to enable compil
sam2/sam2_video_predictor.py:1223
↓ 1 callersMethod_encode_new_memory
Encode the current image and its prediction into a memory feature.
sam2/modeling/sam2_base.py:658
↓ 1 callersMethod_forward
Compute the losses related to the masks: the focal loss and the dice loss. and also the MAE or MSE loss between predicted IoUs and ac
sam2/loss_fns.py:179
↓ 1 callersMethod_forward_ca
(self, tgt, memory, query_pos, pos, num_k_exclude_rope=0)
sam2/modeling/memory_attention.py:66
↓ 1 callersMethod_forward_sa
(self, tgt, query_pos)
sam2/modeling/memory_attention.py:58
↓ 1 callersMethod_generate_masks
(self, image: np.ndarray)
sam2/automatic_mask_generator.py:208
↓ 1 callersMethod_get_batch_size
Gets the batch size of the output given the batch size of the input prompts.
sam2/modeling/sam/prompt_encoder.py:118
↓ 1 callersMethod_get_device
(self)
sam2/modeling/sam/prompt_encoder.py:139
↓ 1 callersMethod_get_pos_embed
(self, hw: Tuple[int, int])
sam2/modeling/backbones/hieradet.py:272
↓ 1 callersMethod_get_stability_scores
Compute stability scores of the mask logits based on the IoU between upper and lower thresholds.
sam2/modeling/sam/mask_decoder.py:228
↓ 1 callersMethod_iter_correct_pt_sampling
( self, is_init_cond_frame, point_inputs, gt_masks, high_res_features,
sam2/sam2_train.py:486
↓ 1 callersMethod_obj_idx_to_id
Map model-side object index to client-side object id.
sam2/sam2_video_predictor.py:153
↓ 1 callersMethod_prepare_backbone_features_per_frame
Compute the image backbone features on the fly for the given img_ids.
sam2/sam2_train.py:158
↓ 1 callersMethod_prepare_memory_conditioned_features
Fuse the current frame's visual feature map with previous memory.
sam2/modeling/sam2_base.py:490
↓ 1 callersMethod_process_batch
( self, points: np.ndarray, im_size: Tuple[int, ...], crop_box: List[int],
sam2/automatic_mask_generator.py:274
↓ 1 callersMethod_process_crop
( self, image: np.ndarray, crop_box: List[int], crop_layer_idx: int, o
sam2/automatic_mask_generator.py:233
↓ 1 callersFunction_read_video_decord
read video using decord.VideoReader Args: ele (dict): a dict contains the configuration of video. support keys: - vid
unipixel/dataset/utils.py:244
↓ 1 callersMethod_reset_tracking_results
Reset all tracking inputs and results across the videos.
sam2/sam2_video_predictor.py:739
↓ 1 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
sam2/sam2_video_predictor.py:880
↓ 1 callersMethod_setup_figure
Args: Same as in :meth:`__init__()`. Returns: fig (matplotlib.pyplot.figure): top level container for all th
unipixel/utils/visualizer.py:190
↓ 1 callersMethod_update_losses
(self, losses, src_masks, target_masks, ious, num_objects, object_score_logits)
sam2/loss_fns.py:209
↓ 1 callersMethod_use_mask_as_output
Directly turn binary `mask_inputs` into a output mask logits without using SAM. (same input and output shapes as in _forward_sam_head
sam2/modeling/sam2_base.py:414
↓ 1 callersMethodadd_new_points_or_box
Add new points to a frame.
sam2/sam2_video_predictor.py:236
↓ 1 callersFunctionapply_rotary_enc
( xq: torch.Tensor, xk: torch.Tensor, freqs_cis: torch.Tensor, repeat_freqs_k: bool = False, )
sam2/modeling/position_encoding.py:286
↓ 1 callersFunctionarea_from_rle
(rle: Dict[str, Any])
sam2/utils/amg.py:150
↓ 1 callersMethodbbox
(self)
unipixel/utils/visualizer.py:167
↓ 1 callersFunctionbuild_all_layer_point_grids
Generates point grids for all crop layers.
sam2/utils/amg.py:178
↓ 1 callersFunctionbuild_demo
()
demo/app.py:287
↓ 1 callersFunctionbuild_point_grid
Generates a 2D grid of points evenly spaced in [0,1]x[0,1].
sam2/utils/amg.py:168
↓ 1 callersFunctionbuild_sam2
( config_file, ckpt_path=None, device="cuda", mode="eval", hydra_overrides_extra=[], a
sam2/build_sam.py:68
↓ 1 callersFunctionbuild_sam2_video_predictor
( config_file, ckpt_path=None, device="cuda", mode="eval", hydra_overrides_extra=[], a
sam2/build_sam.py:97
↓ 1 callersFunctionbuild_sam2_video_predictor_hf
(model_id, **kwargs)
sam2/build_sam.py:154
↓ 1 callersFunctioncalculate_video_frame_range
Calculate the start and end frame indices based on the given time range. Args: ele (dict): A dictionary containing optional 'video_s
unipixel/dataset/utils.py:188
↓ 1 callersFunctioncheck_ans
(options, ans, response)
unipixel/eval/eval_general.py:18
↓ 1 callersMethodclear_all_prompts_in_frame
Remove all input points or mask in a specific frame for a given object.
sam2/sam2_video_predictor.py:689
↓ 1 callersFunctioncoco_encode_rle
(uncompressed_rle: Dict[str, Any])
sam2/utils/amg.py:276
↓ 1 callersFunctioncompute_f_score_volume
(pred, gt)
unipixel/eval/infer_seg.py:54
↓ 1 callersFunctioncompute_f_score_volume
(pred: torch.Tensor, gt: torch.Tensor)
unipixel/eval/infer_pixelqa.py:46
↓ 1 callersFunctioncompute_iou_volume
(pred, gt)
unipixel/eval/infer_seg.py:46
↓ 1 callersFunctioncompute_iou_volume
(pred: torch.Tensor, gt: torch.Tensor)
unipixel/eval/infer_pixelqa.py:38
↓ 1 callersFunctioncompute_j_and_f_volume
(pred, gt)
unipixel/eval/infer_seg.py:65
↓ 1 callersFunctioncompute_j_and_f_volume
(pred: torch.Tensor, gt: torch.Tensor)
unipixel/eval/infer_pixelqa.py:57
↓ 1 callersMethodcreateIndex
(self)
unipixel/dataset/sub_classes/utils.py:42
↓ 1 callersFunctiondb_eval_boundary
(annotation, segmentation, void_pixels=None, bound_th=0.008)
unipixel/eval/eval_seg.py:46
↓ 1 callersFunctiondb_eval_boundary
(annotation, segmentation, void_pixels=None, bound_th=0.008)
unipixel/eval/eval_revos.py:103
↓ 1 callersFunctiondb_eval_boundary
(annotation, segmentation, void_pixels=None, bound_th=0.008)
unipixel/eval/eval_groundmore.py:84
↓ 1 callersFunctiondb_eval_iou
(annotation, segmentation, void_pixels=None)
unipixel/eval/eval_seg.py:21
↓ 1 callersFunctiondb_eval_iou
Compute region similarity as the Jaccard Index. Arguments: annotation (ndarray): binary annotation map. segmentation (ndarray
unipixel/eval/eval_revos.py:69
↓ 1 callersFunctiondb_eval_iou
Compute region similarity as the Jaccard Index. Arguments: annotation (ndarray): binary annotation map. segmentation (ndarray
unipixel/eval/eval_groundmore.py:50
↓ 1 callersFunctiondice_loss
Compute the DICE loss, similar to generalized IOU for masks Args: inputs: A float tensor of arbitrary shape. The pred
sam2/loss_fns.py:17
↓ 1 callersMethoddraw_box
Args: box_coord (tuple): a tuple containing x0, y0, x1, y1 coordinates, where x0 and y0 are the coordinates of th
unipixel/utils/visualizer.py:369
↓ 1 callersMethoddraw_line
Args: x_data (list[int]): a list containing x values of all the points being drawn. Length of list should match t
unipixel/utils/visualizer.py:467
↓ 1 callersFunctioneval_queue
(q, rank, out_dict, visa_pred_path)
unipixel/eval/eval_revos.py:251
↓ 1 callersFunctionextract_vision_info
(conversations: list[dict] | list[list[dict]])
unipixel/dataset/utils.py:330
↓ 1 callersMethodfetch_data
(self, idx)
unipixel/dataset/hybrid.py:81
↓ 1 callersFunctionfetch_video
(ele: dict, image_factor: int = IMAGE_FACTOR, return_video_sample_fps: bool =
unipixel/dataset/utils.py:272
↓ 1 callersFunctionfill_holes_in_mask_scores
A post processor to fill small holes in mask scores with area under `max_area`.
sam2/utils/misc.py:303
↓ 1 callersMethodforward_batch
(self, img_list)
sam2/utils/transforms.py:39
↓ 1 callersMethodforward_image
Identical to the corresponding method in the parent (SAM2VideoPredictor), but cloning the backbone features and pos encoding to enabl
sam2/sam2_video_predictor.py:1072
↓ 1 callersMethodforward_tracking
Forward video tracking on each frame (and sample correction clicks).
sam2/sam2_train.py:293
↓ 1 callersMethodgather_and_save_model
(self)
unipixel/train/custom_trainer.py:237
↓ 1 callersFunctiongather_lora_params
(model, bias)
unipixel/train/custom_trainer.py:26
↓ 1 callersFunctiongenerate_crop_boxes
Generates a list of crop boxes of different sizes. Each layer has (2**i)**2 boxes for the ith layer.
sam2/utils/amg.py:187
↓ 1 callersMethodgetAnnIds
(self, image_ids=[], cat_ids=[], ref_ids=[])
unipixel/dataset/sub_classes/utils.py:134
↓ 1 callersMethodgetCatIds
(self)
unipixel/dataset/sub_classes/utils.py:162
↓ 1 callersMethodgetRefIds
(self, image_ids=[], cat_ids=[], ref_ids=[], split='')
unipixel/dataset/sub_classes/utils.py:103
↓ 1 callersFunctionget_1d_sine_pe
Get 1D sine positional embedding as in the original Transformer paper.
sam2/modeling/sam2_utils.py:61
↓ 1 callersFunctionget_activation_fn
Return an activation function given a string
sam2/modeling/sam2_utils.py:74
↓ 1 callersFunctionget_conv
(conv_type)
unipixel/conversation.py:38
↓ 1 callersFunctionget_duration
(path, num_threads=1)
unipixel/utils/io.py:250
↓ 1 callersFunctionget_meta_exp
(exp_path)
unipixel/eval/eval_seg.py:202
↓ 1 callersFunctionget_min_box
(tensor, min_area=10)
unipixel/eval/infer_seg.py:24
↓ 1 callersMethodget_num_layers
(self)
sam2/modeling/backbones/hieradet.py:311
↓ 1 callersFunctionget_r2vos_accuracy
Compute per-pixel accuracy. Args: gt_masks: List[np.ndarray], shape: (n_frames, h, w), dtype: np.uint8 pred_masks: List[np.ndarra
unipixel/eval/eval_revos.py:24
↓ 1 callersFunctionget_r2vos_robustness
Args: gt_masks: List[np.ndarray], shape: (n_frames, h, w), dtype: np.uint8 pred_masks: List[np.ndarray], shape: (n_frames, h, w),
unipixel/eval/eval_revos.py:44
↓ 1 callersFunctionget_target_modules
(model, lora_type, base_model)
unipixel/train/train.py:78
↓ 1 callersMethodinit_parameters
(self)
unipixel/model/qwen2_5_vl.py:109
↓ 1 callersFunctioninit_t_xy
(end_x: int, end_y: int)
sam2/modeling/position_encoding.py:253
↓ 1 callersFunctioninteraction
(client, message_text)
unipixel/eval/videorefer_bench_d/1.eval_gpt_4o_mini.py:20
↓ 1 callersFunctioninteraction
(client, message_text)
unipixel/eval/videorefer_bench_d/1.eval_gpt_4o.py:20
↓ 1 callersFunctioniou_loss
Args: inputs: A float tensor of arbitrary shape. The predictions for each example. targets: A float tensor with t
sam2/loss_fns.py:90
↓ 1 callersFunctionis_box_near_crop_edge
Filter masks at the edge of a crop, but not at the edge of the original image.
sam2/utils/amg.py:78
← previousnext →101–200 of 437, ranked by callers