MCPcopy Create free account

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

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

↓ 1 callersFunctionevaluate
(train_state: train_utils.TrainState, step: int, valid_iter: Iterator[Batch], nu
scenic/projects/adatape/adatape_vit/adatape_trainer.py:497
↓ 1 callersMethodevaluate
Run evaluation.
scenic/projects/streaming_dvc/cococap_eval.py:67
↓ 1 callersFunctionevaluate_caption_scores
Compute the mean NLP metrics over the given IOU thresholds. Args: ground_truths_filtered: Filtered list of ground truth captions for each th
scenic/projects/vid2seq/dvc_eval.py:273
↓ 1 callersFunctionevaluate_detections
Compute the mean P/R between the predicted and ground truth segments. Args: predicted_segments: A numpy array of shape [K x 2] containing the p
scenic/projects/vid2seq/dvc_eval.py:133
↓ 1 callersFunctionevaluate_single_dense_captions
Compute both the P/R and NLP metrics for the given predictions. Args: predicted_segments: A numpy arrays, of shape [K x 2] containing the p
scenic/projects/vid2seq/dvc_eval.py:508
↓ 1 callersFunctionexponential_decay_scheduler
Gives a scaling factor based on scheduling with an exponential decay. Args: step: int; Current step. decay_steps: int; Number of steps to d
scenic/train_lib/lr_schedules.py:131
↓ 1 callersMethodextract_classifications
Extracts the label for each bbox, and sorts the results by score. More specifically, after extracting each bbox's label, the bboxes and score
scenic/dataset_lib/coco_dataset/coco_eval.py:220
↓ 1 callersFunctionextract_graph_from_file
Extract 2hop graphs for all pages in each file. Args: kg_graph: the global KG (i.e. WikiData Knowledge Graph), stored as dict. i: index of
scenic/projects/knowledge_visual_language/data/wikidata/extract_wikigraph.py:30
↓ 1 callersFunctionextract_graph_mp
Use multiprocessing to parallize graph extraction. Args: kg_graph: the global KG (i.e. WikiData Knowledge Graph), stored as dict. n_pool: n
scenic/projects/knowledge_visual_language/data/wikidata/extract_wikigraph.py:53
↓ 1 callersFunctionextract_tubelets_from_video
Extracts tubelets from videos for use as regression targets. Args: x: Input tensor of shape [batch, time, height, width, channels] tubelet_
scenic/projects/av_mae/base_model.py:64
↓ 1 callersFunctionf1_score_with_invalid
Compute F1 score, but any prediction != 0 or 1 is counted as incorrect. Args: target: Numpy array of targets, either 0 or 1 (binary label space
scenic/projects/baselines/bert/train_utils.py:41
↓ 1 callersMethodfake_batch
(self)
scenic/projects/av_mae/tests/test_trainer.py:171
↓ 1 callersFunctionfake_boxes
Sample boxes in [x, y, x, y] format in un-normalized image coordinates.
scenic/projects/baselines/detr/tests/test_transforms.py:31
↓ 1 callersFunctionfavor_attention
Computes bidirectional (noncausal) normalized FAVOR+ attention. Computes FAVOR+ linear attention from Performers,based on: "Rethinking Attention
scenic/projects/performer/performer.py:684
↓ 1 callersFunctionfilter_shape_image
Remove shapes that are not visible in the image. Args: config: configuration object (hyper-parameters for shape generation) imagedict: shap
scenic/projects/boundary_attention/kaleidoshapes/make_kaleido_image.py:458
↓ 1 callersFunctionfind_states
(opt_state, cls)
scenic/train_lib/optax.py:37
↓ 1 callersFunctionfixed
(hyper, **kw)
scenic/projects/baselines/plainvit/configs/transfer_standard4_plainvit_config.py:167
↓ 1 callersFunctionflatten_beam_dim
Flattens the first two dimensions of a non-scalar array.
scenic/projects/gerald/ger_eval.py:378
↓ 1 callersFunctionflatten_beam_dim
Flattens the first two dimensions of a non-scalar array.
scenic/projects/pixel_llm/auto_regressive_decode.py:138
↓ 1 callersFunctionflatten_beam_dim
Flattens the first two dimensions of a non-scalar array.
scenic/projects/streaming_dvc/modeling/auto_regressive_decode.py:141
↓ 1 callersFunctionformat_predictions
Formats predictions to COCO annotation format. Args: scores: [num_images, num_instances] array of confidence scores. labels: [num_images, n
scenic/projects/owl_vit/evaluator.py:337
↓ 1 callersFunctionformat_text
Tokenize raw string with tokenizer.
scenic/projects/avatar/datasets/dataset_utils.py:1069
↓ 1 callersMethodforward_backbones
(self, images, padding_mask, preprocess, train)
scenic/projects/pixel_llm/modeling/pixel_llm.py:391
↓ 1 callersMethodforward_caption_with_track
Generate captions using augmented features from tracking. Args: object_features: (batch_size, num_objs, res, res, D) matched_text: (b
scenic/projects/densevoc/modeling/densevoc_model.py:292
↓ 1 callersMethodforward_detection
(self, visual_features_dict, batch, train=False)
scenic/projects/pixel_llm/modeling/pixel_llm.py:481
↓ 1 callersMethodforward_global_video_caption
Forward global video captioning. Args: features: list of arrays: FPN features. video_caption_tokens: 1 x N x max_caption_length. Only
scenic/projects/densevoc/modeling/densevoc_model.py:203
↓ 1 callersMethodforward_prompt_encoder_adapter
( self, image_embeddings, image_size, outputs, batch, *, train=False
scenic/projects/pixel_llm/modeling/pixel_llm.py:521
↓ 1 callersMethodforward_tracking
Forward tracking head. The images from the batch are from the same video. Args: last_proposals: (batch_size, num_objs, 4) object
scenic/projects/densevoc/modeling/densevoc_model.py:387
↓ 1 callersMethodfuse_video_text
Fuses video and text tokens. Args: video_tokens: A 3D float tensor of shape (batch_size, sequence_length, channels) representing th
scenic/projects/unloc/model.py:214
↓ 1 callersFunctiongather_flatten
Flatten leading two dims, e.g. to get global batch after all_gather.
scenic/projects/unloc/eval_utils.py:344
↓ 1 callersFunctiongather_topk_beams
Gathers the top-k beam slices given by score_or_log_prob array. Args: nested: pytree of arrays or scalars (the latter ignored). score_or_lo
scenic/projects/avatar/decode.py:105
↓ 1 callersFunctiongather_topk_beams
Gathers the top-k beam slices given by score_or_log_prob array. Args: nested: pytree of arrays or scalars (the latter ignored). score_or_lo
scenic/projects/gerald/ger_eval.py:451
↓ 1 callersFunctiongather_topk_beams
Gathers the top-k beam slices given by score_or_log_prob array. Args: nested: pytree of arrays or scalars (the latter ignored). score_or_lo
scenic/projects/pixel_llm/auto_regressive_decode.py:211
↓ 1 callersFunctiongather_topk_beams
Gathers the top-k beam slices given by score_or_log_prob array. Args: nested: pytree of arrays or scalars (the latter ignored). score_or_lo
scenic/projects/streaming_dvc/modeling/auto_regressive_decode.py:214
↓ 1 callersFunctiongaussian_blur
Blurs the given image with separable convolution. Args: image: Tensor of shape [height, width, channels] and dtype float to blur. kernel_s
scenic/projects/loca/ops.py:378
↓ 1 callersFunctiongeneralized_kernel_feature_creator
Constructs kernel features for fast generalized attention. Args: data: input for which features are computes projection_matrix: matrix used
scenic/projects/fast_vit/model_utils.py:863
↓ 1 callersMethodgenerate
Automatically generate masks for all objects. This function is from the original SamAutomaticMaskGenerator at https://github.com/facebookrese
scenic/projects/baselines/segment_anything/modeling/sam.py:238
↓ 1 callersFunctiongenerate_fake_example
Generate a random COCO example.
scenic/projects/baselines/detr/tests/test_util.py:40
↓ 1 callersFunctiongenerate_parity_eval_sample
Generate one sample for parity task. Args: batch_size: Determines the batch size. seq_len: Determines the sequence length of parity vector.
scenic/projects/adatape/dataset/parity_dataset.py:48
↓ 1 callersFunctiongenerate_parity_sample
Generate one sample for parity task. Args: batch_size: Determines the batch size. seq_len: Determines the sequence length of parity vector.
scenic/projects/adatape/dataset/parity_dataset.py:24
↓ 1 callersFunctiongenerate_selector
(p, bsz)
scenic/dataset_lib/video_ops.py:359
↓ 1 callersFunctiongenerate_sequence_example
Generate a sequence example.
scenic/projects/vid2seq/generate_from_file.py:108
↓ 1 callersMethodget_2d_array
(self)
scenic/projects/fast_vit/model_utils.py:1021
↓ 1 callersFunctionget_adversarial_fn
(adversarial_fn_name)
scenic/projects/adversarialtraining/attacks/attack_compute.py:117
↓ 1 callersMethodget_alpha_omega_vertex
Maps output of model to alpha, omega, vertex.
scenic/projects/boundary_attention/helpers/junction_functions.py:343
↓ 1 callersFunctionget_average_batch_size
Computes average batch size.
scenic/projects/polyvit/train_utils.py:68
↓ 1 callersFunctionget_average_batch_size
Computes average batch size.
scenic/projects/vid2seq/train_utils.py:24
↓ 1 callersMethodget_avg_wedge_feature
Find smoothed patches of the image along with wedge colors. Args: input_features: Input features with shape [N, C, H, W] global_featu
scenic/projects/boundary_attention/helpers/junction_functions.py:218
↓ 1 callersFunctionget_axial_1d_input
Converts 2d inputs to 1d for axial attention.
scenic/projects/fast_vit/model_utils.py:357
↓ 1 callersFunctionget_axial_2d_input
Converts 1d inputs back to 2d after axial attention.
scenic/projects/fast_vit/model_utils.py:370
↓ 1 callersMethodget_boundary_consistency_term
Compute the boundary consistency loss. Args: dists: Array of shape [N, 2, R, R, H', W'] with samples of the two distance functions fo
scenic/projects/boundary_attention/field_of_junctions_jax/field_of_junctions.py:840
↓ 1 callersFunctionget_class_colors
Returns a [num_classes, 3] array of colors for the model output labels.
scenic/dataset_lib/cityscapes_dataset.py:208
↓ 1 callersFunctionget_class_names
Returns a list with the class names of the model output labels.
scenic/dataset_lib/cityscapes_dataset.py:214
↓ 1 callersFunctionget_class_proportions
Computes class proportions in case of label imbalance.
scenic/projects/pointcloud/shapenet_dataset.py:59
↓ 1 callersFunctionget_class_proportions
Returns a [num_classes] array of pixel frequency proportions.
scenic/dataset_lib/cityscapes_dataset.py:219
↓ 1 callersFunctionget_coco_cap_eval_source
Returns the COCO Caption eval source.
scenic/projects/pixel_llm/configs/bert/pixel_llm_bert_trace.py:184
↓ 1 callersFunctionget_coco_cap_eval_source
Returns the COCO Caption eval source.
scenic/projects/pixel_llm/configs/bert/pixel_llm_bert_trace_ref_densecap_llava.py:183
↓ 1 callersFunctionget_coco_cap_eval_source
Returns the COCO Caption eval source.
scenic/projects/pixel_llm/configs/bert/pixel_llm_bert_trace_refseg_densecap_llava.py:83
↓ 1 callersFunctionget_coco_cap_eval_source
Returns the COCO Caption eval source.
scenic/projects/pixel_llm/configs/t5/pixel_llm_t5_trace.py:184
↓ 1 callersFunctionget_coco_cap_eval_source
Returns the COCO Caption eval source.
scenic/projects/pixel_llm/configs/t5/pixel_llm_t5_trace_ref_densecap_llava.py:183
↓ 1 callersFunctionget_coco_cap_eval_source
Returns the COCO Caption eval source.
scenic/projects/pixel_llm/configs/t5/pixel_llm_t5_trace_refseg_densecap_llava.py:83
↓ 1 callersFunctionget_coco_cap_train_source
Returns the COCO Caption train source.
scenic/projects/pixel_llm/configs/bert/pixel_llm_bert_trace.py:145
↓ 1 callersFunctionget_coco_cap_train_source
Returns the COCO Caption train source.
scenic/projects/pixel_llm/configs/bert/pixel_llm_bert_trace_ref_densecap_llava.py:146
↓ 1 callersFunctionget_coco_cap_train_source
Returns the COCO Caption train source.
scenic/projects/pixel_llm/configs/t5/pixel_llm_t5_trace.py:145
↓ 1 callersFunctionget_coco_cap_train_source
Returns the COCO Caption train source.
scenic/projects/pixel_llm/configs/t5/pixel_llm_t5_trace_ref_densecap_llava.py:146
↓ 1 callersFunctionget_coco_ref_eval_source
Returns the RefCOCO/RefCOCOg/RefCOCO+/ eval source.
scenic/projects/pixel_llm/configs/bert/pixel_llm_bert_trace_ref_densecap_llava.py:323
↓ 1 callersFunctionget_coco_ref_eval_source
Returns the RefCOCO/RefCOCOg/RefCOCO+/ train source.
scenic/projects/pixel_llm/configs/bert/pixel_llm_bert_densecap.py:130
↓ 1 callersFunctionget_coco_ref_eval_source
Returns the RefCOCO/RefCOCOg/RefCOCO+/ eval source.
scenic/projects/pixel_llm/configs/bert/pixel_llm_bert_trace_refseg_densecap_llava.py:223
↓ 1 callersFunctionget_coco_ref_eval_source
Returns the RefCOCO/RefCOCOg/RefCOCO+/ train source.
scenic/projects/pixel_llm/configs/t5/pixel_llm_t5_densecap.py:130
↓ 1 callersFunctionget_coco_ref_eval_source
Returns the RefCOCO/RefCOCOg/RefCOCO+/ eval source.
scenic/projects/pixel_llm/configs/t5/pixel_llm_t5_trace_ref_densecap_llava.py:323
↓ 1 callersFunctionget_coco_ref_eval_source
Returns the RefCOCO/RefCOCOg/RefCOCO+/ eval source.
scenic/projects/pixel_llm/configs/t5/pixel_llm_t5_trace_refseg_densecap_llava.py:223
↓ 1 callersFunctionget_coco_ref_train_source
Returns the RefCOCO/RefCOCOg/RefCOCO+/ train source.
scenic/projects/pixel_llm/configs/bert/pixel_llm_bert_refseg.py:25
↓ 1 callersFunctionget_coco_ref_train_source
Returns the RefCOCO/RefCOCOg/RefCOCO+/ train source.
scenic/projects/pixel_llm/configs/bert/pixel_llm_bert_trace_refseg_densecap_llava.py:119
↓ 1 callersFunctionget_coco_ref_train_source
Returns the RefCOCO/RefCOCOg/RefCOCO+/ train source.
scenic/projects/pixel_llm/configs/t5/pixel_llm_t5_refseg.py:25
↓ 1 callersFunctionget_coco_ref_train_source
Returns the RefCOCO/RefCOCOg/RefCOCO+/ train source.
scenic/projects/pixel_llm/configs/t5/pixel_llm_t5_trace_refseg_densecap_llava.py:119
↓ 1 callersMethodget_color_consistency_term
Compute the spatial color consistency loss. Args: dists: Array of shape [N, 2, R, R, H', W'] with samples of the two distance functio
scenic/projects/boundary_attention/field_of_junctions_jax/field_of_junctions.py:868
↓ 1 callersFunctionget_config
()
scenic/projects/av_mae/tests/test_mbt.py:29
↓ 1 callersFunctionget_config
Returns the ViT experiment configuration for ImageNet. This file is a copy of config/imagenet_augreg_matvit_config.py.
scenic/projects/matvit/classification_eval_main.py:52
↓ 1 callersFunctionget_confusion_matrix
Computes the confusion matrix that is necessary for global mIoU.
scenic/projects/pointcloud/segmentation_trainer.py:208
↓ 1 callersFunctionget_confusion_matrix
Computes confusion matrix from predictions. Args: labels: [n_batch] or [n_batch, n_classes] array. In the latter case, labels are assumed
scenic/projects/vivit/train_utils.py:334
↓ 1 callersFunctionget_contrastive_labels
Labels the inner products compute from `compute_inners`. Given an output from `_compute_inners` and text_mask, returns: -labels: indicates where
scenic/projects/verbs_in_action/losses.py:137
↓ 1 callersFunctionget_d_prime
(auc_roc_value)
scenic/projects/av_mae/evaluation_lib.py:24
↓ 1 callersFunctionget_data_split
Return a (sub)split adapted to a given host.
scenic/projects/layout_denoise/datasets/dataset.py:154
↓ 1 callersFunctionget_dataset
Returns a tf.data.Dataset and class names.
scenic/projects/owl_vit/evaluator.py:153
↓ 1 callersFunctionget_dataset
Returns a generator for the audiovisual dataset.
scenic/projects/vid2seq/datasets/dense_video_captioning_tfrecord_dataset.py:402
↓ 1 callersFunctionget_dataset
Returns dataset given config.
scenic/projects/streaming_dvc/main.py:57
↓ 1 callersFunctionget_dataset_by_name
(name)
scenic/projects/boundary_attention/dataset_lib/dataloader.py:34
↓ 1 callersFunctionget_dataset_config
Returns dataset config.
scenic/projects/pointcloud/pointcloud_dataset.py:49
↓ 1 callersFunctionget_dataset_config
Returns dataset config.
scenic/projects/pointcloud/s3dis_dataset.py:43
↓ 1 callersFunctionget_dataset_config
Returns dataset config.
scenic/projects/pointcloud/shapenet_dataset.py:54
↓ 1 callersFunctionget_dataset_tfds
Data provider.
scenic/dataset_lib/dataset_utils.py:610
↓ 1 callersFunctionget_dataset_weights
(crt_step)
scenic/projects/layout_denoise/trainer.py:606
↓ 1 callersFunctionget_datasets
Creates dataset from config.
scenic/projects/vid2seq/datasets/dense_video_captioning_tfrecord_dataset.py:561
↓ 1 callersFunctionget_default_adversarial_config
Get default adversarial config.
scenic/projects/adversarialtraining/configs/imagenet_train/imagenet_regvit_config.py:31
↓ 1 callersFunctionget_default_dataset_config
Gets default configs for wit_internal (en) dataset.
scenic/projects/knowledge_visual_language/data/cc12m_table_dataset.py:38
↓ 1 callersFunctionget_default_dataset_config
Gets default configs for wit_internal (en) dataset.
scenic/projects/knowledge_visual_language/data/wiki_image_text_generation_dataset.py:69
↓ 1 callersFunctionget_default_dataset_config
Gets default configs for CC12M dataset.
scenic/projects/knowledge_visual_language/data/cc12m_generation_dataset.py:43
↓ 1 callersFunctionget_default_dataset_config
Gets default configs for argus dataset.
scenic/projects/knowledge_visual_language/data/web_image_text_generation_dataset.py:38
↓ 1 callersFunctionget_default_dataset_config
Gets default configs for wit_internal (en) dataset.
scenic/projects/knowledge_visual_language/data/wit_table_dataset.py:66
↓ 1 callersFunctionget_default_dataset_config
Gets default configs for wit_internal (en) dataset.
scenic/projects/knowledge_visual_language/data/vqa_table_dataset.py:69
← previousnext →1,101–1,200 of 4,921, ranked by callers