MCPcopy Create free account

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

Functions716 in github.com/UCSC-VLAA/OpenVision

Method_ikok_pp_fn
(data)
src/helpers/registry.py:58
Function_image_wider_than_requested_aspect_ratio
()
src/transforms/simclr_aug.py:205
Function_inception_crop
(image)
src/transforms/ops_image.py:141
Function_keep
(data)
src/transforms/ops_general.py:145
Function_make_global_arr
(x, shard, shape)
src/helpers/sharding.py:77
Method_merge_heads
(self, hidden_states, embed_dim)
src/models/text_decoder.py:179
Function_on_commit_callback
(array_names)
src/helpers/utils.py:1042
Function_onehot
(data)
src/transforms/ops_general.py:125
Function_pad_to_shape
(x)
src/transforms/ops_general.py:231
Function_pp_ass_keys
(labels)
src/transforms/bert_ops.py:259
Function_pp_autoreg_label
(label)
src/transforms/ops_text.py:45
Function_pp_bert_tokenize
(labels)
src/transforms/bert_ops.py:114
Function_pp_custom_bert_tokenize
(data)
src/transforms/bert_ops.py:474
Function_pp_fn
(example)
src/datasets/input_pipeline.py:180
Function_pp_imagenet_labels
(label)
src/transforms/ops_text.py:35
Function_pp_noun_tokenize
(labels)
src/transforms/bert_ops.py:271
Function_preprocess_fn
The preprocessing function that is returned.
src/datasets/build_transforms.py:60
Function_rand_erase
(image)
src/transforms/ops_image.py:445
Function_randaug
(image)
src/transforms/ops_image.py:420
Function_random_flip_lr_pp
(image)
src/transforms/ops_image.py:314
Method_register
(item)
src/helpers/registry.py:144
Function_requested_aspect_ratio_wider_than_image
()
src/transforms/simclr_aug.py:198
Function_resize
Resizes image to a given size.
src/transforms/ops_image.py:70
Function_resize_small
(image)
src/transforms/ops_image.py:103
Function_rotate_level_to_arg
(level)
src/transforms/autoaugment.py:480
Function_shear_level_to_arg
(level)
src/transforms/autoaugment.py:509
Function_shrink_level_to_arg
Converts level to ratio by which we shrink the image content.
src/transforms/autoaugment.py:486
Function_single_compose_two_images
(image1, image2)
src/transforms/mixup.py:297
Method_split_heads
(self, hidden_states, num_heads, head_dim)
src/models/text_decoder.py:176
Function_squeeze_last_dim
(x)
src/transforms/ops_general.py:198
Function_sync
(x)
src/helpers/utils.py:752
Function_transform
(image)
src/transforms/ops_image.py:270
Function_transform
(image)
src/transforms/simclr_aug.py:364
Method_unlock
(x)
src/convert_upload/open_clip/transformer.py:563
Function_value_range
Scales values in given range.
src/transforms/ops_general.py:51
Function_vgg_value_range
(image)
src/transforms/ops_image.py:340
Method_window_mask
Mask a part of the image.
src/models/vit.py:544
Functionadd_id
(idx, features)
src/evaluators/proj/image_text/retrieval.py:120
Functionadd_model_config
add model config path or file and update registry
src/convert_upload/open_clip/factory.py:72
Functionadd_prompts
(idx, class_name)
src/evaluators/proj/image_text/discriminative_classifier.py:89
Functionautocontrast
Implements Autocontrast function from PIL using TF ops. Args: image: A 3D uint8 tensor. Returns: The image after it has had autocontrast a
src/transforms/autoaugment.py:296
Methodbackward
(ctx, grad_output)
src/convert_upload/open_clip/loss.py:281
Methodbackward
(ctx, *grad_outputs)
src/convert_upload/open_clip/loss.py:298
Functionbce
Binary Cross Entropy Loss Should be numerically stable, built based on: https://github.com/pytorch/pytorch/issues/751 :param
src/losses/common.py:258
Functionbce_logits
(*, logits, labels, weight=None, reduction=True)
src/losses/common.py:256
Functionbrightness
Equivalent of PIL Brightness.
src/transforms/autoaugment.py:227
Functionbrightness_foo
()
src/transforms/simclr_aug.py:139
Methodbuild_cls_mask
(self, text, cast_dtype: torch.dtype)
src/convert_upload/open_clip/transformer.py:772
Functionbuild_zero_shot_classifier
Build zero-shot classifier weights by iterating over class names in batches Args: model: CLIP model instance tokenizer: CLIP toke
src/convert_upload/open_clip/zero_shot_classifier.py:21
Functionbuild_zero_shot_classifier_legacy
Build zero-shot classifier weights by iterating over class names 1 by 1 Args: model: CLIP model instance tokenizer: CLIP tokenize
src/convert_upload/open_clip/zero_shot_classifier.py:71
Functioncenter_crop
Crops to center of image and rescales to desired size. Args: image: Image Tensor to crop. height: Height of image to be cropped.
src/transforms/simclr_aug.py:219
Functioncheck_and_compile
(pattern)
src/helpers/utils.py:781
Functioncheck_zero_image
(test_img, org_img)
src/transforms/autoaugment.py:773
Functioncheckpointing_timeout
(writer, timeout)
src/helpers/utils.py:241
Functioncolor
Equivalent of PIL Color.
src/transforms/autoaugment.py:204
Functioncolor_jitter
Distorts the color of the image. Args: image: The input image tensor. strength: the floating number for the strength of the color augm
src/transforms/simclr_aug.py:55
Functionconcate_two_captions
(data)
src/transforms/bert_ops.py:441
Functioncontrast
Equivalent of PIL Contrast.
src/transforms/autoaugment.py:210
Functioncontrast_foo
()
src/transforms/simclr_aug.py:146
Functionconvert_int8_model_to_inference_mode
(model)
src/convert_upload/open_clip/utils.py:84
Methodcount_correct
Returns count of correct predictions (and optionally embeddings).
src/evaluators/proj/image_text/discriminative_classifier.py:305
Functioncreate_loss
(args)
src/convert_upload/open_clip/factory.py:359
Functioncreate_model_and_transforms
( model_name: str, pretrained: Optional[str] = None, precision: str = 'fp32',
src/convert_upload/open_clip/factory.py:396
Functioncutmix
Composing two images by inserting a patch into another image.
src/transforms/mixup.py:218
Functioncutout
Apply cutout (https://arxiv.org/abs/1708.04552) to image. This operation applies a (2*pad_size x 2*pad_size) mask of zeros to a random location wi
src/transforms/autoaugment.py:139
Functiondecode
(output_ids: torch.Tensor)
src/convert_upload/open_clip/tokenizer.py:272
Methoddistort
Given an image tensor, returns a distorted image with the same shape. Args: image: `Tensor` of shape [height, width, 3] or [num_fram
src/transforms/random_erasing.py:67
Methoddistort
Applies RandomErasing to single `image`. Args: image (tf.Tensor): Of shape [height, width, 3] representing an image. Returns: tf.T
src/transforms/random_erasing.py:139
Functiondistort_image_with_autoaugment
Applies the AutoAugment policy to `image`. AutoAugment is from the paper: https://arxiv.org/abs/1805.09501. Args: image: `Tensor` of shape [he
src/transforms/autoaugment.py:685
Functiondistort_image_with_randaugment
Applies the RandAugment policy to `image`. RandAugment is from the paper https://arxiv.org/abs/1909.13719, Args: image: `Tensor` of shape [hei
src/transforms/autoaugment.py:713
Functiondistort_image_with_randaugment_timm
Applies the RandAugment policy to `image`. RandAugment is from the paper https://arxiv.org/abs/1909.13719, Args: image: `Tensor` of shape [hei
src/transforms/autoaugment.py:778
Functiondistort_image_with_three_aug
Applies the RandAugment policy to `image`. RandAugment is from the paper https://arxiv.org/abs/1909.13719, Args: image: `Tensor` of shape [hei
src/transforms/three_aug.py:187
Methoddistort_with_boxes
Distorts the image and bounding boxes. Args: image: `Tensor` of shape [height, width, 3] or [num_frames, height, width, 3] represent
src/transforms/random_erasing.py:80
Functiondot_product_attention
Computes dot-product attention given query, key, and value. This is the core function for applying attention based on https://arxiv.org/abs/1706.
src/models/common.py:138
Methodembed_images
(train_state, images)
src/evaluators/proj/image_text/retrieval.py:206
Methodembed_texts
(train_state, texts)
src/evaluators/proj/image_text/retrieval.py:210
Methodembed_texts
Returns text embeddings.
src/evaluators/proj/image_text/discriminative_classifier.py:300
Methodencode_image
(self, images, normalize: bool = True)
src/convert_upload/open_clip/coca_model.py:159
Methodencode_text
(self, text, normalize: bool = True)
src/convert_upload/open_clip/coca_model.py:163
Functionequalize
Implements Equalize function from PIL using TF ops.
src/transforms/autoaugment.py:365
Functioneval_logits_fn
(train_state, batch)
src/main_clip.py:620
Functioneval_logits_fn
(state, batch)
src/main_openvision2.py:347
Functionexpand_aliases
(idx, class_name)
src/evaluators/proj/image_text/discriminative_classifier.py:82
Functionf1
()
src/transforms/ops_general.py:185
Functionf2
()
src/transforms/ops_general.py:186
Functionfinal_policy
(image_)
src/transforms/autoaugment.py:672
Functionfix_old_checkpoints
Fix small bwd incompat that can't be resolved with names in model def.
src/models/vit.py:864
Functionflatten
(data)
src/transforms/ops_general.py:246
Functionformat_str
Format string with reference fields from config. This makes it easy to build preprocess strings that contain references to fields tha are edited
src/configs/common.py:143
Methodforward
(self, image_features, text_features, logits, labels, logit_scale, output_dict=False)
src/convert_upload/open_clip/loss.py:160
Methodforward
( self, image_features, text_features, logit_scale,
src/convert_upload/open_clip/loss.py:185
Methodforward
(ctx, from_rank, to_rank, group, tensor)
src/convert_upload/open_clip/loss.py:274
Methodforward
(ctx, left_rank, right_rank, group, tensor_to_left, tensor_to_right)
src/convert_upload/open_clip/loss.py:291
Methodforward
(self, image_features, text_features, logit_scale, logit_bias, output_dict=False)
src/convert_upload/open_clip/loss.py:360
Methodforward
( self, image, text: Optional[torch.Tensor] = None, image_late
src/convert_upload/open_clip/coca_model.py:167
Methodforward
(self, x: torch.Tensor)
src/convert_upload/open_clip/modified_resnet.py:42
Methodforward
(self, x)
src/convert_upload/open_clip/modified_resnet.py:68
Methodforward
(self, x)
src/convert_upload/open_clip/modified_resnet.py:173
Methodforward
Args: img (PIL Image or Tensor): Image to be cropped. Returns: PIL Image or Tensor: Cropped image.
src/convert_upload/open_clip/transform.py:224
Methodforward
(self, x)
src/convert_upload/open_clip/timm_model.py:149
← previousnext →401–500 of 716, ranked by callers