MCPcopy Create free account

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

Functions716 in github.com/UCSC-VLAA/OpenVision

↓ 1 callersFunctionbidirectional_contrastive_loss
Bidirectional contrastive losses (e.g. for contrastive trainer/evaluator).
src/losses/common.py:50
↓ 1 callersMethodbpe
(self, token)
src/convert_upload/open_clip/tokenizer.py:173
↓ 1 callersFunctionbuild_and_apply_nas_policy
Build a policy from the given policies passed in and apply to image. Args: policies: list of lists of tuples in the form `(func, prob, level)`,
src/transforms/autoaugment.py:638
↓ 1 callersMethodbuild_attention_mask
(self)
src/convert_upload/open_clip/transformer.py:882
↓ 1 callersMethodbuild_causal_mask
(self)
src/convert_upload/open_clip/transformer.py:762
↓ 1 callersFunctionbuild_lut
(histo, step)
src/transforms/autoaugment.py:378
↓ 1 callersFunctioncenter_crop_or_pad
Center crops and/or pads the given image. If the image is torch Tensor, it is expected to have [..., H, W] shape, where ... means an arbitrary
src/convert_upload/open_clip/transform.py:167
↓ 1 callersFunctioncheck_and_compile_patterns
Validates and compiles a list of param-patterns. The validation consists of checking for common mistakes, currently only that the pattern does no
src/helpers/utils.py:763
↓ 1 callersFunctioncolor_jitter_nonrand
Distorts the color of the image (jittering order is fixed). Args: image: The input image tensor. brightness: A float, specifying the b
src/transforms/simclr_aug.py:78
↓ 1 callersFunctioncolor_jitter_rand
Distorts the color of the image (jittering order is random). Args: image: The input image tensor. brightness: A float, specifying the
src/transforms/simclr_aug.py:118
↓ 1 callersFunctionconvert_state_dict
(model: Union[CustomTextCLIP, CLIP], state_dict)
src/convert_upload/open_clip/convert.py:183
↓ 1 callersFunctionconvert_to_custom_text_state_dict
(state_dict: dict)
src/convert_upload/open_clip/model.py:432
↓ 1 callersFunctioncreate_learning_rate_schedule
Creates learning rate schedule, see (internal link). Args: total_steps: The total number of steps to run. batch_size: The global batch-size
src/optim/build_optax.py:83
↓ 1 callersFunctioncreate_schedule
(mult=1.0, **kw)
src/optim/build_optax.py:198
↓ 1 callersFunctioncrop_and_resize
Make a random crop and resize it to height `height` and width `width`. Args: image: Tensor representing the image. height: Desired ima
src/transforms/simclr_aug.py:294
↓ 1 callersFunctiondecode_variant
Converts a string like "B" or "B/32" into a params dict.
src/models/text_transformer.py:741
↓ 1 callersFunctiondecode_variant
Converts a model variant string into a dictionary of hyperparameters.
src/models/text_decoder_v2.py:480
↓ 1 callersFunctiondecode_variant
Converts a string like "B" or "B/32" into a params dict.
src/models/text_decoder.py:584
↓ 1 callersFunctiondefault_bpe
()
src/convert_upload/open_clip/tokenizer.py:28
↓ 1 callersFunctiondistorted_bounding_box_crop
Generates cropped_image using one of the bboxes randomly distorted. See `tf.image.sample_distorted_bounding_box` for more documentation. Args:
src/transforms/simclr_aug.py:244
↓ 1 callersFunctiondot_product_attention_weights
Computes dot-product attention weights given query and key. Used by :func:`dot_product_attention`, which is what you'll most likely use. But if y
src/models/common.py:53
↓ 1 callersMethodevaluate
Returns evaluation results.
src/evaluators/proj/image_text/retrieval.py:280
↓ 1 callersMethodevaluate
Returns evaluation results.
src/evaluators/proj/image_text/discriminative_classifier.py:389
↓ 1 callersFunctionevaluators
()
src/main_openvision2.py:354
↓ 1 callersFunctionfind_states
(opt_state, cls)
src/optim/build_optax.py:158
↓ 1 callersMethodflush_timings
(self)
src/helpers/utils.py:435
↓ 1 callersMethodforward
(self, image_features, text_features, logit_scale, output_dict=False)
src/convert_upload/open_clip/loss.py:120
↓ 1 callersFunctiongather_features
( image_features, text_features, local_loss=False, gather_with_grad=False,
src/convert_upload/open_clip/loss.py:19
↓ 1 callersFunctiongaussian_blur
Blurs the given image with separable convolution. Args: image: Tensor of shape [height, width, channels] and dtype float to blur. kern
src/transforms/simclr_aug.py:316
↓ 1 callersFunctiongaussian_filter2d
Perform Gaussian blur on image(s). Args: image: Either a 2-D `Tensor` of shape `[height, width]`, a 3-D `Tensor` of shape `[height,
src/transforms/three_aug.py:78
↓ 1 callersFunctiongenerate_readme
(model_card: dict, model_name: str)
src/convert_upload/open_clip/push_to_hf_hub.py:213
↓ 1 callersFunctionget_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/convert_upload/open_clip/pos_embed.py:20
↓ 1 callersFunctionget_eval_fn
Produces eval function, also applies pmap.
src/evaluators/proj/image_text/contrastive.py:51
↓ 1 callersFunctionget_feature_value
(data, feature_name)
src/evaluators/proj/image_text/retrieval.py:102
↓ 1 callersMethodget_ground_truth
(self, device, dtype, num_logits, negative_only=False)
src/convert_upload/open_clip/loss.py:337
↓ 1 callersMethodget_logits
(self, image_features, text_features, logit_scale, logit_bias=None)
src/convert_upload/open_clip/loss.py:343
↓ 1 callersFunctionget_order
(x)
src/convert_upload/open_clip/tokenizer.py:350
↓ 1 callersMethodget_params
Get parameters
src/convert_upload/open_clip/transform.py:116
↓ 1 callersFunctionget_posemb
(self, typ, seqshape, width, name, dtype=jnp.float32, cls_token=False)
src/models/vit.py:166
↓ 1 callersFunctionget_posemb
( self, typ, max_len, width, name, dtype=jnp.float32,
src/models/text_transformer.py:64
↓ 1 callersFunctionget_reduction_mask_fn
Choose strategy for dropping (masking) tokens to achieve target context length
src/convert_upload/open_clip/tokenizer.py:391
↓ 1 callersMethodget_reference_weight
(self)
src/convert_upload/open_clip/transformer.py:306
↓ 1 callersFunctionget_type
Returns type of v and for boolean returns a strict bool function.
src/configs/common.py:107
↓ 1 callersFunctionimage_transform
( image_size: Union[int, Tuple[int, int]], is_train: bool, mean: Optional[Tuple[float,
src/convert_upload/open_clip/transform.py:274
↓ 1 callersMethodinit_parameters
(self)
src/convert_upload/open_clip/modified_resnet.py:141
↓ 1 callersMethodinit_parameters
(self)
src/convert_upload/open_clip/transformer.py:576
↓ 1 callersMethodinit_parameters
(self)
src/convert_upload/open_clip/transformer.py:735
↓ 1 callersFunctionjax_model_inference
(params, image, text)
src/convert_upload/transfer_jax2hf.py:555
↓ 1 callersFunctionlevel_to_arg
(hparams)
src/transforms/autoaugment.py:523
↓ 1 callersFunctionlevel_to_arg_increasing
(hparams)
src/transforms/autoaugment.py:551
↓ 1 callersFunctionlist_openai_models
Returns the names of available CLIP models
src/convert_upload/open_clip/openai.py:19
↓ 1 callersFunctionlist_pretrained_models_by_tag
return all models having the specified pretrain tag
src/convert_upload/open_clip/pretrained.py:526
↓ 1 callersFunctionload_any
we load checkpoint by given load_config
src/main_clip.py:231
↓ 1 callersFunctionload_big_vision_weights
Load weights from .npz checkpoints for official Google big_vision image-text models Currently the SigLIP source models are supported and a Custo
src/convert_upload/open_clip/convert.py:13
↓ 1 callersFunctionload_openai_model
Load a CLIP model Parameters ---------- name : str A model name listed by `clip.available_models()`, or the path to a model check
src/convert_upload/open_clip/openai.py:24
↓ 1 callersFunctionlocal_logits
(local_img, local_txt1, local_txt2)
src/losses/common.py:126
↓ 1 callersFunctionmake_final_policy
(tf_policy_)
src/transforms/autoaugment.py:671
↓ 1 callersFunctionneighbour_exchange
(from_rank, to_rank, tensor, group=None)
src/convert_upload/open_clip/loss.py:219
↓ 1 callersFunctionneighbour_exchange_bidir
(left_rank, right_rank, tensor_to_left, tensor_to_right, group=None)
src/convert_upload/open_clip/loss.py:239
↓ 1 callersFunctionneighbour_exchange_bidir_with_grad
(left_rank, right_rank, tensor_to_left, tensor_to_right, group=None)
src/convert_upload/open_clip/loss.py:303
↓ 1 callersFunctionnpload
Loads `fname` and returns an np.ndarray or dict thereof.
src/helpers/utils.py:126
↓ 1 callersMethodnum_examples_per_process
Returns a list of the numer of examples for each process. This is only needed for datasets that should go through make_for_inference. Args:
src/datasets/core.py:48
↓ 1 callersFunctionobrax_to_open_clip
(jax_params_cpu, H, W, Channel, pos_embed="learn", txt_model='vit', use_dense_general=True)
src/convert_upload/transfer_jax2hf.py:115
↓ 1 callersFunctiononehot
(labels, num_classes, on_value=1.0, off_value=0.0)
src/helpers/utils.py:119
↓ 1 callersMethodpad_and_add_class_token
(self, encoded_text, max_length)
src/convert_upload/open_clip/tokenizer.py:547
↓ 1 callersFunctionparse_name
Parses input to the registry's lookup function. Args: string_to_parse: can be either an arbitrary name or function call (optionally with
src/helpers/registry.py:71
↓ 1 callersFunctionposemb_sincos_1d
Follows the MoCo v3 logic.
src/models/text_transformer.py:45
↓ 1 callersFunctionposemb_sincos_2d
Follows the MoCo v3 logic.
src/convert_upload/transfer_jax2hf.py:98
↓ 1 callersFunctionprepare_inputs_for_generation
(input_ids, image_inputs, past=None, **kwargs)
src/convert_upload/open_clip/coca_model.py:479
↓ 1 callersFunctionpush_pretrained_to_hf_hub
( model_name, pretrained: str, repo_id: str, precision: str = 'fp32', image_mean: Optional
src/convert_upload/open_clip/push_to_hf_hub.py:160
↓ 1 callersFunctionpush_to_hf_hub
( model, tokenizer, model_config: Optional[dict], repo_id: str, commit_message: str = 'Add
src/convert_upload/open_clip/push_to_hf_hub.py:90
↓ 1 callersMethodrandom_masking
(self, x, mask_ratio, rng_mask=None, mask_mode='random', height=14, width=14)
src/models/vit.py:464
↓ 1 callersFunctionreference_attn
(query, key, value, causal, dtype)
src/models/bpt.py:201
↓ 1 callersFunctionrename
(k)
src/helpers/utils.py:653
↓ 1 callersFunctionresample_posemb
This function implements "high-res finetuning" for transformer models.
src/models/vit.py:838
↓ 1 callersFunctionresize_pos_embed
(state_dict, model, interpolation: str = 'bicubic', antialias: bool = True)
src/convert_upload/open_clip/model.py:525
↓ 1 callersFunctionresize_text_pos_embed
(state_dict, model, interpolation: str = 'linear', antialias: bool = False)
src/convert_upload/open_clip/model.py:559
↓ 1 callersFunctionsave_and_upload_for_hf
( model_state_dict, bv_conifg, text_model = 'vit' )
src/convert_upload/transfer_jax2hf.py:572
↓ 1 callersFunctionsave_config_for_hf
( model, config_path: str, model_config: Optional[dict] )
src/convert_upload/open_clip/push_to_hf_hub.py:40
↓ 1 callersFunctionsave_for_hf
( model, tokenizer: HFTokenizer, model_config: dict, save_directory: str, safe_serializati
src/convert_upload/open_clip/push_to_hf_hub.py:63
↓ 1 callersFunctionscale_values
(im)
src/transforms/autoaugment.py:314
↓ 1 callersFunctionscan_attention
(args)
src/models/bpt.py:102
↓ 1 callersFunctionselect_and_apply_random_policy
Select a random policy from `policies` and apply it to `image`.
src/transforms/autoaugment.py:625
↓ 1 callersMethodset_language
(self, src_lang)
src/convert_upload/open_clip/tokenizer.py:457
↓ 1 callersMethodset_language
(self, src_lang)
src/convert_upload/open_clip/tokenizer.py:596
↓ 1 callersFunctionset_model_preprocess_cfg
(model, preprocess_cfg: Dict[str, Any])
src/convert_upload/open_clip/model.py:608
↓ 1 callersFunctionshard_and_put
make local tf tensor to global jax array based on sharding strategy
src/datasets/input_pipeline.py:209
↓ 1 callersFunctionshould_remove
(k)
src/helpers/utils.py:660
↓ 1 callersMethodstem
(self, x)
src/convert_upload/open_clip/modified_resnet.py:166
↓ 1 callersFunctiontree_get
Get an entry of pytree by flattened key name, eg a/b/c, with nice error. Args: tree: the pytree to be queried. name: the path to extract fr
src/helpers/utils.py:593
↓ 1 callersFunctiontree_unflatten
Reverses `tree_flatten_with_names(tree)[0]`.
src/helpers/utils.py:538
↓ 1 callersFunctiontsload
Loads tensorstore-based array-tree from disk. If `tree` argument is provided, then array names to load and target structure is derived from the t
src/helpers/utils.py:1084
↓ 1 callersFunctiontssave
Save pytree using jax tensorstore-based checkpoint manager. NOTE: When overwriting an existing checkpoint with a different pytree, the result is,
src/helpers/utils.py:983
↓ 1 callersFunctionupdate_fn
Update step.
src/main_clip.py:404
↓ 1 callersFunctionupdate_fn
(state, batch, rng_key)
src/main_openvision2.py:265
FunctionModel
Factory function, because linen really don't like what I'm doing!
src/models/vit.py:811
FunctionModel
Factory function, because linen really don't like what I'm doing!
src/models/text_transformer.py:736
FunctionModel
Factory function to create the autoregressive model with a variant. Args: variant: A string shorthand for a model size (e.g., 'B', 'L').
src/models/text_decoder_v2.py:466
FunctionModel
Factory function, because linen really don't like what I'm doing!
src/models/text_decoder.py:579
Method__call__
Returns the tokenized representation of given input string(s) Parameters ---------- texts : Union[str, List[str]]
src/convert_upload/open_clip/tokenizer.py:227
← previousnext →201–300 of 716, ranked by callers