Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
ShijieZhou-UCLA committed Jan 25, 2024
1 parent 59306f8 commit 9e714ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ You can customize `NUM_SEMANTIC_CHANNELS` in `submodules/diff-gaussian-rasteriza

If you would like to use the optional CNN speed-up module, do the following accordingly:

- Customize `NUMBER` in `semantic_feature_size/NUMBER` in `scene/gaussian_model.py` in line 142.
- Customize `NUMBER` in `feature_out_dim/NUMBER` in `train.py` in line 51.
- Customize `NUMBER` in `feature_out_dim/NUMBER` in `render.py` in line 116 and 246.

Expand Down
6 changes: 3 additions & 3 deletions scene/gaussian_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def oneupSHdegree(self):
if self.active_sh_degree < self.max_sh_degree:
self.active_sh_degree += 1

def create_from_pcd(self, pcd : BasicPointCloud, spatial_lr_scale : float, sematic_feature_size : int, speedup: bool):
def create_from_pcd(self, pcd : BasicPointCloud, spatial_lr_scale : float, semantic_feature_size : int, speedup: bool):
self.spatial_lr_scale = spatial_lr_scale
fused_point_cloud = torch.tensor(np.asarray(pcd.points)).float().cuda()
fused_color = RGB2SH(torch.tensor(np.asarray(pcd.colors)).float().cuda())
Expand All @@ -139,8 +139,8 @@ def create_from_pcd(self, pcd : BasicPointCloud, spatial_lr_scale : float, semat
features[:, 3:, 1:] = 0.0

if speedup: # speed up for Segmentation
sematic_feature_size = int(sematic_feature_size/2) # speed up for SAM
self._semantic_feature = torch.zeros(fused_point_cloud.shape[0], sematic_feature_size, 1).float().cuda()
semantic_feature_size = int(semantic_feature_size/2) # speed up for SAM
self._semantic_feature = torch.zeros(fused_point_cloud.shape[0], semantic_feature_size, 1).float().cuda()
print("Number of points at initialisation : ", fused_point_cloud.shape[0])

dist2 = torch.clamp_min(distCUDA2(torch.from_numpy(np.asarray(pcd.points)).float().cuda()), 0.0000001)
Expand Down

0 comments on commit 9e714ff

Please sign in to comment.