bp
Browse files- eval_wrapper/eval.py +1 -1
- eval_wrapper/eval_utils.py +0 -16
eval_wrapper/eval.py
CHANGED
@@ -19,7 +19,7 @@ from utils.collate import collate
|
|
19 |
from engine import eval_model
|
20 |
from utils.viz import just_load_viz
|
21 |
from utils.geometry import compute_pointmap_torch
|
22 |
-
from eval_wrapper.eval_utils import
|
23 |
from huggingface_hub import hf_hub_download
|
24 |
|
25 |
class EvalWrapper(torch.nn.Module):
|
|
|
19 |
from engine import eval_model
|
20 |
from utils.viz import just_load_viz
|
21 |
from utils.geometry import compute_pointmap_torch
|
22 |
+
from eval_wrapper.eval_utils import filter_all_masks
|
23 |
from huggingface_hub import hf_hub_download
|
24 |
|
25 |
class EvalWrapper(torch.nn.Module):
|
eval_wrapper/eval_utils.py
CHANGED
@@ -2,7 +2,6 @@ import numpy as np
|
|
2 |
import matplotlib.pyplot as plt
|
3 |
from scipy.stats import norm, lognorm
|
4 |
import torch
|
5 |
-
import open3d as o3d
|
6 |
|
7 |
def colorize_points_with_turbo_all_dims(points, method='norm',cmap='turbo'):
|
8 |
"""
|
@@ -38,21 +37,6 @@ def colorize_points_with_turbo_all_dims(points, method='norm',cmap='turbo'):
|
|
38 |
|
39 |
return colors
|
40 |
|
41 |
-
def npy2ply(points,colors=None,normals=None):
|
42 |
-
cloud = o3d.geometry.PointCloud()
|
43 |
-
cloud.points = o3d.utility.Vector3dVector(points.astype(np.float64))
|
44 |
-
|
45 |
-
# compute the normals
|
46 |
-
if colors is not None:
|
47 |
-
if colors.max()>1:
|
48 |
-
colors = colors/255.0
|
49 |
-
cloud.colors = o3d.utility.Vector3dVector(colors.astype(np.float64))
|
50 |
-
else:
|
51 |
-
colors = colorize_points_with_turbo_all_dims(points)
|
52 |
-
cloud.colors = o3d.utility.Vector3dVector(colors.astype(np.float64))
|
53 |
-
if normals is not None:
|
54 |
-
cloud.normals = o3d.utility.Vector3dVector(normals.astype(np.float64))
|
55 |
-
return cloud
|
56 |
|
57 |
def transform_pointmap(pointmap_cam,c2w):
|
58 |
# pointmap: shape H x W x 3
|
|
|
2 |
import matplotlib.pyplot as plt
|
3 |
from scipy.stats import norm, lognorm
|
4 |
import torch
|
|
|
5 |
|
6 |
def colorize_points_with_turbo_all_dims(points, method='norm',cmap='turbo'):
|
7 |
"""
|
|
|
37 |
|
38 |
return colors
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
def transform_pointmap(pointmap_cam,c2w):
|
42 |
# pointmap: shape H x W x 3
|