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
↓ 118 callers
Function
_pcfg
(url='', hf_hub='', **kwargs)
src/convert_upload/open_clip/pretrained.py:29
↓ 47 callers
Function
_n2p
(w, t=True)
src/convert_upload/open_clip/convert.py:21
↓ 28 callers
Function
write_note
(note)
src/main_clip.py:128
↓ 16 callers
Method
load
(self, ckpt={})
src/helpers/utils.py:406
↓ 15 callers
Function
write_note
(note)
src/main_openvision2.py:115
↓ 13 callers
Function
_slpcfg
(url='', hf_hub='', **kwargs)
src/convert_upload/open_clip/pretrained.py:42
↓ 13 callers
Method
tokenize
(self, text)
src/convert_upload/open_clip/tokenizer.py:534
↓ 11 callers
Function
get_steps
(name, default=ValueError, cfg=config)
src/main_clip.py:211
↓ 11 callers
Function
unbox_logicallypartioned
Unboxes the flax.LogicallyPartitioned pieces Args: boxed_pytree: a pytree that includes LogicallyPartitioned leaves. Returns: a pyt
src/helpers/sharding.py:25
↓ 10 callers
Method
__init__
( self, dim: int, num_heads: int = 8, qkv_bias: bool = True,
src/convert_upload/open_clip/transformer.py:90
↓ 10 callers
Method
measure
Logs the metric value.
src/helpers/utils.py:859
↓ 8 callers
Function
_create_bert_tokenizer
(vocab_path, add_bos=False, add_eos=False)
src/transforms/bert_ops.py:44
↓ 8 callers
Function
reshard
Take an arbitrarily* sharded pytree and shard it according to `shardings`. This is a no-op for tree elements which are already sharded as request
src/helpers/sharding.py:59
↓ 8 callers
Method
save
(self)
src/helpers/utils.py:398
↓ 7 callers
Function
_apcfg
(url='', hf_hub='', **kwargs)
src/convert_upload/open_clip/pretrained.py:55
↓ 7 callers
Function
itstime
Returns True if it's time to execute an action. Args: step: the current step representing "now". every_n_steps: the action should run every
src/helpers/utils.py:209
↓ 7 callers
Function
random_apply
Randomly apply function func to x with probability p.
src/transforms/simclr_aug.py:24
↓ 7 callers
Method
run
Returns metrics.
src/evaluators/proj/image_text/retrieval.py:305
↓ 7 callers
Function
tree_flatten_with_names
Populates tree_flatten with leaf names. This function populates output of tree_flatten with leaf names, using a custom traversal that produces na
src/helpers/utils.py:509
↓ 6 callers
Function
create_orbax_checkpoint_manager
Returns specified Orbax (async or not) CheckpointManager or None if checkpointing is disabled.
src/helpers/utils.py:1142
↓ 6 callers
Function
pp
(title, names, indent=" ")
src/models/common.py:590
↓ 6 callers
Function
redux
(x)
src/losses/common.py:86
↓ 6 callers
Function
scale_channel
Scale the 2D image using the autocontrast rule.
src/transforms/autoaugment.py:305
↓ 6 callers
Function
tokenizer_eval
(inkey)
src/configs/openvision2.py:260
↓ 5 callers
Function
_make_mask_trees
(params, patterns_values, log)
src/optim/build_optax.py:281
↓ 5 callers
Function
_ntuple
(n)
src/convert_upload/open_clip/utils.py:49
↓ 5 callers
Function
download_pretrained_from_hf
( model_id: str, filename: str = 'open_clip_pytorch_model.bin', revision=None,
src/convert_upload/open_clip/pretrained.py:616
↓ 5 callers
Method
encode_text
(self, text, normalize: bool = False)
src/convert_upload/open_clip/model.py:271
↓ 5 callers
Function
get_model_config
(model_name)
src/convert_upload/open_clip/factory.py:80
↓ 5 callers
Function
merge_preprocess_dict
Merge overlay key-value pairs on top of base preprocess cfg or dict. Input dicts are filtered based on PreprocessCfg fields.
src/convert_upload/open_clip/transform.py:40
↓ 5 callers
Method
pause
(self, wait_for=())
src/helpers/utils.py:389
↓ 5 callers
Function
prefetch_iterator
Runs iterator `it` ahead for `n` steps. Adapted from flax.
src/datasets/input_pipeline.py:192
↓ 5 callers
Method
resume
(self)
src/helpers/utils.py:394
↓ 5 callers
Method
step_end
Ends a training step, write its full row.
src/helpers/utils.py:877
↓ 5 callers
Method
step_start
(self, step)
src/helpers/utils.py:855
↓ 5 callers
Method
tick
A chronometer tick.
src/helpers/utils.py:320
↓ 5 callers
Function
unwrap
Unwraps an image produced by wrap. Where there is a 0 in the last channel for every spatial position, the rest of the three channels in that spati
src/transforms/autoaugment.py:419
↓ 5 callers
Function
wrap
Returns 'image' with an extra channel set to all 1s.
src/transforms/autoaugment.py:411
↓ 5 callers
Method
write
(metrics)
src/helpers/utils.py:881
↓ 4 callers
Function
_build_vision_tower
( embed_dim: int, vision_cfg: CLIPVisionCfg, quick_gelu: bool = False, cast_dt
src/convert_upload/open_clip/model.py:106
↓ 4 callers
Function
_clean_tag
(tag: str)
src/convert_upload/open_clip/pretrained.py:514
↓ 4 callers
Method
_encode_image
(self, images, normalize: bool = True)
src/convert_upload/open_clip/coca_model.py:149
↓ 4 callers
Function
_get_hf_config
(model_id, cache_dir=None)
src/convert_upload/open_clip/factory.py:87
↓ 4 callers
Method
_loss
(self, image_features, text_features, logit_scale, logit_bias=None, negative_only=False)
src/convert_upload/open_clip/loss.py:349
↓ 4 callers
Method
_make_layer
(self, planes, blocks, stride=1)
src/convert_upload/open_clip/modified_resnet.py:132
↓ 4 callers
Function
_mccfg
(url='', hf_hub='', **kwargs)
src/convert_upload/open_clip/pretrained.py:68
↓ 4 callers
Function
_randomly_negate_tensor
With 50% prob turn the tensor negative.
src/transforms/autoaugment.py:473
↓ 4 callers
Function
_translate_level_to_arg
(level, translate_const)
src/transforms/autoaugment.py:516
↓ 4 callers
Function
basic_clean
(text)
src/convert_upload/open_clip/tokenizer.py:67
↓ 4 callers
Function
blend
Blend image1 and image2 using 'factor'. Factor can be above 0.0. A value of 0.0 means only image1 is used. A value of 1.0 means only image2 is us
src/transforms/autoaugment.py:99
↓ 4 callers
Function
blockwise_attn
( query, key, value, bias=None, deterministic=True, dropout_rng=None,
src/models/bpt.py:50
↓ 4 callers
Method
close
(self)
src/helpers/utils.py:889
↓ 4 callers
Method
decode
(self, tokens)
src/convert_upload/open_clip/tokenizer.py:222
↓ 4 callers
Method
global_registry
()
src/helpers/registry.py:137
↓ 4 callers
Function
hms
Format time in hours/minutes/seconds.
src/helpers/utils.py:254
↓ 4 callers
Function
info
(s, *a)
src/main_clip.py:125
↓ 4 callers
Method
inform
Provide some extra info that's only known later in the program.
src/helpers/utils.py:304
↓ 4 callers
Method
log_timing
Use this when you time sth once per step and want instant flushing.
src/helpers/utils.py:413
↓ 4 callers
Method
save_pretrained
(self, dest)
src/convert_upload/open_clip/tokenizer.py:427
↓ 4 callers
Function
startstop_prof
Runs the profiler for `surround` steps around the next `log_steps`.
src/helpers/utils.py:818
↓ 4 callers
Function
steps
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/optim/build_optax.py:24
↓ 3 callers
Function
_build_text_tower
( embed_dim: int, text_cfg: CLIPTextCfg, quick_gelu: bool = False, cast_dtype:
src/convert_upload/open_clip/model.py:175
↓ 3 callers
Method
_global_pool
(self, x: torch.Tensor)
src/convert_upload/open_clip/transformer.py:600
↓ 3 callers
Function
_parse_policy_info
Return the function that corresponds to `name` and update `level` param.
src/transforms/autoaugment.py:578
↓ 3 callers
Method
_split_heads
(self, hidden_states, num_heads, head_dim)
src/models/text_transformer.py:311
↓ 3 callers
Method
_split_heads
(self, hidden_states, num_heads, head_dim)
src/models/common.py:470
↓ 3 callers
Function
_square875
(sz)
src/configs/clip_common.py:47
↓ 3 callers
Function
create_mesh
Creates a device mesh with each slice in its own data parallel group.
src/helpers/sharding.py:41
↓ 3 callers
Method
encode
(self, text)
src/convert_upload/open_clip/tokenizer.py:214
↓ 3 callers
Method
encode_image
(self, image, normalize: bool = False)
src/convert_upload/open_clip/model.py:267
↓ 3 callers
Function
evaluators
()
src/main_clip.py:631
↓ 3 callers
Function
freeze_batch_norm_2d
Converts all `BatchNorm2d` and `SyncBatchNorm` layers of provided module into `FrozenBatchNorm2d`. If `module` is itself an instance of eithe
src/convert_upload/open_clip/utils.py:9
↓ 3 callers
Function
get_cast_dtype
(precision: str)
src/convert_upload/open_clip/model.py:88
↓ 3 callers
Function
get_clean_fn
(type: str)
src/convert_upload/open_clip/tokenizer.py:94
↓ 3 callers
Method
get_logits
(self, image_features, text_features, logit_scale)
src/convert_upload/open_clip/loss.py:102
↓ 3 callers
Function
get_order
(x)
src/transforms/bert_ops.py:59
↓ 3 callers
Function
get_pretrained_cfg
(model: str, tag: str)
src/convert_upload/open_clip/pretrained.py:550
↓ 3 callers
Method
get_tfdata
Creates this data object as a tf.data.Dataset. This will be called separately in each process, and it is up to the dataset implementation to
src/datasets/core.py:25
↓ 3 callers
Function
image_transform_v2
( cfg: PreprocessCfg, is_train: bool, aug_cfg: Optional[Union[Dict[str, Any], Augmenta
src/convert_upload/open_clip/transform.py:393
↓ 3 callers
Function
info
(s, *a)
src/main_openvision2.py:112
↓ 3 callers
Function
load_checkpoint
Loads a jax pytree from a npz file. Args: tree: deprecated, use None. Bwd-compat for old format that only stored values: the pytree struc
src/helpers/utils.py:144
↓ 3 callers
Method
lock
lock modules Args: unlocked_groups (int): leave last n layer groups unlocked (default: 0)
src/convert_upload/open_clip/timm_model.py:110
↓ 3 callers
Function
maybe_repeat
(arg, n_reps)
src/helpers/registry.py:35
↓ 3 callers
Function
merge_preprocess_kwargs
(base: PreprocessCfg, **kwargs)
src/convert_upload/open_clip/transform.py:57
↓ 3 callers
Function
min_tensor
(a, b)
src/transforms/autoaugment.py:546
↓ 3 callers
Function
recover_tree
Recovers a tree as a nested dict from flat names and values. This function is useful to analyze checkpoints that are saved by our programs withou
src/helpers/utils.py:722
↓ 3 callers
Function
should_merge
(name)
src/models/common.py:565
↓ 3 callers
Function
startstop_prof_at_steps
( sess, step=None, first_step=None, last_step=None, name="steps", ttl=3 * 365 * 24 * 3600)
src/helpers/utils.py:827
↓ 3 callers
Function
text_global_pool
(x, text: Optional[torch.Tensor] = None, pool_type: str = 'argmax')
src/convert_upload/open_clip/transformer.py:655
↓ 2 callers
Method
__init__
( self, local_loss=False, gather_with_grad=False, cache_labels
src/convert_upload/open_clip/loss.py:68
↓ 2 callers
Method
__init__
(self, inplanes, planes, stride=1)
src/convert_upload/open_clip/modified_resnet.py:13
↓ 2 callers
Method
__init__
(self, use_pooler_output=True)
src/convert_upload/open_clip/hf_model.py:67
↓ 2 callers
Function
_add_tpu_host_options
(data)
src/datasets/input_pipeline.py:185
↓ 2 callers
Function
_canonicalize
Returns canonicalized `text` (lowercase and puncuation removed). Args: text: string to be canonicalized. keep_punctuation_exact_string: If
src/evaluators/proj/image_text/prompt_engineering.py:105
↓ 2 callers
Function
_convert_openclip_txt
(module: TextTransformer, prefix)
src/convert_upload/open_clip/convert.py:125
↓ 2 callers
Function
_convert_timm_img
(module, prefix)
src/convert_upload/open_clip/convert.py:37
↓ 2 callers
Method
_embed
Embeds features name `name` using `embed_fn`. Args: name: Feature name to be embedded. train_state: train_state for the predict
src/evaluators/proj/image_text/retrieval.py:223
↓ 2 callers
Method
_encode_text
(self, text, normalize: bool = True)
src/convert_upload/open_clip/coca_model.py:154
↓ 2 callers
Function
_get_gaussian_kernel
Compute 1D Gaussian kernel.
src/transforms/three_aug.py:62
↓ 2 callers
Function
_get_hf_config_tokenizer
(model_id, cache_dir=None)
src/convert_upload/transfer_jax2hf.py:564
next →
1–100 of 716, ranked by callers