MCPcopy Create free account

hub / github.com/bytedance/Shot2Story / functions

Functions1,483 in github.com/bytedance/Shot2Story

Methodlist_processors
(cls)
code/lavis/common/registry.py:268
Methodlist_runners
(cls)
code/lavis/common/registry.py:256
MethodloadQA
Load questions and answers with the specified question ids. :param ids (int array) : integer ids specifying question ids
code/lavis/common/vqa_tools/vqa.py:148
Functionload_checkpoint
(model, checkpoint_path, use_ema=False, strict=True)
code/lavis/models/timesformer/helpers.py:57
Functionload_demo_image
()
code/app/calculate_coco_features.py:22
Functionload_file
Common i/o utility to handle loading data from various file formats. Supported: .pkl, .pickle, .npy, .json For the npy files, we
code/lavis/common/utils.py:313
Methodload_from_pretrained
(self, url_or_filename)
code/lavis/models/blip_models/blip_nlvr.py:156
Methodload_from_pretrained
(self, url_or_filename, use_distill=True)
code/lavis/models/albef_models/albef_nlvr.py:217
Methodload_from_pretrained
(self, url_or_filename, rename_text_keys=True)
code/lavis/models/albef_models/__init__.py:30
Methodload_from_pretrained
(self, url_or_filename, num_frames, num_patches)
code/lavis/models/alpro_models/__init__.py:24
Functionload_json
(filename)
code/lavis/common/utils.py:54
Methodload_pretrained
(self, checkpoint_path, prefix="")
code/lavis/models/vit.py:284
Functionload_pretrained_imagenet
( model, pretrained_model, cfg=None, ignore_classifier=True, num_frames=8, num_patches
code/lavis/models/timesformer/helpers.py:235
Functionload_pretrained_kinetics
( model, pretrained_model, cfg=None, ignore_classifier=True, num_frames=8, num_patches
code/lavis/models/timesformer/helpers.py:299
Functionload_tf_weights_in_t5
Load tf checkpoints in a pytorch model.
code/lavis/models/blip2_models/modeling_t5.py:79
Methodlock
lock modules Args: unlocked_groups (int): leave last n layer groups unlocked (default: 0)
code/lavis/models/clip_models/timm_model.py:91
Methodlock
(self, unlocked_groups=0, freeze_bn_stats=False)
code/lavis/models/clip_models/model.py:342
Methodlock_image_tower
(self, unlocked_groups=0, freeze_bn_stats=False)
code/lavis/models/clip_models/model.py:546
Methodlog_freq
(self)
code/lavis/runners/runner_base.py:292
Methodlr_scheduler
A property to get and create learning rate scheduler by split just in need.
code/lavis/runners/runner_base.py:150
Functionmain_process
(func)
code/lavis/common/dist_utils.py:107
Methodmax_epoch
(self)
code/lavis/runners/runner_iter.py:57
Methodmax_epoch
(self)
code/lavis/runners/runner_base.py:288
Methodmin_lr
(self)
code/lavis/runners/runner_base.py:301
Methodmodel_cfg
(self)
code/lavis/common/config.py:140
Methodno_weight_decay
(self)
code/lavis/models/vit.py:262
Methodno_weight_decay
(self)
code/lavis/models/timesformer/vit.py:395
Functionnone_level_to_args
(level)
code/lavis/processors/randaugment.py:266
Functionnormalize
Args: clip (torch.tensor): Video clip to be normalized. Size is (C, T, H, W) mean (tuple): pixel RGB mean. Size is (3) st
code/lavis/processors/functional_video.py:93
Methodoptimizer
(self)
code/lavis/runners/runner_base.py:108
Functionpad_same
(x, k, s, d=(1, 1), value=0)
code/lavis/models/timesformer/vit_utils.py:140
Methodpadding
(self, seq)
code/lavis/processors/gpt_processors.py:128
Methodparallelize
(self, device_map=None)
code/lavis/models/blip2_models/modeling_t5.py:1482
Methodparallelize
(self, device_map=None)
code/lavis/models/blip2_models/modeling_t5.py:1687
Methodparallelize
(self, device_map=None)
code/lavis/models/blip2_models/modeling_t5.py:1983
Functionparse
(x)
code/lavis/models/clip_vit.py:191
Functionparse
(x)
code/lavis/models/timesformer/vit_utils.py:89
Functionposterize_func
same output as PIL.ImageOps.posterize
code/lavis/processors/randaugment.py:192
Methodpredict
(self, samples)
code/lavis/models/blip_models/blip_nlvr.py:128
Methodpredict
(self, samples)
code/lavis/models/blip_models/blip_classification.py:142
Methodpredict
(self, samples)
code/lavis/models/albef_models/albef_classification.py:149
Methodpredict
(self, samples)
code/lavis/models/albef_models/albef_nlvr.py:213
Methodpredict
(self, samples)
code/lavis/models/alpro_models/alpro_qa.py:109
Methodpredict_answers
Args: samples (dict): A dictionary containing the following keys: - image (torch.Tensor): A tensor of shape (batc
code/lavis/models/albef_models/albef_vqa.py:228
Methodpredict_answers
( self, samples, num_beams=5, inference_method="generate", max_len=10,
code/lavis/models/blip2_models/blip2_t5_instruct.py:415
Methodpredict_answers
( self, samples, num_beams=5, inference_method="generate", max_len=10,
code/lavis/models/blip2_models/blip2_t5.py:247
Methodpredict_answers
( self, samples, num_beams=5, inference_method="generate", max_len=10,
code/lavis/models/blip2_models/blip2_opt.py:282
Methodpredict_answers
( self, samples, num_beams=5, inference_method="generate", max_len=10,
code/lavis/models/blip2_models/blip2_vicuna_instruct.py:379
Methodpredict_answers
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:232
Methodpredict_class
( self, samples, candidates, n_segments=1, )
code/lavis/models/blip2_models/blip2_t5_instruct.py:463
Methodpredict_class
( self, samples, candidates, n_segments=1, )
code/lavis/models/blip2_models/blip2_vicuna_instruct.py:427
Methodprepare_LLM_input
Args: samples (dict): A dictionary containing the following keys: - image (torch.Tensor): A tensor of shape (batc
code/lavis/models/img2prompt_models/img2prompt_vqa.py:464
Methodprepare_decoder_input_ids_from_labels
(self, labels: torch.Tensor)
code/lavis/models/blip2_models/modeling_t5.py:1923
Methodprepare_inputs_for_generation
( self, input_ids, attention_mask=None, **model_kwargs )
code/lavis/models/med.py:1106
Methodprepare_inputs_for_generation
( self, input_ids, past=None, attention_mask=None, **model_kwargs )
code/lavis/models/med.py:1266
Methodprepare_inputs_for_generation
( self, input_ids, query_embeds, past=None, attention_mask=None, **model_kwargs )
code/lavis/models/blip2_models/Qformer.py:1097
Methodprepare_inputs_for_generation
( self, input_ids, query_embeds=None, past_key_values=None, attention_mask=None, inputs_embeds=None, *
code/lavis/models/blip2_models/modeling_llama.py:738
Methodprepare_inputs_for_generation
( self, input_ids, past=None, attention_mask=None, head_mask=None,
code/lavis/models/blip2_models/modeling_t5.py:1895
Methodprepare_inputs_for_generation
( self, input_ids=None, query_embeds=None, past=None, attention_mask=N
code/lavis/models/blip2_models/modeling_opt.py:1079
Methodprint_help
(self)
code/lavis/common/config.py:256
Methodproject
projects hidden states correctly to key/query states
code/lavis/models/blip2_models/modeling_t5.py:520
Methodre_evaluate_only
Set to True to skip training.
code/lavis/runners/runner_base.py:340
Methodreduction
feature reduction (output stride) accessor
code/lavis/models/timesformer/features.py:70
Methodregister_builder
r"""Register a dataset builder to registry with key 'name' Args: name: Key with which the builder will be registered. Us
code/lavis/common/registry.py:22
Methodregister_lr_scheduler
r"""Register a model to registry with key 'name' Args: name: Key with which the task will be registered. Usage:
code/lavis/common/registry.py:141
Methodregister_model
r"""Register a task to registry with key 'name' Args: name: Key with which the task will be registered. Usage:
code/lavis/common/registry.py:83
Methodregister_processor
r"""Register a processor to registry with key 'name' Args: name: Key with which the task will be registered. Usage:
code/lavis/common/registry.py:112
Methodregister_runner
r"""Register a model to registry with key 'name' Args: name: Key with which the task will be registered. Usage:
code/lavis/common/registry.py:165
Methodregister_task
r"""Register a task to registry with key 'name' Args: name: Key with which the task will be registered. Usage:
code/lavis/common/registry.py:54
Methodrescale
(param, layer_id)
code/lavis/models/eva_vit.py:301
Methodreset_classifier
(self, num_classes, global_pool='')
code/lavis/models/eva_vit.py:320
Functionresized_crop
Do spatial cropping and resizing to the video clip Args: clip (torch.tensor): Video clip to be cropped. Size is (C, T, H, W)
code/lavis/processors/functional_video.py:43
Methodresume_ckpt_path
(self)
code/lavis/runners/runner_base.py:351
Functionrotate_func
like PIL, rotate by degree, not radians
code/lavis/processors/randaugment.py:76
Methodrun_cfg
(self)
code/lavis/common/config.py:132
Methodsave_attn_gradients
(self, attn_gradients)
code/lavis/models/vit.py:76
Methodsave_attn_gradients
(self, attn_gradients)
code/lavis/models/med.py:164
Methodsave_attn_gradients
(self, attn_gradients)
code/lavis/models/blip_models/nlvr_encoder.py:128
Methodsave_attn_gradients
(self, attn_gradients)
code/lavis/models/blip2_models/Qformer.py:149
Functionsave_file
Common i/o utility to handle saving data to various file formats. Supported: .pkl, .pickle, .npy, .json Specifically for .json, u
code/lavis/common/utils.py:275
Functionsave_frames_grid
(img_array, out_path)
code/lavis/datasets/data_utils.py:337
Methodscaler
(self)
code/lavis/runners/runner_base.py:140
Methodset_decoder
(self, decoder)
code/lavis/models/blip2_models/modeling_llama.py:638
Methodset_decoder
(self, decoder)
code/lavis/models/blip2_models/modeling_opt.py:924
Methodset_input_embeddings
(self, value)
code/lavis/models/med.py:743
Methodset_input_embeddings
(self, value)
code/lavis/models/blip_models/nlvr_encoder.py:703
Methodset_input_embeddings
(self, value)
code/lavis/models/blip2_models/Qformer.py:702
Methodset_input_embeddings
(self, value)
code/lavis/models/blip2_models/modeling_llama.py:455
Methodset_input_embeddings
(self, value)
code/lavis/models/blip2_models/modeling_llama.py:629
Methodset_input_embeddings
(self, value)
code/lavis/models/blip2_models/modeling_llama.py:808
Methodset_input_embeddings
(self, new_embeddings)
code/lavis/models/blip2_models/modeling_t5.py:1506
Methodset_input_embeddings
(self, new_embeddings)
code/lavis/models/blip2_models/modeling_t5.py:1713
Methodset_input_embeddings
(self, new_embeddings)
code/lavis/models/blip2_models/modeling_t5.py:2004
Methodset_input_embeddings
(self, value)
code/lavis/models/blip2_models/modeling_opt.py:574
Methodset_input_embeddings
(self, value)
code/lavis/models/blip2_models/modeling_opt.py:829
Methodset_input_embeddings
(self, value)
code/lavis/models/blip2_models/modeling_opt.py:915
Methodset_output_embeddings
(self, new_embeddings)
code/lavis/models/med.py:1021
Methodset_output_embeddings
(self, new_embeddings)
code/lavis/models/med.py:1147
Methodset_output_embeddings
(self, new_embeddings)
code/lavis/models/blip2_models/Qformer.py:984
Methodset_output_embeddings
(self, new_embeddings)
code/lavis/models/blip2_models/Qformer.py:1147
← previousnext →1,301–1,400 of 1,483, ranked by callers