MCPcopy Create free account

hub / github.com/bytedance/Shot2Story / functions

Functions1,483 in github.com/bytedance/Shot2Story

↓ 4 callersFunctionenhance_level_to_args
(MAX_LEVEL)
code/lavis/processors/randaugment.py:223
↓ 4 callersFunctiongetAttMap
(img, attMap, blur=True, overlap=True)
code/app/utils.py:49
↓ 4 callersMethodget_attention_mask
(self, seq, pad_token=-1)
code/lavis/processors/gpt_processors.py:85
↓ 4 callersMethodget_builder_class
(cls, name)
code/lavis/common/registry.py:232
↓ 4 callersFunctionget_padding
(kernel_size: int, stride: int = 1, dilation: int = 1, **_)
code/lavis/models/timesformer/vit_utils.py:100
↓ 4 callersMethodget_processor_class
(cls, name)
code/lavis/common/registry.py:244
↓ 4 callersMethodget_prompt
(self)
code/lavis/conversation/conversation.py:52
↓ 4 callersFunctionload_blip_itm_model
(device, model_type="base")
code/app/utils.py:77
↓ 4 callersFunctionload_demo_image
()
code/app/__init__.py:16
↓ 4 callersMethodload_from_pretrained
(self, url_or_filename)
code/lavis/models/blip_models/blip.py:34
↓ 4 callersFunctionload_state_dict
(checkpoint_path, use_ema=False)
code/lavis/models/timesformer/helpers.py:24
↓ 4 callersFunctionload_video
(video_path, n_frms=MAX_INT, height=-1, width=-1, sampling="uniform", clips=None)
code/lavis/datasets/data_utils.py:32
↓ 4 callersMethodlog_stats
(self, stats, split_name)
code/lavis/runners/runner_base.py:713
↓ 4 callersMethodmodel
A property to get the DDP-wrapped model on the device.
code/lavis/runners/runner_base.py:88
↓ 4 callersFunctionprepare_sample
(samples, cuda_enabled=True)
code/lavis/datasets/data_utils.py:140
↓ 4 callersMethodprocessPunctuation
(self, inText)
code/lavis/common/vqa_tools/vqa_eval.py:249
↓ 4 callersMethodsetup_task
(cls, cfg)
code/lavis/tasks/vqa.py:48
↓ 4 callersFunctiontile
(x, dim, n_tile)
code/lavis/models/base_model.py:242
↓ 3 callersMethod__init__
vis_root (string): Root directory of images (e.g. coco/images/) ann_root (string): directory to store the annotation file
code/lavis/datasets/datasets/retrieval_datasets.py:30
↓ 3 callersMethod__init__
( self, in_features, hidden_features=None, out_features=None, act_laye
code/lavis/models/vit.py:29
↓ 3 callersMethod__init__
(self, feature_info: List[Dict], out_indices: Tuple[int])
code/lavis/models/timesformer/features.py:22
↓ 3 callersMethod_convert_node_to_json
(self, node)
code/lavis/common/config.py:161
↓ 3 callersMethod_save_checkpoint
Save the checkpoint at the current epoch.
code/lavis/runners/runner_base.py:632
↓ 3 callersFunctionapply_rot_embed
(x: torch.Tensor, sin_emb, cos_emb)
code/lavis/models/clip_models/timm_model.py:434
↓ 3 callersMethodattention
(self, x: torch.Tensor, attn_mask: Optional[torch.Tensor] = None)
code/lavis/models/clip_models/model.py:279
↓ 3 callersMethodbuild_datasets
(self, cfg)
code/lavis/tasks/vqa.py:71
↓ 3 callersMethodchunk
(iterable, chunk_size, drop_last_batch)
code/lavis/datasets/datasets/hdfs_distributed_sampler.py:31
↓ 3 callersMethodeval_epoch
Evaluate the model on a given split. Args: split_name (str): name of the split to evaluate on. cur_epoch (in
code/lavis/runners/runner_base.py:482
↓ 3 callersMethodforward_cap
Args: samples (dict): A dictionary containing the following keys: - image (torch.Tensor): A tensor of shape (batc
code/lavis/models/pnp_vqa_models/pnp_vqa.py:84
↓ 3 callersMethodforward_itm
Args: samples (dict): A dictionary containing the following keys: - image (torch.Tensor): A tensor of shape (batc
code/lavis/models/pnp_vqa_models/pnp_vqa.py:54
↓ 3 callersMethodforward_qa
Args: samples (dict): A dictionary containing the following keys: - image (torch.Tensor): A tensor of shape (batc
code/lavis/models/pnp_vqa_models/pnp_vqa.py:174
↓ 3 callersFunctionfreeze_batch_norm_2d
Converts all `BatchNorm2d` and `SyncBatchNorm` layers of provided module into `FrozenBatchNorm2d`. If `module` is itself an instance of eithe
code/lavis/models/clip_models/utils.py:14
↓ 3 callersMethodget_extended_attention_mask
Makes broadcastable attention and causal masks so that future and masked tokens are ignored. Arguments: attention_mask (
code/lavis/models/blip2_models/Qformer.py:713
↓ 3 callersFunctionget_pretrained_url
(model: str, tag: str)
code/lavis/models/clip_models/pretrained.py:120
↓ 3 callersFunctionget_world_size
()
code/lavis/common/dist_utils.py:41
↓ 3 callersFunctionhexists
hdfs capable to check whether a file_path is exists
code/lavis/datasets/hdfs_utils.py:237
↓ 3 callersFunctionhload_pkl
load pickle from hdfs
code/lavis/datasets/hdfs_utils.py:29
↓ 3 callersFunctioninit_bert_tokenizer
()
code/app/utils.py:44
↓ 3 callersMethodloadRes
Load result file and return a result object. :param resFile (str) : file name of result file :return: res (obj)
code/lavis/common/vqa_tools/vqa.py:173
↓ 3 callersFunctionload_dataset_config
(cfg_path)
code/lavis/datasets/builders/base_dataset_builder.py:310
↓ 3 callersFunctionmakedir
Create the directory if it does not exist.
code/lavis/common/utils.py:64
↓ 3 callersFunctionpixel_freq_bands
( num_bands: int, max_freq: float = 224.0, linear_bands: bool = True, dtype: torch.dtype = tor
code/lavis/models/clip_models/timm_model.py:250
↓ 3 callersMethodprocessDigitArticle
(self, inText)
code/lavis/common/vqa_tools/vqa_eval.py:261
↓ 3 callersMethodregister
r"""Register an item to registry with key 'name' Args: name: Key with which the item will be registered. Usage::
code/lavis/common/registry.py:205
↓ 3 callersFunctionreorg_datasets_by_split
Organizes datasets by split. Args: datasets: dict of torch.utils.data.Dataset objects by name. Returns: Dict of dataset
code/lavis/datasets/data_utils.py:149
↓ 3 callersMethodreset_classifier
(self, num_classes, global_pool="")
code/lavis/models/timesformer/vit.py:401
↓ 3 callersFunctionrot
(x)
code/lavis/models/clip_models/timm_model.py:430
↓ 3 callersFunctionshow_samples
(dataset, offset=0, is_next=False)
code/app/dataset_browser.py:94
↓ 3 callersMethodstep
(self, cur_epoch, cur_step)
code/lavis/common/optims.py:37
↓ 3 callersMethodto_dict
(self)
code/lavis/common/config.py:165
↓ 3 callersFunctiontrunc_normal_
r"""Fills the input Tensor with values drawn from a truncated normal distribution. The values are effectively drawn from the normal distributi
code/lavis/models/clip_models/timm_model.py:544
↓ 2 callersMethod__init__
(self)
code/lavis/processors/alpro_processors.py:52
↓ 2 callersMethod_build_class_labels
(self)
code/lavis/datasets/datasets/nlvr_datasets.py:40
↓ 2 callersMethod_collect
(self, x)
code/lavis/models/timesformer/features.py:207
↓ 2 callersFunction_file_name
(row)
code/lavis/datasets/download_scripts/DownloadConceptualCaptions/download_data_cc3m.py:82
↓ 2 callersFunction_file_name
(row)
code/lavis/datasets/download_scripts/DownloadConceptualCaptions/download_data_cc12m.py:82
↓ 2 callersFunction_get_feature_info
(net, out_indices)
code/lavis/models/timesformer/features.py:137
↓ 2 callersMethod_load_checkpoint
Resume from a checkpoint.
code/lavis/runners/runner_base.py:680
↓ 2 callersFunction_module_list
(module, flatten_sequential=False)
code/lavis/models/timesformer/features.py:123
↓ 2 callersMethod_predict_class
Args: samples (dict): A dictionary containing the following keys: - image (torch.Tensor): A tensor of shape (batc
code/lavis/models/blip2_models/blip2_t5_instruct.py:503
↓ 2 callersMethod_predict_class
( self, samples, candidates, n_segments=1, )
code/lavis/models/blip2_models/blip2_vicuna_instruct.py:469
↓ 2 callersFunction_rescan_model_configs
()
code/lavis/models/clip_models/model.py:896
↓ 2 callersMethod_save_checkpoint
(self, cur_iters, is_best=False)
code/lavis/runners/runner_iter.py:156
↓ 2 callersMethod_save_result_leaderboard
Saving the results in the format required for leaderboard evaluation. [TODO] add support for multi-choice.
code/lavis/tasks/vqa.py:296
↓ 2 callersMethod_shift_right
(self, input_ids)
code/lavis/models/blip2_models/modeling_t5.py:919
↓ 2 callersMethod_train_inner_loop
An inner training loop compatible with both epoch-based and iter-based training. When using epoch-based, training stops after one ep
code/lavis/tasks/base_task.py:156
↓ 2 callersFunction_urlretrieve
(url: str, filename: str, chunk_size: int = 1024)
code/lavis/common/utils.py:154
↓ 2 callersMethodadd_meter
(self, name, meter)
code/lavis/common/logger.py:119
↓ 2 callersMethodask
(self, text, conv)
code/lavis/conversation/conversation.py:502
↓ 2 callersMethodattention
(self, x: torch.Tensor)
code/lavis/models/clip_vit.py:132
↓ 2 callersFunctionbuild_fourier_pos_embed
( feat_shape: List[int], bands: Optional[torch.Tensor] = None, num_bands: int = 64, max_res: i
code/lavis/models/clip_models/timm_model.py:329
↓ 2 callersMethodbuild_model
(self, cfg)
code/lavis/tasks/base_task.py:29
↓ 2 callersFunctionbuild_model_from_openai_state_dict
(state_dict: dict)
code/lavis/models/clip_models/model.py:792
↓ 2 callersFunctionbytes_to_unicode
Returns list of utf-8 byte and a corresponding list of unicode strings. The reversible bpe codes work on unicode strings. This means you
code/lavis/models/clip_models/tokenizer.py:32
↓ 2 callersFunctioncombine_splits
(s1,s2)
code/lavis/conversation/conversation.py:239
↓ 2 callersMethodcompute_itm
(self, image_inputs, text_ids, text_atts)
code/lavis/models/blip2_models/blip2_qformer.py:347
↓ 2 callersFunctioncompute_sim_matrix
(model, data_loader, **kwargs)
code/lavis/models/albef_models/__init__.py:76
↓ 2 callersFunctionconcat_datasets
Concatenates multiple datasets into a single dataset. It supports may-style datasets and DataPipeline from WebDataset. Currently, does not s
code/lavis/datasets/data_utils.py:175
↓ 2 callersMethodconcat_text_input_output
(self, input_ids, input_atts, output_ids, output_atts)
code/lavis/models/blip2_models/blip2_vicuna_instruct.py:115
↓ 2 callersFunctionconvert_weights_to_fp16
Convert applicable model parameters to fp16
code/lavis/models/eva_vit.py:397
↓ 2 callersFunctionconvert_weights_to_fp16
Convert applicable model parameters to fp16
code/lavis/models/clip_models/model.py:763
↓ 2 callersMethodcreateIndex
(self)
code/lavis/common/vqa_tools/vqa.py:53
↓ 2 callersMethodcreate_loaders
Create dataloaders for training and validation.
code/lavis/runners/runner_base.py:523
↓ 2 callersFunctioncreate_model
( model_name: str, pretrained: str = "", precision: str = "fp32", device: torch.device = torch
code/lavis/models/clip_models/model.py:934
↓ 2 callersFunctioncrop
Args: clip (torch.tensor): Video clip to be cropped. Size is (C, T, H, W)
code/lavis/processors/functional_video.py:23
↓ 2 callersFunctiondownload_pretrained
(url: str, root: str = os.path.expanduser("~/.cache/clip"))
code/lavis/models/clip_models/pretrained.py:130
↓ 2 callersFunctiondrop_path
Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks). This is the same as the DropConnect impl I created for Ef
code/lavis/models/timesformer/vit_utils.py:161
↓ 2 callersMethodencode_img
(self, image)
code/lavis/models/blip2_models/video_minigpt4.py:189
↓ 2 callersMethodformat_arguments
(self)
code/lavis/common/config.py:248
↓ 2 callersMethodformat_help
(self)
code/lavis/common/config.py:251
↓ 2 callersMethodforward
( self, hidden_states, attention_mask=None, head_mask=None, encoder_hi
code/lavis/models/med.py:422
↓ 2 callersMethodforward_encoder
(self, samples)
code/lavis/models/blip_models/blip_caption_video.py:53
↓ 2 callersMethodforward_encoder
(self, samples)
code/lavis/models/blip_models/blip_caption.py:53
↓ 2 callersMethodforward_encoder
(self, samples)
code/lavis/models/albef_models/albef_vqa.py:137
↓ 2 callersMethodfrom_config
(cls, cfg=None)
code/lavis/processors/base_processor.py:20
↓ 2 callersMethodgenerate
(self, input_ids, attention_mask, num_beams=1, min_length=0, max_length=20)
code/lavis/models/pnp_vqa_models/pnp_unifiedqav2_fid.py:43
↓ 2 callersMethodgenerate_from_encoder
( self, tokenized_prompt, visual_embeds, sep_token_id, pad_token_id,
code/lavis/models/med.py:1316
↓ 2 callersMethodgetQuesIds
Get question ids that satisfy given filter conditions. default skips that filter :param imgIds (int array) : get question ids f
code/lavis/common/vqa_tools/vqa.py:79
↓ 2 callersMethodget_dicts
return info dicts for specified keys (or all if None) at specified indices (or out_indices if None)
code/lavis/models/timesformer/features.py:49
↓ 2 callersMethodget_embed
(self, shape: List[int])
code/lavis/models/clip_models/timm_model.py:497
← previousnext →101–200 of 1,483, ranked by callers