MCPcopy Create free account

hub / github.com/JIA-Lab-research/LISA / functions

Functions403 in github.com/JIA-Lab-research/LISA

↓ 1 callersFunctionsafe_save_model_for_hf_trainer
Collects the state dict and dump to disk.
model/llava/train/train.py:185
↓ 1 callersMethodselect_masks
( self, masks: torch.Tensor, iou_preds: torch.Tensor, num_points: int )
model/segment_anything/utils/onnx.py:105
↓ 1 callersMethodset_image
Calculates the image embeddings for the provided image, allowing masks to be predicted with the 'predict' method. Arguments:
model/segment_anything/predictor.py:33
↓ 1 callersMethodset_torch_image
Calculates the image embeddings for the provided image, allowing masks to be predicted with the 'predict' method. Expects the input
model/segment_anything/predictor.py:64
↓ 1 callersMethodshowRef
(self, ref, seg_box="seg")
utils/refer.py:246
↓ 1 callersFunctionsigmoid_ce_loss
Args: inputs: A float tensor of arbitrary shape. The predictions for each example. targets: A float tensor with t
model/LISA.py:42
↓ 1 callersFunctionsmall_param_init_fn_
( module: nn.Module, n_layers: int, d_model: int, init_div_is_residual: Union[int, float, str,
model/llava/model/language_model/mpt/param_init_fns.py:223
↓ 1 callersFunctionsmart_tokenizer_and_embedding_resize
Resize tokenizer and embedding. Note: This is the unoptimized version that may make your embedding size not be divisible by 64.
model/llava/train/train.py:227
↓ 1 callersMethodsummary
(self)
utils/utils.py:100
↓ 1 callersMethodto_numpy
(self)
model/segment_anything/utils/amg.py:72
↓ 1 callersFunctiontrain
Main training loop.
train_ds.py:403
↓ 1 callersFunctionuncrop_masks
( masks: torch.Tensor, crop_box: List[int], orig_h: int, orig_w: int )
model/segment_anything/utils/amg.py:255
↓ 1 callersFunctionuncrop_points
(points: torch.Tensor, crop_box: List[int])
model/segment_anything/utils/amg.py:246
↓ 1 callersFunctionwindow_partition
Partition into non-overlapping windows with padding if needed. Args: x (tensor): input tokens with [B, H, W, C]. window_size
model/segment_anything/modeling/image_encoder.py:263
↓ 1 callersFunctionwindow_unpartition
Window unpartition into original sequences and removing padding. Args: windows (tensor): input tokens with [B * num_windows, window_s
model/segment_anything/modeling/image_encoder.py:291
Method__call__
( self, output_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs )
model/llava/mm_utils.py:71
Method__call__
(self, instances: Sequence[Dict])
model/llava/train/train.py:769
Method__delitem__
(self, key: str)
model/segment_anything/utils/amg.py:35
Method__getattr__
(self, attr)
model/llava/utils.py:75
Method__getitem__
(self, idx)
utils/reason_seg_dataset.py:109
Method__getitem__
(self, idx)
utils/dataset.py:265
Method__getitem__
(self, idx)
utils/dataset.py:353
Method__getitem__
(self, idx)
utils/sem_seg_dataset.py:188
Method__getitem__
(self, idx)
utils/refer_seg_dataset.py:120
Method__getitem__
(self, idx)
utils/vqa_dataset.py:83
Method__getitem__
(self, key: str)
model/segment_anything/utils/amg.py:38
Method__getitem__
(self, i)
model/llava/train/train.py:701
Method__init__
(self, name, fmt=":f", summary_type=Summary.AVERAGE)
utils/utils.py:55
Method__init__
(self, num_batches, meters, prefix="")
utils/utils.py:132
Method__init__
( self, base_image_dir, tokenizer, vision_tower, samples_per_epoch=500
utils/reason_seg_dataset.py:27
Method__init__
( self, base_image_dir, tokenizer, vision_tower, samples_per_epoch=500
utils/dataset.py:169
Method__init__
( self, base_image_dir, tokenizer, vision_tower, val_dataset,
utils/dataset.py:278
Method__init__
( self, base_image_dir, tokenizer, vision_tower, samples_per_epoch=500
utils/sem_seg_dataset.py:133
Method__init__
( self, base_image_dir, tokenizer, vision_tower, samples_per_epoch=500
utils/refer_seg_dataset.py:25
Method__init__
( self, base_image_dir, tokenizer, vision_tower, samples_per_epoch=500
utils/vqa_dataset.py:37
Method__init__
(self, data_root, dataset="grefcoco", splitBy="unc")
utils/grefer.py:37
Method__init__
(self, data_root, dataset="refcoco", splitBy="unc")
utils/refer.py:44
Method__init__
( self, config, **kwargs, )
model/LISA.py:63
Method__init__
( self, config, **kwargs, )
model/LISA.py:124
Method__init__
Uses SAM to calculate the image embedding for an image, and then allow repeated, efficient mask prediction given prompts. Ar
model/segment_anything/predictor.py:17
Method__init__
Using a SAM model, generates masks for the entire image. Generates a grid of point prompts over the image, then filters low q
model/segment_anything/automatic_mask_generator.py:25
Method__init__
Predicts masks given an image and prompt embeddings, using a transformer architecture. Arguments: transformer_dim
model/segment_anything/modeling/mask_decoder.py:17
Method__init__
Args: img_size (int): Input image size. patch_size (int): Patch size. in_chans (int): Number of input ima
model/segment_anything/modeling/image_encoder.py:18
Method__init__
Args: dim (int): Number of input channels. num_heads (int): Number of attention heads. qkv_bias (bool):
model/segment_anything/modeling/image_encoder.py:199
Method__init__
Args: kernel_size (Tuple): kernel size of the projection layer. stride (Tuple): stride of the projection layer.
model/segment_anything/modeling/image_encoder.py:400
Method__init__
(self, num_channels: int, eps: float = 1e-6)
model/segment_anything/modeling/common.py:32
Method__init__
A transformer decoder that attends to an input image using queries whose positional embedding is supplied. Args: d
model/segment_anything/modeling/transformer.py:17
Method__init__
A transformer block with four layers: (1) self-attention of sparse inputs, (2) cross attention of sparse inputs to dense inputs, (3)
model/segment_anything/modeling/transformer.py:110
Method__init__
SAM predicts object masks from an image and input prompts. Arguments: image_encoder (ImageEncoderViT): The backbone used t
model/segment_anything/modeling/sam.py:22
Method__init__
(self, num_pos_feats: int = 64, scale: Optional[float] = None)
model/segment_anything/modeling/prompt_encoder.py:194
Method__init__
(self, target_length: int)
model/segment_anything/utils/transforms.py:24
Method__init__
( self, model: Sam, return_single_mask: bool, use_stability_score: bool = Fals
model/segment_anything/utils/onnx.py:25
Method__init__
(self, **kwargs)
model/segment_anything/utils/amg.py:22
Method__init__
(self, logger, log_level=logging.INFO)
model/llava/utils.py:69
Method__init__
(self, keywords, tokenizer, input_ids)
model/llava/mm_utils.py:57
Method__init__
(self, config)
model/llava/model/llava_arch.py:30
Method__init__
(self, config)
model/llava/model/language_model/llava_llama.py:42
Method__init__
(self, config)
model/llava/model/language_model/llava_mpt.py:48
Method__init__
( self, d_model: int, n_heads: int, expansion_ratio: int, attn_config:
model/llava/model/language_model/mpt/blocks.py:26
Method__init__
(self, config: MPTConfig)
model/llava/model/language_model/mpt/modeling_mpt.py:378
Method__init__
The MPT configuration class. Args: d_model (int): The size of the embedding dimension of the model. n_heads (int): Th
model/llava/model/language_model/mpt/configuration_mpt.py:33
Method__init__
( self, normalized_shape, eps=1e-05, elementwise_affine=True, device=N
model/llava/model/language_model/mpt/norm.py:17
Method__init__
( self, normalized_shape, eps=1e-05, weight=True, dtype=None, device=None )
model/llava/model/language_model/mpt/norm.py:79
Method__init__
( self, d_model: int, n_heads: int, attn_impl: str = "triton", clip_qk
model/llava/model/language_model/mpt/attention.py:364
Method__init__
(self, vision_tower, args, delay_load=False)
model/llava/model/multimodal_encoder/clip_encoder.py:7
Method__init__
( self, data_path: str, tokenizer: transformers.PreTrainedTokenizer, data_args
model/llava/train/train.py:684
Method__len__
(self)
utils/reason_seg_dataset.py:94
Method__len__
(self)
utils/dataset.py:262
Method__len__
(self)
utils/dataset.py:335
Method__len__
(self)
utils/sem_seg_dataset.py:173
Method__len__
(self)
utils/refer_seg_dataset.py:105
Method__len__
(self)
utils/vqa_dataset.py:68
Method__len__
(self)
model/llava/train/train.py:698
Method__setitem__
(self, key: str, item: Any)
model/segment_anything/utils/amg.py:29
Method__str__
(self)
utils/utils.py:96
Function_build_alibi_tensor
( self: BloomModel, batch_size: int, query_length: int, key_length: int,
model/llava/model/language_model/mpt/hf_prefixlm_converter.py:230
Function_bwd_kernel
( Q, K, V, Bias, DO, DQ, DK, DV, LSE, D, softmax_scale, stride
model/llava/model/language_model/mpt/flash_attn_triton.py:609
Function_bwd_preprocess_do_o_dot
( Out, DO, Delta, stride_ob, stride_oh, stride_om, stride_dob, stride_doh,
model/llava/model/language_model/mpt/flash_attn_triton.py:271
Function_fwd_kernel
( Q, K, V, Bias, Out, Lse, TMP, softmax_scale, stride_qb, stride_qh,
model/llava/model/language_model/mpt/flash_attn_triton.py:59
Function_prepare_attn_mask
( self: BloomModel, attention_mask: torch.Tensor, bidirectional_mask: Optional[torch.T
model/llava/model/language_model/mpt/hf_prefixlm_converter.py:198
Function_prepare_decoder_attention_mask
( self, attention_mask, input_shape, inputs_embeds, past_key_values_length )
model/llava/model/language_model/mpt/hf_prefixlm_converter.py:549
Function_prepare_decoder_attention_mask
( self, attention_mask, input_shape, inputs_embeds, past_key_values_length )
model/llava/train/llama_flash_attn_monkey_patch.py:109
Method_reorder_cache
Used by HuggingFace generate when using beam search with kv-caching. See https://github.com/huggingface/transformers/blob/3ec7a47664ebe40c40f
model/llava/model/language_model/mpt/modeling_mpt.py:525
Method_save_checkpoint
(self, model, trial, metrics=None)
model/llava/train/llava_trainer.py:37
Method_set_gradient_checkpointing
(self, module, value=False)
model/llava/model/language_model/llava_mpt.py:69
Methodactivation_checkpointing_fn
(self, module)
model/llava/model/language_model/mpt/modeling_mpt.py:373
Methodactivation_checkpointing_fn
(self, module)
model/llava/model/language_model/mpt/modeling_mpt.py:488
Functionadd_bidirectional_mask_if_missing
Attempts to add bidirectional_mask to batch if missing. Raises: KeyError if bidirectional_mask is missing and can't be inferred
model/llava/model/language_model/mpt/hf_prefixlm_converter.py:732
Methodapply_boxes_torch
Expects a torch tensor with shape Bx4. Requires the original image size in (H, W) format.
model/segment_anything/utils/transforms.py:92
Methodapply_image_torch
Expects batched images with shape BxCxHxW and float format. This transformation may not exactly match apply_image. apply_image is
model/segment_anything/utils/transforms.py:62
Methodbackward
(ctx, do)
model/llava/model/language_model/mpt/flash_attn_triton.py:962
Methodbackward
(ctx, do)
model/llava/model/language_model/mpt/flash_attn_triton.py:1013
Functionbaseline_param_init_fn_
( module: nn.Module, init_std: float, n_layers: int, d_model: Optional[int] = None, init_d
model/llava/model/language_model/mpt/param_init_fns.py:195
Functionbuild_logger
(logger_name, logger_filename)
model/llava/utils.py:20
Functionbuild_sam_vit_b
(checkpoint=None)
model/segment_anything/build_sam.py:38
Functionbuild_sam_vit_l
(checkpoint=None)
model/segment_anything/build_sam.py:28
Functioncollate_fn
( batch, tokenizer=None, conv_type="llava_v1", use_mm_start_end=True, local_rank=-1 )
utils/dataset.py:29
Methodconfig
(self)
model/llava/model/multimodal_encoder/clip_encoder.py:75
Functionconvert_hf_causal_lm_to_prefix_lm
Converts a HuggingFace Causal LM to a Prefix LM. Supported HuggingFace model classes: - `GPT2LMHeadModel` - `GPTNeoForCausalLM`
model/llava/model/language_model/mpt/hf_prefixlm_converter.py:661
Functioncustom_forward
(*inputs)
model/llava/model/language_model/mpt/hf_prefixlm_converter.py:368
← previousnext →201–300 of 403, ranked by callers