MCPcopy Create free account

hub / github.com/google-research/scenic / functions

Functions4,921 in github.com/google-research/scenic

↓ 5 callersMethodget_metrics_fn
Returns a callable metric function for the model. The metrics function is for pmap-based models, where we need to normalise by doing p-sums o
scenic/model_lib/base_models/base_model.py:130
↓ 5 callersMethodget_metrics_fn
Returns a callable metric function for the model. Args: split: The split for which we calculate the metrics. It should be one of th
scenic/projects/knowledge_visual_language/models/knowledge_fid.py:614
↓ 5 callersMethodget_metrics_fn
Returns a callable metric function for the model. Args: split: The split for which we calculate the metrics. It should be one of th
scenic/projects/unloc/moment_retrieval_base_model.py:262
↓ 5 callersMethodget_not_accessed
Returns the set of fields that were not accessed since the last reset.
scenic/common_lib/debug_utils.py:247
↓ 5 callersFunctionget_tokenizer
(tokenizer_weight_path)
scenic/projects/pixel_llm/tokenizers.py:39
↓ 5 callersMethodinitialize
Load sharded dataset into CPU.
scenic/projects/knowledge_visual_language/models/local_memory.py:78
↓ 5 callersMethodis_valid
Helper function to assert that tensor `t` does not have `nan`, `inf`.
scenic/projects/baselines/detr/tests/test_model.py:179
↓ 5 callersMethodis_valid
Helper function to assert that tensor `t` does not have `nan`, `inf`.
scenic/projects/baselines/detr/tests/test_detr_base_model.py:126
↓ 5 callersMethodlog_fewshot_summary
Call `writer` with a descriptive string and the results.
scenic/train_lib/transfer/fewshot_utils.py:510
↓ 5 callersFunctionlog_to_cns
Saves predictions to CNS. Args: predictions: Serialised predictions. filename_prefix: File prefix to save the results to.
scenic/projects/svvit/inference.py:181
↓ 5 callersFunctionloss_fn
(params)
scenic/projects/baselines/detr/trainer.py:108
↓ 5 callersMethodnms
Running NMS on batched objects. Args: boxes: float arrays in shape B x n x 4. Boxes are in absolute coordinate in order of (l, t, r
scenic/projects/baselines/centernet/modeling/centernet.py:478
↓ 5 callersFunctionremove_padding_and_concat_and_pad_tokens
Remove padding and concat and pad tokens. Removing padding tokens at the end of each caption, concat them into a single paragraph caption, an
scenic/projects/streaming_dvc/io/densecap_ops.py:32
↓ 5 callersFunctionrescale_and_convert_boxes_to_xywh
Rescale boxes, and convert format to xywh.
scenic/projects/pixel_llm/evaluators.py:284
↓ 5 callersFunctionrun
Converts VideoMAE checkpoints to Jax, and checks for correctness.
scenic/projects/objectvivit/tools/convert_videomae_checkpoint.py:340
↓ 5 callersMethodrun_all
Compute summary over all `datasets` that comes from config.
scenic/train_lib/transfer/fewshot_utils.py:489
↓ 5 callersMethodshutdown
(self, wait: bool = True)
scenic/common_lib/debug_utils.py:294
↓ 5 callersFunctionstore_predictions
Saves predictions. Args: predictions: Serialised predictions. filename_prefix: File prefix to save the results to.
scenic/projects/tasseo/inference.py:179
↓ 5 callersMethodtext_loss
Text loss with label smoothing. Args: text_outputs: (text_batch_size, max_caption_length, vocab_size) matched_text: (text_batch_size,
scenic/projects/densevoc/modeling/grit.py:302
↓ 5 callersMethodto_tensor
(labels, orig_labels)
scenic/projects/owl_vit/preprocessing/image_ops.py:621
↓ 5 callersFunctiontraining_loss_fn_single
(params, model_state, batch,
scenic/projects/adversarialtraining/classification_adversarialtraining_trainer.py:119
↓ 5 callersFunctionunwrap
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 spat
scenic/dataset_lib/big_transfer/preprocessing/autoaugment.py:417
↓ 5 callersFunctionwrap
Returns 'image' with an extra channel set to all 1s.
scenic/dataset_lib/big_transfer/preprocessing/autoaugment.py:409
↓ 4 callersFunction_bytes_feature
(value)
scenic/projects/densevoc/tools/build_vidstg_tfrecord.py:104
↓ 4 callersFunction_bytes_feature
(value)
scenic/projects/pixel_llm/tools/build_llava_tfrecord.py:76
↓ 4 callersFunction_bytes_feature
(value)
scenic/projects/pixel_llm/tools/build_mdetr_ref_tfrecord.py:73
↓ 4 callersMethod_extract_encoder_output
Extracts encoder output.
scenic/projects/mtv/model.py:463
↓ 4 callersFunction_flatten_params
Flattens a dictionary, keeping empty leaves.
scenic/projects/pixel_llm/partition_utils.py:240
↓ 4 callersFunction_flatten_params
Flattens a dictionary, keeping empty leaves.
scenic/projects/streaming_dvc/partition_utils.py:176
↓ 4 callersFunction_int64_feature
(value)
scenic/projects/densevoc/tools/build_vidstg_tfrecord.py:112
↓ 4 callersFunction_merge_params
Merges `restored_params` into `params`.
scenic/projects/baselines/vit.py:462
↓ 4 callersMethodadd_batch_of_examples
Add a batch of examples to the evaluator. Args: target: Target to be predicted as a Numpy array. output: Output from the model as a N
scenic/projects/tasseo/train_utils.py:166
↓ 4 callersMethodadd_batch_of_examples
Add a batch of examples to the evaluator. Args: target: Target to be predicted as a Numpy array. output: Output from the model as a N
scenic/projects/svvit/metrics.py:187
↓ 4 callersFunctionapply
(method, **kwargs)
scenic/projects/owl_vit/evaluator.py:245
↓ 4 callersFunctionapply_spe
(keys, spe)
scenic/projects/performer/performer.py:526
↓ 4 callersFunctionaugment_image_annotation
Apply data augmentation.
scenic/projects/densevoc/input_utils.py:485
↓ 4 callersMethodautoregressive_predict
Generate caption from object features in an auto-agressive way. Args: params: pytree of network parameters. detections: dict with key
scenic/projects/densevoc/modeling/grit.py:369
↓ 4 callersFunctionblend
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 u
scenic/dataset_lib/big_transfer/preprocessing/autoaugment.py:89
↓ 4 callersMethodcompute_metrics
Computes the relevant metrics for all added <target, output> pairs.
scenic/projects/tasseo/train_utils.py:180
↓ 4 callersMethodcompute_metrics
Computes the relevant metrics for all added <target, output> pairs.
scenic/projects/svvit/metrics.py:201
↓ 4 callersFunctioncreate_dataset_iterator
( subset: Text, batch_size_local: int, num_clips: int, caption_string: str, stri
scenic/projects/avatar/datasets/av_asr_tfrecord_dataset.py:895
↓ 4 callersFunctiondataset_builder
Returns generators for COCO object detection 2017 train & validation set. Args: batch_size: int; Determines the train batch size. eval_batc
scenic/projects/baselines/centernet/input_pipeline.py:319
↓ 4 callersMethoddecode
(self, *args, **kwargs)
scenic/projects/vid2seq/models.py:124
↓ 4 callersMethodencode_topk_knowledge
( self, bsz, retr_texts, retr_images=None, train=False, random_drop_image=
scenic/projects/knowledge_visual_language/models/fusion_in_decoder_soft.py:265
↓ 4 callersMethodextract_peaks
Concert dense outputs from the network to objects. Args: outputs: dict of list of arrays. The keys should be 'heatmaps' and 'box_re
scenic/projects/baselines/centernet/modeling/centernet.py:432
↓ 4 callersFunctionfake_model_outputs_batch
Generate fake data that resembles model `outputs` `batch` `indices`. See ObjectDetectionWithMatchingModel's loss_* functions for more details reg
scenic/projects/baselines/detr/tests/test_detr_base_model.py:58
↓ 4 callersFunctionget_cls_token_and_video_frames
Returns whether there is CLS token and the number of video frames.
scenic/projects/polyvit/model_utils.py:534
↓ 4 callersMethodget_dense_pe
(self, image_embedding_size=None)
scenic/projects/baselines/segment_anything/modeling/prompt_encoder.py:65
↓ 4 callersFunctionget_mask
(traversal)
scenic/projects/baselines/deformable_detr/trainer.py:90
↓ 4 callersMethodget_scores
Scores image features against queries. Args: image: Single uint8 Numpy image of any size. Will be converted to float and resized be
scenic/projects/owl_vit/notebooks/inference.py:176
↓ 4 callersFunctiongrad_fn
(inputs)
scenic/projects/owl_vit/trainer.py:93
↓ 4 callersFunctionidentity
tf.identity for nested dictionary of Tensors.
scenic/projects/baselines/detr/transforms.py:45
↓ 4 callersMethodinit_from_train_state
Updates the train_state with data from restored_train_state.
scenic/projects/av_mae/mbt.py:744
↓ 4 callersFunctioninverse_sigmoid
(x: jnp.ndarray, eps: float = 1e-5)
scenic/projects/baselines/deformable_detr/deformable_transformer.py:35
↓ 4 callersMethodis_valid
Helper function to assert that tensor `t` does not have `nan`, `inf`.
scenic/model_lib/base_models/tests/test_segmentation_model.py:72
↓ 4 callersMethodlocal2global
Compute average value for each pixel over all patches containing it. For example, this can be used to compute the global boundary maps, or the
scenic/projects/boundary_attention/field_of_junctions_jax/field_of_junctions.py:634
↓ 4 callersMethodlookup
(self, keys: tf.Tensor)
scenic/projects/owl_vit/preprocessing/label_ops.py:1038
↓ 4 callersMethodloss_function
Returns the sum of classification and box regression losses. Args: logits: (batch_size, batch_size * num_max_captions, num_frames, 3).
scenic/projects/unloc/moment_retrieval_base_model.py:356
↓ 4 callersFunctionnormalise
(tensor: jnp.ndarray, offset: float = 127.5)
scenic/projects/av_mae/train_utils.py:84
↓ 4 callersFunctionon_segment
Check if point q lies on line segment pr.
scenic/projects/boundary_attention/kaleidoshapes/make_kaleido_image.py:644
↓ 4 callersFunctionorientation
Determine the orientation of the triplet (p, q, r).
scenic/projects/boundary_attention/kaleidoshapes/make_kaleido_image.py:651
↓ 4 callersFunctionpad_first_dim
Pads the first dimension of the input `sequence` to `max_len`.
scenic/projects/avatar/datasets/dataset_utils.py:33
↓ 4 callersFunctionpreprocess_fn
Returns a preprocessing function that operates on inputs and labels.
scenic/projects/layout_denoise/datasets/dataset.py:64
↓ 4 callersFunctionremove_promptability_marker
Removes any promptability-marker-character from a tensor of strings.
scenic/projects/owl_vit/preprocessing/label_ops.py:307
↓ 4 callersMethodroi_align
RoIAlign on multilevel features. Args: features: A sorted list of (B, Hi, Wi, C) features. boxes: (B, T, 4) boxes in XYXY format, whe
scenic/projects/baselines/centernet/modeling/roi_heads.py:209
↓ 4 callersMethodrun_all
Computes linear evaluation metrics over multiple datasets. Args: repr_train_state: The train state that should be passed in as the first
scenic/train_lib/transfer/linear_probe_utils.py:387
↓ 4 callersFunctionstr_to_bytes
(string)
scenic/projects/densevoc/tools/build_vidstg_tfrecord.py:100
↓ 4 callersFunctionstr_to_bytes
(string)
scenic/projects/pixel_llm/tools/build_ln_tfrecord.py:185
↓ 4 callersMethodstring_tensor_to_indices
( self, string_tensor: Union[tf.Tensor, Sequence[str]],)
scenic/projects/gerald/input_pipeline.py:511
↓ 4 callersFunctiontask
Vision task with val and test splits.
scenic/projects/baselines/plainvit/configs/transfer_standard4_plainvit_config.py:173
↓ 4 callersFunctiontask
Vision task with val and test splits.
scenic/projects/polyvit/configs/polyvit_all.py:113
↓ 4 callersFunctiontf_int32
(t)
scenic/projects/baselines/centernet/transforms.py:132
↓ 4 callersFunctiontf_int32
(t)
scenic/projects/baselines/detr/transforms.py:27
↓ 4 callersFunctiontf_int32
(t)
scenic/projects/densevoc/input_utils.py:471
↓ 4 callersFunctiontile_positional_embeddings
Tile positional embeddings. Args: restored_posemb_grid: Positional embeddings from restored model. Shape is [n_restored_tokens, d] n_
scenic/projects/vivit/model_utils.py:249
↓ 4 callersMethodunfold
Extract patches from an image. Args: im: Array of shape [N, C, H, W] Returns: Array of shape [N, C, R, R, H', W'] containing all
scenic/projects/boundary_attention/field_of_junctions_jax/field_of_junctions.py:388
↓ 4 callersFunctionvalidate_config
(field)
scenic/projects/mbt/datasets/audiovisual_tfrecord_dataset.py:432
↓ 4 callersFunctionvalidate_config
(field)
scenic/projects/vivit/data/video_tfrecord_dataset.py:388
↓ 4 callersFunctionwrite_note
(note)
scenic/train_lib/classification_trainer.py:336
↓ 3 callersMethod__call__
(self, features: Features)
scenic/projects/owl_vit/preprocessing/image_ops.py:317
↓ 3 callersFunction_batch_and_prefetch
(ds, batch_size)
scenic/projects/pixel_llm/io/flexio.py:548
↓ 3 callersFunction_build_pipeline
Build a tf.data.Dataset pipeline using clu.deterministic_data or DMVR. Args: split: The split to be used. start_step: Start step for GRAIN-
scenic/projects/pixel_llm/io/flexio.py:397
↓ 3 callersFunction_build_pipeline
Build a tf.data.Dataset pipeline using clu.deterministic_data. Different from the original flexio, this function only support TFRecord. Args:
scenic/projects/streaming_dvc/io/flexio.py:162
↓ 3 callersFunction_build_pipeline
Build a tf.data.Dataset pipeline using clu.deterministic_data or DMVR. Args: split: The split to be used. start_step: Start step for GRAIN-
scenic/dataset_lib/flexio/flexio.py:289
↓ 3 callersFunction_bytes_feature
(value)
scenic/projects/densevoc/tools/build_vln_tfrecord.py:73
↓ 3 callersFunction_conv_output_shape
Convenience wrapper function for inferring the convolution output shape. Args: spatial_shape: Input (lhs) shapes for which the output shapes sh
scenic/model_lib/layers/masked_layers.py:571
↓ 3 callersFunction_convert_strings_to_int_sequences
Converts string to sequence of ints so that it is XLA compatible.
scenic/projects/avatar/datasets/av_asr_tfrecord_dataset.py:85
↓ 3 callersFunction_create_image_figure
Creates a Bokeh figure showing an image.
scenic/projects/owl_vit/notebooks/plotting.py:131
↓ 3 callersFunction_decode_and_center_crop
Crops to center of image with padding then scales `image_size`.
scenic/dataset_lib/imagenet_dataset.py:127
↓ 3 callersFunction_decode_spectrogram
Decodes audio spectrogram. Args: spectrogram: input mel spectrogram inflate: if True, adds a channel dimension circular_time_shift: If
scenic/projects/av_mae/datasets/dataset_utils.py:610
↓ 3 callersFunction_flatten
(x)
scenic/projects/av_mae/mbt.py:1006
↓ 3 callersFunction_float_feature
(value)
scenic/projects/pixel_llm/tools/build_ln_tfrecord.py:193
↓ 3 callersFunction_get_query_color
(query_ind, alpha=1.0)
scenic/projects/owl_vit/notebooks/interactive.py:321
↓ 3 callersMethod_get_stochastic_depth_rate
Returns the stochastic depth rate for the current layer and view.
scenic/projects/mtv/model.py:115
↓ 3 callersFunction_initialize_model
Initialization function to be jitted.
scenic/train_lib/train_utils.py:148
↓ 3 callersFunction_int64_feature
(value)
scenic/projects/densevoc/tools/convert_video_tfrecord_to_image_tfrecord.py:82
↓ 3 callersFunction_int64_feature
(value)
scenic/projects/densevoc/tools/build_vln_tfrecord.py:81
↓ 3 callersFunction_invert_perm
(perm)
scenic/projects/fast_vit/model_utils.py:1410
↓ 3 callersFunction_make_mask_trees
Wrapper around `make_mask_trees` that supports different input types.
scenic/train_lib/optax.py:53
↓ 3 callersFunction_randomly_negate_tensor
With 50% prob turn the tensor negative.
scenic/dataset_lib/big_transfer/preprocessing/autoaugment.py:473
← previousnext →101–200 of 4,921, ranked by callers