Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/UCSC-VLAA/OpenVision
/ functions
Functions
716 in github.com/UCSC-VLAA/OpenVision
⨍
Functions
716
◇
Types & classes
90
↳
Endpoints
1
Method
forward
(self, x: BaseModelOutput, attention_mask: TensorType)
src/convert_upload/open_clip/hf_model.py:49
Method
forward
(self, x: BaseModelOutput, attention_mask: TensorType)
src/convert_upload/open_clip/hf_model.py:58
Method
forward
(self, x: BaseModelOutput, attention_mask: TensorType)
src/convert_upload/open_clip/hf_model.py:72
Method
forward
(self, x: BaseModelOutput, attention_mask: TensorType)
src/convert_upload/open_clip/hf_model.py:92
Method
forward
(self, x: TensorType)
src/convert_upload/open_clip/hf_model.py:154
Method
forward
(self, x: torch.Tensor)
src/convert_upload/open_clip/transformer.py:18
Method
forward
(self, x: torch.Tensor)
src/convert_upload/open_clip/transformer.py:27
Method
forward
(self, x: torch.Tensor)
src/convert_upload/open_clip/transformer.py:35
Method
forward
(self, x)
src/convert_upload/open_clip/transformer.py:45
Method
forward
(self, x)
src/convert_upload/open_clip/transformer.py:60
Method
forward
(self, x, attn_mask: Optional[torch.Tensor] = None)
src/convert_upload/open_clip/transformer.py:132
Method
forward
(self, x: torch.Tensor)
src/convert_upload/open_clip/transformer.py:202
Method
forward
( self, q_x: torch.Tensor, k_x: Optional[torch.Tensor] = None,
src/convert_upload/open_clip/transformer.py:254
Method
forward
(self, x: torch.Tensor, attn_mask: Optional[torch.Tensor] = None)
src/convert_upload/open_clip/transformer.py:309
Method
forward
(self, x: torch.Tensor, attn_mask: Optional[torch.Tensor] = None)
src/convert_upload/open_clip/transformer.py:355
Method
forward
(self, x: torch.Tensor, attn_mask: Optional[torch.Tensor] = None)
src/convert_upload/open_clip/transformer.py:418
Method
forward
(self, x: torch.Tensor)
src/convert_upload/open_clip/transformer.py:610
Method
forward
(self, text)
src/convert_upload/open_clip/transformer.py:781
Method
forward
(self, image_embs, text_embs)
src/convert_upload/open_clip/transformer.py:890
Method
forward
( self, image: Optional[torch.Tensor] = None, text: Optional[torch.Tensor]
src/convert_upload/open_clip/model.py:297
Method
forward
( self, image: Optional[torch.Tensor] = None, text: Optional[torch.Tensor]
src/convert_upload/open_clip/model.py:375
Function
from_config
Creates a list of evaluators based on `config`.
src/evaluators/common.py:26
Function
func1
()
src/transforms/bert_ops.py:503
Function
func2
()
src/transforms/bert_ops.py:504
Function
func3
()
src/transforms/bert_ops.py:547
Function
func4
()
src/transforms/bert_ops.py:548
Function
func5
()
src/transforms/bert_ops.py:570
Function
func6
()
src/transforms/bert_ops.py:571
Function
gather_flat
(x)
src/evaluators/proj/image_text/contrastive.py:43
Function
gaussian_blur
(image, sig_min=0.1, sig_max=2.)
src/transforms/three_aug.py:166
Method
generate
( self, image, text=None, seq_len=30, max_seq_len=77, temperat
src/convert_upload/open_clip/coca_model.py:202
Method
generate_start_height
(mask_height)
src/models/vit.py:532
Method
generate_start_width
(mask_width)
src/models/vit.py:537
Function
get
(name, **kw)
src/datasets/core.py:72
Function
get_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
Function
get_captions
Returns a dataset with unrolled "caption" for every example.
src/evaluators/proj/image_text/retrieval.py:107
Method
get_cast_dtype
(self)
src/convert_upload/open_clip/transformer.py:412
Function
get_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
Function
get_class_names
Returns class name for `dataset_name` from `source`.
src/evaluators/proj/image_text/prompt_engineering.py:60
Function
get_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
Function
get_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
Function
get_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
Function
get_concat
Concatenates elements along some axis.
src/transforms/ops_general.py:204
Function
get_config
The base configuration.
src/configs/openvision.py:26
Function
get_config
Builds the base configuration.
src/configs/openvision2.py:32
Function
get_copy
Copies value of `inkey` into `outkey`.
src/transforms/ops_general.py:162
Function
get_count
Returns `ScaleByScheduleState.count` from `opt_state` as an integer.
src/optim/build_optax.py:164
Function
get_decode
Decode an encoded image string, see tf.io.decode_image.
src/transforms/ops_image.py:43
Function
get_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
Function
get_disclf
Returns config for discriminative_classifier of specified datasets.
src/configs/clip_common.py:90
Function
get_drop
Drops the given keys.
src/transforms/ops_general.py:152
Function
get_flatten
Flattens the keys of data with separator '/'.
src/transforms/ops_general.py:243
Method
get_ikok_pp_fn
(*args, key=None, inkey=self.indefault, outkey=self.outdefault, **kw)
src/helpers/registry.py:54
Function
get_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
Function
get_input_dtype
(precision: str)
src/convert_upload/open_clip/model.py:97
Function
get_keep
Keeps only the given keys.
src/transforms/ops_general.py:142
Method
get_logits
(self, image, text)
src/convert_upload/open_clip/model.py:288
Method
get_logits
(self, image, text)
src/convert_upload/open_clip/model.py:366
Function
get_lookup
Map string to number.
src/transforms/ops_general.py:67
Function
get_model_preprocess_cfg
(model)
src/convert_upload/open_clip/model.py:591
Function
get_model_tokenize_cfg
(model)
src/convert_upload/open_clip/model.py:615
Function
get_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
Function
get_pad_to_shape
Pads tensor to specified `shape`.
src/transforms/ops_general.py:228
Function
get_pass_keys
()
src/transforms/bert_ops.py:258
Function
get_pp_autoreg_label
Convert i1k label numbers to strings, using CLIP's class names.
src/transforms/ops_text.py:42
Function
get_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
Function
get_pp_clip_i1k_label_names
Convert i1k label numbers to strings, using CLIP's class names.
src/transforms/ops_text.py:32
Function
get_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
Function
get_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
Function
get_prompt_templates
Returns prompt templates.
src/evaluators/proj/image_text/prompt_engineering.py:81
Function
get_rag_tensor
Converts the specified feature to ragged tensor.
src/transforms/ops_general.py:216
Function
get_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
Function
get_randerasing
(probability: float = 0.25, min_area: float = 0.02, max_area: float = 1 / 3,
src/transforms/ops_image.py:434
Function
get_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
Function
get_random_flip_lr
Flips an image horizontally with probability 50%.
src/transforms/ops_image.py:311
Function
get_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
Function
get_squeeze_last_dim
()
src/transforms/ops_general.py:197
Method
get_tfdata
(self, ordered=False)
src/datasets/tfds.py:51
Function
get_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
Function
get_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
Function
gray_scale
(image)
src/transforms/three_aug.py:162
Function
hue_foo
()
src/transforms/simclr_aug.py:160
Function
image_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
Function
init
(rng)
src/main_clip.py:238
Function
init
(rng_key)
src/main_openvision2.py:197
Function
init
(rng)
src/convert_upload/transfer_jax2hf.py:474
Method
init_parameters
(self)
src/convert_upload/open_clip/hf_model.py:192
Method
init_parameters
(self)
src/convert_upload/open_clip/transformer.py:864
Function
input_for_quicktest
(config_input, quicktest)
src/configs/common.py:22
Method
input_size
(self)
src/convert_upload/open_clip/transform.py:34
Function
interpolate_pos_embed
(model, checkpoint_model)
src/convert_upload/open_clip/pos_embed.py:75
Function
invert
Inverts the image pixels.
src/transforms/autoaugment.py:405
Function
is_pretrained_cfg
(model: str, tag: str)
src/convert_upload/open_clip/pretrained.py:544
Function
list_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
Function
load
Loads both towers, `init_files` is now a dict with `img` and `txt` keys.
src/models/two_towers.py:121
Function
load
Load init from checkpoint, both old model and this one. +Hi-res posemb.
src/models/vit.py:903
Function
load
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
Function
load
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
Function
load
Load init from checkpoint, both old model and this one. +Hi-res posemb.
src/models/text_decoder.py:603
Function
load_checkpoint_ts
Loads a big_vision checkpoint saved by `save_checkpoint_ts`.
src/helpers/utils.py:1069
← previous
next →
501–600 of 716, ranked by callers