Skip to content

Commit

Permalink
delete camera params from spherical render
Browse files Browse the repository at this point in the history
  • Loading branch information
inuex35 committed Oct 13, 2024
1 parent 1474c16 commit b0e978d
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 32 deletions.
4 changes: 1 addition & 3 deletions gsplat/cuda/_torch_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ def _ortho_proj(
def _spherical_proj(
means: Tensor, # [C, N, 3]
covars: Tensor, # [C, N, 3, 3]
Ks: Tensor, # [C, 3, 3]
width: int,
height: int,
) -> Tuple[Tensor, Tensor]:
Expand All @@ -234,7 +233,6 @@ def _spherical_proj(
Args:
means: Gaussian means in camera coordinate system. [C, N, 3].
covars: Gaussian covariances in camera coordinate system. [C, N, 3, 3].
Ks: Camera intrinsics. [C, 3, 3].
width: Image width.
height: Image height.
Expand Down Expand Up @@ -329,7 +327,7 @@ def _fully_fused_projection(
elif camera_model == "pinhole":
means2d, covars2d = _persp_proj(means_c, covars_c, Ks, width, height)
elif camera_model == "spherical":
means2d, covars2d = _spherical_proj(means_c, covars_c, Ks, width, height)
means2d, covars2d = _spherical_proj(means_c, covars_c, width, height)
else:
assert_never(camera_model)

Expand Down
4 changes: 0 additions & 4 deletions gsplat/cuda/csrc/fully_fused_projection_bwd.cu
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,6 @@ __global__ void fully_fused_projection_bwd_kernel(
spherical_proj_vjp<T>(
mean_c,
covar_c,
fx,
fy,
cx,
cy,
image_width,
image_height,
v_covar2d,
Expand Down
4 changes: 0 additions & 4 deletions gsplat/cuda/csrc/fully_fused_projection_fwd.cu
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,6 @@ __global__ void fully_fused_projection_fwd_kernel(
spherical_proj<T>(
mean_c,
covar_c,
Ks[0],
Ks[4],
Ks[2],
Ks[5],
image_width,
image_height,
covar2d,
Expand Down
4 changes: 0 additions & 4 deletions gsplat/cuda/csrc/fully_fused_projection_packed_bwd.cu
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,6 @@ __global__ void fully_fused_projection_packed_bwd_kernel(
spherical_proj_vjp<T>(
mean_c,
covar_c,
fx,
fy,
cx,
cy,
image_width,
image_height,
v_covar2d,
Expand Down
4 changes: 0 additions & 4 deletions gsplat/cuda/csrc/fully_fused_projection_packed_fwd.cu
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,6 @@ __global__ void fully_fused_projection_packed_fwd_kernel(
spherical_proj<T>(
mean_c,
covar_c,
Ks[0],
Ks[4],
Ks[2],
Ks[5],
image_width,
image_height,
covar2d,
Expand Down
4 changes: 0 additions & 4 deletions gsplat/cuda/csrc/proj_bwd.cu
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,6 @@ __global__ void proj_bwd_kernel(
spherical_proj_vjp<OpT>(
mean,
covar,
fx,
fy,
cx,
cy,
width,
height,
glm::transpose(v_covar2d),
Expand Down
2 changes: 1 addition & 1 deletion gsplat/cuda/csrc/proj_fwd.cu
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ __global__ void proj_fwd_kernel(
fisheye_proj(mean, covar, fx, fy, cx, cy, width, height, covar2d, mean2d);
break;
case CameraModelType::SPHERICAL: // spherical projection
spherical_proj(mean, covar, fx, fy, cx, cy, width, height, covar2d, mean2d);
spherical_proj(mean, covar, width, height, covar2d, mean2d);
break;
}

Expand Down
8 changes: 0 additions & 8 deletions gsplat/cuda/csrc/utils.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -521,10 +521,6 @@ inline __device__ void spherical_proj(
// inputs
const vec3<T> mean3d,
const mat3<T> cov3d,
const T fx,
const T fy,
const T cx,
const T cy,
const uint32_t width,
const uint32_t height,
// outputs
Expand Down Expand Up @@ -565,10 +561,6 @@ inline __device__ void spherical_proj_vjp(
// fwd inputs
const vec3<T> mean3d,
const mat3<T> cov3d,
const T fx,
const T fy,
const T cx,
const T cy,
const uint32_t width,
const uint32_t height,
// grad outputs
Expand Down

0 comments on commit b0e978d

Please sign in to comment.