Skip to content

Commit

Permalink
Merge 160835c into f831dab
Browse files Browse the repository at this point in the history
  • Loading branch information
wanmeihuali authored Jun 23, 2023
2 parents f831dab + 160835c commit 36091ef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 9 additions & 2 deletions GaussianPointAdaptiveController.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,18 @@ def _add_densify_points(self):
self.maintained_parameters.pointcloud[invalid_point_id_to_fill] += point_offset
self.maintained_parameters.pointcloud[densify_point_id] -= point_offset
if self.config.enable_sample_from_point:
over_reconstructed_point_id = densify_point_id[over_reconstructed_mask]
over_reconstructed_point_id_to_fill = invalid_point_id_to_fill[over_reconstructed_mask]
assert over_reconstructed_point_id.shape[0] == over_reconstructed_point_id_to_fill.shape[0]
point_position = self._sample_from_point(
point_to_split=self.maintained_parameters.pointcloud[over_reconstructed_point_id_to_fill],
point_feature_to_split=self.maintained_parameters.pointcloud_features[over_reconstructed_point_id_to_fill])
point_to_split=self.maintained_parameters.pointcloud[over_reconstructed_point_id],
point_feature_to_split=self.maintained_parameters.pointcloud_features[over_reconstructed_point_id])
self.maintained_parameters.pointcloud[over_reconstructed_point_id_to_fill] = point_position
# rerun same function to also sample position for original points
point_position = self._sample_from_point(
point_to_split=self.maintained_parameters.pointcloud[over_reconstructed_point_id],
point_feature_to_split=self.maintained_parameters.pointcloud_features[over_reconstructed_point_id])
self.maintained_parameters.pointcloud[over_reconstructed_point_id] = point_position
under_reconstructed_point_id_to_fill = invalid_point_id_to_fill[under_reconstructed_mask]
under_reconstructed_point_grad_position = self.densify_point_info.densify_point_grad_position[:num_fillable_densify_points][under_reconstructed_mask]
self.maintained_parameters.pointcloud[under_reconstructed_point_id_to_fill] += under_reconstructed_point_grad_position * \
Expand Down
4 changes: 2 additions & 2 deletions GaussianPointCloudRasterisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def generate_point_sort_key(
HALF_NEIGHBOR_TILE_SIZE = 7 # in paper it is 8
@ti.kernel
def generate_num_overlap_tiles(
num_overlap_tiles: ti.types.ndarray(ti.i64, ndim=1), # (M)
num_overlap_tiles: ti.types.ndarray(ti.i32, ndim=1), # (M)
point_uv: ti.types.ndarray(ti.f32, ndim=2), # (M, 2)
point_uv_covariance: ti.types.ndarray(ti.f32, ndim=3), # (M, 2, 2)
point_alpha_after_activation: ti.types.ndarray(ti.f32, ndim=1), # (M)
Expand Down Expand Up @@ -180,7 +180,7 @@ def generate_point_sort_key_by_num_overlap_tiles(
point_in_camera: ti.types.ndarray(ti.f32, ndim=2), # (M, 3)
point_uv_covariance: ti.types.ndarray(ti.f32, ndim=3), # (M, 2, 2)
point_alpha_after_activation: ti.types.ndarray(ti.f32, ndim=1), # (M)
accumulated_num_overlap_tiles: ti.types.ndarray(ti.i32, ndim=1), # (M)
accumulated_num_overlap_tiles: ti.types.ndarray(ti.i64, ndim=1), # (M)
point_offset_with_sort_key: ti.types.ndarray(ti.i32, ndim=1), # (K), K = sum(num_overlap_tiles)
point_in_camera_sort_key: ti.types.ndarray(ti.i64, ndim=1), # (K), K = sum(num_overlap_tiles)
camera_width: ti.i32, # required to be multiple of 16
Expand Down

0 comments on commit 36091ef

Please sign in to comment.