MCPcopy Create free account

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

Functions716 in github.com/UCSC-VLAA/OpenVision

Methodforward
(self, x: BaseModelOutput, attention_mask: TensorType)
src/convert_upload/open_clip/hf_model.py:49
Methodforward
(self, x: BaseModelOutput, attention_mask: TensorType)
src/convert_upload/open_clip/hf_model.py:58
Methodforward
(self, x: BaseModelOutput, attention_mask: TensorType)
src/convert_upload/open_clip/hf_model.py:72
Methodforward
(self, x: BaseModelOutput, attention_mask: TensorType)
src/convert_upload/open_clip/hf_model.py:92
Methodforward
(self, x: TensorType)
src/convert_upload/open_clip/hf_model.py:154
Methodforward
(self, x: torch.Tensor)
src/convert_upload/open_clip/transformer.py:18
Methodforward
(self, x: torch.Tensor)
src/convert_upload/open_clip/transformer.py:27
Methodforward
(self, x: torch.Tensor)
src/convert_upload/open_clip/transformer.py:35
Methodforward
(self, x)
src/convert_upload/open_clip/transformer.py:45
Methodforward
(self, x)
src/convert_upload/open_clip/transformer.py:60
Methodforward
(self, x, attn_mask: Optional[torch.Tensor] = None)
src/convert_upload/open_clip/transformer.py:132
Methodforward
(self, x: torch.Tensor)
src/convert_upload/open_clip/transformer.py:202
Methodforward
( self, q_x: torch.Tensor, k_x: Optional[torch.Tensor] = None,
src/convert_upload/open_clip/transformer.py:254
Methodforward
(self, x: torch.Tensor, attn_mask: Optional[torch.Tensor] = None)
src/convert_upload/open_clip/transformer.py:309
Methodforward
(self, x: torch.Tensor, attn_mask: Optional[torch.Tensor] = None)
src/convert_upload/open_clip/transformer.py:355
Methodforward
(self, x: torch.Tensor, attn_mask: Optional[torch.Tensor] = None)
src/convert_upload/open_clip/transformer.py:418
Methodforward
(self, x: torch.Tensor)
src/convert_upload/open_clip/transformer.py:610
Methodforward
(self, text)
src/convert_upload/open_clip/transformer.py:781
Methodforward
(self, image_embs, text_embs)
src/convert_upload/open_clip/transformer.py:890
Methodforward
( self, image: Optional[torch.Tensor] = None, text: Optional[torch.Tensor]
src/convert_upload/open_clip/model.py:297
Methodforward
( self, image: Optional[torch.Tensor] = None, text: Optional[torch.Tensor]
src/convert_upload/open_clip/model.py:375
Functionfrom_config
Creates a list of evaluators based on `config`.
src/evaluators/common.py:26
Functionfunc1
()
src/transforms/bert_ops.py:503
Functionfunc2
()
src/transforms/bert_ops.py:504
Functionfunc3
()
src/transforms/bert_ops.py:547
Functionfunc4
()
src/transforms/bert_ops.py:548
Functionfunc5
()
src/transforms/bert_ops.py:570
Functionfunc6
()
src/transforms/bert_ops.py:571
Functiongather_flat
(x)
src/evaluators/proj/image_text/contrastive.py:43
Functiongaussian_blur
(image, sig_min=0.1, sig_max=2.)
src/transforms/three_aug.py:166
Methodgenerate
( self, image, text=None, seq_len=30, max_seq_len=77, temperat
src/convert_upload/open_clip/coca_model.py:202
Methodgenerate_start_height
(mask_height)
src/models/vit.py:532
Methodgenerate_start_width
(mask_width)
src/models/vit.py:537
Functionget
(name, **kw)
src/datasets/core.py:72
Functionget_2d_sincos_pos_embed
grid_size: int of the grid height and width return: pos_embed: [grid_size*grid_size, embed_dim] or [1+grid_size*grid_size, embed_dim] (w/
src/models/vit.py:133
Functionget_captions
Returns a dataset with unrolled "caption" for every example.
src/evaluators/proj/image_text/retrieval.py:107
Methodget_cast_dtype
(self)
src/convert_upload/open_clip/transformer.py:412
Functionget_central_crop
Makes central crop of a given size. Args: crop_size: either an integer H, where H is both the height and width of the central crop, or a
src/transforms/ops_image.py:287
Functionget_class_names
Returns class name for `dataset_name` from `source`.
src/evaluators/proj/image_text/prompt_engineering.py:60
Functionget_coco
Returns config for mscoco retrieval zero-shot. Args: log_steps: How often the evaluators should be run. pp_img: Pre-processing string
src/configs/clip_common.py:113
Functionget_color_jitter
Makes a random crop of a given size. Args: color_jitter: . Returns: A function, that applies color jitter.
src/transforms/ops_image.py:346
Functionget_color_jitter_timm
Makes a random crop of a given size. Args: color_jitter: . Returns: A function, that applies color jitter.
src/transforms/ops_image.py:373
Functionget_concat
Concatenates elements along some axis.
src/transforms/ops_general.py:204
Functionget_config
The base configuration.
src/configs/openvision.py:26
Functionget_config
Builds the base configuration.
src/configs/openvision2.py:32
Functionget_copy
Copies value of `inkey` into `outkey`.
src/transforms/ops_general.py:162
Functionget_count
Returns `ScaleByScheduleState.count` from `opt_state` as an integer.
src/optim/build_optax.py:164
Functionget_decode
Decode an encoded image string, see tf.io.decode_image.
src/transforms/ops_image.py:43
Functionget_decode_jpeg_and_inception_crop
Decode jpeg string and make inception-style image crop. Inception-style crop is a random image crop (its size and aspect ratio are random) that w
src/transforms/ops_image.py:161
Functionget_disclf
Returns config for discriminative_classifier of specified datasets.
src/configs/clip_common.py:90
Functionget_drop
Drops the given keys.
src/transforms/ops_general.py:152
Functionget_flatten
Flattens the keys of data with separator '/'.
src/transforms/ops_general.py:243
Methodget_ikok_pp_fn
(*args, key=None, inkey=self.indefault, outkey=self.outdefault, **kw)
src/helpers/registry.py:54
Functionget_inception_crop
Makes inception-style image crop. Inception-style crop is a random image crop (its size and aspect ratio are random) that was used for training I
src/transforms/ops_image.py:122
Functionget_input_dtype
(precision: str)
src/convert_upload/open_clip/model.py:97
Functionget_keep
Keeps only the given keys.
src/transforms/ops_general.py:142
Methodget_logits
(self, image, text)
src/convert_upload/open_clip/model.py:288
Methodget_logits
(self, image, text)
src/convert_upload/open_clip/model.py:366
Functionget_lookup
Map string to number.
src/transforms/ops_general.py:67
Functionget_model_preprocess_cfg
(model)
src/convert_upload/open_clip/model.py:591
Functionget_model_tokenize_cfg
(model)
src/convert_upload/open_clip/model.py:615
Functionget_onehot
One-hot encodes the input. Args: depth: Length of the one-hot vector (how many classes). key: Key of the data to be one-hot encoded. ke
src/transforms/ops_general.py:104
Functionget_pad_to_shape
Pads tensor to specified `shape`.
src/transforms/ops_general.py:228
Functionget_pass_keys
()
src/transforms/bert_ops.py:258
Functionget_pp_autoreg_label
Convert i1k label numbers to strings, using CLIP's class names.
src/transforms/ops_text.py:42
Functionget_pp_bert_tokenize
Extracts tokens with tensorflow_text.BertTokenizer. Args: vocab_path: Path to a file containing the vocabulry for the WordPiece tokenizer
src/transforms/bert_ops.py:97
Functionget_pp_clip_i1k_label_names
Convert i1k label numbers to strings, using CLIP's class names.
src/transforms/ops_text.py:32
Functionget_pp_custom_bert_tokenize
Extracts tokens with tensorflow_text.BertTokenizer. Add custom args for coca training. Args: vocab_path: Path to a file containing the vocabu
src/transforms/bert_ops.py:446
Functionget_preprocess_fn
Transform an input string into the preprocessing function. The minilanguage is as follows: fn1|fn2(arg, arg2,...)|... And describes the suc
src/datasets/build_transforms.py:23
Functionget_prompt_templates
Returns prompt templates.
src/evaluators/proj/image_text/prompt_engineering.py:81
Functionget_rag_tensor
Converts the specified feature to ragged tensor.
src/transforms/ops_general.py:216
Functionget_randaug
Creates a function that applies RandAugment. RandAugment is from the paper https://arxiv.org/abs/1909.13719, Args: num_layers: Integer, the
src/transforms/ops_image.py:403
Functionget_randerasing
(probability: float = 0.25, min_area: float = 0.02, max_area: float = 1 / 3,
src/transforms/ops_image.py:434
Functionget_random_crop
Makes a random crop of a given size. Args: crop_size: either an integer H, where H is both the height and width of the random crop, or a
src/transforms/ops_image.py:246
Functionget_random_flip_lr
Flips an image horizontally with probability 50%.
src/transforms/ops_image.py:311
Functionget_resize_small
Resizes the smaller side to `smaller_size` keeping aspect ratio. Args: smaller_size: an integer, that represents a new size of the smaller side
src/transforms/ops_image.py:86
Functionget_squeeze_last_dim
()
src/transforms/ops_general.py:197
Methodget_tfdata
(self, ordered=False)
src/datasets/tfds.py:51
Functionget_value_range
Transforms a [in_min,in_max] image to [vmin,vmax] range. Input ranges in_min/in_max can be equal-size lists to rescale the invidudal channels ind
src/transforms/ops_general.py:32
Functionget_vgg_value_range
VGG-style preprocessing, subtracts mean and divides by stddev. This preprocessing is very common for ImageNet pre-trained models since VGG, and t
src/transforms/ops_image.py:322
Functiongray_scale
(image)
src/transforms/three_aug.py:162
Functionhue_foo
()
src/transforms/simclr_aug.py:160
Functionimage_to_text_retrieval_eval
Runs the image-to-text retrieval eval from the distance matrix. Args: dist_matrix: Distance matrix between text and image embeddings (shape
src/evaluators/proj/image_text/image_text_retrieval.py:57
Functioninit
(rng)
src/main_clip.py:238
Functioninit
(rng_key)
src/main_openvision2.py:197
Functioninit
(rng)
src/convert_upload/transfer_jax2hf.py:474
Methodinit_parameters
(self)
src/convert_upload/open_clip/hf_model.py:192
Methodinit_parameters
(self)
src/convert_upload/open_clip/transformer.py:864
Functioninput_for_quicktest
(config_input, quicktest)
src/configs/common.py:22
Methodinput_size
(self)
src/convert_upload/open_clip/transform.py:34
Functioninterpolate_pos_embed
(model, checkpoint_model)
src/convert_upload/open_clip/pos_embed.py:75
Functioninvert
Inverts the image pixels.
src/transforms/autoaugment.py:405
Functionis_pretrained_cfg
(model: str, tag: str)
src/convert_upload/open_clip/pretrained.py:544
Functionlist_pretrained
returns list of pretrained models Returns a tuple (model_name, pretrain_tag) by default or 'name:tag' if as_str == True
src/convert_upload/open_clip/pretrained.py:519
Functionload
Loads both towers, `init_files` is now a dict with `img` and `txt` keys.
src/models/two_towers.py:121
Functionload
Load init from checkpoint, both old model and this one. +Hi-res posemb.
src/models/vit.py:903
Functionload
Loads pre-trained weights for the model's components. This function handles loading weights for the image encoder and text decoder from separ
src/models/openvision2_model.py:174
Functionload
Loads pre-trained model weights from a checkpoint file. Args: init_params: A PyTree of randomly initialized model parameters. ini
src/models/text_decoder_v2.py:494
Functionload
Load init from checkpoint, both old model and this one. +Hi-res posemb.
src/models/text_decoder.py:603
Functionload_checkpoint_ts
Loads a big_vision checkpoint saved by `save_checkpoint_ts`.
src/helpers/utils.py:1069
← previousnext →501–600 of 716, ranked by callers