MCPcopy Create free account

hub / github.com/afford-motion/afford-motion / functions

Functions504 in github.com/afford-motion/afford-motion

↓ 25 callersFunction_extract_into_tensor
Extract values from a 1-D numpy array for a batch of indices. :param arr: the 1-D numpy array. :param timesteps: a tensor of indices int
diffusion/gaussian_diffusion.py:829
↓ 20 callersMethoddenormalize
Denormalize pose sequence (usually for visualization) Args: pose_seq: a numpy array of normalized pose sequence
utils/eval/get_data.py:82
↓ 17 callersMethodget
(self, name: str)
utils/registry.py:70
↓ 17 callersMethodwrite
Write data to board Args: write_dict: the data need to be write, which must be a dict, e.g., {'step': int, ...}
utils/io.py:145
↓ 13 callersFunctionskeleton_to_mesh
Convert skeleton to meshes Args: skeleton: skeleton array, joints position, <L, njoints, 3> kinematic_chain: kinematic chain, ca
utils/visualize.py:230
↓ 11 callersMethod__init__
(self, num_channels: int, widening_factor: int, bias: bool = True)
models/modules.py:652
↓ 10 callersMethod__init__
(self, query_dim, key_dim, value_dim)
utils/eval/modules.py:233
↓ 10 callersFunctionmkdir_if_not_exists
Make directory with the given dir_name Args: dir_name: input directory name that can be a path recursive: recursive directory cre
utils/io.py:38
↓ 9 callersFunctioncompute_repr_dimesion
(data_repr: str)
utils/misc.py:4
↓ 8 callersFunctiontranslation_to_transform
Convert translation to transform matrix
datasets/motionx.py:24
↓ 7 callersMethod__init__
Initialize the dataset Args: cfg: configuration object phase: phase string, can be 'train' and 'test'
datasets/motionx.py:35
↓ 6 callersFunctionfull_name
(dataset: str, scene_id: str, folder: bool=False)
datasets/motionx.py:18
↓ 6 callersFunctionmake_default_transform
Make default transform Args: transforms_list: the list of specified transforms transform_cfg: transform configuration R
datasets/transforms.py:200
↓ 6 callersMethodnormalize
Normalize pose sequence Args: pose_seq: a numpy array of pose sequence Return: Normalized p
datasets/motionx.py:149
↓ 5 callersMethod__init__
(self, cfg: DictConfig, *args, **kwargs)
models/cdm.py:414
↓ 5 callersMethod__init__
(self, in_planes, out_planes=None)
models/scene_models/pointtransformer.py:73
↓ 5 callersMethod_make_dec
(self, block, planes, blocks, share_planes=8, nsample=16, is_head=False)
models/scene_models/pointtransformer.py:158
↓ 5 callersMethod_make_enc
(self, block, planes, blocks, share_planes=8, stride=1, nsample=16)
models/scene_models/pointtransformer.py:150
↓ 5 callersMethod_make_enc
(self, block, planes, blocks, share_planes=8, stride=1, nsample=16)
models/scene_models/pointtransformer.py:234
↓ 4 callersMethod_make_dec
(self, block, planes, blocks, share_planes=8, nsample=16, is_head=False)
models/modules.py:89
↓ 4 callersMethod_make_dec
(self, block, planes, blocks, share_planes=8, nsample=16, is_head=False)
models/cdm.py:228
↓ 4 callersMethod_make_dec
(self, block, planes, blocks, share_planes=8, nsample=16, is_head=False)
models/cdm.py:341
↓ 4 callersMethod_make_enc
(self, block, planes, blocks, share_planes=8, stride=1, nsample=16)
models/modules.py:81
↓ 4 callersMethod_make_enc
(self, block, planes, blocks, share_planes=8, stride=1, nsample=16)
models/modules.py:144
↓ 4 callersMethod_make_enc
(self, block, planes, blocks, share_planes=8, stride=1, nsample=16)
models/cdm.py:220
↓ 4 callersMethod_make_enc
(self, block, planes, blocks, share_planes=8, stride=1, nsample=16)
models/cdm.py:333
↓ 4 callersMethod_scale_timesteps
(self, t)
diffusion/gaussian_diffusion.py:352
↓ 4 callersMethod_wrap_model
(self, model)
diffusion/respace.py:105
↓ 4 callersMethodbackward
(ctx, *output_grads)
diffusion/nn.py:161
↓ 4 callersFunctionget_meshes_from_smplx
(body_model_neutral, param)
utils/misc.py:26
↓ 4 callersMethodp_mean_variance
Apply the model to get p(x_{t-1} | x_t), as well as a prediction of the initial x, x_0. :param model: the model, which takes
diffusion/gaussian_diffusion.py:233
↓ 4 callersMethodq_posterior_mean_variance
Compute the mean and variance of the diffusion posterior: q(x_{t-1} | x_t, x_0)
diffusion/gaussian_diffusion.py:209
↓ 4 callersFunctionrender_meshes_to_animation
Render meshes to videos Args: save_dir: directory to save videos meshes: meshes to render appendix_meshes: appendix mesh
utils/visualize.py:339
↓ 3 callersMethod_get_pos_ohot
(self, pos)
utils/eval/word_vectorizer.py:53
↓ 3 callersMethod_make_ctx
(self, in_planes, planes)
models/cdm.py:349
↓ 3 callersMethodclose
Close the board and flush the log
utils/io.py:141
↓ 3 callersFunctioncreate_dataset
Create a `torch.utils.data.Dataset` object from configuration. Args: cfg: configuration object, dataset configuration phase: pha
datasets/base.py:7
↓ 3 callersFunctioncreate_model_and_diffusion
Create model and diffusion according to the configuration Args: cfg: configuration dict Return: model and diffusion
models/base.py:72
↓ 3 callersFunctionframe2mp4
Convert image frames to video, use ffmpeg to implement the convertion. Args: frames_path: image path, a string template mp4: sav
utils/visualize.py:398
↓ 3 callersMethodget_dataloader
Get dataloader
datasets/motionx.py:144
↓ 3 callersFunctionget_dataset_loader
(batch_size=32, split='train', **kwargs)
utils/eval/get_data.py:198
↓ 3 callersMethodjoints_to_params_batch
Converts joints to smplx params, Support batch size > 1 If optimize, the program will optimize the smplx parameters with the given joints po
utils/joints_to_smplx.py:99
↓ 3 callersFunctionload_ckpt
Load ckpt for current model Args: model: current model path: save path
utils/training.py:342
↓ 3 callersFunctionpadding_motion
Pad one motion sequence to the max_length
utils/joints_to_smplx.py:18
↓ 3 callersFunctionprocess_scene
(scene_path, out_filename)
prepare/process_scene.py:8
↓ 3 callersFunctionrecover_from_ric
(data, joints_num)
utils/visualize.py:491
↓ 2 callersMethod_do_register
(self, name: str, obj: Any)
utils/registry.py:44
↓ 2 callersMethod_extract_contact
Extract contact from contact array with different contact types
datasets/motionx.py:546
↓ 2 callersMethod_extract_contact
Extract contact from contact array with different contact types
datasets/humanml3d.py:464
↓ 2 callersMethod_predict_eps_from_xstart
(self, x_t, t, pred_xstart)
diffusion/gaussian_diffusion.py:346
↓ 2 callersMethod_predict_xstart_from_eps
(self, x_t, t, eps)
diffusion/gaussian_diffusion.py:329
↓ 2 callersMethod_vb_terms_bpd
Get a term for the variational lower-bound. The resulting units are bits (rather than nats, as one might expect). This allow
diffusion/gaussian_diffusion.py:710
↓ 2 callersFunctionapprox_standard_normal_cdf
A fast approximation of the cumulative distribution function of the standard normal.
diffusion/losses.py:42
↓ 2 callersFunctioncalculate_activation_statistics
Params: -- activation: num_samples x dim_feat Returns: -- mu: dim_feat -- sigma: dim_feat x dim_feat
utils/eval/metrics.py:60
↓ 2 callersFunctioncalculate_top_k
(mat, top_k)
utils/eval/metrics.py:22
↓ 2 callersFunctioncompute_loss
(pred_param, param, mask, input_joint,)
utils/joints_to_smplx.py:182
↓ 2 callersFunctioncompute_optimization_loss
(opt_joints, joints, opt_params=None)
utils/misc.py:127
↓ 2 callersFunctionconvert_smplx_to_pos
Convert raw smplx representation to pos representation Args: smplx: A tuple containing motion sequence and betas same_betas: Whe
prepare/smplx_to_vec.py:35
↓ 2 callersMethodcreate_board
Create a board for visualizing the curves Args: platform: the platform of board, e.g., 'TensorBoard', 'WanDB'
utils/io.py:128
↓ 2 callersFunctionencode_text_bert
Encode text using BERT model. Args: tokenizer: BERT tokenizer. bert_model: BERT model. raw_text: List of raw text.
models/functions.py:24
↓ 2 callersFunctionencode_text_clip
Encode text using CLIP model. Args: clip_model: CLIP model. raw_text: List of raw text. device: Device to use.
models/functions.py:62
↓ 2 callersFunctioneuclidean_distance_matrix
Params: -- matrix1: N1 x D -- matrix2: N2 x D Returns: -- dist: N1 x N2 dist[i, j] == distance(matrix
utils/eval/metrics.py:6
↓ 2 callersFunctionevaluation
(eval_wrapper, gt_loader, eval_motion_loaders, diversity_times, mm_num_times, run_mm=False)
utils/eval/eval_humanml.py:106
↓ 2 callersFunctionget_joints_and_meshes_from_smplx
(body_model_neutral, param)
utils/misc.py:59
↓ 2 callersFunctionget_lang_feat_dim_type
(model_name: str)
models/functions.py:86
↓ 2 callersMethodget_motion_embeddings
(self, motions, m_lens)
utils/eval/evaluator_wrapper.py:275
↓ 2 callersFunctionget_positional_encoding
Get positional encoding Args: max_len: maximum length of sequence time_emb_dim: dimension of time embedding Return:
models/modules.py:10
↓ 2 callersMethodload_and_freeze
(self, model_path)
utils/joints_to_smplx.py:86
↓ 2 callersFunctionload_and_freeze_bert_model
Load BERT model and freeze its parameters. Args: version: BERT model version. Return: BERT tokenizer and BERT model
models/functions.py:6
↓ 2 callersFunctionload_and_freeze_clip_model
Load CLIP model and freeze its parameters. Args: version: CLIP model version. Return: CLIP model.
models/functions.py:46
↓ 2 callersFunctionmean_flat
Take the mean over all non-batch dimensions.
diffusion/nn.py:87
↓ 2 callersMethodnormalize
Normalize pose sequence Args: pose_seq: a numpy array of pose sequence Return: Normalized p
datasets/humanml3d.py:139
↓ 2 callersFunctionpointtransformer_enc_repro
(**kwargs)
models/scene_models/pointtransformer.py:289
↓ 2 callersFunctionpointtransformer_seg_repro
(**kwargs)
models/scene_models/pointtransformer.py:285
↓ 2 callersFunctionqinv
(q)
visualize_h3d.py:41
↓ 2 callersFunctionqinv
(q)
utils/visualize.py:443
↓ 2 callersFunctionqrot
Rotate vector(s) v about the rotation described by quaternion(s) q. Expects a tensor of shape (*, 4) for q and a tensor of shape (*, 3) for v
visualize_h3d.py:47
↓ 2 callersFunctionqrot
Rotate vector(s) v about the rotation described by quaternion(s) q. Expects a tensor of shape (*, 4) for q and a tensor of shape (*, 3) for v
utils/visualize.py:449
↓ 2 callersMethodrotate
(self, t)
models/modules.py:182
↓ 2 callersMethodrun_loop
(self)
utils/training.py:118
↓ 2 callersFunctionsmplx_signed_distance
Compute signed distance between query points and mesh vertices. Args: object_points: (B, O, 3) query points in the mesh. smp
utils/evaluate.py:473
↓ 2 callersFunctionsum_flat
Take the sum over all non-batch dimensions.
diffusion/nn.py:93
↓ 1 callersMethod__init__
(self, model, timestep_map, rescale_timesteps, original_num_steps)
diffusion/respace.py:118
↓ 1 callersMethod__init__
Initialize the dataset Args: cfg: configuration object phase: phase string, can be 'train' and 'test'
datasets/humanml3d.py:18
↓ 1 callersMethod_anneal_lr
(self)
utils/training.py:84
↓ 1 callersMethod_anneal_lr
(self)
utils/training.py:263
↓ 1 callersMethod_extract_contact
Extract contact from contact array with different contact types
datasets/motionx.py:819
↓ 1 callersMethod_extract_contact
Extract contact from contact array with different contact types
datasets/humanml3d.py:696
↓ 1 callersMethod_freeze_scene_model_batchnorm
Freeze batchnorm in scene model if the model has scene model.
utils/training.py:111
↓ 1 callersMethod_load_and_sync_parameters
Load model from checkpoint if provided for resuming.
utils/training.py:55
↓ 1 callersMethod_load_and_sync_parameters
Load model from checkpoint if provided for resuming.
utils/training.py:234
↓ 1 callersMethod_load_datasets
Load the dataset
datasets/motionx.py:84
↓ 1 callersMethod_load_datasets
Load the dataset
datasets/motionx.py:478
↓ 1 callersMethod_load_datasets
Load the dataset
datasets/motionx.py:759
↓ 1 callersMethod_load_datasets
Load the original humanml3d dataset
datasets/humanml3d.py:48
↓ 1 callersMethod_load_datasets
Load the dataset
datasets/humanml3d.py:347
↓ 1 callersMethod_load_datasets
Load the original humanml3d dataset
datasets/humanml3d.py:604
↓ 1 callersMethod_load_optimizer_state
Load optimizer state from checkpoint if provided for resuming.
utils/training.py:70
↓ 1 callersMethod_load_optimizer_state
Load optimizer state from checkpoint if provided for resuming.
utils/training.py:249
↓ 1 callersMethod_load_split_ids
(self)
datasets/motionx.py:69
next →1–100 of 504, ranked by callers