Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/google-research/scenic
/ functions
Functions
4,921 in github.com/google-research/scenic
⨍
Functions
4,921
◇
Types & classes
859
↳
Endpoints
16
↓ 1 callers
Function
_initialize_model
Initialization function to be jitted.
scenic/projects/layout_denoise/train_utils.py:78
↓ 1 callers
Function
_initialize_model
Initialization function to be jitted.
scenic/projects/unloc/train_utils.py:342
↓ 1 callers
Function
_initialize_model
Initialization function to be jitted.
scenic/projects/av_mae/trainer_multimodal.py:88
↓ 1 callers
Function
_initialize_model
Initialization function to be jitted.
scenic/projects/boundary_attention/train_utils.py:220
↓ 1 callers
Function
_load_json
Loading json file.
scenic/dataset_lib/coco_dataset/coco_eval.py:62
↓ 1 callers
Function
_map
A versatile vmap-like function.
scenic/projects/baselines/deformable_detr/attention.py:120
↓ 1 callers
Method
_match_and_label_boxes
Match and label boxes in each cascade stages. Args: proposals: array (B, samples_per_image, 4). gt_boxes: array (B, max_gt_boxes, 4).
scenic/projects/baselines/centernet/modeling/roi_heads.py:444
↓ 1 callers
Method
_merge_views_along_channel_axis
Merges tokens from each view along the channel axis.
scenic/projects/mtv/model.py:527
↓ 1 callers
Method
_merge_views_along_time_axis
Merges tokens from each view along the time axis.
scenic/projects/mtv/model.py:510
↓ 1 callers
Function
_multilabel_to_multihot
Converts labels from multi-label to multi-hot representation. In the multi-label representation, labels have shape [..., max_num_labels_per_insta
scenic/projects/owl_vit/preprocessing/label_ops.py:959
↓ 1 callers
Function
_multilevel_roi_align_loop
A loop implementation of multilevel ROIAlign.
scenic/projects/baselines/centernet/modeling/roi_align.py:123
↓ 1 callers
Function
_numerator
Computes the numartor.
scenic/projects/fast_vit/model_utils.py:1130
↓ 1 callers
Function
_panoptic_to_standard_annotations
Translates panoptic annotations to standard annotations. Panoptic annotations have one extra level of nesting compared to detection annotations (
scenic/dataset_lib/coco_dataset/coco_eval.py:118
↓ 1 callers
Function
_parse_policy_info
Return the function that corresponds to `name` and update `level` param.
scenic/dataset_lib/video_ops.py:745
↓ 1 callers
Method
_predict_classes_jitted
( self, image_features: jnp.ndarray, query_embeddings: jnp.ndarray, )
scenic/projects/owl_vit/notebooks/inference.py:224
↓ 1 callers
Function
_prepare
Prepare the cost matrix. To speed up computational efficiency of the algorithm, all weights are shifted to be non-negative. Each element is reduc
scenic/model_lib/matchers/hungarian_cover.py:31
↓ 1 callers
Method
_recombine_heads
(self, x)
scenic/projects/baselines/segment_anything/modeling/transformer.py:190
↓ 1 callers
Function
_recover_tree
(keys, values)
scenic/projects/baselines/plainvit/trainer.py:68
↓ 1 callers
Function
_resize
Resizes the image. Args: image: Tensor; Input image. image_size: int; Image size. Returns: Resized image.
scenic/projects/tasseo/datasets/metaphase_sexid_dataset.py:53
↓ 1 callers
Method
_resize_image
Applies the appropriate TF resizing function.
scenic/projects/owl_vit/preprocessing/image_ops.py:358
↓ 1 callers
Function
_roi_align_einsum
An einsum-based implementation of ROIAlign.
scenic/projects/baselines/centernet/modeling/roi_align.py:48
↓ 1 callers
Method
_roi_align_image_features
(self, image_features, boxes)
scenic/projects/owl_vit/layers.py:463
↓ 1 callers
Function
_rotate_half
(x)
scenic/projects/pixel_llm/modeling/eva02_vit.py:201
↓ 1 callers
Function
_run_moment_retrieval_test_steps
Run moment retrieval test steps and save results into a dict.
scenic/projects/unloc/eval_utils.py:773
↓ 1 callers
Function
_run_temporal_localization_test_steps
Run temporal localization test steps and save results into a dict.
scenic/projects/unloc/eval_utils.py:582
↓ 1 callers
Method
_sample_camera_params
Samples reasonable camera parameters.
scenic/projects/boundary_attention/helpers/additive_noise_model.py:193
↓ 1 callers
Function
_sample_random_prompt_templates
Returns num_samples prompt templates uniformly at random.
scenic/projects/owl_vit/preprocessing/label_ops.py:362
↓ 1 callers
Method
_scatter_top_masks
Scatters the top masks back to a full-sized array of all-zero masks.
scenic/projects/owl_vit/layers.py:455
↓ 1 callers
Function
_scenic_optimizer_args_to_optax_args
Transform original scenic arguments to optax arguments.
scenic/train_lib/optimizers.py:239
↓ 1 callers
Method
_self_attention_encode_all_video_text_pairs
Fuses all video-text pairs via self attention. Args: video_tokens: A 3D float tensor of shape (batch_size, sequence_length, channel
scenic/projects/unloc/video_text_fusion.py:538
↓ 1 callers
Function
_set_host_device_count
(n)
scenic/projects/owl_vit/evaluator.py:558
↓ 1 callers
Function
_shard_width
Return the width of the shard matcher based on the number of shards.
scenic/projects/vivit/data/file_utils.py:64
↓ 1 callers
Function
_solarize
(image)
scenic/projects/loca/ops.py:440
↓ 1 callers
Function
_sorted_items
Returns items of a dict ordered by keys.
scenic/projects/baselines/detr/train_utils.py:369
↓ 1 callers
Method
_split_tokens_and_bottleneck
Removes bottleneck tokens from input.
scenic/projects/mtv/model.py:246
↓ 1 callers
Function
_targets_from_batch
Get target labels and boxes with additional non-object appended.
scenic/projects/baselines/deformable_detr/model.py:208
↓ 1 callers
Method
_temporal_encode
Encodes the tokens in the temporal dimension.
scenic/projects/unloc/encoders.py:433
↓ 1 callers
Method
_temporal_encode
(self, x: Dict[str, jnp.ndarray])
scenic/projects/av_mae/mbt.py:410
↓ 1 callers
Function
_timestamp
()
scenic/projects/owl_vit/evaluator.py:149
↓ 1 callers
Function
_to_grid
To grid.
scenic/projects/adversarialtraining/attacks/attack_transforms.py:20
↓ 1 callers
Method
_tokenize
Creates tokens for each view. Args: x: A 5D float tensor of shape (batch, time, height, width, channels) representing the input vid
scenic/projects/mtv/model.py:474
↓ 1 callers
Method
_train
The main training loop. Args: representation_fn: A function that given a batch, returns representations that are passed to the line
scenic/train_lib/transfer/linear_probe_utils.py:209
↓ 1 callers
Function
_traverse_with_names
Traverses nested dicts/dataclasses and emits (leaf_name, leaf_val).
scenic/train_lib/optimizers.py:254
↓ 1 callers
Function
_tree_merge
(tree1, tree2)
scenic/projects/streaming_dvc/partition_utils.py:77
↓ 1 callers
Function
_unshard_and_get
(tree)
scenic/projects/owl_vit/evaluator.py:480
↓ 1 callers
Function
_update_weights_using_cover
Updates weights for hungarian matching using a cover. We first find the minimum uncovered weight. Then, we subtract this from all the uncovered w
scenic/model_lib/matchers/hungarian_cover.py:379
↓ 1 callers
Function
adapt_attention_weights
Adapts PyTorch attention layers to Flax.
scenic/projects/objectvivit/tools/convert_videomae_checkpoint.py:130
↓ 1 callers
Method
add_annotation
Add a single inference example as COCO annotation for later evaluation. Labels should not include a background/padding class, but only valid obje
scenic/dataset_lib/coco_dataset/coco_eval.py:257
↓ 1 callers
Method
add_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/baselines/bert/train_utils.py:164
↓ 1 callers
Method
add_decomposed_rel_pos
Calculate decomposed Relative Positional Embeddings from paper:`mvitv2`. Args: attn (Tensor): attention map. q (Tensor): query q in t
scenic/projects/baselines/centernet/modeling/vitdet.py:90
↓ 1 callers
Method
add_decomposed_rel_pos
Calculate decomposed Relative Positional Embeddings from paper:`MViTv2`. Args: attn (Tensor): attention map. q (Tensor): query q in t
scenic/projects/baselines/segment_anything/modeling/image_encoder.py:206
↓ 1 callers
Method
add_example
Add a single example to the evaluator. Args: prediction: Model prediction tuple of 3 arrays: boxes, scores, classes. 'boxes' is in
scenic/projects/baselines/centernet/evaluators.py:65
↓ 1 callers
Method
add_example
Add a single example to the evaluator. Note that the postprocessing of the predictions is significantly different from the one used in DETR.
scenic/projects/baselines/deformable_detr/coco_eval.py:60
↓ 1 callers
Method
add_example
Add a single example to the evaluator. Args: task_name: Name of the task, e.g., layout. ds_name: Name of the dataset, e.g., rico.
scenic/projects/layout_denoise/train_utils.py:163
↓ 1 callers
Method
add_example
Add a single example to the evaluator. Args: prediction: string. target: Target dictionary with keys and 'image/id'.
scenic/projects/streaming_dvc/densecap_evaluator.py:79
↓ 1 callers
Function
add_float_list
(key: str, values: Sequence[float], sequence: tf.train.SequenceExample)
scenic/projects/vid2seq/generate_from_file.py:71
↓ 1 callers
Method
add_modality_token
Add modality learned tokens.
scenic/projects/av_mae/vivit.py:197
↓ 1 callers
Method
add_modality_token
Add modality learned tokens.
scenic/projects/av_mae/mbt.py:434
↓ 1 callers
Method
add_point_detection
Predict segmentation mask from bounding boxes.
scenic/projects/pixel_llm/modeling/pixel_llm.py:1533
↓ 1 callers
Function
add_positional_embed
Adds positional embedding.
scenic/projects/mbt/model.py:166
↓ 1 callers
Function
add_positional_embed
Adds positional embedding.
scenic/projects/av_mae/mbt.py:50
↓ 1 callers
Method
add_positional_encodings
Add positional encodings to the input patch sequence.
scenic/projects/loca/vit.py:42
↓ 1 callers
Function
add_spectrogram
Add audio spectrogram. Args: parser_builder: An instance of a builders.BaseParserBuilder. sampler_builder: An instance of a builders.Sample
scenic/projects/mbt/datasets/dataset_utils.py:110
↓ 1 callers
Function
add_spectrogram
Add audio spectrogram. Args: parser_builder: An instance of a builders.BaseParserBuilder. sampler_builder: An instance of a builders.Sample
scenic/projects/avatar/datasets/dataset_utils.py:746
↓ 1 callers
Function
add_spectrogram_from_audio
Add audio spectrogram computed from waveform. Args: parser_builder: An instance of a builders.BaseParserBuilder. sampler_builder: An instan
scenic/projects/avatar/datasets/dataset_utils.py:436
↓ 1 callers
Function
add_text
Adds functions to process text feature to builders. This function expects the input to be either a `tf.train.SequenceExample` (with the features
scenic/projects/avatar/datasets/dataset_utils.py:849
↓ 1 callers
Function
add_text_untokenized
Adds functions to process text feature to builders.
scenic/projects/avatar/datasets/dataset_utils.py:972
↓ 1 callers
Function
add_white_noise
Adds deterministic gaussian white noise to the signal. While setting a global seeds does not guarrantee the deterministic per-sample noise genera
scenic/projects/avatar/datasets/dataset_utils.py:57
↓ 1 callers
Function
aggregate_gradients_pmean
Aggregates gradients using JAX's pmean. Args: axis_name: Name of the axis for pmean aggregation. Returns: A `GradientTransformation`.
scenic/train_lib/optax.py:304
↓ 1 callers
Function
all_gather_and_unreplicate
(inputs)
scenic/projects/tasseo/inference.py:191
↓ 1 callers
Function
all_gather_and_unreplicate
(inputs)
scenic/projects/svvit/inference.py:193
↓ 1 callers
Function
all_gather_metrics_inputs
Gathers inputs for moment retrieval metrics from all devices.
scenic/projects/unloc/eval_utils.py:44
↓ 1 callers
Function
annotations_in_file
Yields all `LocalizedNarrative` dic in a given file. Args: filename: File to load the Localized Narratives from. Yields: LN dic.
scenic/projects/pixel_llm/tools/build_ln_tfrecord.py:101
↓ 1 callers
Function
append_or_add_object_mask
Generate object heatmaps. Args: feature_dict: dict of tensors from the dataloader num_frames: int; frames of a single model. keep_full_
scenic/projects/objectvivit/dataset_utils.py:324
↓ 1 callers
Method
apply
Returns transformed image.
scenic/projects/owl_vit/preprocessing/image_ops.py:89
↓ 1 callers
Method
apply
Return the transformed image. The op can consume the seed.
scenic/projects/owl_vit/preprocessing/image_ops.py:133
↓ 1 callers
Method
apply
Applies the op to the features.
scenic/projects/owl_vit/preprocessing/label_ops.py:379
↓ 1 callers
Method
apply_boxes
Returns transformed boxes.
scenic/projects/owl_vit/preprocessing/image_ops.py:93
↓ 1 callers
Method
apply_boxes
Returns transformed boxes.
scenic/projects/owl_vit/preprocessing/image_ops.py:137
↓ 1 callers
Method
apply_decoder
Apply the decoder for each modality.
scenic/projects/av_mae/vivit_multimodal.py:221
↓ 1 callers
Method
apply_decoder_projection
Project the unmasked tokens to decoder latent space dimension.
scenic/projects/av_mae/vivit_multimodal.py:413
↓ 1 callers
Method
apply_dense_layer
Apply the regressor for each modality.
scenic/projects/av_mae/vivit_multimodal.py:210
↓ 1 callers
Function
apply_encoder
Apply the encoder for each modality.
scenic/projects/av_mae/vivit_multimodal.py:501
↓ 1 callers
Function
apply_specaugment
Performs SpecAugment on the inputs. SpecAugment is a data augmentation technique from arXiv:1904.08779, that combines three transformations: -
scenic/projects/mbt/datasets/dataset_utils.py:24
↓ 1 callers
Method
apply_with_autoregressive_decoding
Apply inference with autoregressive decoding. Apply t5x autoregressive decoding with cache using either their beam_search or temperature_samp
scenic/projects/knowledge_visual_language/models/knowledge_fid.py:675
↓ 1 callers
Method
assertDictEqualRecursive
(self, actual, expected)
scenic/projects/unloc/model_utils_test.py:30
↓ 1 callers
Method
assertDictEqualRecursive
(self, actual, expected)
scenic/projects/unloc/eval_utils_test.py:111
↓ 1 callers
Function
attack_fn_targeted
(inputs, pertubation, target_labels)
scenic/projects/adversarialtraining/attacks/attack_losses.py:40
↓ 1 callers
Method
autoregressive_predict
Autoregressive decoding text tokens.
scenic/projects/pixel_llm/modeling/pixel_llm.py:1367
↓ 1 callers
Function
average_arp
(length)
scenic/projects/mbt/model_utils.py:350
↓ 1 callers
Function
average_arp
(length)
scenic/projects/vivit/model_utils.py:585
↓ 1 callers
Function
average_arp
(length)
scenic/projects/polyvit/model_utils.py:504
↓ 1 callers
Function
batch_gather
Performs a batched gather of the data. Args: x: A [batch, num_in, ...] JTensor of data to gather from. idx: A [batch, num_out] JTensor of d
scenic/projects/baselines/centernet/modeling/roi_head_utils.py:307
↓ 1 callers
Function
batch_random_blur
Random blur to all frames. All frames have a blur applied to them, or all do not. Args: images: `Tensor` of shape [timesteps, height, width,
scenic/dataset_lib/video_ops.py:344
↓ 1 callers
Function
bbox_to_coord
Converts normalized bounding box coordinates (xyxy) to integer. Args: bbox: Tensor of shape [..., 4] image_size: Tensor or list/tuple of tw
scenic/projects/pixel_llm/io/ops.py:91
↓ 1 callers
Function
beam_init
Initializes the beam search state data structure.
scenic/projects/avatar/decode.py:145
↓ 1 callers
Function
beam_init
Initializes the beam search state data structure.
scenic/projects/gerald/ger_eval.py:397
↓ 1 callers
Function
beam_init
Initializes the beam search state data structure.
scenic/projects/pixel_llm/auto_regressive_decode.py:157
↓ 1 callers
Function
beam_init
Initializes the beam search state data structure.
scenic/projects/streaming_dvc/modeling/auto_regressive_decode.py:160
↓ 1 callers
Function
beam_search_routine_with_different_code_lengths
Beam search for transformer machine translation. If `inputs` has non-zero entries, those values are not modified, i.e., the sampled values for th
scenic/projects/gerald/ger_eval.py:223
← previous
next →
801–900 of 4,921, ranked by callers