MCPcopy Create free account

hub / github.com/akanazawa/cmr / functions

Functions262 in github.com/akanazawa/cmr

↓ 1 callersFunctiontriangle_direction_intersection
Finds where an origin-centered ray going in direction trg intersects a triangle. Args: tri: 3 X 3 vertex locations. tri[0, :] is 0th
utils/geometry.py:11
↓ 1 callersFunctionupconv2d
(in_planes, out_planes, mode='bilinear')
nnutils/net_blocks.py:68
↓ 1 callersFunctionvis_vert2kp
verts: N x 3 vert2kp: K x N For each keypoint, visualize its weights on each vertex. Base color is white, pick a color for each kp.
utils/bird_vis.py:303
↓ 1 callersFunctionvisualize
(img, outputs, renderer)
demo.py:53
↓ 1 callersMethodvisualize
(self, outputs, batch)
benchmark/evaluate.py:82
Method__call__
(self, verts)
nnutils/loss_utils.py:269
Method__call__
(self, verts)
nnutils/loss_utils.py:321
Method__call__
Input: img_pred, img_gt: B x 3 x H x W mask_pred, mask_gt: B x H x W
nnutils/loss_utils.py:354
Method__call__
Pred and target are Variables. If normalize is on, scales images between [-1, 1] Assumes the inputs are in range [0, 1].
nnutils/perceptual_loss.py:21
Method__getitem__
(self, index)
data/base.py:184
Method__init__
Initialize virtual trackball control. initial : quaternion or rotation matrix
utils/transformations.py:1538
Method__init__
(self, opt)
utils/visualizer.py:10
Method__init__
(self, img_size, faces, t_size=3)
utils/bird_vis.py:24
Method__init__
(self, opts, filter_key=None)
data/base.py:53
Method__init__
(self, opts, filter_key=None)
data/cub.py:50
Method__init__
(self, dim)
nnutils/net_blocks.py:16
Method__init__
(self, renderer)
nnutils/nmr.py:102
Method__init__
(self, img_size=256)
nnutils/nmr.py:146
Method__init__
(self)
nnutils/nmr.py:235
Method__init__
(self, opts)
nnutils/predictor.py:32
Method__init__
(self, faces)
nnutils/laplacian.py:34
Method__init__
(self, verts, edges2verts, margin=2, use_bad_edge=False, use_l2=False)
nnutils/loss_utils.py:240
Method__init__
(self, faces)
nnutils/loss_utils.py:313
Method__init__
(self)
nnutils/loss_utils.py:350
Method__init__
(self, opts)
nnutils/test_utils.py:65
Method__init__
(self, model='net', net='alex', use_gpu=True)
nnutils/perceptual_loss.py:15
Method__init__
(self, n_blocks=4)
nnutils/mesh_net.py:42
Method__init__
(self, nz_feat, uv_sampler, opts, img_H=64, img_W=128, n_upconv=5, nc_init=256, predict_flow=False, symmetric=
nnutils/mesh_net.py:97
Method__init__
(self, nz_feat, num_verts)
nnutils/mesh_net.py:143
Method__init__
(self, nz_feat, nz_rot=4, classify_rot=False)
nnutils/mesh_net.py:161
Method__init__
(self, nz)
nnutils/mesh_net.py:176
Method__init__
(self, nz, orth=True)
nnutils/mesh_net.py:192
Method__init__
(self, nz_feat=100, num_verts=1000)
nnutils/mesh_net.py:206
Method__init__
(self, input_shape, opts, nz_feat=100, num_kps=15, sfm_mean_shape=None)
nnutils/mesh_net.py:223
Method__init__
(self, opts)
nnutils/train_utils.py:57
Method__len__
(self)
data/base.py:181
Function_import_module
Try import all public attributes from module into global namespace. Existing attributes with name clashes are renamed with prefix. Attributes
utils/transformations.py:1893
Functionangle_between_vectors
Return angle between vectors. If directed is False, the input vectors are interpreted as undirected axes, i.e. the maximum angle is pi/2.
utils/transformations.py:1807
Functionappend_obj
(mf_handle, vertices, faces)
utils/mesh.py:236
Methodbackward
Just L'g = Lg Args: grad_out: B x N x 3 Returns: grad_vertices: B x N x 3
nnutils/laplacian.py:89
Functionbase_loader
(d_set_func, batch_size, opts, filter_key=None, shuffle=True)
data/base.py:214
Functioncamera_loss
cam_* are B x 7, [sc, tx, ty, quat] Losses are in similar magnitude so one margin is ok.
nnutils/loss_utils.py:96
Functionclip_matrix
Return matrix to obtain normalized device coordinates from frustum. The frustum bounds are axis-aligned along x (left, right), y (bottom, top
utils/transformations.py:596
Functioncompose_matrix
Return transformation matrix from sequence of transformations. This is the inverse of the decompose_matrix function. Sequence of transformat
utils/transformations.py:809
Functioncompute_dt
Computes distance transform of mask.
utils/image.py:94
Functioncompute_dt_barrier
Computes barrier distance transform of mask.
utils/image.py:102
Functioncompute_edges2verts
Returns a list: [A, B, C, D] the 4 vertices for each edge.
utils/mesh.py:158
Functioncompute_uvsampler
For this mesh, pre-computes the UV coordinates for F x T x T points. Returns F x T x T x 2
utils/mesh.py:207
Functioncompute_vert2kp
(verts, mean_shape)
utils/mesh.py:175
Functionconcatenate_matrices
Return concatenation of series of transformation matrices. >>> M = numpy.random.rand(16).reshape((4, 4)) - 0.5 >>> numpy.allclose(M, concaten
utils/transformations.py:1854
Methodconstrain
Return state of constrain to axis mode.
utils/transformations.py:1584
Functioncreate_sphere
(n_subdivide=3)
utils/mesh.py:13
Functioncrop
Crops a region from the image corresponding to the bbox. If some regions specified go outside the image boundaries, the pixel values are set
utils/image.py:60
Functioncross_product
Cross product of va by vb. Args: qa: B X N X 3 vectors qb: B X N X 3 vectors Returns: q_mult: B X N X 3 vectors
nnutils/geom_utils.py:63
Functiondata_loader
(opts, shuffle=True)
data/cub.py:78
Functiondecoder3d
Simple 3D encoder with nlayers. Args: nlayers: number of decoder layers nz_shape: number of bottleneck nc_input: num
nnutils/net_blocks.py:178
Functiondecompose_matrix
Return sequence of transformations from transformation matrix. matrix : array_like Non-degenerative homogeneous transformation matrix
utils/transformations.py:724
Methoddefine_criterion
(self)
experiments/shape.py:109
Methoddefine_model
(self)
benchmark/evaluate.py:30
Methoddefine_model
(self)
experiments/shape.py:56
Functiondeform_l2reg
l2 norm on V = B x N x 3
nnutils/loss_utils.py:182
Functiondiagnose_network
(net, name='network')
utils/visutil.py:57
Methoddown
Set initial cursor window coordinates and pick constrain-axis.
utils/transformations.py:1593
Methoddrag
Update current cursor window coordinates.
utils/transformations.py:1603
Functionencoder3d
Simple 3D encoder with nlayers. Args: nlayers: number of encoder layers use_bn: whether to use batch_norm nc_input:
nnutils/net_blocks.py:148
Functionentropy_loss
Input is K x N Each column is a prob of vertices being the one for k-th keypoint. We want this to be sparse = low entropy.
nnutils/loss_utils.py:190
Functioneuler_from_quaternion
Return Euler angles from quaternion for specified axis sequence. >>> angles = euler_from_quaternion([0.99810947, 0.06146124, 0, 0]) >>> numpy
utils/transformations.py:1170
Functionexec_main
()
nnutils/nmr.py:189
Methodforward
(self)
experiments/shape.py:151
Methodforward
(self, x)
nnutils/net_blocks.py:12
Methodforward
(self, x)
nnutils/net_blocks.py:20
Methodforward
(self, V)
nnutils/laplacian.py:41
Methodforward
(self, x)
nnutils/mesh_net.py:47
Methodforward
(self, feat)
nnutils/mesh_net.py:117
Methodforward
(self, feat)
nnutils/mesh_net.py:151
Methodforward
(self, feat)
nnutils/mesh_net.py:166
Methodforward
(self, feat)
nnutils/mesh_net.py:180
Methodforward
(self, feat)
nnutils/mesh_net.py:199
Methodforward
(self, feat)
nnutils/mesh_net.py:213
Methodforward
(self, img)
nnutils/mesh_net.py:293
Methodget_current_points
(self)
experiments/shape.py:280
Methodget_current_scalars
(self)
experiments/shape.py:286
Methodget_current_visuals
(self)
experiments/shape.py:226
Functionidentity_matrix
Return 4x4 identity/unit matrix. >>> I = identity_matrix() >>> numpy.allclose(I, numpy.dot(I, I)) True >>> numpy.sum(I), numpy.trace(
utils/transformations.py:207
Functioninfo
Print methods and doc strings. Takes module, class, list, dictionary, or string.
utils/visutil.py:74
Methodinit_dataset
(self)
benchmark/evaluate.py:41
Methodinit_dataset
(self)
experiments/shape.py:97
Functioninverse_matrix
Return inverse of square transformation matrix. >>> M0 = random_rotation_matrix() >>> M1 = inverse_matrix(M0.T) >>> numpy.allclose(M1, nu
utils/transformations.py:1838
Functionis_same_quaternion
Return True if two quaternions are equal.
utils/transformations.py:1886
Functionis_same_transform
Return True if two matrices perform same transformation. >>> is_same_transform(numpy.identity(4), numpy.identity(4)) True >>> is_same_tra
utils/transformations.py:1870
Functionkp_data_loader
(batch_size, opts)
data/cub.py:82
Functionkp_l2_loss
L2 loss between visible keypoints. \Sum_i [0.5 * vis[i] * (kp_gt[i] - kp_pred[i])^2] / (|vis|)
nnutils/loss_utils.py:201
Methodload_network
(self, network, network_label, epoch_label, network_dir=None)
nnutils/train_utils.py:81
Functionlsgan_loss
DELETE ME. Label 0=fake, 1=real. score_real is B x 1, score for real samples score_fake is B x 1, score for fake samples Returns
nnutils/loss_utils.py:215
Functionmain
(_)
demo.py:101
Functionmain
(_)
benchmark/plot_curves.py:105
Functionmain
(_)
benchmark/run_evals.py:28
Functionmain
(_)
benchmark/evaluate.py:185
Functionmain
(_)
experiments/shape.py:304
Functionmake_symmetric
Assumes that the input mesh {V,F} is perfectly symmetric Splits the mesh along the X-axis, and reorders the mesh s.t. (so this is reflect
utils/mesh.py:20
← previousnext →101–200 of 262, ranked by callers