Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/akanazawa/cmr
/ functions
Functions
262 in github.com/akanazawa/cmr
⨍
Functions
262
◇
Types & classes
30
↓ 1 callers
Function
triangle_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 callers
Function
upconv2d
(in_planes, out_planes, mode='bilinear')
nnutils/net_blocks.py:68
↓ 1 callers
Function
vis_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 callers
Function
visualize
(img, outputs, renderer)
demo.py:53
↓ 1 callers
Method
visualize
(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
Function
angle_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
Function
append_obj
(mf_handle, vertices, faces)
utils/mesh.py:236
Method
backward
Just L'g = Lg Args: grad_out: B x N x 3 Returns: grad_vertices: B x N x 3
nnutils/laplacian.py:89
Function
base_loader
(d_set_func, batch_size, opts, filter_key=None, shuffle=True)
data/base.py:214
Function
camera_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
Function
clip_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
Function
compose_matrix
Return transformation matrix from sequence of transformations. This is the inverse of the decompose_matrix function. Sequence of transformat
utils/transformations.py:809
Function
compute_dt
Computes distance transform of mask.
utils/image.py:94
Function
compute_dt_barrier
Computes barrier distance transform of mask.
utils/image.py:102
Function
compute_edges2verts
Returns a list: [A, B, C, D] the 4 vertices for each edge.
utils/mesh.py:158
Function
compute_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
Function
compute_vert2kp
(verts, mean_shape)
utils/mesh.py:175
Function
concatenate_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
Method
constrain
Return state of constrain to axis mode.
utils/transformations.py:1584
Function
create_sphere
(n_subdivide=3)
utils/mesh.py:13
Function
crop
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
Function
cross_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
Function
data_loader
(opts, shuffle=True)
data/cub.py:78
Function
decoder3d
Simple 3D encoder with nlayers. Args: nlayers: number of decoder layers nz_shape: number of bottleneck nc_input: num
nnutils/net_blocks.py:178
Function
decompose_matrix
Return sequence of transformations from transformation matrix. matrix : array_like Non-degenerative homogeneous transformation matrix
utils/transformations.py:724
Method
define_criterion
(self)
experiments/shape.py:109
Method
define_model
(self)
benchmark/evaluate.py:30
Method
define_model
(self)
experiments/shape.py:56
Function
deform_l2reg
l2 norm on V = B x N x 3
nnutils/loss_utils.py:182
Function
diagnose_network
(net, name='network')
utils/visutil.py:57
Method
down
Set initial cursor window coordinates and pick constrain-axis.
utils/transformations.py:1593
Method
drag
Update current cursor window coordinates.
utils/transformations.py:1603
Function
encoder3d
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
Function
entropy_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
Function
euler_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
Function
exec_main
()
nnutils/nmr.py:189
Method
forward
(self)
experiments/shape.py:151
Method
forward
(self, x)
nnutils/net_blocks.py:12
Method
forward
(self, x)
nnutils/net_blocks.py:20
Method
forward
(self, V)
nnutils/laplacian.py:41
Method
forward
(self, x)
nnutils/mesh_net.py:47
Method
forward
(self, feat)
nnutils/mesh_net.py:117
Method
forward
(self, feat)
nnutils/mesh_net.py:151
Method
forward
(self, feat)
nnutils/mesh_net.py:166
Method
forward
(self, feat)
nnutils/mesh_net.py:180
Method
forward
(self, feat)
nnutils/mesh_net.py:199
Method
forward
(self, feat)
nnutils/mesh_net.py:213
Method
forward
(self, img)
nnutils/mesh_net.py:293
Method
get_current_points
(self)
experiments/shape.py:280
Method
get_current_scalars
(self)
experiments/shape.py:286
Method
get_current_visuals
(self)
experiments/shape.py:226
Function
identity_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
Function
info
Print methods and doc strings. Takes module, class, list, dictionary, or string.
utils/visutil.py:74
Method
init_dataset
(self)
benchmark/evaluate.py:41
Method
init_dataset
(self)
experiments/shape.py:97
Function
inverse_matrix
Return inverse of square transformation matrix. >>> M0 = random_rotation_matrix() >>> M1 = inverse_matrix(M0.T) >>> numpy.allclose(M1, nu
utils/transformations.py:1838
Function
is_same_quaternion
Return True if two quaternions are equal.
utils/transformations.py:1886
Function
is_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
Function
kp_data_loader
(batch_size, opts)
data/cub.py:82
Function
kp_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
Method
load_network
(self, network, network_label, epoch_label, network_dir=None)
nnutils/train_utils.py:81
Function
lsgan_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
Function
main
(_)
demo.py:101
Function
main
(_)
benchmark/plot_curves.py:105
Function
main
(_)
benchmark/run_evals.py:28
Function
main
(_)
benchmark/evaluate.py:185
Function
main
(_)
experiments/shape.py:304
Function
make_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
← previous
next →
101–200 of 262, ranked by callers