This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define NOMINMAX | |
| #include <mutex> | |
| #include <string_view> | |
| #include <windows.h> | |
| #include "minhook.h" | |
| #pragma comment(lib, "libminhook-x86") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # NOTE: THIS WON'T RUN, PLZ IMPLEMENT YOUR OWN load_mesh AND export_mesh, THEN CHANGE IMPORTS ACCORDINGLY | |
| import time | |
| import torch | |
| from tqdm import tqdm | |
| # fmt: off | |
| import sys | |
| sys.path.append('.') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import torch | |
| def torch_inverse_2x2(A: torch.Tensor, eps=torch.finfo(torch.float).eps): | |
| B = torch.zeros_like(A) | |
| # for readability | |
| a = A[..., 0, 0] | |
| b = A[..., 0, 1] | |
| c = A[..., 1, 0] | |
| d = A[..., 1, 1] | |
| # slightly slower but save 20% of space (??) by |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import torch | |
| import mcubes | |
| import trimesh | |
| import numpy as np | |
| from pytorch3d.ops.knn import knn_points | |
| from tqdm import tqdm | |
| from functools import reduce | |
| from torch_scatter import scatter | |
| from pytorch3d.structures import Meshes | |
| from typing import Callable, Tuple, Union |