Spaces:
Runtime error
Runtime error
Update lib/dataset/mesh_util.py
Browse files- lib/dataset/mesh_util.py +0 -13
lib/dataset/mesh_util.py
CHANGED
|
@@ -17,7 +17,6 @@
|
|
| 17 |
|
| 18 |
import numpy as np
|
| 19 |
import cv2
|
| 20 |
-
import pymeshlab
|
| 21 |
import torch
|
| 22 |
import torchvision
|
| 23 |
import trimesh
|
|
@@ -150,18 +149,6 @@ def remesh(obj_path, perc, device):
|
|
| 150 |
return verts_pr, faces_pr
|
| 151 |
|
| 152 |
|
| 153 |
-
def possion(mesh, obj_path):
|
| 154 |
-
|
| 155 |
-
mesh.export(obj_path)
|
| 156 |
-
ms = pymeshlab.MeshSet()
|
| 157 |
-
ms.load_new_mesh(obj_path)
|
| 158 |
-
ms.surface_reconstruction_screened_poisson(depth=10)
|
| 159 |
-
ms.set_current_mesh(1)
|
| 160 |
-
ms.save_current_mesh(obj_path)
|
| 161 |
-
|
| 162 |
-
return trimesh.load(obj_path)
|
| 163 |
-
|
| 164 |
-
|
| 165 |
def get_mask(tensor, dim):
|
| 166 |
|
| 167 |
mask = torch.abs(tensor).sum(dim=dim, keepdims=True) > 0.0
|
|
|
|
| 17 |
|
| 18 |
import numpy as np
|
| 19 |
import cv2
|
|
|
|
| 20 |
import torch
|
| 21 |
import torchvision
|
| 22 |
import trimesh
|
|
|
|
| 149 |
return verts_pr, faces_pr
|
| 150 |
|
| 151 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 152 |
def get_mask(tensor, dim):
|
| 153 |
|
| 154 |
mask = torch.abs(tensor).sum(dim=dim, keepdims=True) > 0.0
|