SYMBOL INDEX (289 symbols across 24 files) FILE: data/smal_base.py class BaseDataset (line 59) | class BaseDataset(Dataset): method __init__ (line 64) | def __init__(self, opts, filter_key=None): method forward_img (line 84) | def forward_img(self, index): method normalize_kp (line 244) | def normalize_kp(self, kp, img_h, img_w, update_vis=False): method get_camera_projection_matrix (line 260) | def get_camera_projection_matrix(self, f, c): method my_project_points (line 272) | def my_project_points(self, ptsw, P): method my_anti_project_points (line 281) | def my_anti_project_points(self, ptsi, P): method get_model_trans_for_cropped_image (line 294) | def get_model_trans_for_cropped_image(self, trans, bbox, flength, img_... method crop_image (line 326) | def crop_image(self, img, mask, bbox, kp, vis, camera_params, model_tr... method scale_image (line 365) | def scale_image(self, img, mask, kp, vis, camera_params, occ_map, orig... method __len__ (line 407) | def __len__(self): method __getitem__ (line 410) | def __getitem__(self, index): function base_loader (line 459) | def base_loader(d_set_func, batch_size, opts, filter_key=None, shuffle=T... FILE: data/zebra.py class ZebraDataset (line 47) | class ZebraDataset(base_data.BaseDataset): method __init__ (line 52) | def __init__(self, opts, filter_key=None, filter_name=None): function data_loader (line 128) | def data_loader(opts, shuffle=True, filter_name=None): function kp_data_loader (line 132) | def kp_data_loader(batch_size, opts): function mask_data_loader (line 136) | def mask_data_loader(batch_size, opts): function texture_map_data_loader (line 139) | def texture_map_data_loader(batch_size, opts): FILE: experiments/smal_shape.py class ShapeTrainer (line 90) | class ShapeTrainer(train_utils.Trainer): method define_model (line 91) | def define_model(self): method init_dataset (line 144) | def init_dataset(self): method define_criterion (line 156) | def define_criterion(self): method set_optimization_input (line 187) | def set_optimization_input(self): method set_optimization_variables (line 195) | def set_optimization_variables(self): method set_input (line 211) | def set_input(self, batch): method forward (line 298) | def forward(self, opts_scale=None, opts_pose=None, opts_trans=None, op... method get_current_visuals (line 517) | def get_current_visuals(self): method get_current_points (line 574) | def get_current_points(self): method get_current_scalars (line 580) | def get_current_scalars(self): function main (line 613) | def main(_): FILE: nnutils/geom_utils.py function sample_textures (line 10) | def sample_textures(texture_flow, images): function perspective_proj_withz (line 30) | def perspective_proj_withz(X, cam, offset_z=0, cuda_device=0,norm_f=1., ... FILE: nnutils/loss_utils.py function texture_dt_loss (line 14) | def texture_dt_loss(texture_flow, dist_transf, vis_rend=None, cams=None,... function texture_loss (line 57) | def texture_loss(img_pred, img_gt, mask_pred, mask_gt): function uv_flow_loss (line 71) | def uv_flow_loss(uv_flow_pred, uv_flow_gt_w_mask): function mask_loss (line 82) | def mask_loss(mask_pred, mask_gt): function delta_v_loss (line 91) | def delta_v_loss(delta_v, delta_v_gt): function texture_map_loss (line 95) | def texture_map_loss(texture_map_pred, texture_map_gt, texture_map_mask,... function camera_loss (line 118) | def camera_loss(cam_pred, cam_gt, margin, normalized): function model_trans_loss (line 132) | def model_trans_loss(trans_pred, trans_gt): function model_pose_loss (line 140) | def model_pose_loss(pose_pred, pose_gt, opts): function betas_loss (line 168) | def betas_loss(betas_pred, betas_gt=None, prec=None): function hinge_loss (line 183) | def hinge_loss(loss, margin): function kp_l2_loss (line 188) | def kp_l2_loss(kp_pred, kp_gt): function keypoints_2D_loss (line 201) | def keypoints_2D_loss(kp_pred, kp_gt): function MSE_texture_loss (line 208) | def MSE_texture_loss(img_pred, img_gt, mask_pred, mask_gt, background_im... class PerceptualTextureLoss (line 218) | class PerceptualTextureLoss(object): method __init__ (line 219) | def __init__(self): method __call__ (line 223) | def __call__(self, img_pred, img_gt, mask_pred, mask_gt, background_im... FILE: nnutils/net_blocks.py class Flatten (line 11) | class Flatten(nn.Module): method forward (line 12) | def forward(self, x): class Unsqueeze (line 15) | class Unsqueeze(nn.Module): method __init__ (line 16) | def __init__(self, dim): method forward (line 20) | def forward(self, x): function fc (line 24) | def fc(norm_type, nc_inp, nc_out): function fc_stack (line 37) | def fc_stack(nc_inp, nc_out, nlayers, norm_type='batch'): function fc_stack_dropout (line 46) | def fc_stack_dropout(nc_inp, nc_out, nlayers): function conv2d (line 72) | def conv2d(norm_type, in_planes, out_planes, kernel_size=3, stride=1, nu... function deconv2d (line 92) | def deconv2d(in_planes, out_planes): function upconv2d (line 99) | def upconv2d(in_planes, out_planes, mode='bilinear'): function decoder2d (line 111) | def decoder2d(nlayers, nz_shape, nc_input, norm_type='batch', nc_final=1... function conv3d (line 150) | def conv3d(norm_type, in_planes, out_planes, kernel_size=3, stride=1, nu... function deconv3d (line 170) | def deconv3d(norm_type, in_planes, out_planes, num_groups=2): function encoder3d (line 191) | def encoder3d(nlayers, norm_type='batch', nc_input=1, nc_max=128, nc_l1=... function decoder3d (line 221) | def decoder3d(nlayers, nz_shape, nc_input, norm_type='batch', nc_final=1... function net_init (line 254) | def net_init(net): function bilinear_init (line 284) | def bilinear_init(kernel_size=4): FILE: nnutils/nmr.py function convert_as (line 19) | def convert_as(src, trg): class NMR (line 29) | class NMR(object): method __init__ (line 30) | def __init__(self): method to_gpu (line 35) | def to_gpu(self, device=0): method forward_mask (line 39) | def forward_mask(self, vertices, faces): method backward_mask (line 55) | def backward_mask(self, grad_masks): method forward_img (line 66) | def forward_img(self, vertices, faces, textures): method backward_img (line 84) | def backward_img(self, grad_images): class Render (line 100) | class Render(torch.autograd.Function): method __init__ (line 102) | def __init__(self, renderer): method forward (line 106) | def forward(self, vertices, faces, textures=None): method backward (line 122) | def backward(self, grad_out): class NeuralRenderer (line 140) | class NeuralRenderer(torch.nn.Module): method __init__ (line 146) | def __init__(self, img_size=256, proj_type='perspective', norm_f=1., n... method ambient_light_only (line 175) | def ambient_light_only(self): method directional_light_only (line 180) | def directional_light_only(self): method set_bgcolor (line 186) | def set_bgcolor(self, color): method project_points (line 189) | def project_points(self, verts, cams): method forward (line 193) | def forward(self, vertices, faces, cams, textures=None): FILE: nnutils/perceptual_loss.py class PerceptualLoss (line 14) | class PerceptualLoss(object): method __init__ (line 15) | def __init__(self, model='net', net='alex', use_gpu=True): method __call__ (line 21) | def __call__(self, pred, target, normalize=True): FILE: nnutils/smal_mesh_eval.py function preprocess_image (line 28) | def preprocess_image(img_path, img_size=256, kp=None, border=20): function smal_mesh_eval (line 56) | def smal_mesh_eval(num_train_epoch): function set_input (line 97) | def set_input(self, batch): function collect_outputs (line 114) | def collect_outputs(self): FILE: nnutils/smal_mesh_net.py class ResNetConv (line 91) | class ResNetConv(nn.Module): method __init__ (line 92) | def __init__(self, n_blocks=4, opts=None): method forward (line 103) | def forward(self, x, y=None): class Encoder (line 127) | class Encoder(nn.Module): method __init__ (line 135) | def __init__(self, opts, input_shape, n_blocks=4, nz_feat=100, bott_si... method forward (line 151) | def forward(self, img, fg_img): class TexturePredictorUV (line 159) | class TexturePredictorUV(nn.Module): method __init__ (line 164) | def __init__(self, nz_feat, uv_sampler, opts, img_H=64, img_W=128, n_u... method forward (line 202) | def forward(self, feat): class ShapePredictor (line 250) | class ShapePredictor(nn.Module): method __init__ (line 255) | def __init__(self, nz_feat, num_verts, opts, left_idx, right_idx, shap... method forward (line 287) | def forward(self, feat): class PosePredictor (line 305) | class PosePredictor(nn.Module): method __init__ (line 308) | def __init__(self, opts, nz_feat, num_joints=35): method forward (line 314) | def forward(self, feat): class BetasPredictor (line 323) | class BetasPredictor(nn.Module): method __init__ (line 324) | def __init__(self, opts, nz_feat, nenc_feat, num_betas=10): method forward (line 329) | def forward(self, feat, enc_feat): class Keypoints2DPredictor (line 334) | class Keypoints2DPredictor(nn.Module): method __init__ (line 335) | def __init__(self, opts, nz_feat, nenc_feat, num_keypoints=28): method forward (line 341) | def forward(self, feat, enc_feat): class ScalePredictor (line 347) | class ScalePredictor(nn.Module): method __init__ (line 351) | def __init__(self, nz, opts): method forward (line 362) | def forward(self, feat): class TransPredictor (line 373) | class TransPredictor(nn.Module): method __init__ (line 378) | def __init__(self, nz, projection_type, opts): method forward (line 393) | def forward(self, feat): class CodePredictor (line 409) | class CodePredictor(nn.Module): method __init__ (line 410) | def __init__(self, nz_feat=100, nenc_feat=2048, num_verts=1000, opts=N... method forward (line 421) | def forward(self, feat, enc_feat): class MeshNet (line 449) | class MeshNet(nn.Module): method __init__ (line 450) | def __init__(self, input_shape, opts, nz_feat=100, num_kps=28, sfm_mea... method forward (line 561) | def forward(self, img, masks=None): method symmetrize (line 591) | def symmetrize(self, V): method get_smal_verts (line 609) | def get_smal_verts(self, pose=None, betas=None, trans=None, del_v=None): method get_mean_shape (line 620) | def get_mean_shape(self): FILE: nnutils/smal_predictor.py class MeshPredictor (line 29) | class MeshPredictor(object): method __init__ (line 30) | def __init__(self, opts): method load_network (line 69) | def load_network(self, network, network_label, epoch_label): method set_input (line 78) | def set_input(self, batch): method predict (line 95) | def predict(self, batch, cam_gt=None, trans_gt=None, pose_gt=None, bet... method forward (line 103) | def forward(self, cam_gt=None, trans_gt=None, pose_gt=None, betas_gt=N... method collect_outputs (line 194) | def collect_outputs(self): FILE: nnutils/train_utils.py function set_bn_eval (line 69) | def set_bn_eval(m): class Trainer (line 76) | class Trainer(): method __init__ (line 77) | def __init__(self, opts): method save_network (line 92) | def save_network(self, network, network_label, epoch_label, gpu_id=None): method load_network (line 101) | def load_network(self, network, network_label, epoch_label, network_di... method define_model (line 109) | def define_model(self): method init_dataset (line 113) | def init_dataset(self): method define_criterion (line 117) | def define_criterion(self): method set_input (line 121) | def set_input(self, batch): method forward (line 125) | def forward(self): method save (line 129) | def save(self, epoch_prefix): method get_current_visuals (line 134) | def get_current_visuals(self): method get_current_scalars (line 138) | def get_current_scalars(self): method get_current_points (line 142) | def get_current_points(self): method init_training (line 146) | def init_training(self): method save_current (line 158) | def save_current(self, opts, initial_loss=0, final_loss=0, code='_'): method train (line 180) | def train(self): FILE: smal_eval.py function get_bbox (line 62) | def get_bbox(img_path, kp): function preprocess_image (line 76) | def preprocess_image(img_path, img_size=256, kp=None, border=5, bgval=-1... function mirror_keypoints (line 126) | def mirror_keypoints(keyp, vis, img_w): function mirror_image (line 150) | def mirror_image(img): function visualize_opt (line 157) | def visualize_opt(img, predictor, renderer, data, out_path): function visualize (line 172) | def visualize(img, outputs, renderer, img_path=None, opts=None, cam_gt=0, function save_params (line 243) | def save_params(outputs, idx): function main (line 251) | def main(_): FILE: smal_model/batch_lbs.py function batch_skew (line 9) | def batch_skew(vec, batch_size=None, opts=None): function batch_rodrigues (line 35) | def batch_rodrigues(theta, opts=None): function batch_lrotmin (line 56) | def batch_lrotmin(theta): function batch_global_rigid_transformation (line 77) | def batch_global_rigid_transformation(Rs, Js, parent, rotate_base = Fals... FILE: smal_model/smal_basics.py function align_smal_template_to_symmetry_axis (line 9) | def align_smal_template_to_symmetry_axis(v): function load_smal_model (line 35) | def load_smal_model(model_name='my_smpl_00781_4_all.pkl'): function get_horse_template (line 44) | def get_horse_template(model_name='my_smpl_00781_4_all.pkl', data_name='... FILE: smal_model/smal_torch.py function undo_chumpy (line 18) | def undo_chumpy(x): class SMAL (line 21) | class SMAL(object): method __init__ (line 22) | def __init__(self, pkl_path, opts, dtype=torch.float): method __call__ (line 68) | def __call__(self, beta, theta, trans=None, del_v=None, get_skin=True): FILE: utils/geometry.py function triangle_direction_intersection (line 11) | def triangle_direction_intersection(tri, trg): function project_verts_on_mesh (line 42) | def project_verts_on_mesh(verts, mesh_verts, mesh_faces): FILE: utils/image.py function resize_img (line 8) | def resize_img(img, scale_factor): function peturb_bbox (line 17) | def peturb_bbox(bbox, pf=0, jf=0): function square_bbox (line 40) | def square_bbox(bbox): function crop (line 60) | def crop(img, bbox, bgval=None): function compute_dt (line 97) | def compute_dt(mask): function compute_dt_barrier (line 105) | def compute_dt_barrier(mask, k=50): FILE: utils/mesh.py function from_img_to_nmr (line 14) | def from_img_to_nmr(texture_map, ft, vt, tex_size): function from_uvflow_to_img (line 24) | def from_uvflow_to_img(imgs, uv_flows): function sample_texture (line 31) | def sample_texture(uv_map, uv_img): function sample_textures (line 52) | def sample_textures(texture_flow, images): function create_sphere (line 71) | def create_sphere(n_subdivide=3): function make_symmetric (line 78) | def make_symmetric(verts, faces, left_inds, right_inds, center_inds): function make_faces_symmetric (line 136) | def make_faces_symmetric(verts, faces, num_indept_verts, num_sym_verts): function compute_edges2verts (line 234) | def compute_edges2verts(verts, faces): function compute_vert2kp (line 251) | def compute_vert2kp(verts, mean_shape): function get_spherical_coords (line 268) | def get_spherical_coords(X): function compute_uvsampler_sphere (line 283) | def compute_uvsampler_sphere(verts, faces, tex_size=2): function compute_uvsampler (line 311) | def compute_uvsampler(verts, faces, vt, ft, tex_size=2): function append_obj (line 323) | def append_obj(mf_handle, vertices, faces): FILE: utils/obj2nmr.py function obj2nmr_uvmap (line 29) | def obj2nmr_uvmap(ft, vt, tex_size=6): FILE: utils/smal_vis.py class VisRenderer (line 18) | class VisRenderer(object): method __init__ (line 24) | def __init__(self, img_size, faces, proj_type, norm_f, norm_z, norm_f0... method __call__ (line 52) | def __call__(self, verts, cams=None, texture=None, rend_mask=False): method rotated (line 88) | def rotated(self, vert, deg, axis=[0, 1, 0], cam=None, texture=None): method set_bgcolor (line 102) | def set_bgcolor(self, color): method set_light_dir (line 105) | def set_light_dir(self, direction, int_dir=0.8, int_amb=0.8): function asVariable (line 112) | def asVariable(x): function convert_as (line 118) | def convert_as(src, trg): function convert2np (line 127) | def convert2np(x): function tensor2mask (line 137) | def tensor2mask(image_tensor, imtype=np.uint8): function kp2im (line 145) | def kp2im(kp, img, radius=None): function draw_kp (line 178) | def draw_kp(kp, img, radius=None): function vis_verts (line 217) | def vis_verts(mean_shape, verts, face, mvs=None, textures=None): function vis_vert2kp (line 253) | def vis_vert2kp(verts, vert2kp, face, mvs=None): function tensor2im (line 303) | def tensor2im(image_tensor, imtype=np.uint8, scale_to_range_1=False): function visflow (line 316) | def visflow(flow_img): function visflow_jonas (line 347) | def visflow_jonas(flow_img, img_size): FILE: utils/transformations.py function identity_matrix (line 207) | def identity_matrix(): function translation_matrix (line 222) | def translation_matrix(direction): function translation_from_matrix (line 235) | def translation_from_matrix(matrix): function reflection_matrix (line 247) | def reflection_matrix(point, normal): function reflection_from_matrix (line 273) | def reflection_from_matrix(matrix): function rotation_matrix (line 302) | def rotation_matrix(angle, direction, point=None): function rotation_from_matrix (line 346) | def rotation_from_matrix(matrix): function scale_matrix (line 386) | def scale_matrix(factor, origin=None, direction=None): function scale_from_matrix (line 420) | def scale_from_matrix(matrix): function projection_matrix (line 461) | def projection_matrix(point, normal, direction=None, function projection_from_matrix (line 523) | def projection_from_matrix(matrix, pseudo=False): function clip_matrix (line 596) | def clip_matrix(left, right, bottom, top, near, far, perspective=False): function shear_matrix (line 648) | def shear_matrix(angle, direction, point, normal): function shear_from_matrix (line 679) | def shear_from_matrix(matrix): function decompose_matrix (line 724) | def decompose_matrix(matrix): function compose_matrix (line 809) | def compose_matrix(scale=None, shear=None, angles=None, translate=None, function orthogonalization_matrix (line 862) | def orthogonalization_matrix(lengths, angles): function affine_matrix_from_points (line 889) | def affine_matrix_from_points(v0, v1, shear=True, scale=True, usesvd=True): function superimposition_matrix (line 998) | def superimposition_matrix(v0, v1, scale=False, usesvd=True): function euler_matrix (line 1049) | def euler_matrix(ai, aj, ak, axes='sxyz'): function euler_from_matrix (line 1112) | def euler_from_matrix(matrix, axes='sxyz'): function euler_from_quaternion (line 1170) | def euler_from_quaternion(quaternion, axes='sxyz'): function quaternion_from_euler (line 1181) | def quaternion_from_euler(ai, aj, ak, axes='sxyz'): function quaternion_about_axis (line 1238) | def quaternion_about_axis(angle, axis): function quaternion_matrix (line 1254) | def quaternion_matrix(quaternion): function quaternion_from_matrix (line 1281) | def quaternion_from_matrix(matrix, isprecise=False): function quaternion_multiply (line 1366) | def quaternion_multiply(quaternion1, quaternion0): function quaternion_conjugate (line 1383) | def quaternion_conjugate(quaternion): function quaternion_inverse (line 1397) | def quaternion_inverse(quaternion): function quaternion_real (line 1411) | def quaternion_real(quaternion): function quaternion_imag (line 1421) | def quaternion_imag(quaternion): function quaternion_slerp (line 1431) | def quaternion_slerp(quat0, quat1, fraction, spin=0, shortestpath=True): function random_quaternion (line 1472) | def random_quaternion(rand=None): function random_rotation_matrix (line 1500) | def random_rotation_matrix(rand=None): class Arcball (line 1515) | class Arcball(object): method __init__ (line 1538) | def __init__(self, initial=None): method place (line 1563) | def place(self, center, radius): method setaxes (line 1576) | def setaxes(self, *axes): method constrain (line 1584) | def constrain(self): method constrain (line 1589) | def constrain(self, value): method down (line 1593) | def down(self, point): method drag (line 1603) | def drag(self, point): method next (line 1616) | def next(self, acceleration=0.0): method matrix (line 1621) | def matrix(self): function arcball_map_to_sphere (line 1626) | def arcball_map_to_sphere(point, center, radius): function arcball_constrain_to_axis (line 1639) | def arcball_constrain_to_axis(point, axis): function arcball_nearest_axis (line 1655) | def arcball_nearest_axis(point, axes): function vector_norm (line 1688) | def vector_norm(data, axis=None, out=None): function unit_vector (line 1727) | def unit_vector(data, axis=None, out=None): function random_vector (line 1771) | def random_vector(size): function vector_product (line 1786) | def vector_product(v0, v1, axis=0): function angle_between_vectors (line 1807) | def angle_between_vectors(v0, v1, directed=True, axis=0): function inverse_matrix (line 1838) | def inverse_matrix(matrix): function concatenate_matrices (line 1854) | def concatenate_matrices(*matrices): function is_same_transform (line 1870) | def is_same_transform(matrix0, matrix1): function is_same_quaternion (line 1886) | def is_same_quaternion(q0, q1): function _import_module (line 1893) | def _import_module(name, package=None, warn=True, prefix='_py_', ignore=... FILE: utils/visualizer.py class Visualizer (line 9) | class Visualizer(): method __init__ (line 10) | def __init__(self, opt): method print_message (line 24) | def print_message(self, text): method display_current_results (line 29) | def display_current_results(self, visuals, epoch): method plot_current_scalars (line 77) | def plot_current_scalars(self, epoch, counter_ratio, opt, scalars): method plot_current_points (line 93) | def plot_current_points(self, points, disp_offset=10): method print_current_scalars (line 102) | def print_current_scalars(self, epoch, i, scalars): method save_images (line 112) | def save_images(self, webpage, visuals, image_path): FILE: utils/visutil.py function tensor2im (line 13) | def tensor2im(image_tensor, imtype=np.uint8): function tensor2kps (line 19) | def tensor2kps(kp_tensor): function tensor2verts (line 28) | def tensor2verts(vert_tensor): function tensor2im_batch (line 38) | def tensor2im_batch(image_tensor, num_batch, imtype=np.uint8): function undo_resnet_preprocess (line 49) | def undo_resnet_preprocess(image_tensor): function diagnose_network (line 57) | def diagnose_network(net, name='network'): function save_image (line 70) | def save_image(image_numpy, image_path): function info (line 74) | def info(object, spacing=10, collapse=1): function varname (line 84) | def varname(p): function print_numpy (line 90) | def print_numpy(x, val=True, shp=False): function mkdirs (line 100) | def mkdirs(paths): function mkdir (line 108) | def mkdir(path):