MCPcopy Create free account

hub / github.com/KuofengGao/Verbose_Images / functions

Functions3,633 in github.com/KuofengGao/Verbose_Images

↓ 2 callersMethod_predict_class
( self, samples, candidates, n_segments=1, special_qformer_input_promp
lavis/models/blip2_models/blip2_vicuna_xinstruct.py:1680
↓ 2 callersMethod_predict_noise
( self, t, latent_model_input, text_embeddings, width=512, hei
lavis/models/blip_diffusion_models/blip_diffusion.py:287
↓ 2 callersMethod_register_attention_refine
( self, src_subject, prompts, num_inference_steps, cross_replace_steps
lavis/models/blip_diffusion_models/blip_diffusion.py:559
↓ 2 callersMethod_register_backend
(cls, name, backend, force=False, prefixes=None)
lavis/common/annotator/uniformer/mmcv/fileio/file_client.py:886
↓ 2 callersMethod_register_scheme
(cls, prefixes, loader, force=False)
lavis/common/annotator/uniformer/mmcv/runner/checkpoint.py:168
↓ 2 callersFunction_rescan_model_configs
()
lavis/models/clip_models/model.py:896
↓ 2 callersMethod_resize
(self, x, size)
lavis/common/annotator/uniformer/mmcv/ops/merge_cells.py:92
↓ 2 callersMethod_save_checkpoint
Save the current checkpoint and delete unwanted checkpoint.
lavis/common/annotator/uniformer/mmcv/runner/hooks/checkpoint.py:119
↓ 2 callersMethod_save_ckpt
Save the best checkpoint. It will compare the score according to the compare function, write related information (best score, best ch
lavis/common/annotator/uniformer/mmcv/runner/hooks/evaluation.py:314
↓ 2 callersMethod_save_result_leaderboard
Saving the results in the format required for leaderboard evaluation. [TODO] add support for multi-choice.
lavis/tasks/vqa.py:299
↓ 2 callersFunction_scale_size
Rescale a size by a ratio. Args: size (tuple[int]): (w, h). scale (float | tuple(float)): Scaling factor. Returns: t
lavis/common/annotator/uniformer/mmcv/image/geometric.py:16
↓ 2 callersMethod_shift_right
(self, input_ids)
lavis/models/blip2_models/modeling_t5.py:919
↓ 2 callersMethod_should_evaluate
Judge whether to perform evaluation. Here is the rule to judge whether to perform evaluation: 1. It will not perform evaluation durin
lavis/common/annotator/uniformer/mmcv/runner/hooks/evaluation.py:279
↓ 2 callersMethod_swap_ema_parameters
Swap the parameter of model with parameter in ema_buffer.
lavis/common/annotator/uniformer/mmcv/runner/hooks/ema.py:83
↓ 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
lavis/tasks/base_task.py:157
↓ 2 callersFunction_urlretrieve
(url: str, filename: str, chunk_size: int = 1024)
lavis/common/utils.py:156
↓ 2 callersMethodadd_meter
(self, name, meter)
lavis/common/logger.py:119
↓ 2 callersMethodafter_epoch
(self, runner)
lavis/common/annotator/uniformer/mmcv/runner/hooks/hook.py:22
↓ 2 callersMethodafter_iter
(self, runner)
lavis/common/annotator/uniformer/mmcv/runner/hooks/hook.py:28
↓ 2 callersFunctionallreduce_grads
Allreduce gradients. Args: params (list[torch.Parameters]): List of parameters of a model coalesce (bool, optional): Whether allr
lavis/common/annotator/uniformer/mmcv/runner/dist_utils.py:121
↓ 2 callersFunctionbbox_clip
Clip bboxes to fit the image shape. Args: bboxes (ndarray): Shape (..., 4*k) img_shape (tuple[int]): (height, width) of the image
lavis/common/annotator/uniformer/mmcv/image/geometric.py:342
↓ 2 callersMethodbefore_epoch
(self, runner)
lavis/common/annotator/uniformer/mmcv/runner/hooks/hook.py:19
↓ 2 callersMethodbefore_iter
(self, runner)
lavis/common/annotator/uniformer/mmcv/runner/hooks/hook.py:25
↓ 2 callersFunctionbgr2gray
Convert a BGR image to grayscale image. Args: img (ndarray): The input image. keepdim (bool): If False (by default), then return
lavis/common/annotator/uniformer/mmcv/image/colorspace.py:22
↓ 2 callersFunctionbuild_dataloader
Build PyTorch DataLoader. In distributed training, each GPU/process has a dataloader. In non-distributed training, there is only one dataload
lavis/common/annotator/uniformer/mmseg/datasets/builder.py:78
↓ 2 callersFunctionbuild_dataset
Build datasets.
lavis/common/annotator/uniformer/mmseg/datasets/builder.py:61
↓ 2 callersMethodbuild_datasets
(self, cfg)
lavis/tasks/vqa.py:95
↓ 2 callersFunctionbuild_dropout
Builder for drop out layers.
lavis/common/annotator/uniformer/mmcv/cnn/bricks/drop.py:63
↓ 2 callersFunctionbuild_fourier_pos_embed
( feat_shape: List[int], bands: Optional[torch.Tensor] = None, num_bands: int = 64, max_res: i
lavis/models/clip_models/timm_model.py:329
↓ 2 callersFunctionbuild_loss
Build loss.
lavis/common/annotator/uniformer/mmseg/models/builder.py:30
↓ 2 callersFunctionbuild_model_from_openai_state_dict
(state_dict: dict)
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
lavis/models/ulip_models/utils/tokenizer.py:18
↓ 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
lavis/models/clip_models/tokenizer.py:32
↓ 2 callersFunctioncache_url
This implementation downloads the remote resource and caches it locally. The resource will only be downloaded if not previously requested.
lavis/common/utils.py:244
↓ 2 callersFunctioncfg_from_yaml_file
(cfg_file)
lavis/models/ulip_models/utils/config.py:37
↓ 2 callersFunctioncheck_outside_inside
(segments_info, connect_idx)
lavis/common/annotator/mlsd/utils.py:406
↓ 2 callersFunctioncheck_prerequisites
A decorator factory to check if prerequisites are satisfied. Args: prerequisites (str of list[str]): Prerequisites to be checked.
lavis/common/annotator/uniformer/mmcv/utils/misc.py:206
↓ 2 callersFunctioncoco_caption_eval
(coco_gt_root, results_file, split, annotation_file=None, img_ids=[])
lavis/tasks/captioning.py:222
↓ 2 callersFunctioncompute_gradcam
(model, visual_input, text_input, tokenized_text, block_num=6)
lavis/models/blip_models/blip_image_text_matching.py:151
↓ 2 callersMethodcompute_itm
(self, image_inputs, text_ids, text_atts)
lavis/models/blip2_models/blip2_qformer.py:364
↓ 2 callersFunctioncompute_sim_matrix
(model, data_loader, **kwargs)
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
lavis/datasets/data_utils.py:113
↓ 2 callersMethodconcat_text_input_output
(self, input_ids, input_atts, output_ids, output_atts)
lavis/models/blip2_models/blip2_vicuna_instruct.py:123
↓ 2 callersMethodconcat_text_input_output
(self, input_ids, input_atts, output_ids, output_atts)
lavis/models/blip2_models/blip2_vicuna_xinstruct.py:491
↓ 2 callersMethodcontrast
Contrast distortion.
lavis/common/annotator/uniformer/mmseg/datasets/pipelines/transforms.py:819
↓ 2 callersFunctionconv3x3
3x3 convolution with padding.
lavis/common/annotator/uniformer/mmcv/cnn/resnet.py:10
↓ 2 callersFunctionconvert_weights_to_fp16
Convert applicable model parameters to fp16
lavis/models/eva_vit.py:410
↓ 2 callersFunctionconvert_weights_to_fp16
Convert applicable model parameters to fp16
lavis/models/clip_models/model.py:763
↓ 2 callersMethodcopy_grads_to_fp32
Copy gradients from fp16 model to fp32 weight copy.
lavis/common/annotator/uniformer/mmcv/runner/hooks/optimizer.py:193
↓ 2 callersMethodcopy_params_to_fp16
Copy updated params from fp32 weight copy to fp16 model.
lavis/common/annotator/uniformer/mmcv/runner/hooks/optimizer.py:203
↓ 2 callersMethodcreateIndex
(self)
lavis/common/vqa_tools/vqa.py:53
↓ 2 callersMethodcreate_loaders
Create dataloaders for training and validation.
lavis/runners/runner_base.py:504
↓ 2 callersFunctioncreate_model
( model_name: str, pretrained: str = "", precision: str = "fp32", device: torch.device = torch
lavis/models/clip_models/model.py:934
↓ 2 callersFunctioncrop
Args: clip (torch.tensor): Video clip to be cropped. Size is (C, T, H, W)
lavis/processors/functional_video.py:23
↓ 2 callersMethodcurrent_lr
Get current learning rates. Returns: list[float] | dict[str, list[float]]: Current learning rates of all param gr
lavis/common/annotator/uniformer/mmcv/runner/base_runner.py:205
↓ 2 callersFunctiondeccode_output_score_and_ptss
tpMap: center: tpMap[1, 0, :, :] displacement: tpMap[1, 1:5, :, :]
lavis/common/annotator/mlsd/utils.py:19
↓ 2 callersFunctiondenormalize
Denormalize input grid from range [0, 1] to [-1, 1] Args: grid (Tensor): The grid to be denormalize, range [0, 1]. Returns: Te
lavis/common/annotator/uniformer/mmcv/ops/point_sample.py:105
↓ 2 callersFunctiondownload_pretrained
(url: str, root: str = os.path.expanduser("~/.cache/clip"))
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
lavis/models/timesformer/vit_utils.py:161
↓ 2 callersFunctionema_inplace
(moving_avg, new, decay)
lavis/models/beats/quantizer.py:25
↓ 2 callersMethodend_of_epoch
(self, runner)
lavis/common/annotator/uniformer/mmcv/runner/hooks/hook.py:64
↓ 2 callersMethodevaluate
Evaluate the dataset. Args: results (list): Testing results of the dataset. metric (str | list[str]): Metrics to be e
lavis/common/annotator/uniformer/mmseg/datasets/custom.py:306
↓ 2 callersMethodextract_feat
Extract features from images.
lavis/common/annotator/uniformer/mmseg/models/segmentors/encoder_decoder.py:77
↓ 2 callersFunctionflatten_binary_logits
Flattens predictions in the batch (binary case) Remove labels equal to 'ignore_index'.
lavis/common/annotator/uniformer/mmseg/models/losses/lovasz_loss.py:29
↓ 2 callersFunctionflatten_probs
Flattens predictions in the batch.
lavis/common/annotator/uniformer/mmseg/models/losses/lovasz_loss.py:42
↓ 2 callersFunctionflops_to_string
Convert FLOPs number into a string. Note that Here we take a multiply-add counts as one FLOP. Args: flops (float): FLOPs number to b
lavis/common/annotator/uniformer/mmcv/cnn/utils/flops_counter.py:118
↓ 2 callersMethodformat_arguments
(self)
lavis/common/config.py:248
↓ 2 callersMethodformat_help
(self)
lavis/common/config.py:251
↓ 2 callersMethodforward
Placeholder of forward function.
lavis/common/annotator/uniformer/mmseg/models/decode_heads/decode_head.py:166
↓ 2 callersMethodforward
(self, fine_grained_point_feats, coarse_point_feats)
lavis/common/annotator/uniformer/mmseg/models/decode_heads/point_head.py:115
↓ 2 callersMethodforward
Forward function.
lavis/common/annotator/uniformer/mmseg/models/decode_heads/enc_head.py:129
↓ 2 callersMethodforward
Placeholder of forward function.
lavis/common/annotator/uniformer/mmseg/models/decode_heads/cascade_decode_head.py:14
↓ 2 callersMethodforward
(target_gpus, input)
lavis/common/annotator/uniformer/mmcv/parallel/_functions.py:67
↓ 2 callersMethodforward
( self, hidden_states, attention_mask=None, head_mask=None, encoder_hi
lavis/models/med.py:422
↓ 2 callersMethodforward_encoder
(self, samples)
lavis/models/blip_models/blip_caption.py:53
↓ 2 callersMethodforward_encoder
(self, samples)
lavis/models/albef_models/albef_vqa.py:137
↓ 2 callersMethodforward_padding_mask
( self, features: torch.Tensor, padding_mask: torch.Tensor, )
lavis/models/beats/Tokenizers.py:109
↓ 2 callersMethodforward_padding_mask
( self, features: torch.Tensor, padding_mask: torch.Tensor, )
lavis/models/beats/BEATs.py:104
↓ 2 callersMethodforward_qa
Args: samples (dict): A dictionary containing the following keys: - image (torch.Tensor): A tensor of shape (batc
lavis/models/pnp_vqa_models/pnp_vqa.py:174
↓ 2 callersMethodforward_single
Scatters points into voxels. Args: points (torch.Tensor): Points to be reduced into voxels. coors (torch.Tensor): Cor
lavis/common/annotator/uniformer/mmcv/ops/scatter_points.py:82
↓ 2 callersMethodfrom_config
(cls, cfg)
lavis/models/blip_diffusion_models/blip_diffusion.py:918
↓ 2 callersMethodfrom_config
(cls, cfg=None)
lavis/processors/base_processor.py:20
↓ 2 callersMethodfromstring
Generate config from config str. Args: cfg_str (str): Config str. file_format (str): Config file format corresponding
lavis/common/annotator/uniformer/mmcv/utils/config.py:338
↓ 2 callersMethodgenerate
(self, input_ids, attention_mask, num_beams=1, min_length=0, max_length=20)
lavis/models/pnp_vqa_models/pnp_unifiedqav2_fid.py:43
↓ 2 callersMethodget
Read data from a given ``filepath`` with 'rb' mode. Args: filepath (str or Path): Path to read data. Returns:
lavis/common/annotator/uniformer/mmcv/fileio/file_client.py:147
↓ 2 callersMethodgetQuesIds
Get question ids that satisfy given filter conditions. default skips that filter :param imgIds (int array) : get question ids f
lavis/common/vqa_tools/vqa.py:79
↓ 2 callersMethodget_crop_bbox
Randomly get a crop bounding box.
lavis/common/annotator/uniformer/mmseg/datasets/pipelines/transforms.py:512
↓ 2 callersMethodget_dicts
return info dicts for specified keys (or all if None) at specified indices (or out_indices if None)
lavis/models/timesformer/features.py:49
↓ 2 callersMethodget_embed
(self, shape: List[int])
lavis/models/clip_models/timm_model.py:497
↓ 2 callersMethodget_epoch
(self, runner)
lavis/common/annotator/uniformer/mmcv/runner/hooks/logger/base.py:72
↓ 2 callersMethodget_frame
Get frame by index. Args: frame_id (int): Index of the expected frame, 0-based. Returns: ndarray or None: Re
lavis/common/annotator/uniformer/mmcv/video/io.py:160
↓ 2 callersMethodget_hook_info
(self)
lavis/common/annotator/uniformer/mmcv/runner/base_runner.py:309
↓ 2 callersFunctionget_host_info
Get hostname and username. Return empty string if exception raised, e.g. ``getpass.getuser()`` will lead to error in docker container
lavis/common/annotator/uniformer/mmcv/runner/utils.py:16
↓ 2 callersFunctionget_logger
Initialize and get a logger by name. If the logger has not been initialized, this method will initialize the logger by adding one or two handl
lavis/models/ulip_models/utils/logger.py:29
↓ 2 callersFunctionget_logger
Initialize and get a logger by name. If the logger has not been initialized, this method will initialize the logger by adding one or two handl
lavis/models/ulip_models/pointbert/logger.py:29
↓ 2 callersMethodget_lr
(self, runner, base_lr)
lavis/common/annotator/uniformer/mmcv/runner/hooks/lr_updater.py:68
↓ 2 callersFunctionget_model_parameters_number
Calculate parameter number of a model. Args: model (nn.module): The model for parameter number calculation. Returns: float:
lavis/common/annotator/uniformer/mmcv/cnn/utils/flops_counter.py:307
↓ 2 callersFunctionget_modules_mapping
()
lavis/common/annotator/uniformer/mmcv/cnn/utils/flops_counter.py:553
↓ 2 callersMethodget_momentum
(self, runner, base_momentum)
lavis/common/annotator/uniformer/mmcv/runner/hooks/momentum_updater.py:52
↓ 2 callersMethodget_momentum
(self, runner, param_group)
lavis/common/annotator/uniformer/mmcv/runner/hooks/momentum_updater.py:465
← previousnext →401–500 of 3,633, ranked by callers