MCPcopy Create free account

hub / github.com/apple/ml-4m / functions

Functions1,193 in github.com/apple/ml-4m

↓ 1 callersMethodget_binary_masks
Creates the binary mask of each instance in the sample.
fourm/data/modality_transforms.py:517
↓ 1 callersMethodget_border_functions
Creates and returns a function `fn` using crop region coordinates given in crop_points. `fn` receives two input points x and xn and returns a
fourm/data/modality_transforms.py:422
↓ 1 callersFunctionget_bytes_io
(path)
run_training_vqcontrolnet.py:480
↓ 1 callersFunctionget_bytes_io
(path)
run_training_divae.py:483
↓ 1 callersFunctionget_bytes_io
(path)
run_training_vqvae.py:543
↓ 1 callersFunctionget_bytes_io
(path)
fourm/utils/s3_utils.py:81
↓ 1 callersMethodget_class_and_file
Extracts the class and file name from a path.
fourm/data/multimodal_dataset_folder.py:324
↓ 1 callersMethodget_corrupt_samples
(self, corrupt_samples_log, task_ext)
save_vq_tokens.py:98
↓ 1 callersFunctionget_dataset
(args, text_tokenizer)
run_generation.py:408
↓ 1 callersFunctionget_feature_extractor
(args)
save_vq_tokens.py:188
↓ 1 callersFunctionget_feature_extractor
Creates and returns feature extractor from arguments.
run_training_vqvae.py:434
↓ 1 callersFunctionget_image_tokenizer
Load a pretrained image tokenizer from a checkpoint. Args: tokenizer_id (str): ID of the tokenizer to load (name of the checkpoint f
fourm/vq/__init__.py:8
↓ 1 callersFunctionget_keypoints_rectangle
Compute rectangle enclosing keypoints above the threshold. Args: keypoints (np.array): Keypoint array of shape (N, 3). thresh
fourm/utils/hmr2_utils/hmr2/utils/render_openpose.py:16
↓ 1 callersFunctionget_model
Creates and returns model from arguments
run_training_vqcontrolnet.py:361
↓ 1 callersFunctionget_model
Creates and returns model from arguments.
run_training_divae.py:363
↓ 1 callersFunctionget_model
Creates and returns model from arguments.
run_training_vqvae.py:349
↓ 1 callersFunctionget_model
Creates and returns model from arguments
run_training_4m.py:354
↓ 1 callersFunctionget_model
Creates and returns model from arguments
run_training_4m_fsdp.py:359
↓ 1 callersFunctionget_num_layer_for_beit
(var_name, num_max_layer)
fourm/utils/optim_factory.py:43
↓ 1 callersFunctionget_num_layer_for_fm
Layers go from 0 to (num_enc + num_dec + 1) where 0 is the encoder embedding and (num_enc + num_dec + 1) is the projection following the decoder
fourm/utils/optim_factory.py:62
↓ 1 callersFunctionget_num_layer_for_vit
(var_name, num_max_layer)
fourm/utils/optim_factory.py:27
↓ 1 callersMethodget_num_layers_decoder
(self)
fourm/models/fm.py:221
↓ 1 callersMethodget_num_layers_encoder
(self)
fourm/models/fm.py:218
↓ 1 callersMethodget_num_layers_encoder
(self)
fourm/models/fm_vit.py:163
↓ 1 callersFunctionget_parameter_groups
( model, weight_decay=1e-5, skip_list=(), get_num_layer=None, get_layer_scale=None, decoder_d
fourm/utils/optim_factory.py:111
↓ 1 callersFunctionget_parameters
(m)
fourm/utils/optim_factory.py:186
↓ 1 callersFunctionget_perceptual_loss
Creates and returns perceptual loss from arguments.
run_training_vqvae.py:413
↓ 1 callersFunctionget_pil_resample_mode
Returns the PIL resampling mode for the given resample mode string. Args: resample_mode: Resampling mode string
fourm/data/modality_transforms.py:49
↓ 1 callersMethodget_query_points
(self)
fourm/data/modality_transforms.py:1239
↓ 1 callersFunctionget_state_dict
(model, unwrap_fn=unwrap_model)
fourm/utils/timm/model.py:24
↓ 1 callersMethodget_target_tokens
(self, sample, query_points)
fourm/data/modality_transforms.py:1255
↓ 1 callersFunctionget_world_size
()
fourm/utils/dist.py:54
↓ 1 callersFunctiongopen_with_s3
gopen from webdataset, but with s3 support
fourm/utils/s3_utils.py:88
↓ 1 callersFunctiongumbel_noise
(t)
fourm/vq/quantizers/quantize_lucid.py:46
↓ 1 callersMethodhumanposes_crop_and_resize
Crop and resize human poses (and their bounding boxes)
fourm/data/modality_transforms.py:1044
↓ 1 callersMethodimage_dim_to_string
(self, metadata, key, bin_size=32)
fourm/data/modality_transforms.py:932
↓ 1 callersMethodimage_hflip
(self, img: Image, flip: bool)
fourm/data/modality_transforms.py:307
↓ 1 callersMethodimage_mask
Applies input and target masking to an image tensor Args: tensor: Image tensor num_tokens: Number of tokens in the te
fourm/data/masking.py:236
↓ 1 callersMethodindices_to_embedding
(self, indices)
fourm/vq/quantizers/quantize_memcodes.py:54
↓ 1 callersMethodinit
Initialize parts of embedding module that are dependent on dimension of tokens. Should be called when setting up FourM. Args
fourm/models/encoder_embeddings.py:53
↓ 1 callersMethodinit
Initialize parts of module that are dependent on dimension of tokens. Should be called when setting up FourM. Args:
fourm/models/encoder_embeddings.py:152
↓ 1 callersMethodinit
Initialize parts of embedding module that are dependent on dimension of tokens. Should be called when setting up FourM. Args
fourm/models/encoder_embeddings.py:348
↓ 1 callersMethodinit
Initialize parts of embedding module that are dependent on dimension of tokens. Should be called when setting up FourM. Args
fourm/models/decoder_embeddings.py:56
↓ 1 callersMethodinit
Initialize parts of module that are dependent on dimension of tokens. Should be called when setting up FourM. Args:
fourm/models/decoder_embeddings.py:187
↓ 1 callersMethodinit_embed_
(self, data)
fourm/vq/quantizers/quantize_lucid.py:223
↓ 1 callersMethodinit_embed_
(self, data)
fourm/vq/quantizers/quantize_lucid.py:349
↓ 1 callersMethodinit_weights
Weight initialization following MAE's initialization scheme
fourm/vq/models/uvit.py:810
↓ 1 callersMethodinit_weights
Weight initialization following MAE's initialization scheme
fourm/models/fm.py:182
↓ 1 callersMethodinit_weights
Weight initialization following MAE's initialization scheme
fourm/models/fm_vit.py:127
↓ 1 callersMethodinitialize_parameters
(self)
fourm/utils/clip/model.py:363
↓ 1 callersMethodinput_image
Applies masking for an image given as input Args: tensor: Image tensor num_tokens: Number of tokens in the tensor
fourm/data/masking.py:601
↓ 1 callersMethodinput_sequence
Applies masking for a sequence given as input Args: sequence_str: Sequence string max_tokens: Maximum number of token
fourm/data/masking.py:643
↓ 1 callersMethodinput_token_budget
Sample a token budget for the input Args: num_input_tokens: Number of tokens in the input Returns: Token bud
fourm/data/masking.py:181
↓ 1 callersMethodint_metadata_to_string
(self, metadata, key)
fourm/data/modality_transforms.py:937
↓ 1 callersMethodinterpolate_pos_encoding
(self, x, w, h)
fourm/utils/clip/model.py:285
↓ 1 callersFunctioniou
Calculates iou of the input bounding boxes
fourm/utils/plotting_utils.py:559
↓ 1 callersFunctionis_model_in_modules
Check if a model exists within a subset of modules Args: model_name (str) - name of model to check module_names (tuple, list, set)
fourm/utils/timm/registry.py:117
↓ 1 callersFunctionis_valid_file
(x: str)
fourm/data/multimodal_dataset_folder.py:74
↓ 1 callersFunctionlaplace_smoothing
(x, n_categories, eps = 1e-5)
fourm/vq/quantizers/quantize_lucid.py:59
↓ 1 callersFunctionlinear_temp_schedule
Temperature that decays the temperature inversely proportional to the token schedule.
fourm/utils/generation.py:97
↓ 1 callersFunctionload
(module, prefix='')
fourm/utils/checkpoint.py:52
↓ 1 callersMethodload_from_pretrained
(self, name="vgg_lpips")
fourm/vq/percept_losses/lpips.py:82
↓ 1 callersFunctionload_tokenizers
(args, device)
run_generation.py:350
↓ 1 callersFunctionmain
(args)
save_vq_tokens.py:199
↓ 1 callersFunctionmain
Main function for training and evaluation.
run_training_vqcontrolnet.py:419
↓ 1 callersFunctionmain
(args)
run_generation.py:491
↓ 1 callersFunctionmain
Main function for training and evaluation.
run_training_divae.py:424
↓ 1 callersFunctionmain
Main function for training and evaluation.
run_training_vqvae.py:460
↓ 1 callersFunctionmain
(args)
run_training_4m.py:390
↓ 1 callersFunctionmain
(args)
run_training_4m_fsdp.py:395
↓ 1 callersFunctionmake_empty_mod_dict
(modality_info)
fourm/data/unified_datasets.py:488
↓ 1 callersFunctionmake_rotation
(rx=0, ry=0, rz=0, order="xyz")
fourm/utils/hmr2_utils/hmr2/utils/renderer.py:46
↓ 1 callersFunctionmake_safe
(name)
fourm/utils/timm/model_builder.py:19
↓ 1 callersFunctionmake_translation
(t)
fourm/utils/hmr2_utils/hmr2/utils/renderer.py:43
↓ 1 callersMethodmanual_bin_metadata_to_string
(self, metadata, key)
fourm/data/modality_transforms.py:947
↓ 1 callersFunctionmap_locations
Converts v0, v1, v2, v3 textual representation into int. When tokens=True, inp is mapped to its corresponding token id.
fourm/utils/plotting_utils.py:540
↓ 1 callersMethodmap_semseg_values
(self, sample)
fourm/data/modality_transforms.py:335
↓ 1 callersFunctionmask_out_samples
Optionally mask out invalid regions and concat mask to images. Useful when tokenizing simulated data that contains unlabeled regions. Args:
run_training_vqvae.py:857
↓ 1 callersMethodmask_to_tensor
(self, img)
fourm/data/modality_transforms.py:576
↓ 1 callersFunctionmaster_params_to_model_params
Copy the master parameter data back into the model parameters.
fourm/vq/models/unet/fp16_util.py:85
↓ 1 callersFunctionmaster_params_to_state_dict
( model, param_groups_and_shapes, master_params, use_fp16 )
fourm/vq/models/unet/fp16_util.py:115
↓ 1 callersMethodmerge_sequences
(self, mod_dict, pred_ids, target_mod, text_tokenizer, default_sentinel="[S_1]")
fourm/models/generate.py:550
↓ 1 callersMethodmetadata_to_string
(self, metadata, keys: List[str] = None)
fourm/data/modality_transforms.py:956
↓ 1 callersFunctionmodel_entrypoint
Fetch a model entrypoint for specified model name
fourm/utils/timm/registry.py:104
↓ 1 callersFunctionmodel_grads_to_master_grads
Copy the gradients from the model parameters into the master parameters from make_master_params().
fourm/vq/models/unet/fp16_util.py:72
↓ 1 callersMethodmulti_guided_maskgit_step_batched
(self, uncond_dict, cond_dicts, cond_weights, target_mod, num_select,
fourm/models/generate.py:705
↓ 1 callersMethodmulti_guided_roar_step_batched
(self, uncond_dict, cond_dicts, cond_weights, target_mod, num_select,
fourm/models/generate.py:817
↓ 1 callersMethodno_weight_decay
(self)
fourm/utils/hmr2_utils/hmr2/models/backbones/vit.py:322
↓ 1 callersMethodnormal_to_tensor
(self, img)
fourm/data/modality_transforms.py:295
↓ 1 callersFunctiononex_temp_schedule
Abitrary temperature schedule for one over x
fourm/utils/generation.py:83
↓ 1 callersMethodorder_and_filter_bboxes
(self, bboxes)
fourm/data/modality_transforms.py:697
↓ 1 callersMethodorder_bboxes_by_score
(bboxes)
fourm/data/modality_transforms.py:652
↓ 1 callersFunctionorthgonal_loss_fn
(t)
fourm/vq/quantizers/quantize_lucid.py:171
↓ 1 callersFunctionpad_shape
(shape, size, dim = 0)
fourm/vq/quantizers/quantize_lucid.py:72
↓ 1 callersFunctionpair
(t)
fourm/vq/models/unet/unet.py:41
↓ 1 callersFunctionparam_grad_or_zeros
(param)
fourm/vq/models/unet/fp16_util.py:161
↓ 1 callersMethodprepare_input
Preprocesses the input image tensor before feeding it to the encoder. If self.undo_std, the input is first denormalized from the ImageNet
fourm/vq/vqvae.py:269
↓ 1 callersFunctionquat_to_rotmat
Convert quaternion representation to rotation matrix. Args: quat (torch.Tensor) of shape (B, 4); 4 <===> (w, x, y, z). Returns:
fourm/utils/hmr2_utils/hmr2/utils/geometry.py:30
↓ 1 callersFunctionrand_augment_ops
(magnitude=10, hparams=None, transforms=None)
fourm/utils/timm/auto_augment.py:617
↓ 1 callersFunctionrand_augment_transform
Create a RandAugment transform :param config_str: String defining configuration of random augmentation. Consists of multiple sections separa
fourm/utils/timm/auto_augment.py:639
← previousnext →401–500 of 1,193, ranked by callers