MCPcopy Create free account

hub / github.com/DavidBoja/SMPL-Fitting / functions

Functions110 in github.com/DavidBoja/SMPL-Fitting

↓ 32 callersMethodcuda
(self)
body_models.py:72
↓ 24 callersMethodupdate
(self,losses)
losses.py:202
↓ 12 callersFunctionsend_to_socket
Send data to socket :param fig: plotly figure :param socket: socket object :param socket_type: type of socket to use
utils.py:479
↓ 9 callersFunctionload_config
(path="configs/config.yaml")
utils.py:27
↓ 8 callersFunctionload_scan
Load scan given its scan_path using open3d. Scan can be defined as: - .ply file - .ply.gz file :param scan_path: (str) of path
utils.py:715
↓ 6 callersMethod__init__
(self, cfg: dict, loss_weights: dict,**kwargs)
losses.py:164
↓ 5 callersMethoddeform_verts
(self, pose: torch.tensor, betas: torch.tensor,
body_models.py:87
↓ 5 callersFunctionload_landmarks
Load landmarks from file and return the landmarks as torch tensor. Landmark file is defined in the following format: - .txt extensio
utils.py:607
↓ 5 callersFunctionprocess_body_model_path
(cfg: dict)
utils.py:129
↓ 4 callersMethodforward
(self, **kwargs)
losses.py:185
↓ 4 callersFunctionget_normals
Find unit vertex normals.
utils.py:787
↓ 3 callersFunctioncheck_scan_prequisites_fit_bm
Check if the input_dict has all the required fields with defined values. Required data for fitting is the scans: - name, - vertices
utils.py:351
↓ 3 callersFunctioncleanup
Close sockets and terminate dash app subprocess. :param visualize: boolean indicating if visualization is on :param socket: socket object
utils.py:521
↓ 3 callersFunctioncreate_results_directory
Save results in save_path/YYYY_MM_DD_HH_MM_SS folder. If continue_run is folder of type YYYY_MM_DD_HH_MM_SS, then save results in save_pa
utils.py:238
↓ 3 callersFunctionget_already_fitted_scan_names
Return list of already fitted scans - founds as .npz files in the save_path directory :param cfg: config dictionary with
utils.py:333
↓ 3 callersFunctionget_skipped_scan_names
Get list of scan names that have been skipped because of missing data. :param cfg: config dictionary with save_path: pa
utils.py:424
↓ 3 callersMethodlandmark_indices
(self,landmarks_order)
body_models.py:68
↓ 3 callersFunctionload_loss_weights_config
(which_strategy,which_option,path=None)
utils.py:40
↓ 3 callersFunctionprocess_default_dtype
(cfg: dict)
utils.py:125
↓ 3 callersFunctionprocess_landmarks
This function processes the cfg["use_landmarks"] which states which landamrks to use during optimization. The function returns a standar
utils.py:153
↓ 3 callersFunctionprocess_visualize_steps
The optimization iteration steps to visualize from visualize_steps are processed into a list of iteration indices to visualize. :param
utils.py:103
↓ 3 callersFunctionrun_dash_app_as_subprocess
Run dahs app in a subprocess. :param port: port to run the dash app on. The visualization should be available at localhost:<port> If
dash_app.py:87
↓ 3 callersFunctionsave_configs
(cfg: dict)
utils.py:91
↓ 3 callersFunctionset_init_plot
Plot the initial plotly figure for the optimization. Plotting the input scan as point cloud and the initial body model template as point
visualization.py:20
↓ 3 callersFunctionsetup_socket
Set up the socket for sending data to the Dash app Currently only zmq is supported. :param socket_type: type of socket to use
utils.py:451
↓ 3 callersFunctionto_txt
(list,path,name)
utils.py:282
↓ 3 callersFunctionviz_error_curves
Visualize error curves (losses) for the optimization. Vertical lines are added when weights of losses are changed. :param losses: (dic
visualization.py:114
↓ 3 callersFunctionviz_final_fit
Plot the final fit figure for the optimization. Plotting the input scan as mesh if faces are given, else plotting as point cloud. Plo
visualization.py:180
↓ 3 callersFunctionviz_iteration
Plot the points of the optimized body model for iteration :param fig: (plotly) figure :param pc: (torch.tensor) (N,3) :param it
visualization.py:76
↓ 2 callersFunctionfit_body_model
Fit a body body model (SMPL/SMPLX) to the input scan using data, landmark and prior losses :param: input_dict (dict): with keys:
refine_fitting.py:30
↓ 2 callersFunctionfit_body_model
Fit a body body model (SMPL/SMPLX) to the input scan using data, landmark and prior losses :param: input_dict (dict): with keys:
fit_body_model.py:30
↓ 2 callersFunctionfit_vertices
Fit template vertices onto scan. Either start from body model in T-pose or from previous fit. :param: input_dict (dict): with keys:
fit_vertices.py:26
↓ 2 callersFunctioninfer_body_model
(N_verts)
body_models.py:8
↓ 2 callersFunctioninitialize_fit_bm_loss_weights
Initialize the loss_weights if 0-th iteration is not provided in loss_weights dictionary :param loss_weights: dictionary of loss weights
utils.py:53
↓ 2 callersFunctionprint_losses
(data_loss:torch.tensor, landmark_loss:torch.tensor, prior_loss:torch.tensor
utils.py:295
↓ 2 callersFunctionprint_params
(pose: torch.tensor, beta:torch.tensor, trans:torch.tensor,
utils.py:286
↓ 2 callersMethodupdate_loss_weights
(self,iteration)
losses.py:181
↓ 2 callersFunctionvisualize_pve
Visualize the PVE errors as a color map on the fitted body model. :param verts: np.array (N,3) :param vert_errors: np.array (N,) :par
visualization.py:547
↓ 1 callersFunctioncheck_scan_prequisites_fit_verts
Check if all the scan dict has all the required fields If all the data is there, return True, else False Required data is: name, vertices
utils.py:389
↓ 1 callersFunctionclose_sockets
Close a socket. :param socket: socket object
utils.py:499
↓ 1 callersFunctionclosure
()
fit_vertices.py:132
↓ 1 callersFunctioncreate_dash_app
Create the dash app with 3 plot layout: 3d plot, error curves and the final fit. return: the dash app
dash_app.py:14
↓ 1 callersFunctioncreate_thread
Create a background thread to continuously update the figure. :param socket: the zmq socket :param app: the dash app
dash_app.py:50
↓ 1 callersFunctioncreate_wireframe_plot
Given vertices and faces, creates a wireframe of plotly segments. Used for visualizing the wireframe. :param verts:
visualization.py:259
↓ 1 callersFunctioncreate_zmq_socket
Set up the ZeroMQ socket for receiving data from the optimization script.
dash_app.py:35
↓ 1 callersFunctionexit_fitting_vertices
(current_loss, previous_loss, loss_difference, minimal_loss)
utils.py:899
↓ 1 callersMethodforward
(self, pose, betas, **kwargs)
losses.py:343
↓ 1 callersFunctioninitialize_A
Creates (N,3,4) homogeneous transformation matrix Either random or eye matrix for rotation and 0 for translation. Homogeneous
utils.py:866
↓ 1 callersFunctioninitialize_fit_verts_loss_weights
Initialize the loss_weights if 0-th iteration is missing from the loss_weights dictionary :param loss_weights: dictionary of loss weights
utils.py:75
↓ 1 callersMethodlog_likelihood
Create graph operation for negative log-likelihood calculation
losses.py:314
↓ 1 callersMethodmerged_log_likelihood
(self, pose, betas)
losses.py:297
↓ 1 callersFunctionparse_landmark_txt_coords_formatting
Parse landamrk txt file with formatting x y z landmark_name :param data (List[str]) list of strings, each string represe
utils.py:539
↓ 1 callersFunctionparse_landmark_txt_index_formatting
Parse landamrk txt file with formatting landmark_index landmark_name :param data (List[str]) list of strings, each string
utils.py:574
↓ 1 callersFunctionprint_loss_weights
(data_loss:torch.tensor, landmark_loss:torch.tensor, prior_los
utils.py:312
↓ 1 callersFunctionprocess_body_model_fit_verts
(cfg)
utils.py:137
↓ 1 callersFunctionprocess_caesar_landmarks
Process CAESAR dataset landmarks from .lnd file. Reading file from AUX to END flags. :param landmark_path (str): path to landmark .lnd
landmarks.py:176
↓ 1 callersFunctionprocess_dataset_name
(cfg:dict)
utils.py:216
↓ 1 callersFunctionset_seed
(sd)
utils.py:777
↓ 1 callersFunctionsummed_L2
:param x: (torch.tensor) dim N x 3 :param y: (torch.tensor) dim N x 3
losses.py:207
↓ 1 callersFunctionterminate_dash_app_subprocess
Terminate the dash app subprocess asking nicely first, then forcefully. :param dash_app_process: the dash app subprocess :param dash
dash_app.py:108
↓ 1 callersMethodtrack_loss
(self,loss_dict)
losses.py:178
↓ 1 callersFunctionupdate_normals
Rotates the normals by homogeneous transformation A (given as N x 3 x 4) A missing last row [0,0,0,1] Input: normals: pytorch Tensor of
utils.py:798
MethodN_verts
(self)
body_models.py:45
Method__call__
(self, pose, betas, **kwargs)
body_models.py:75
Method__getitem__
:return (dict): dictionary with keys: "name": name of scan "vertices": (N,3) np.array "faces": (N,3) np.a
datasets.py:123
Method__getitem__
:return (dict): dictionary with keys: "name": name of scan "vertices": (N,3) np.array "faces": (N,3) np.a
datasets.py:293
Method__getitem__
:return (dict): dictionary
datasets.py:477
Method__init__
(self,**kwargs)
losses.py:25
Method__init__
(self,partial_data_threshold: float,**kwargs)
losses.py:44
Method__init__
(self,body_models_path: str,**kwargs)
losses.py:66
Method__init__
(self, **kwargs)
losses.py:88
Method__init__
(self, normal_threshold_angle: float = None, **kwargs)
losses.py:106
Method__init__
(self,loss_names)
losses.py:198
Method__init__
(self, prior_folder='prior', num_gaussians=6, dtype=torch.float32, epsilon=1e-16,
losses.py:218
Method__init__
:param data_dir (str): path to caesar dataset :param load_countries (str or list): countries to load.
datasets.py:24
Method__init__
:param data_dir (str): path to caesar dataset :param load_gt (bool): whether to load ground truth fitting or not
datasets.py:238
Method__init__
Loading 4DHumanOutfit dataset Expecint the following structure: smpl params save as: parameters_path/subj_name/subj_name-
datasets.py:348
Method__init__
(self, cfg: dict)
body_parameters.py:10
Method__init__
(self, cfg: dict)
body_models.py:23
Method__len__
(self)
datasets.py:229
Method__len__
(self)
datasets.py:340
Method__len__
(self)
datasets.py:519
Method__new__
(cls, cfg)
body_parameters.py:68
Method__new__
(cls, cfg)
body_models.py:115
Functionevaluate_chamfer
Evaluate the chamfer distance of the fitted body model to the scan. :param fitting_results_path: (str) Path to folder with fitting resu
evaluate_fitting.py:144
Functionevalute_pve
Evaluate the PVE of the fitted body model to the ground truth (GT) body. When evaluating a dataset - the GT is presumed to be given by
evaluate_fitting.py:21
Methodfaces
(self)
body_models.py:65
Functionfit_body_model_onto_dataset
(cfg: dict)
refine_fitting.py:237
Functionfit_body_model_onto_dataset
(cfg: dict)
fit_body_model.py:199
Functionfit_body_model_onto_scan
(cfg: dict)
refine_fitting.py:276
Functionfit_body_model_onto_scan
(cfg: dict)
fit_body_model.py:236
Functionfit_vertices_onto_dataset
(cfg: dict)
fit_vertices.py:191
Functionfit_vertices_onto_scan
(cfg: dict)
fit_vertices.py:229
Methodforward
Directional Chamfer Distance from bm template to vertices Sum the distances from every point of the template to the closest point
losses.py:29
Methodforward
Directional Chamfer Distance from template to vertices Sum the distances from every point of the template to the closest point
losses.py:49
Methodforward
Difference between homo transformations between neighboring template points :param A: (torch.tensor) transformation matrix A
losses.py:74
Methodforward
summed L2 norm between scan_landmarks and template_landmarks :param scan_landmarks: (torch.tensor) dim (N,3) :param template
losses.py:91
Methodforward
For each template vertex i, find the closest nearest neighbors in the scan and compute the angle between their normals and the normal
losses.py:114
Methodforward
(self)
body_parameters.py:61
Methodget_mean
Returns the mean of the mixture
losses.py:292
next →1–100 of 110, ranked by callers