MCPcopy Create free account

hub / github.com/akanazawa/human_dynamics / functions

Functions299 in github.com/akanazawa/human_dynamics

↓ 162 callersMethodappend
Appends an omega. Args: omega (Bx85): [cams, poses, shapes].
src/omega.py:250
↓ 26 callersMethodload
(self)
src/data_loader_sequence.py:56
↓ 23 callersMethodupdate
(self, vars)
src/discriminators.py:83
↓ 16 callersFunctiondraw_skeleton
joints is 3 x 19. but if not will transpose it. 0: Right heel 1: Right knee 2: Right hip 3: Left hip 4: Left knee 5: Left
src/util/render/render_utils.py:38
↓ 15 callersMethodget_kps
Returns the keypoints at time t. Note that the shape is different for ground truth omegas and predicted omegas. Arg
src/omega.py:67
↓ 14 callersMethodget_shapes
Returns shapes at time t. Args: t (int). Returns: Shapes (Bx10).
src/omega.py:131
↓ 13 callersFunctionfloat_feature
Wrapper for inserting float features into Example proto.
src/datasets/common.py:173
↓ 11 callersMethodencode_jpeg
(self, image)
src/datasets/common.py:62
↓ 11 callersFunctionprocess_tensors
Wrapper function for processing sparse tensors outputted by variable length features. 1. Converts sparse tensors to dense tensors. 2
src/util/data_utils.py:478
↓ 10 callersMethodadd_scalar_summary
Helper function to add scalar summary. Args: summary_name (str). scalar_value (float).
src/trainer_sequence_fc.py:687
↓ 10 callersMethoddecode_jpeg
(self, image_data)
src/datasets/common.py:53
↓ 10 callersMethodget_poses_rot
Returns poses as rotation matrices at time t. Args: t (int). Returns: Poses (Bx24x3x3).
src/omega.py:95
↓ 8 callersMethodappend_batched
Appends multiple omegas. Args: omegas (BxTx85): [cams, poses, shapes].
src/omega.py:237
↓ 8 callersFunctionbatch_rodrigues
Theta is N x 3
src/tf_smpl/batch_lbs.py:42
↓ 8 callersMethodget_cams
Gets cams at time t. Args: t (int). Returns: Cams (Bx3).
src/omega.py:306
↓ 8 callersFunctionint64_feature
Wrapper for inserting int64 features into Example proto.
src/datasets/common.py:166
↓ 8 callersFunctionresize_img
(img, scale_factor)
src/util/common.py:7
↓ 7 callersMethodget_joints
Returns the joints at time t. Args: t (int). Returns: Joints (Bx25x3).
src/omega.py:55
↓ 6 callersFunctioncompute_errors_batched
Computes errors.
src/evaluation/eval.py:114
↓ 6 callersMethodcompute_smpl
Batch computation of vertices, joints, rotation matrices, and keypoints. Due to the overhead added to computation graph, call this on
src/omega.py:263
↓ 6 callersFunctionto_variable
(x)
src/util/render/nmr_renderer.py:243
↓ 5 callersFunctionconvert_to_example_temporal
Builds an Example proto for an image temporal example for N images. Note, no paired mosh data is available, so all poses and shape are None
src/datasets/common.py:187
↓ 5 callersFunctionget_smooth_bbox_params
Computes smooth bounding box parameters from keypoints: 1. Computes bbox by rescaling the person to be around 150 px. 2. Linearly int
src/util/smooth_bbox.py:10
↓ 5 callersMethodget_verts
(self)
src/omega.py:328
↓ 5 callersFunctionmkdir
(dir_path)
src/util/common.py:17
↓ 5 callersFunctionsave_seq_to_test_tfrecord
Saves a sequence to test format for rendering and evaluation. Args: out_name (str): Tfrecord filename. im_paths (list of len
src/datasets/make_test_tfrecords.py:22
↓ 5 callersFunctionto_float_tensor
(x)
src/util/render/nmr_renderer.py:249
↓ 4 callersFunctionbatch_pred_omega
Given B x T x * inputs, computes IEF on them by batching them as BT x *. if use_optcam is True, only outputs 72 or 82 dims. and appe
src/models.py:233
↓ 4 callersMethodcompute_all_phis
Computes the image features for any arbitrary sequence of images. Args: all_images (TxHxWx3). Returns:
src/datasets/resnet_extractor.py:74
↓ 4 callersFunctioncompute_gpu_smpl
(poses, shapes, get_joints=False)
src/evaluation/eval.py:68
↓ 4 callersFunctioncompute_loss_e_kp
L_{KP}=\sum_{i=1}^K v_i||x_i - (\hat{x_i}||_1 Args: kp_gt (NxKx3): Ground truth kp. kp_pred (NxKx2): Predicted kp. n
src/ops.py:41
↓ 4 callersMethodgather
Gathers a subset over time. Args: values (BxTx...): Tensor that we only need a subset of. indices (iterable)
src/omega.py:144
↓ 4 callersMethodmake_omega_pred
(self, use_optcam=False)
src/trainer_sequence_fc.py:481
↓ 4 callersFunctionmkdir
(dir_path)
src/datasets/upenn_to_tfrecords_video.py:432
↓ 4 callersFunctionrepeat_col
(col, num_repeat)
src/util/data_utils.py:560
↓ 4 callersFunctiontf_repeat
Repeats elements of a tensor. Tensorflow implementation of np.repeat. Args: tensor (tensor): Input tensor. repeat (int):
src/util/data_utils.py:765
↓ 4 callersFunctionundo_chumpy
(x)
src/tf_smpl/batch_smpl.py:22
↓ 4 callersFunctionupdate_dict_entries
Appends values in appender to list in accumulator. Args: accumulator (dict): Dict of lists with entries from appenders. appe
src/evaluation/eval_util.py:302
↓ 4 callersMethodview
For debug.
src/trainer_sequence_fc.py:1122
↓ 3 callersFunctionbytes_feature
Wrapper for inserting bytes features into Example proto.
src/datasets/common.py:180
↓ 3 callersFunctioncompute_loss_e_3d
(poses_gt, poses_pred, shapes_gt, shapes_pred, joints_gt, joints_pred, batch_size, has_g
src/ops.py:59
↓ 3 callersFunctioncompute_loss_mse
Computes the l2 loss between 3D params pred and gt for the data that has_gt3d is True. Parameters to compute loss over: 3Djoints: 14
src/ops.py:87
↓ 3 callersMethodcompute_losses_deltas
Computes all delta losses. Args: omegas_dict (dict): Dict mapping delta_t to Omegas. suffix_future (str): Su
src/trainer_sequence_fc.py:848
↓ 3 callersFunctionget_config
()
src/config.py:137
↓ 3 callersFunctionget_dims
(x)
src/util/render/nmr_renderer.py:39
↓ 3 callersFunctionmkdir
(dir_path)
src/datasets/insta_variety_to_tfrecords.py:518
↓ 3 callersFunctionmkdir
(dir_path)
src/datasets/video_in_the_wild_to_tfrecords.py:497
↓ 3 callersMethodpredict_all_images
Wrapper to predict entire sequence. Because of edge padding, images at edges will have low quality predictions since they do
src/evaluation/tester.py:260
↓ 3 callersFunctionremove_pads
Undos padding done by make_square.
src/util/render/nmr_renderer.py:507
↓ 3 callersMethodrotated
vert is N x 3, torch FloatTensor (or Variable)
src/util/render/nmr_renderer.py:176
↓ 2 callersMethod__init__
(self, config, batch_size=None)
src/omega.py:23
↓ 2 callersFunctionalign_by_pelvis
Assumes joints is N x 14 x 3 in LSP order. Then hips are: [3, 2] Takes mid point of these points, then subtracts it.
src/ops.py:167
↓ 2 callersFunctionalign_by_pelvis
Aligns joints by pelvis to be at origin. Assumes hips are index 3 and 2 of joints (14x3) in LSP order. Pelvis is midpoint of hips. Args:
src/evaluation/eval_util.py:158
↓ 2 callersFunctionbatch_orth_proj_idrot
X is N x num_points x 3 camera is N x 3 same as applying orth_proj_idrot to each N
src/tf_smpl/projection.py:16
↓ 2 callersFunctionclean_video
returns None if video is bad ow. returns cleaned/adjusted image_paths and gt2ds
src/datasets/upenn_to_tfrecords_video.py:291
↓ 2 callersFunctionclean_video
returns None if video is bad ow. returns cleaned/adjusted image_paths and gt2ds
src/datasets/insta_variety_to_tfrecords.py:273
↓ 2 callersFunctionclean_video
returns None if video is bad ow. returns cleaned/adjusted image_paths and gt2ds
src/datasets/video_in_the_wild_to_tfrecords.py:274
↓ 2 callersFunctioncompute_error_verts
Computes MPJPE over 6890 surface vertices. Args: verts_gt (Nx6989x3). verts_pred (Nx6989x3). Returns: error_ver
src/evaluation/eval_util.py:140
↓ 2 callersMethodcompute_losses_prior
(self)
src/trainer_sequence_fc.py:989
↓ 2 callersFunctioncompute_tracks
This script basically: 1. Extracts individual frames from mp4 since PoseFlow requires per frame images to be written. 2. Call Alph
extract_tracks.py:127
↓ 2 callersMethoddecode_png
(self, image_data)
src/datasets/common.py:76
↓ 2 callersFunctionencoder_fc3_dropout
3D inference module. 3 MLP layers (last is the output) With dropout on first 2. Input: - x: N x [|img_feat|, |3D_param|] - reuse
src/models.py:80
↓ 2 callersFunctionextend_dict_entries
Extends values in accumulator with appender.
src/evaluation/eval_util.py:278
↓ 2 callersFunctionflip_image
Flipping image and kp. kp is 3 x N! pose is 72D gt3d is 14 x 3
src/util/data_utils.py:601
↓ 2 callersFunctionget_hallucinator_model
(model_type='fc2_res')
src/models.py:26
↓ 2 callersFunctionget_image_encoder
Retrieves encoder fn for image and 3D
src/models.py:12
↓ 2 callersFunctionget_pred_path_name
Gets path name to store cached predictions. If directory doesn't exist, build it automatically. File structure: +-- PRED_DIR
src/evaluation/prediction.py:22
↓ 2 callersFunctionget_seq_labels
(data_dir, split)
src/datasets/insta_variety_to_tfrecords.py:444
↓ 2 callersFunctionget_seq_labels
(data_dir, split, video_list_file)
src/datasets/video_in_the_wild_to_tfrecords.py:445
↓ 2 callersFunctionget_sequences
(data_dir, split)
src/datasets/threedpw/read_3dpw.py:69
↓ 2 callersFunctionget_temporal_encoder
(model_type='AZ_FC2GN')
src/models.py:37
↓ 2 callersFunctionget_upenn2coco
Converts Upenn keypoints to 25 universal keypoints with toes. Note: UPenn does not have "heel". H36M has heel but not ankles.
src/datasets/upenn/read_upenn.py:36
↓ 2 callersFunctionget_verts
(fname)
src/datasets/threedpw/compute_neutral_shape.py:45
↓ 2 callersFunctionhamilton_product
Multiply qa by qb. Args: qa: B X N X 4 quaternions qb: B X N X 4 quaternions Returns: q_mult: B X N X 4
src/util/render/torch_utils.py:76
↓ 2 callersFunctionhmr_ief
Runs HMR-style IEF. Args: phi (Bx2048): Image features. omega_start (Bx85): Starting Omega as input to first IEF. sc
src/models.py:380
↓ 2 callersFunctionhmr_ief
Runs HMR-style IEF. Args: phi (Bx2048): Image features. omega_start (Bx85): Starting Omega as input to first IEF. sc
src/ops.py:270
↓ 2 callersFunctionmake_A
(R, t, name=None)
src/tf_smpl/batch_lbs.py:163
↓ 2 callersMethodmake_fetch_dict
(self, omegas, suffix='')
src/evaluation/tester.py:217
↓ 2 callersMethodmake_omega_pred
(self, use_optcam=False)
src/evaluation/tester.py:154
↓ 2 callersFunctionmake_square
Bc nmr only deals with square image, adds pad to the shorter side.
src/util/render/nmr_renderer.py:491
↓ 2 callersFunctionmake_video
output_path is the final mp4 name img_dir is where the images to make into video are saved.
src/evaluation/run_video.py:205
↓ 2 callersFunctionmean_of_dict_values
Flattens values of dictionary and computes the mean.
src/evaluation/eval_util.py:291
↓ 2 callersFunctionprint_summary
(errors_dict)
src/evaluation/eval.py:330
↓ 2 callersFunctionprocess_image
Processes an image, producing 224x224 crop. Args: im_path (str). bbox_param (3,): [cx, cy, scale]. visualize (bool).
src/evaluation/run_video.py:56
↓ 2 callersFunctionprocess_videos_test
seq_path is a path to the directory of a seq. each video becomes a tfrecord
src/datasets/upenn_to_tfrecords_video.py:376
↓ 2 callersMethodprune_variables
(self, variables, skip_prefixes)
src/trainer_sequence_fc.py:667
↓ 2 callersMethodread_data
Reads data from given filename queue and pre-processes the data. Args: filename_queue: Queue of filename strings.
src/data_loader_sequence.py:267
↓ 2 callersFunctionread_from_example
Returns data from an entry in test tfrecord. Args: serialized_ex (str). Returns: dict. Keys: N (1).
src/datasets/common.py:86
↓ 2 callersFunctionread_labels
Returns: - kp: N x 13 x 3 - is_train
src/datasets/upenn/read_upenn.py:103
↓ 2 callersFunctionread_poses
(path, n_frames=None, is_3d=False, joint_ids=range(32))
src/datasets/h36/read_human36m.py:231
↓ 2 callersFunctionrender_preds
Renders a 2x2 video: | mesh on input video | mesh on og image space | | 2d skel on input | rotated mesh | Also renders
src/evaluation/run_video.py:110
↓ 2 callersFunctionrun_on_video
Main driver. First extracts alphapose/posetrack in track_dir Then runs HMMR.
demo_video.py:194
↓ 2 callersFunctionsave_results
(config, all_dataset_results, json_path='')
src/evaluation/eval.py:341
↓ 2 callersFunctionsave_seq_to_tfrecord
(out_name, im_paths, gt2ds, gt3ds,
src/datasets/h36_to_tfrecords_video.py:329
↓ 2 callersMethodset_cams
Only used for opt_cam
src/omega.py:318
↓ 2 callersMethodupdate_E_vars
(self)
src/trainer_sequence_fc.py:675
↓ 2 callersMethodupdate_instance_vars
(self)
src/omega.py:231
↓ 2 callersFunctionvisualize_img
Visualizes the image with the ground truth keypoints and predicted keypoints on left and image with mesh on right. Keypoints should be i
src/util/render/nmr_renderer.py:265
↓ 2 callersMethodvisualize_strip
Visualizes the delta and hal predictions side-by-side. Each strip contains projected 2D skeleton on left and mesh overlaid on gt imag
src/trainer_sequence_fc.py:1284
↓ 1 callersMethod__call__
verts is |V| x 3 numpy/cuda torch Variable or B x V x 3 cams is 3D [s, tx, ty], numpy/cuda torch Variable or B x 3 cams is NO
src/util/render/nmr_renderer.py:81
next →1–100 of 299, ranked by callers