MCPcopy Create free account

hub / github.com/UCSC-VLAA/OpenVision / functions

Functions716 in github.com/UCSC-VLAA/OpenVision

↓ 2 callersFunction_process_batch
(batch_classnames)
src/convert_upload/open_clip/zero_shot_classifier.py:52
↓ 2 callersFunction_rescan_model_configs
()
src/convert_upload/open_clip/factory.py:33
↓ 2 callersMethod_sample_from_beta
(alpha, beta, shape)
src/transforms/mixup.py:112
↓ 2 callersFunction_split_frozen
Computes `frozen_mask` and updates `masks` and `scheds`.
src/optim/build_optax.py:287
↓ 2 callersFunction_token_to_tensor
(token_id, device: str = "cpu")
src/convert_upload/open_clip/coca_model.py:81
↓ 2 callersFunction_traverse_with_names
Traverses nested dicts/dataclasses and emits (leaf_name, leaf_val).
src/helpers/utils.py:445
↓ 2 callersFunction_window_mask
Mask a part of the image.
src/transforms/mixup.py:304
↓ 2 callersFunction_with_infinite_padding
Adds "infinite padding" to the dataset.
src/evaluators/proj/image_text/retrieval.py:57
↓ 2 callersFunction_with_infinite_padding
Adds "infinite padding" to the dataset.
src/evaluators/proj/image_text/discriminative_classifier.py:51
↓ 2 callersFunctionapply_transform
Apply the i-th transformation.
src/transforms/simclr_aug.py:97
↓ 2 callersMethodbatch_encode_plus
(self, texts, max_length=None)
src/convert_upload/open_clip/tokenizer.py:539
↓ 2 callersFunctionblockwise_ffn
(remat_ffn, inputs, chunk_size=2048, deterministic=True)
src/models/bpt.py:21
↓ 2 callersFunctionbuild_model_from_openai_state_dict
( state_dict: dict, quick_gelu=True, cast_dtype=torch.float16, )
src/convert_upload/open_clip/model.py:450
↓ 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
src/convert_upload/open_clip/tokenizer.py:33
↓ 2 callersFunctioncanonicalize_text
Returns canonicalized `text` (lowercase and punctuation removed). From: https://github.com/google-research/big_vision/blob/53f18caf27a9419231bbf0
src/convert_upload/open_clip/tokenizer.py:105
↓ 2 callersFunctionconvert_mobile_clip_state_dict
(model: CustomTextCLIP, state_dict, fastvit = True)
src/convert_upload/open_clip/convert.py:142
↓ 2 callersFunctionconvert_weights_to_lp
Convert applicable model parameters to low-precision (bf16 or fp16)
src/convert_upload/open_clip/model.py:398
↓ 2 callersFunctioncreate_model
( model_name: str, pretrained: Optional[str] = None, precision: str = 'fp32',
src/convert_upload/open_clip/factory.py:196
↓ 2 callersFunctioncreate_model_from_pretrained
( model_name: str, pretrained: Optional[str] = None, precision: str = 'fp32',
src/convert_upload/open_clip/factory.py:453
↓ 2 callersFunctioncreate_vision_encoder_and_transforms
Creates a vision encoder model and its corresponding image transforms. This version correctly handles models from Hugging Face Hub.
src/convert_upload/open_clip/factory.py:502
↓ 2 callersFunctiondecode_variant
Converts a string like "B" or "B/32" into a params dict.
src/models/vit.py:816
↓ 2 callersMethoddist_loss
(self, teacher_logits, student_logits)
src/convert_upload/open_clip/loss.py:182
↓ 2 callersMethoddistort
Applies Mixup and/or Cutmix to batch of images and transforms labels. Args: images (tf.Tensor): Of shape [batch_size, height, width, 3] repr
src/transforms/mixup.py:77
↓ 2 callersFunctiondownload_pretrained
( cfg: Dict, force_hf_hub: bool = False, cache_dir: Union[str, None] = None, )
src/convert_upload/open_clip/pretrained.py:627
↓ 2 callersFunctiondownload_pretrained_from_url
( url: str, cache_dir: Union[str, None] = None, )
src/convert_upload/open_clip/pretrained.py:562
↓ 2 callersMethodencode_image
(self, image, normalize: bool = False)
src/convert_upload/open_clip/model.py:358
↓ 2 callersMethodencode_text
(self, text, normalize: bool = False)
src/convert_upload/open_clip/model.py:362
↓ 2 callersFunctionenqueue
(n_steps)
src/datasets/input_pipeline.py:199
↓ 2 callersFunctionget_1d_sincos_pos_embed_from_grid
embed_dim: output dimension for each position pos: a list of positions to be encoded: size (M,) out: (M, D)
src/convert_upload/open_clip/pos_embed.py:49
↓ 2 callersFunctionget_2d_sincos_pos_embed_from_grid
(embed_dim, grid)
src/convert_upload/open_clip/pos_embed.py:38
↓ 2 callersMethodget_cast_dtype
(self)
src/convert_upload/open_clip/transformer.py:350
↓ 2 callersMethodget_ground_truth
(self, device, num_logits)
src/convert_upload/open_clip/loss.py:89
↓ 2 callersFunctionget_pairs
Return set of symbol pairs in a word. Word is represented as tuple of symbols (symbols being variable-length strings).
src/convert_upload/open_clip/tokenizer.py:55
↓ 2 callersFunctionget_pretrained_url
(model: str, tag: str)
src/convert_upload/open_clip/pretrained.py:557
↓ 2 callersFunctionget_resize
Resizes image to a given size. Args: size: either an integer H, where H is both the new height and width of the resized image, or a list
src/transforms/ops_image.py:54
↓ 2 callersFunctionget_tokenizer
( model_name: str = '', context_length: Optional[int] = None, **kwargs, )
src/convert_upload/open_clip/factory.py:94
↓ 2 callersMethodget_transformer_kwargs
Helper to gather shared Transformer arguments.
src/models/text_decoder_v2.py:450
↓ 2 callersFunctionhas_hf_hub
(necessary=False)
src/convert_upload/open_clip/pretrained.py:608
↓ 2 callersFunctionlist_models
enumerate available model architectures based on config files
src/convert_upload/open_clip/factory.py:67
↓ 2 callersFunctionlist_pretrained_tags_by_model
return all pretrain tags for the specified model architecture
src/convert_upload/open_clip/pretrained.py:536
↓ 2 callersFunctionload_checkpoint
( model: Union[CLIP, CustomTextCLIP], checkpoint_path: str, strict: bool = True, )
src/convert_upload/open_clip/factory.py:159
↓ 2 callersFunctionload_params
Loads a parameters from a npz checkpoint. Args: tree: deprecated, use None. Bwd-compat for old format that only stored values: the pytree
src/helpers/utils.py:165
↓ 2 callersFunctionload_state_dict
(checkpoint_path: str, map_location='cpu')
src/convert_upload/open_clip/factory.py:144
↓ 2 callersMethodlookup
Lookup a name in the registry.
src/helpers/registry.py:154
↓ 2 callersFunctionmake_for_train
Makes an input pipeline for training.
src/datasets/input_pipeline.py:35
↓ 2 callersFunctionmaybe_cleanup_workdir
Potentially removes workdirs at end of run for cleanup.
src/helpers/utils.py:896
↓ 2 callersFunctionmaybe_pad
(x, actually_pad=True)
src/helpers/utils.py:94
↓ 2 callersFunctionneighbour_exchange_with_grad
(from_rank, to_rank, tensor, group=None)
src/convert_upload/open_clip/loss.py:285
↓ 2 callersFunctionposemb_sincos_2d
Follows the MoCo v3 logic.
src/models/vit.py:152
↓ 2 callersFunctionrandom_brightness
A multiplicative vs additive change of brightness.
src/transforms/simclr_aug.py:33
↓ 2 callersFunctionrecall_at
(k)
src/evaluators/proj/image_text/image_text_retrieval.py:47
↓ 2 callersMethodset_grad_checkpointing
(self, enable=True)
src/convert_upload/open_clip/model.py:263
↓ 2 callersFunctionsteps
Gets duration named `prefix` out of `config` and converts it to steps. Using this function to access a configuration value that denotes some kind
src/helpers/utils.py:925
↓ 2 callersFunctiontree_broadcast
Broadcasts a prefix tree to a full tree. Input-output examples: 1. prefix: {"x": 10, "y": 20} target: {"x": {"a": 1, "b": 2}, "y": 3}
src/helpers/utils.py:475
↓ 2 callersFunctiontree_map_with_names
Like jax.tree_util.tree_map but with a filter on the leaf path name. Args: f: A function with first parameter `name` (path-like "a/b/c") and re
src/helpers/utils.py:543
↓ 2 callersFunctionwhitespace_clean
(text)
src/convert_upload/open_clip/tokenizer.py:73
↓ 1 callersMethod__init__
(self, p=0.2)
src/convert_upload/open_clip/transform.py:262
↓ 1 callersMethod__init__
( self, embed_dim: int, vision_cfg: CLIPVisionCfg, text_cfg: C
src/convert_upload/open_clip/model.py:225
↓ 1 callersFunction_add_mask
(pp_fn)
src/datasets/input_pipeline.py:179
↓ 1 callersFunction_all_gather
All gather and flatten first two dims.
src/evaluators/proj/image_text/contrastive.py:41
↓ 1 callersFunction_apply_func_with_prob
Apply `func` to image w/ `args` as input with probability `prob`.
src/transforms/autoaugment.py:604
↓ 1 callersFunction_aspect75
(sz)
src/configs/clip_common.py:51
↓ 1 callersFunction_average_embeddings
Computes per-class averages of `embeddings`.
src/evaluators/proj/image_text/discriminative_classifier.py:156
↓ 1 callersFunction_build_text_decoder_tower
( embed_dim, multimodal_cfg, quick_gelu: bool = False, cast_dtype: Optional[to
src/convert_upload/open_clip/coca_model.py:55
↓ 1 callersFunction_camel2snake
(s)
src/convert_upload/open_clip/hf_model.py:31
↓ 1 callersFunction_compose_two_images
Inserting the second minibatch into the first at the target locations.
src/transforms/mixup.py:293
↓ 1 callersFunction_compute_crop_shape
Compute aspect ratio-preserving shape for central crop. The resulting shape retains `crop_proportion` along one side and a proportion less tha
src/transforms/simclr_aug.py:181
↓ 1 callersFunction_convert_openclip_transformer
(module: Transformer, prefix)
src/convert_upload/open_clip/convert.py:106
↓ 1 callersFunction_create_noun_tokenizer
(vocab_path)
src/transforms/bert_ops.py:74
↓ 1 callersFunction_cutmix
(x, y)
src/transforms/mixup.py:246
↓ 1 callersMethod_cutmix
Applies cutmix.
src/transforms/mixup.py:117
↓ 1 callersMethod_embed_texts
Returns per-class averaged text embeddings.
src/evaluators/proj/image_text/discriminative_classifier.py:343
↓ 1 callersMethod_erase
Erase an area.
src/transforms/random_erasing.py:152
↓ 1 callersFunction_expand_token
(token, batch_size: int)
src/convert_upload/open_clip/transformer.py:315
↓ 1 callersFunction_fill_rectangle
Fills blank area.
src/transforms/random_erasing.py:23
↓ 1 callersMethod_generate_beamsearch
( self, image_inputs, pad_token_id=None, eos_token_id=None,
src/convert_upload/open_clip/coca_model.py:329
↓ 1 callersFunction_get_builder
(dataset, data_dir)
src/datasets/tfds.py:74
↓ 1 callersFunction_get_dataset_info
(builder)
src/evaluators/proj/image_text/retrieval.py:71
↓ 1 callersFunction_get_field_ref
(config_dict, field_name)
src/configs/common.py:136
↓ 1 callersFunction_get_func_args_and_kwargs
(call)
src/helpers/registry.py:115
↓ 1 callersFunction_get_func_name
(expr)
src/helpers/registry.py:105
↓ 1 callersFunction_get_gaussian_kernel_2d
Compute 2D Gaussian kernel given 1D kernels.
src/transforms/three_aug.py:71
↓ 1 callersFunction_get_pad_data
(data)
src/datasets/input_pipeline.py:170
↓ 1 callersMethod_merge_heads
(self, hidden_states, embed_dim)
src/models/text_transformer.py:314
↓ 1 callersMethod_merge_heads
(self, hidden_states, embed_dim)
src/models/common.py:473
↓ 1 callersMethod_mixup
Applies mixup.
src/transforms/mixup.py:160
↓ 1 callersFunction_natural_key
(string_)
src/convert_upload/open_clip/factory.py:29
↓ 1 callersFunction_pad
Explicitly pad a 4-D image. Equivalent to the implicit padding method offered in `tf.nn.conv2d` and `tf.nn.depthwise_conv2d`, but supports no
src/transforms/three_aug.py:22
↓ 1 callersFunction_random_box
Sample a random box of shape [cut_h, cut_w].
src/transforms/mixup.py:267
↓ 1 callersFunction_setup_size
(size, error_msg)
src/convert_upload/open_clip/transform.py:75
↓ 1 callersFunction_split_and_batch
Splits dataset, calls `get_ds` and returns padded + batched datasets.
src/evaluators/proj/image_text/retrieval.py:131
↓ 1 callersFunction_split_and_batch
Splits dataset, calls `get_ds` and returns padded + batched datasets.
src/evaluators/proj/image_text/discriminative_classifier.py:128
↓ 1 callersMethod_tpu_flash_attention
TPU Flash Attention.
src/models/text_transformer.py:317
↓ 1 callersMethod_tpu_flash_attention
Executes the TPU Flash Attention kernel via shard_map.
src/models/text_decoder_v2.py:171
↓ 1 callersMethod_tpu_flash_attention
TPU Flash Attention.
src/models/common.py:476
↓ 1 callersMethod_tpu_flash_attention
TPU Flash Attention.
src/models/text_decoder.py:182
↓ 1 callersMethod_update_labels
(self, images: tf.Tensor, labels: tf.Tensor, lam: tf.Tensor)
src/transforms/mixup.py:178
↓ 1 callersMethodattention
( self, q_x: torch.Tensor, k_x: Optional[torch.Tensor] = None,
src/convert_upload/open_clip/transformer.py:239
↓ 1 callersFunctionautotype
Auto-converts string to bool/int/float if possible.
src/configs/common.py:117
↓ 1 callersFunctionbatched
Batch data into lists of length *n*. The last batch may be shorter. NOTE based on more-itertools impl, to be replaced by python 3.12 itertools.bat
src/convert_upload/open_clip/zero_shot_classifier.py:9
← previousnext →101–200 of 716, ranked by callers