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
↓ 14 callers
Function
vector_norm
Return length, i.e. Euclidean norm, of ndarray along axis. >>> v = numpy.random.random(3) >>> n = vector_norm(v) >>> numpy.allclose(n, nu
utils/transformations.py:1688
↓ 13 callers
Method
forward
(self, img)
nnutils/mesh_net.py:82
↓ 10 callers
Function
convert2np
(x)
utils/bird_vis.py:177
↓ 10 callers
Function
unit_vector
Return ndarray normalized by length, i.e. Euclidean norm, along axis. >>> v0 = numpy.random.random(3) >>> v1 = unit_vector(v0) >>> numpy.
utils/transformations.py:1727
↓ 9 callers
Method
to_gpu
(self, device=0)
nnutils/nmr.py:35
↓ 8 callers
Method
__init__
(self, input_shape, n_blocks=4, nz_feat=100, batch_norm=True)
nnutils/mesh_net.py:73
↓ 7 callers
Method
diff_vp
(self, verts, cam=None, angle=90, axis=[1, 0,
utils/bird_vis.py:104
↓ 5 callers
Method
backward
(self, grad_out)
nnutils/nmr.py:122
↓ 5 callers
Function
convert_as
(src, trg)
nnutils/nmr.py:19
↓ 5 callers
Method
save
Saves the model.
nnutils/train_utils.py:109
↓ 4 callers
Function
asVariable
(x)
utils/bird_vis.py:162
↓ 4 callers
Function
get_iou_pck
(data_path, alphas)
benchmark/plot_curves.py:58
↓ 4 callers
Function
net_init
(net)
nnutils/net_blocks.py:211
↓ 4 callers
Function
quaternion_matrix
Return homogeneous rotation matrix from quaternion. >>> M = quaternion_matrix([0.99810947, 0.06146124, 0, 0]) >>> numpy.allclose(M, rotation_
utils/transformations.py:1254
↓ 3 callers
Method
__init__
(self)
nnutils/nmr.py:30
↓ 3 callers
Function
arcball_constrain_to_axis
Return sphere point perpendicular to axis.
utils/transformations.py:1639
↓ 3 callers
Method
compute_edgelength
(self, V)
nnutils/loss_utils.py:279
↓ 3 callers
Function
conv3d
(batch_norm, in_planes, out_planes, kernel_size=3, stride=1)
nnutils/net_blocks.py:119
↓ 3 callers
Function
fc
(batch_norm, nc_inp, nc_out)
nnutils/net_blocks.py:24
↓ 3 callers
Method
forward
(self, vertices, faces, textures=None)
nnutils/nmr.py:106
↓ 3 callers
Method
project_points
(self, verts, cams)
nnutils/nmr.py:173
↓ 3 callers
Method
symmetrize
Takes num_indept+num_sym verts and makes it num_indept + num_sym + num_sym Is identity if model is not symmetric
nnutils/mesh_net.py:302
↓ 2 callers
Method
__call__
verts is |V| x 3 cuda torch Variable cams is 7, cuda torch Variable Returns N x N x 3 numpy
utils/bird_vis.py:53
↓ 2 callers
Method
ambient_light_only
(self)
nnutils/nmr.py:165
↓ 2 callers
Function
arcball_map_to_sphere
Return unit sphere coordinates from window coordinates.
utils/transformations.py:1626
↓ 2 callers
Method
backward_mask
Compute gradient of vertices given mask gradients. Args: grad_masks: B X 256 X 256 numpy array Returns: grad_
nnutils/nmr.py:55
↓ 2 callers
Function
bilinear_init
(kernel_size=4)
nnutils/net_blocks.py:249
↓ 2 callers
Function
color_within_01
(vals)
utils/bird_vis.py:372
↓ 2 callers
Function
conv2d
(batch_norm, in_planes, out_planes, kernel_size=3, stride=1)
nnutils/net_blocks.py:47
↓ 2 callers
Function
convert_as
(src, trg)
nnutils/laplacian.py:23
↓ 2 callers
Method
forward_mask
Renders masks. Args: vertices: B X N X 3 numpy array faces: B X F X 3 numpy array Returns: masks:
nnutils/nmr.py:39
↓ 2 callers
Method
get_current_visuals
Should be implemented by the child class.
nnutils/train_utils.py:114
↓ 2 callers
Method
get_mean_shape
(self)
nnutils/mesh_net.py:320
↓ 2 callers
Function
hamilton_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
nnutils/geom_utils.py:88
↓ 2 callers
Function
hinge_loss
(loss, margin)
nnutils/loss_utils.py:111
↓ 2 callers
Function
mkdir
(path)
utils/visutil.py:108
↓ 2 callers
Method
predict
batch has B x C x H x W numpy
nnutils/predictor.py:105
↓ 2 callers
Function
quat_rotate
Rotate points by quaternions. Args: X: B X N X 3 points q: B X 4 quaternions Returns: X_rot: B X N X 3 (rotated poin
nnutils/geom_utils.py:116
↓ 2 callers
Method
set_light_dir
(self, direction, int_dir=0.8, int_amb=0.8)
utils/bird_vis.py:155
↓ 1 callers
Function
affine_matrix_from_points
Return affine transform matrix to register two point sets. v0 and v1 are shape (ndims, \*) arrays of at least ndims non-homogeneous coordinat
utils/transformations.py:889
↓ 1 callers
Function
arcball_nearest_axis
Return axis, which arc is nearest to point.
utils/transformations.py:1655
↓ 1 callers
Method
backward_img
Compute gradient of vertices given image gradients. Args: grad_images: B X 3? X 256 X 256 numpy array Returns:
nnutils/nmr.py:84
↓ 1 callers
Method
collect_outputs
(self)
nnutils/predictor.py:176
↓ 1 callers
Function
convert_as
(src, trg)
utils/bird_vis.py:168
↓ 1 callers
Function
cotangent
(V, F)
nnutils/laplacian.py:105
↓ 1 callers
Method
crop_image
(self, img, mask, bbox, kp, vis, sfm_pose)
data/base.py:133
↓ 1 callers
Function
decoder2d
Simple 3D encoder with nlayers. Args: nlayers: number of decoder layers nz_shape: number of bottleneck nc_input: num
nnutils/net_blocks.py:80
↓ 1 callers
Function
deconv2d
(in_planes, out_planes)
nnutils/net_blocks.py:61
↓ 1 callers
Function
deconv3d
(batch_norm, in_planes, out_planes)
nnutils/net_blocks.py:133
↓ 1 callers
Method
define_criterion
Should be implemented by the child class.
nnutils/train_utils.py:97
↓ 1 callers
Method
define_model
Should be implemented by the child class.
nnutils/test_utils.py:104
↓ 1 callers
Method
define_model
Should be implemented by the child class.
nnutils/train_utils.py:89
↓ 1 callers
Method
display_current_results
(self, visuals, epoch)
utils/visualizer.py:25
↓ 1 callers
Function
draw_kp
kp is 15 x 2 or 3 numpy. img can be either RGB or Gray Draws bird points.
utils/bird_vis.py:228
↓ 1 callers
Function
euler_from_matrix
Return Euler angles from rotation matrix for specified axis sequence. axes : One of 24 axis sequences as string or encoded tuple Note that m
utils/transformations.py:1112
↓ 1 callers
Function
euler_matrix
Return homogeneous rotation matrix from Euler angles and axis sequence. ai, aj, ak : Euler's roll, pitch and yaw angles axes : One of 24 axis
utils/transformations.py:1049
↓ 1 callers
Method
evaluate
Compute IOU and keypoint error
benchmark/evaluate.py:48
↓ 1 callers
Function
fc_stack
(nc_inp, nc_out, nlayers, use_bn=True)
nnutils/net_blocks.py:37
↓ 1 callers
Method
forward
(self, vertices, faces, cams, textures=None)
nnutils/nmr.py:177
↓ 1 callers
Method
forward
(self)
nnutils/nmr.py:240
↓ 1 callers
Method
forward
(self)
nnutils/predictor.py:113
↓ 1 callers
Method
forward
Should compute self.total_loss. To be implemented by the child class.
nnutils/train_utils.py:105
↓ 1 callers
Method
forward_img
(self, index)
data/base.py:65
↓ 1 callers
Method
forward_img
Renders masks. Args: vertices: B X N X 3 numpy array faces: B X F X 3 numpy array textures: B X F X T X T
nnutils/nmr.py:66
↓ 1 callers
Method
get_current_points
Should be implemented by the child class.
nnutils/train_utils.py:122
↓ 1 callers
Method
get_current_scalars
Should be implemented by the child class.
nnutils/train_utils.py:118
↓ 1 callers
Function
get_iou_curve
ious: N x 1
benchmark/plot_curves.py:43
↓ 1 callers
Function
get_pck_curve
kp_errs: N x 15 kp_vis: N x 15
benchmark/plot_curves.py:30
↓ 1 callers
Function
get_spherical_coords
(X)
utils/mesh.py:192
↓ 1 callers
Method
init_dataset
Should be implemented by the child class.
nnutils/test_utils.py:108
↓ 1 callers
Method
init_dataset
Should be implemented by the child class.
nnutils/train_utils.py:93
↓ 1 callers
Method
init_testing
(self)
nnutils/test_utils.py:116
↓ 1 callers
Method
init_training
(self)
nnutils/train_utils.py:126
↓ 1 callers
Function
kp2im
Input is numpy array or torch.cuda.Tensor img can be H x W, H x W x C, or C x H x W kp is |KP| x 2
utils/bird_vis.py:195
↓ 1 callers
Function
load_data
(data_path)
benchmark/plot_curves.py:53
↓ 1 callers
Method
load_network
(self, network, network_label, epoch_label)
nnutils/predictor.py:76
↓ 1 callers
Method
load_network
(self, network, network_label, epoch_label,
nnutils/test_utils.py:81
↓ 1 callers
Function
make_faces_symmetric
This reorders the faces, such that it has this order: F_indept - independent face ids F_right (x>0) F_left 1. For each fac
utils/mesh.py:63
↓ 1 callers
Method
mirror_image
(self, img, mask, kp, sfm_pose)
data/base.py:159
↓ 1 callers
Method
normalize_kp
(self, kp, sfm_pose, img_h, img_w)
data/base.py:121
↓ 1 callers
Method
plot_current_points
(self, points, disp_offset=10)
utils/visualizer.py:89
↓ 1 callers
Method
plot_current_scalars
(self, epoch, counter_ratio, opt, scalars)
utils/visualizer.py:73
↓ 1 callers
Function
plot_iou
(full_path, ms_path, full_path_gtcam, ms_path_gtcam, fig_path)
benchmark/plot_curves.py:67
↓ 1 callers
Function
preprocess_image
(img_path, img_size=256)
demo.py:32
↓ 1 callers
Method
print_current_scalars
(self, epoch, i, scalars)
utils/visualizer.py:98
↓ 1 callers
Function
quat_loss_geodesic
Geodesic rotation loss. Args: q1: N X 4 q2: N X 4 Returns: loss : N x 1
nnutils/loss_utils.py:117
↓ 1 callers
Function
quaternion_from_matrix
Return quaternion from rotation matrix. If isprecise is True, the input matrix is assumed to be a precise rotation matrix and a faster algori
utils/transformations.py:1281
↓ 1 callers
Function
quaternion_multiply
Return multiplication of two quaternions. >>> q = quaternion_multiply([4, 1, -2, 3], [8, -5, 6, 7]) >>> numpy.allclose(q, [28, -44, -14, 48])
utils/transformations.py:1366
↓ 1 callers
Function
quaternion_slerp
Return spherical linear interpolation between two quaternions. >>> q0 = random_quaternion() >>> q1 = random_quaternion() >>> q = quaterni
utils/transformations.py:1431
↓ 1 callers
Function
random_quaternion
Return uniform random unit quaternion. rand: array like or None Three independent random variables that are uniformly distributed
utils/transformations.py:1472
↓ 1 callers
Method
save_current_visuals
(self)
nnutils/test_utils.py:93
↓ 1 callers
Method
save_network
(self, network, network_label, epoch_label, gpu_id=None)
nnutils/train_utils.py:72
↓ 1 callers
Method
scale_image
(self, img, mask, kp, vis, sfm_pose)
data/base.py:143
↓ 1 callers
Method
set_bgcolor
(self, color)
utils/bird_vis.py:152
↓ 1 callers
Method
set_bgcolor
(self, color)
nnutils/nmr.py:170
↓ 1 callers
Method
set_input
(self, batch)
nnutils/predictor.py:85
↓ 1 callers
Method
set_input
Should be implemented by the child class.
nnutils/train_utils.py:101
↓ 1 callers
Function
teapot_deform_test
()
nnutils/nmr.py:219
↓ 1 callers
Method
test
(self)
benchmark/evaluate.py:125
↓ 1 callers
Method
train
(self)
nnutils/train_utils.py:138
next →
1–100 of 262, ranked by callers