MCPcopy Create free account

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

Functions437 in github.com/PolyU-ChenLab/UniPixel

Method__init__
(self, processor, model_args, data_args, training_args, repeat=1)
unipixel/dataset/sub_classes/multimodal.py:13
Method__init__
(self, data_root, dataset='refcoco', splitBy='unc')
unipixel/dataset/sub_classes/utils.py:12
Method__init__
(self, processor, model_args, data_args, training_args, repeat=1)
unipixel/dataset/sub_classes/referring.py:52
Method__init__
(self, processor, model_args, data_args, training_args, repeat=1)
unipixel/dataset/sub_classes/segmentation.py:87
Method__init__
(self, config, *args, **kwargs)
unipixel/model/qwen2_5_vl.py:38
Method__init__
(self, config)
unipixel/model/qwen2_5_vl.py:58
Method__init__
(self, annos, sam2_transform, sample_frames)
unipixel/eval/infer_seg.py:78
Method__init__
(self, trainer, chunk_steps)
unipixel/train/custom_trainer.py:100
Method__init__
(self, *args, **kwargs)
unipixel/train/custom_trainer.py:118
Method__iter__
(self)
unipixel/train/custom_trainer.py:67
Method__len__
(self)
sam2/utils/misc.py:166
Method__len__
(self)
unipixel/dataset/hybrid.py:65
Method__len__
(self)
unipixel/dataset/sub_classes/memory.py:95
Method__len__
(self)
unipixel/dataset/sub_classes/region.py:118
Method__len__
(self)
unipixel/dataset/sub_classes/multimodal.py:39
Method__len__
(self)
unipixel/dataset/sub_classes/referring.py:112
Method__len__
(self)
unipixel/dataset/sub_classes/segmentation.py:126
Method__len__
(self)
unipixel/eval/infer_seg.py:84
Method__len__
(self)
unipixel/train/custom_trainer.py:64
Method__setitem__
(self, key: str, item: Any)
sam2/utils/amg.py:30
Method__truediv__
(self, other)
unipixel/eval/eval_general.py:11
Method_check_special_mm_tokens
(self, text, *args, **kwargs)
unipixel/model/qwen2_5_vl.py:27
Method_clear_non_cond_mem_around_input
Remove the non-conditioning memory around the input frame. When users provide correction clicks, the surrounding frames' non-conditio
sam2/sam2_video_predictor.py:1014
Method_create_grayscale_image
Create a grayscale version of the original image. The colors in masked area, if given, will be kept.
unipixel/utils/visualizer.py:711
Method_forward_sam_heads
Identical to the corresponding method in the parent (SAM2VideoPredictor), but cloning the outputs of prompt_encoder and mask_decoder
sam2/sam2_video_predictor.py:1089
Method_get_train_sampler
(self, *args, **kwargs)
unipixel/train/custom_trainer.py:141
Method_jitter
Randomly modifies given color to produce a slightly different color than the color given. Args: color (tuple[double]): a
unipixel/utils/visualizer.py:691
Method_load_frames
()
sam2/utils/misc.py:137
Method_load_from_checkpoint
(self, resume_from_checkpoint, model=None)
unipixel/train/custom_trainer.py:148
Method_map_keys
(container)
sam2/sam2_video_predictor.py:981
Method_save_checkpoint
(self, model, trial, **kwargs)
unipixel/train/custom_trainer.py:283
Methodadd_new_mask
Add new mask to a frame.
sam2/sam2_video_predictor.py:372
Methodadd_new_points
Deprecated method. Please use `add_new_points_or_box` instead.
sam2/sam2_video_predictor.py:367
Methodappend_message
(self, role, msg)
unipixel/conversation.py:15
Functioncache_state_hook
(module, inputs, outputs=None)
unipixel/model/qwen2_5_vl.py:21
Functioncollate
(batch)
unipixel/eval/infer_seg.py:72
Functioncompute_axial_cis
(dim: int, end_x: int, end_y: int, theta: float = 10000.0)
sam2/modeling/position_encoding.py:261
Methodcontrasting_color
Returns 'white' or 'black' depending on which color contrasts more with the given RGB value.
unipixel/utils/visualizer.py:334
Methodcreate_optimizer
(self)
unipixel/train/custom_trainer.py:158
Methoddevice
(self)
sam2/sam2_image_predictor.py:418
Functiondisable_btns
()
demo/app.py:72
Methoddraw_binary_mask
Args: binary_mask (ndarray): numpy array of shape (H, W), where H is the image height and W is the image width. E
unipixel/utils/visualizer.py:497
Methoddraw_circle
Args: circle_coord (list(int) or tuple(int)): contains the x and y coordinates of the center of the circle.
unipixel/utils/visualizer.py:451
Methoddraw_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,
unipixel/utils/visualizer.py:402
Methoddtype
(self)
sam2/sam2_video_predictor.py:42
Functionenable_btns
()
demo/app.py:68
Methodencode_boxes
(self, x, y, w, h)
sam2/modeling/position_encoding.py:76
Methodencode_points
(self, x, y, labels)
sam2/modeling/position_encoding.py:86
Functioneval_queue
(q, rank, out_dict, pred_path)
unipixel/eval/eval_seg.py:167
Functioneval_queue
(q, rank, out_dict, pred_path, video_root)
unipixel/eval/eval_groundmore.py:242
Methodflat_img_batch
Returns a flattened img_batch_tensor of shape [(B*T)xCxHxW]
sam2/sam2_train.py:58
Methodflat_obj_to_img_idx
Returns a flattened tensor containing the object to img index. The flat index can be used to access a flattened img_batch of shape [(
sam2/sam2_train.py:48
Methodforward
(self, input: BatchedVideoDatapoint, hidden)
sam2/sam2_train.py:146
Methodforward
(self, outs_batch: List[Dict], targets_batch: torch.Tensor)
sam2/loss_fns.py:163
Methodforward
(self, x)
sam2/modeling/sam2_utils.py:96
Methodforward
(self, x)
sam2/modeling/sam2_utils.py:127
Methodforward
(self, x: torch.Tensor)
sam2/modeling/sam2_utils.py:145
Methodforward
(self, *args, **kwargs)
sam2/modeling/sam2_base.py:200
Methodforward
( self, tgt, memory, pos: Optional[Tensor] = None, query_pos: Optional
sam2/modeling/memory_attention.py:83
Methodforward
( self, curr: torch.Tensor, # self-attention inputs memory: torch.Tensor,
sam2/modeling/memory_attention.py:122
Methodforward
(self, x)
sam2/modeling/memory_encoder.py:56
Methodforward
(self, x)
sam2/modeling/memory_encoder.py:101
Methodforward
(self, x)
sam2/modeling/memory_encoder.py:130
Methodforward
( self, pix_feat: torch.Tensor, masks: torch.Tensor, skip_mask_sigmoid: bool =
sam2/modeling/memory_encoder.py:162
Methodforward
(self, x: torch.Tensor)
sam2/modeling/position_encoding.py:128
Methodforward
Generate positional encoding for a grid of the specified size.
sam2/modeling/position_encoding.py:159
Methodforward
Generate positional encoding for a sequence of the specified length.
sam2/modeling/position_encoding.py:215
Methodforward
(self, x: torch.Tensor)
sam2/modeling/backbones/utils.py:84
Methodforward
(self, sample: torch.Tensor)
sam2/modeling/backbones/image_encoder.py:30
Methodforward
(self, xs: List[torch.Tensor])
sam2/modeling/backbones/image_encoder.py:115
Methodforward
(self, x: torch.Tensor)
sam2/modeling/backbones/hieradet.py:57
Methodforward
(self, x: torch.Tensor)
sam2/modeling/backbones/hieradet.py:134
Methodforward
(self, x: torch.Tensor)
sam2/modeling/backbones/hieradet.py:280
Methodforward
Predict masks given image and prompt embeddings. Arguments: image_embeddings (torch.Tensor): the embeddings from the image
sam2/modeling/sam/mask_decoder.py:99
Methodforward
Args: image_embedding (torch.Tensor): image to attend to. Should be shape B x embedding_dim x h x w for any h and w.
sam2/modeling/sam/transformer.py:63
Methodforward
(self, queries: Tensor, keys: Tensor, query_pe: Tensor, key_pe: Tensor)
sam2/modeling/sam/transformer.py:149
Methodforward
(self, q: Tensor, k: Tensor, v: Tensor)
sam2/modeling/sam/transformer.py:219
Methodforward
(self, q: Tensor, k: Tensor, v: Tensor, num_k_exclude_rope: int = 0)
sam2/modeling/sam/transformer.py:269
Methodforward
Embeds different types of prompts, returning both sparse and dense embeddings. Arguments: points (tuple(torch.Tens
sam2/modeling/sam/prompt_encoder.py:142
Methodforward
(self, input_ids=None, attention_mask=None, position_ids=None,
unipixel/model/qwen2_5_vl.py:137
Methodforward_with_coords
Positionally encode raw coordinates by normalizing to [0,1].
sam2/modeling/position_encoding.py:230
Methodfrom_pretrained
Load a pretrained model from the Hugging Face hub. Arguments: model_id (str): The Hugging Face repository ID. **
sam2/automatic_mask_generator.py:139
Methodfrom_pretrained
Load a pretrained model from the Hugging Face hub. Arguments: model_id (str): The Hugging Face repository ID. **
sam2/sam2_video_predictor.py:111
MethodgetRefBox
(self, ref_id)
unipixel/dataset/sub_classes/utils.py:189
Methodget_batch_samples
(self, epoch_iterator, num_batches, device)
unipixel/train/custom_trainer.py:223
Functionget_clones
(module, N)
sam2/modeling/sam2_utils.py:85
Methodget_image
Returns: ndarray: the visualized image of shape (H, W, 3) (RGB) in uint8 type. The shape is scale
unipixel/utils/visualizer.py:234
Methodget_image_embedding
Returns the image embeddings for the currently set image, with shape 1xCxHxW, where C is the embedding dimension and (H,W) are
sam2/sam2_image_predictor.py:406
Methodget_layer_id
(self, layer_name)
sam2/modeling/backbones/hieradet.py:296
Methodget_output
Returns: output (VisImage): the image output containing the visualizations added to the image.
unipixel/utils/visualizer.py:767
Methodget_prompt
(self)
unipixel/conversation.py:21
Functionget_sdpa_settings
()
sam2/utils/misc.py:17
Methodhas_holes
(self)
unipixel/utils/visualizer.py:132
Functioninfer_reg
(blob, query, prompt_idx=1, video=None)
demo/app.py:191
Functioninfer_seg
(media, query, sample_frames=16, media_type=None)
demo/app.py:105
Methodload_annos
(self, split='train')
unipixel/dataset/sub_classes/memory.py:335
Methodload_annos
(self, split='train')
unipixel/dataset/sub_classes/region.py:278
Methodload_annos
(self, split='train')
unipixel/dataset/sub_classes/region.py:495
Methodload_annos
(self, split='train')
unipixel/dataset/sub_classes/region.py:597
Methodload_annos
(self, split='train')
unipixel/dataset/sub_classes/referring.py:308
← previousnext →301–400 of 437, ranked by callers