MCPcopy Create free account

hub / github.com/MotrixLab/MotionDiffuse / functions

Functions231 in github.com/MotrixLab/MotionDiffuse

↓ 42 callersMethodto
(self, device)
text2motion/trainers/ddpm_trainer.py:145
↓ 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
text2motion/models/gaussian_diffusion.py:1131
↓ 18 callersMethodload
(self, model_dir)
text2motion/trainers/ddpm_trainer.py:169
↓ 12 callersMethodsave
(self, file_name, ep, total_it)
text2motion/trainers/ddpm_trainer.py:156
↓ 10 callersMethod__init__
(self, query_dim, key_dim, value_dim)
text2motion/datasets/evaluator_models.py:233
↓ 10 callersFunctionqrot_np
(q, v)
text2motion/utils/quaternion.py:134
↓ 8 callersMethod__init__
(self, latent_dim, ffn_dim, dropout, time_embed_dim)
text2motion/models/transformer.py:159
↓ 8 callersFunctionqmul_np
(q, r)
text2motion/utils/quaternion.py:128
↓ 6 callersFunctionmean_flat
Take the mean over all non-batch dimensions.
text2motion/models/gaussian_diffusion.py:156
↓ 5 callersMethodinverse_kinematics_np
(self, joints, face_joint_idx, smooth_forward=False)
text2motion/utils/skeleton.py:55
↓ 5 callersFunctionqinv_np
(q)
text2motion/utils/quaternion.py:23
↓ 5 callersFunctionqmul
Multiply quaternion(s) q with quaternion(s) r. Expects two equally-sized tensors of shape (*, 4), where * denotes any number of dimensions.
text2motion/utils/quaternion.py:33
↓ 4 callersMethod_scale_timesteps
(self, t)
text2motion/models/gaussian_diffusion.py:562
↓ 4 callersMethodget_offsets_joints_batch
(self, joints)
text2motion/utils/skeleton.py:33
↓ 4 callersFunctionget_opt
(opt_path, device)
text2motion/utils/get_opt.py:29
↓ 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
text2motion/models/gaussian_diffusion.py:443
↓ 4 callersMethodq_posterior_mean_variance
Compute the mean and variance of the diffusion posterior: q(x_{t-1} | x_t, x_0)
text2motion/models/gaussian_diffusion.py:419
↓ 4 callersMethodq_sample
Diffuse the data for a given number of diffusion steps. In other words, sample from q(x_t | x_0). :param x_start: the initi
text2motion/models/gaussian_diffusion.py:399
↓ 4 callersFunctionqinv
(q)
text2motion/utils/quaternion.py:16
↓ 4 callersFunctionqnormalize
(q)
text2motion/utils/quaternion.py:28
↓ 4 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
text2motion/utils/quaternion.py:54
↓ 3 callersMethod_get_pos_ohot
(self, pos)
text2motion/utils/word_vectorizer.py:53
↓ 3 callersMethod_predict_eps_from_xstart
(self, x_t, t, pred_xstart)
text2motion/models/gaussian_diffusion.py:556
↓ 3 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
text2motion/models/gaussian_diffusion.py:943
↓ 3 callersFunctionas_minutes
(s)
text2motion/utils/utils.py:38
↓ 3 callersFunctioncont6d_to_matrix
(cont6d)
text2motion/utils/quaternion.py:320
↓ 3 callersMethodgenerate_src_mask
(self, T, length)
text2motion/models/transformer.py:399
↓ 3 callersFunctionqbetween_np
find the quaternion used to rotate v0 to v1
text2motion/utils/quaternion.py:400
↓ 3 callersFunctionzero_module
Zero out the parameters of a module and return it.
text2motion/models/transformer.py:51
↓ 2 callersMethod_predict_xstart_from_eps
(self, x_t, t, eps)
text2motion/models/gaussian_diffusion.py:539
↓ 2 callersFunctionapprox_standard_normal_cdf
A fast approximation of the cumulative distribution function of the standard normal.
text2motion/models/gaussian_diffusion.py:192
↓ 2 callersFunctioncalculate_activation_statistics
Params: -- activation: num_samples x dim_feat Returns: -- mu: dim_feat -- sigma: dim_feat x dim_feat
text2motion/utils/metrics.py:60
↓ 2 callersFunctioncalculate_top_k
(mat, top_k)
text2motion/utils/metrics.py:22
↓ 2 callersFunctioncont6d_to_matrix_np
(cont6d)
text2motion/utils/quaternion.py:339
↓ 2 callersMethodencode_text
(self, text, device)
text2motion/models/transformer.py:380
↓ 2 callersFunctioneuclidean_distance_matrix
Params: -- matrix1: N1 x D -- matrix2: N2 x D Returns: -- dist: N1 x N2 dist[i, j] == distance(matrix
text2motion/utils/metrics.py:6
↓ 2 callersMethodeval_mode
(self)
text2motion/trainers/ddpm_trainer.py:153
↓ 2 callersFunctionfoot_detect
(positions, thres)
text2motion/utils/motion_process.py:43
↓ 2 callersMethodgenerate
(self, caption, m_lens, dim_pose, batch_size=1024)
text2motion/trainers/ddpm_trainer.py:108
↓ 2 callersFunctionget_cont6d_params
(positions)
text2motion/utils/motion_process.py:98
↓ 2 callersMethodget_motion_embeddings
(self, motions, m_lens)
text2motion/datasets/evaluator.py:429
↓ 2 callersMethodget_offsets_joints
(self, joints)
text2motion/utils/skeleton.py:43
↓ 2 callersFunctionget_rifke
Local pose
text2motion/utils/motion_process.py:68
↓ 2 callersFunctionnormal_kl
Compute the KL divergence between two gaussians. Shapes are automatically broadcasted, so batches can be compared to scalars, among other
text2motion/models/gaussian_diffusion.py:163
↓ 2 callersFunctionqeuler
Convert quaternion(s) q to Euler angles. Expects a tensor of shape (*, 4), where * denotes any number of dimensions. Returns a tensor of
text2motion/utils/quaternion.py:76
↓ 2 callersFunctionqfix
Enforce quaternion continuity across the time dimension by selecting the representation (q or -q) with minimal distance (or, equivalently, ma
text2motion/utils/quaternion.py:149
↓ 2 callersFunctionquaternion_to_cont6d_np
(quaternions)
text2motion/utils/quaternion.py:308
↓ 2 callersFunctionquaternion_to_matrix
Convert rotations given as quaternions to rotation matrices. Args: quaternions: quaternions with real part first, as tens
text2motion/utils/quaternion.py:274
↓ 2 callersMethodreal_len
(self)
text2motion/datasets/dataset.py:115
↓ 2 callersFunctionrecover_from_ric
(data, joints_num)
text2motion/utils/motion_process.py:401
↓ 2 callersFunctionrecover_root_rot_pos
(data)
text2motion/utils/motion_process.py:362
↓ 2 callersFunctionsave_image
(image_numpy, image_path)
text2motion/utils/utils.py:22
↓ 2 callersMethodtrain
(self, train_dataset)
text2motion/trainers/ddpm_trainer.py:176
↓ 1 callersMethod_predict_xstart_from_xprev
(self, x_t, t, xprev)
text2motion/models/gaussian_diffusion.py:546
↓ 1 callersMethod_prior_bpd
Get the prior KL term for the variational lower-bound, measured in bits-per-dim. This term can't be optimized, as it only de
text2motion/models/gaussian_diffusion.py:1055
↓ 1 callersMethod_warmed_up
(self)
text2motion/models/gaussian_diffusion.py:152
↓ 1 callersMethodbackward_G
(self)
text2motion/trainers/ddpm_trainer.py:128
↓ 1 callersFunctionbetas_for_alpha_bar
Create a beta schedule that discretizes the given alpha_t_bar function, which defines the cumulative product of (1-beta) over time from t = [
text2motion/models/gaussian_diffusion.py:256
↓ 1 callersFunctionbuild_dataloader
Build PyTorch DataLoader. In distributed training, each GPU/process has a dataloader. In non-distributed training, there is only one dataload
text2motion/datasets/dataloader.py:56
↓ 1 callersFunctionbuild_models
(opt, dim_pose)
text2motion/tools/train.py:18
↓ 1 callersFunctionbuild_models
(opt, dim_pose)
text2motion/tools/evaluation.py:19
↓ 1 callersFunctionbuild_models
(opt)
text2motion/tools/visualization.py:28
↓ 1 callersFunctionbuild_models
(opt)
text2motion/datasets/evaluator.py:354
↓ 1 callersFunctioncalculate_diversity
(activation, diversity_times)
text2motion/utils/metrics.py:73
↓ 1 callersFunctioncalculate_frechet_distance
Numpy implementation of the Frechet Distance. The Frechet distance between two multivariate Gaussians X_1 ~ N(mu_1, C_1) and X_2 ~ N(mu_2, C_2
text2motion/utils/metrics.py:95
↓ 1 callersFunctioncalculate_multimodality
(activation, multimodality_times)
text2motion/utils/metrics.py:84
↓ 1 callersMethodclip_norm
(network_list)
text2motion/trainers/ddpm_trainer.py:58
↓ 1 callersFunctioncompose_image
(img_list, col, row, img_size)
text2motion/utils/utils.py:97
↓ 1 callersMethodcondition_mean
Compute the mean for the previous step, given a function cond_fn that computes the gradient of a conditional log probability with res
text2motion/models/gaussian_diffusion.py:567
↓ 1 callersMethodcondition_score
Compute what the p_mean_variance output would have been, should the model's score function be conditioned by cond_fn. See co
text2motion/models/gaussian_diffusion.py:582
↓ 1 callersFunctioncreate_named_schedule_sampler
Create a ScheduleSampler from a library of pre-defined samplers. :param name: the name of the sampler. :param diffusion: the diffusion ob
text2motion/models/gaussian_diffusion.py:16
↓ 1 callersMethodddim_sample
Sample x_{t-1} from the model using DDIM. Same usage as p_sample().
text2motion/models/gaussian_diffusion.py:771
↓ 1 callersMethodddim_sample_loop_progressive
Use DDIM to sample from the model and yield intermediate samples from each timestep of DDIM. Same usage as p_sample_loop_pro
text2motion/models/gaussian_diffusion.py:893
↓ 1 callersFunctiondiscretized_gaussian_log_likelihood
Compute the log-likelihood of a Gaussian distribution discretizing to a given image. :param x: the target images. It is assumed that this
text2motion/models/gaussian_diffusion.py:200
↓ 1 callersFunctionevaluate_diversity
(activation_dict, file)
text2motion/tools/evaluation.py:113
↓ 1 callersFunctionevaluate_fid
(groundtruth_loader, activation_dict, file)
text2motion/tools/evaluation.py:87
↓ 1 callersFunctionevaluate_matching_score
(motion_loaders, file)
text2motion/tools/evaluation.py:33
↓ 1 callersFunctionevaluate_multimodality
(mm_motion_loaders, file)
text2motion/tools/evaluation.py:124
↓ 1 callersFunctionevaluation
(log_file)
text2motion/tools/evaluation.py:153
↓ 1 callersMethodforward
(self, batch_data, eval_mode=False)
text2motion/trainers/ddpm_trainer.py:67
↓ 1 callersMethodforward_kinematics_cont6d
(self, cont6d_params, root_pos, skel_joints=None, do_root_R=True)
text2motion/utils/skeleton.py:173
↓ 1 callersMethodforward_kinematics_np
(self, quat_params, root_pos, skel_joints=None, do_root_R=True)
text2motion/utils/skeleton.py:126
↓ 1 callersMethodgenerate_batch
(self, caption, m_lens, dim_pose)
text2motion/trainers/ddpm_trainer.py:91
↓ 1 callersMethodget_co_embeddings
(self, word_embs, pos_ohot, cap_lens, motions, m_lens)
text2motion/datasets/evaluator.py:408
↓ 1 callersFunctionget_dataset_motion_loader
(opt_path, batch_size, device)
text2motion/datasets/evaluator.py:277
↓ 1 callersFunctionget_metric_statistics
(values)
text2motion/tools/evaluation.py:146
↓ 1 callersFunctionget_motion_loader
(opt, batch_size, trainer, ground_truth_dataset, mm_num_samples, mm_num_repeats)
text2motion/datasets/evaluator.py:334
↓ 1 callersFunctionget_named_beta_schedule
Get a pre-defined beta schedule for the given name. The beta schedule library consists of beta schedules which remain similar in the lim
text2motion/models/gaussian_diffusion.py:229
↓ 1 callersFunctioninit
()
text2motion/utils/plot_script.py:35
↓ 1 callersMethodinitialize
(self)
text2motion/options/base_options.py:13
↓ 1 callersFunctionis_float
(numStr)
text2motion/utils/get_opt.py:8
↓ 1 callersFunctionis_number
(numStr)
text2motion/utils/get_opt.py:21
↓ 1 callersFunctionmotion_temporal_filter
(motion, sigma=1)
text2motion/utils/utils.py:125
↓ 1 callersMethodp_sample
Sample x_{t-1} from the model at the given timestep. :param model: the model to sample from. :param x: the current tensor at
text2motion/models/gaussian_diffusion.py:606
↓ 1 callersMethodp_sample_loop
Generate samples from the model. :param model: the model module. :param shape: the shape of the samples, (N, C, H, W).
text2motion/models/gaussian_diffusion.py:668
↓ 1 callersMethodp_sample_loop_progressive
Generate samples from the model and yield intermediate samples from each timestep of diffusion. Arguments are the same as p_
text2motion/models/gaussian_diffusion.py:718
↓ 1 callersMethodparse
(self)
text2motion/options/base_options.py:52
↓ 1 callersFunctionplot_3d_motion
(save_path, kinematic_tree, joints, title, figsize=(10, 10), fps=120, radius=4)
text2motion/utils/plot_script.py:26
↓ 1 callersFunctionplot_t2m
(data, result_path, npy_path, caption)
text2motion/tools/visualization.py:20
↓ 1 callersFunctionplot_xzPlane
(minx, maxx, miny, minz, maxz)
text2motion/utils/plot_script.py:43
next →1–100 of 231, ranked by callers