MCPcopy Create free account

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

Functions437 in github.com/PolyU-ChenLab/UniPixel

↓ 1 callersMethodloadAnns
(self, ann_ids=[])
unipixel/dataset/sub_classes/utils.py:171
↓ 1 callersMethodloadCats
(self, cat_ids=[])
unipixel/dataset/sub_classes/utils.py:183
↓ 1 callersMethodloadImgs
(self, image_ids=[])
unipixel/dataset/sub_classes/utils.py:177
↓ 1 callersMethodloadRefs
(self, ref_ids=[])
unipixel/dataset/sub_classes/utils.py:165
↓ 1 callersMethodload_annos
(self, split='train')
unipixel/dataset/sub_classes/memory.py:226
↓ 1 callersMethodload_annos
(self, split='train')
unipixel/dataset/sub_classes/region.py:387
↓ 1 callersMethodload_annos
(self)
unipixel/dataset/sub_classes/multimodal.py:112
↓ 1 callersMethodload_annos
(self, split='train')
unipixel/dataset/sub_classes/referring.py:241
↓ 1 callersFunctionload_frames_with_stride
(path, every_n_frames=4, sample_frames=-1,
unipixel/utils/io.py:200
↓ 1 callersFunctionload_subtitle
(path)
unipixel/utils/io.py:237
↓ 1 callersFunctionload_video_frames
Load the video frames from video_path. The frames are resized to image_size as in the model and are loaded to GPU if offload_video_to_cpu=Fal
sam2/utils/misc.py:170
↓ 1 callersFunctionload_video_frames_from_jpg_images
Load the video frames from a directory of JPEG files ("<frame_index>.jpg" format). The frames are resized to image_size x image_size and are
sam2/utils/misc.py:209
↓ 1 callersFunctionload_video_frames_from_video_file
Load the video frames from a video file.
sam2/utils/misc.py:271
↓ 1 callersFunctionmain
(args)
unipixel/eval/videorefer_bench_d/1.eval_gpt_4o_mini.py:34
↓ 1 callersFunctionmain
(args)
unipixel/eval/videorefer_bench_d/1.eval_gpt_4o.py:34
↓ 1 callersFunctionmask_to_box
compute bounding box given an input mask Inputs: - masks: [B, 1, H, W] masks, dtype=torch.Tensor Returns: - box_coords: [B, 1,
sam2/utils/misc.py:66
↓ 1 callersFunctionparse_args
()
tools/inference.py:39
↓ 1 callersFunctionparse_args
()
unipixel/eval/infer_general.py:14
↓ 1 callersFunctionparse_args
()
unipixel/eval/eval_refcoco.py:8
↓ 1 callersFunctionparse_args
()
unipixel/eval/infer_videorefer_d.py:36
↓ 1 callersFunctionparse_args
()
unipixel/eval/infer_seg.py:145
↓ 1 callersFunctionparse_args
()
unipixel/eval/eval_general.py:30
↓ 1 callersFunctionparse_args
()
unipixel/eval/eval_pixelqa.py:8
↓ 1 callersFunctionparse_args
()
unipixel/eval/infer_videorefer_q.py:37
↓ 1 callersFunctionparse_args
()
unipixel/eval/infer_pixelqa.py:76
↓ 1 callersMethodpolygons_to_mask
(self, polygons)
unipixel/utils/visualizer.py:159
↓ 1 callersMethodpostprocess_masks
Perform PostProcessing on output masks.
sam2/utils/transforms.py:70
↓ 1 callersMethodpredict_masks
Predicts masks. See 'forward' for more details.
sam2/modeling/sam/mask_decoder.py:157
↓ 1 callersFunctionpreprocess
(input_ids, text, tokenizer, conv_type)
unipixel/dataset/utils.py:527
↓ 1 callersFunctionpreprocess_chatml
(input_ids, text, tokenizer)
unipixel/dataset/utils.py:491
↓ 1 callersMethodpropagate_in_video_preflight
Prepare inference_state and consolidate temporary outputs before tracking.
sam2/sam2_video_predictor.py:552
↓ 1 callersMethodreduce_loss
(self, losses)
sam2/loss_fns.py:280
↓ 1 callersMethodrefine_with_m2m
(self, points, point_labels, low_res_masks, points_per_batch)
sam2/automatic_mask_generator.py:400
↓ 1 callersMethodreset_image
Args: img: same as in __init__
unipixel/utils/visualizer.py:215
↓ 1 callersMethodreset_state
Remove all input points or mask in all frames throughout the video.
sam2/sam2_video_predictor.py:726
↓ 1 callersFunctionreshape_for_broadcast
(freqs_cis: torch.Tensor, x: torch.Tensor)
sam2/modeling/position_encoding.py:277
↓ 1 callersFunctionsample_color
(rgb=False, maximum=1)
unipixel/utils/visualizer.py:48
↓ 1 callersFunctionsample_one_point_from_error_center
Sample 1 random point (along with its label) from the center of each error region, that is, the point with the largest distance to the bounda
sam2/modeling/sam2_utils.py:247
↓ 1 callersFunctionsample_random_points_from_errors
Sample `num_pt` random points (along with their labels) independently from the error regions. Inputs: - gt_masks: [B, 1, H_im, W_im] mas
sam2/modeling/sam2_utils.py:195
↓ 1 callersFunctionselect_closest_cond_frames
Select up to `max_cond_frame_num` conditioning frames from `cond_frame_outputs` that are temporally closest to the current frame at `frame_id
sam2/modeling/sam2_utils.py:18
↓ 1 callersMethodset_image
Calculates the image embeddings for the provided image, allowing masks to be predicted with the 'predict' method. Arguments:
sam2/sam2_image_predictor.py:87
↓ 1 callersFunctionshow_mask
(mask, ax, obj_id=None, random_color=False)
unipixel/eval/infer_videorefer_d.py:24
↓ 1 callersFunctionshow_mask
(mask, ax, obj_id=None, random_color=False)
unipixel/eval/infer_videorefer_q.py:25
↓ 1 callersFunctionsmart_nframes
calculate the number of frames for video used for model inputs. Args: ele (dict): a dict contains the configuration of video.
unipixel/dataset/utils.py:150
↓ 1 callersMethodto_numpy
(self)
sam2/utils/amg.py:72
↓ 1 callersFunctionto_rgb
(pil_image: Image.Image)
unipixel/dataset/utils.py:90
↓ 1 callersFunctiontrain
()
unipixel/train/train.py:105
↓ 1 callersMethodtransform_boxes
Expects a tensor of shape Bx4. The coordinates can be in absolute image or normalized coordinates, if the coords are in absolute imag
sam2/utils/transforms.py:62
↓ 1 callersFunctionuncrop_masks
(masks: torch.Tensor, crop_box: List[int], orig_h: int, orig_w: int)
sam2/utils/amg.py:241
↓ 1 callersFunctionuncrop_points
(points: torch.Tensor, crop_box: List[int])
sam2/utils/amg.py:232
↓ 1 callersFunctionwindow_partition
Partition into non-overlapping windows with padding if needed. Args: x (tensor): input tokens with [B, H, W, C]. window_size
sam2/modeling/backbones/utils.py:15
↓ 1 callersFunctionwindow_unpartition
Window unpartition into original sequences and removing padding. Args: x (tensor): input tokens with [B * num_windows, window_size, w
sam2/modeling/backbones/utils.py:38
Method__call__
(self, x)
sam2/utils/transforms.py:35
Method__call__
(self, video)
unipixel/utils/transforms.py:15
Method__call__
(self, video)
unipixel/utils/transforms.py:29
Method__call__
(self, batch)
unipixel/dataset/collator.py:16
Method__delitem__
(self, key: str)
sam2/utils/amg.py:35
Method__getitem__
(self, key: str)
sam2/utils/amg.py:38
Method__getitem__
(self, idx)
unipixel/dataset/hybrid.py:68
Method__getitem__
(self, idx)
unipixel/dataset/sub_classes/memory.py:98
Method__getitem__
(self, idx)
unipixel/dataset/sub_classes/region.py:121
Method__getitem__
(self, idx)
unipixel/dataset/sub_classes/multimodal.py:42
Method__getitem__
(self, idx)
unipixel/dataset/sub_classes/referring.py:115
Method__getitem__
(self, idx)
unipixel/dataset/sub_classes/segmentation.py:129
Method__getitem__
(self, idx)
unipixel/eval/infer_seg.py:87
Method__init__
Using a SAM 2 model, generates masks for the entire image. Generates a grid of point prompts over the image, then filters low
sam2/automatic_mask_generator.py:24
Method__init__
Uses SAM-2 to calculate the image embedding for an image, and then allow repeated, efficient mask prediction given prompts.
sam2/sam2_image_predictor.py:22
Method__init__
( self, image_encoder, memory_attention=None, memory_encoder=None, pro
sam2/sam2_train.py:67
Method__init__
This class computes the multi-step multi-mask and IoU losses. Args: weight_dict: dict containing weights for focal, dice,
sam2/loss_fns.py:123
Method__init__
(self, *args, **kwargs)
sam2/sam2_video_predictor.py:1037
Method__init__
(self, drop_prob=0.0, scale_by_keep=True)
sam2/modeling/sam2_utils.py:91
Method__init__
(self, num_channels: int, eps: float = 1e-6)
sam2/modeling/sam2_utils.py:139
Method__init__
( self, image_encoder, memory_attention, memory_encoder, num_maskmem=7
sam2/modeling/sam2_base.py:23
Method__init__
( self, activation: str, cross_attention: nn.Module, d_model: int, dim
sam2/modeling/memory_attention.py:19
Method__init__
( self, embed_dim=256, kernel_size=4, stride=4, padding=0, tot
sam2/modeling/memory_encoder.py:26
Method__init__
( self, dim, kernel_size=7, padding=3, drop_path=0.0, layer_sc
sam2/modeling/memory_encoder.py:73
Method__init__
( self, out_dim, mask_downsampler, fuser, position
sam2/modeling/memory_encoder.py:140
Method__init__
(self, num_pos_feats: int = 64, scale: Optional[float] = None)
sam2/modeling/position_encoding.py:139
Method__init__
(self, num_pos_feats: int = 64, scale: Optional[float] = None)
sam2/modeling/position_encoding.py:197
Method__init__
Args: kernel_size (Tuple): kernel size of the projection layer. stride (Tuple): stride of the projection layer.
sam2/modeling/backbones/utils.py:65
Method__init__
( self, trunk: nn.Module, neck: nn.Module, scalp: int = 0, )
sam2/modeling/backbones/image_encoder.py:16
Method__init__
( self, dim: int, dim_out: int, num_heads: int, q_pool: nn.Module = No
sam2/modeling/backbones/hieradet.py:41
Method__init__
( self, dim: int, dim_out: int, num_heads: int, mlp_ratio: float = 4.0
sam2/modeling/backbones/hieradet.py:87
Method__init__
Predicts masks given an image and prompt embeddings, using a transformer architecture. Arguments: transformer_dim
sam2/modeling/sam/mask_decoder.py:17
Method__init__
A transformer decoder that attends to an input image using queries whose positional embedding is supplied. Args: d
sam2/modeling/sam/transformer.py:21
Method__init__
A transformer block with four layers: (1) self-attention of sparse inputs, (2) cross attention of sparse inputs to dense inputs, (3)
sam2/modeling/sam/transformer.py:112
Method__init__
( self, *args, rope_theta=10000.0, # whether to repeat q rope
sam2/modeling/sam/transformer.py:243
Method__init__
Encodes prompts for input to SAM's mask decoder. Arguments: embed_dim (int): The prompts' embedding dimension im
sam2/modeling/sam/prompt_encoder.py:18
Method__init__
( self, img_paths, image_size, offload_video_to_cpu, img_mean,
sam2/utils/misc.py:109
Method__init__
Transforms for SAM2.
sam2/utils/transforms.py:17
Method__init__
(self, **kwargs)
sam2/utils/amg.py:24
Method__init__
(self, mean, std)
unipixel/utils/transforms.py:11
Method__init__
(self, size)
unipixel/utils/transforms.py:23
Method__init__
(self, mask_or_polygons, height, width)
unipixel/utils/visualizer.py:88
Method__init__
Args: img (ndarray): an RGB image of shape (H, W, 3) in range [0, 255]. scale (float): scale the input image
unipixel/utils/visualizer.py:179
Method__init__
Args: img_rgb: a numpy array of shape (H, W, C), where H and W correspond to the height and width of the image re
unipixel/utils/visualizer.py:279
Method__init__
(self, tokenizer)
unipixel/dataset/collator.py:13
Method__init__
(self, processor, model_args, data_args, training_args)
unipixel/dataset/hybrid.py:21
Method__init__
(self, processor, model_args, data_args, training_args, repeat=1)
unipixel/dataset/sub_classes/memory.py:35
Method__init__
(self, processor, model_args, data_args, training_args, repeat=1)
unipixel/dataset/sub_classes/region.py:56
← previousnext →201–300 of 437, ranked by callers