Skip to content

Commit

Permalink
Fixed to use gsplat==1.0.0
Browse files Browse the repository at this point in the history
Ref.) LightwheelAI#20

Signed-off-by: Shintaro Sakoda <[email protected]>
  • Loading branch information
SakodaShintaro committed Jul 3, 2024
1 parent 6376829 commit 53e8f1e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
18 changes: 14 additions & 4 deletions street_gaussians_ns/sgn_splatfacto.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
from dataclasses import dataclass, field
from typing import Dict, List, Optional, Tuple, Type, Union

from gsplat._torch_impl import quat_to_rotmat
from gsplat.project_gaussians import project_gaussians
from gsplat.rasterize import rasterize_gaussians
from gsplat.sh import num_sh_bases, spherical_harmonics
from gsplat.cuda_legacy._torch_impl import quat_to_rotmat
from gsplat import project_gaussians, rasterize_gaussians, spherical_harmonics
from pytorch_msssim import SSIM
from torch.nn import Parameter
from typing_extensions import Literal
Expand All @@ -36,6 +34,18 @@
from street_gaussians_ns.data.utils.data_utils import SemanticType


def num_sh_bases(degree: int):
if degree == 0:
return 1
if degree == 1:
return 4
if degree == 2:
return 9
if degree == 3:
return 16
return 25


def random_quat_tensor(N):
"""
Defines a random quaternion tensor of shape (N, 4)
Expand Down
2 changes: 1 addition & 1 deletion street_gaussians_ns/sgn_splatfacto_scene_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import copy
import math

from gsplat.sh import spherical_harmonics
from gsplat import spherical_harmonics
from pytorch3d.transforms import quaternion_multiply
from torch.nn import Parameter
import mediapy as media
Expand Down

0 comments on commit 53e8f1e

Please sign in to comment.