Spaces:
Sleeping
Sleeping
Update openshape/pointnet_util.py
Browse files
openshape/pointnet_util.py
CHANGED
|
@@ -3,7 +3,7 @@ import torch.nn as nn
|
|
| 3 |
import torch.nn.functional as F
|
| 4 |
from time import time
|
| 5 |
import numpy as np
|
| 6 |
-
import dgl.geometry
|
| 7 |
|
| 8 |
def timeit(tag, t):
|
| 9 |
print("{}: {}s".format(tag, time() - t))
|
|
@@ -69,7 +69,7 @@ def farthest_point_sample(xyz, npoint):
|
|
| 69 |
Return:
|
| 70 |
centroids: sampled pointcloud index, [B, npoint]
|
| 71 |
"""
|
| 72 |
-
return dgl.geometry.farthest_point_sampler(xyz, npoint)
|
| 73 |
device = xyz.device
|
| 74 |
B, N, C = xyz.shape
|
| 75 |
centroids = torch.zeros(B, npoint, dtype=torch.long).to(device)
|
|
|
|
| 3 |
import torch.nn.functional as F
|
| 4 |
from time import time
|
| 5 |
import numpy as np
|
| 6 |
+
#import dgl.geometry
|
| 7 |
|
| 8 |
def timeit(tag, t):
|
| 9 |
print("{}: {}s".format(tag, time() - t))
|
|
|
|
| 69 |
Return:
|
| 70 |
centroids: sampled pointcloud index, [B, npoint]
|
| 71 |
"""
|
| 72 |
+
#return dgl.geometry.farthest_point_sampler(xyz, npoint)
|
| 73 |
device = xyz.device
|
| 74 |
B, N, C = xyz.shape
|
| 75 |
centroids = torch.zeros(B, npoint, dtype=torch.long).to(device)
|