Skip to content

Commit

Permalink
Merge commit 'cdd1d1507e78c92fdf0c192a2b2739950dec7d7c'
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinXu02 committed Jan 19, 2024
2 parents a10c777 + cdd1d15 commit 36c8a59
Show file tree
Hide file tree
Showing 22 changed files with 903 additions and 219 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/core_code_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ jobs:
run: |
python ./nerfstudio/scripts/docs/add_nb_tags.py --check
- name: Run Ruff Linter
run: ruff check docs/ nerfstudio/ tests/
run: ruff check docs/ nerfstudio/ tests/ --output-format=github
- name: Run Ruff Formatter
run: ruff format docs/ nerfstudio/ tests/ --check
run: ruff format docs/ nerfstudio/ tests/ --diff
- name: Run Pyright
run: |
pyright
Expand Down
2 changes: 1 addition & 1 deletion nerfstudio/cameras/camera_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ def fisheye624_unproject_helper(uv, params, max_iters: int = 5):
function so this solves an optimization problem using Newton's method to get
the inverse.
Inputs:
uv: BxNx3 tensor of 2D pixels to be projected
uv: BxNx2 tensor of 2D pixels to be unprojected
params: Bx16 tensor of Fisheye624 parameters formatted like this:
[f_u f_v c_u c_v {k_0 ... k_5} {p_0 p_1} {s_0 s_1 s_2 s_3}]
or Bx15 tensor of Fisheye624 parameters formatted like this:
Expand Down
2 changes: 1 addition & 1 deletion nerfstudio/cameras/cameras.py
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ def _compute_rays_for_vr180(

assert distortion_params is not None
masked_coords = pcoord_stack[coord_mask, :]
# The fisheye unprojection does not rely on planar/pinhold unprojection, thus the method needs
# The fisheye unprojection does not rely on planar/pinhole unprojection, thus the method needs
# to access the focal length and principle points directly.
camera_params = torch.cat(
[
Expand Down
3 changes: 1 addition & 2 deletions nerfstudio/configs/method_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
from nerfstudio.data.datamanagers.parallel_datamanager import ParallelDataManagerConfig
from nerfstudio.data.datamanagers.random_cameras_datamanager import RandomCamerasDataManagerConfig
from nerfstudio.data.dataparsers.blender_dataparser import BlenderDataParserConfig
from nerfstudio.data.dataparsers.colmap_dataparser import ColmapDataParserConfig
from nerfstudio.data.dataparsers.dnerf_dataparser import DNeRFDataParserConfig
from nerfstudio.data.dataparsers.instant_ngp_dataparser import InstantNGPDataParserConfig
from nerfstudio.data.dataparsers.nerfstudio_dataparser import NerfstudioDataParserConfig
Expand Down Expand Up @@ -600,7 +599,7 @@
gradient_accumulation_steps={"camera_opt": 100},
pipeline=VanillaPipelineConfig(
datamanager=FullImageDatamanagerConfig(
dataparser=ColmapDataParserConfig(load_3D_points=True),
dataparser=NerfstudioDataParserConfig(load_3D_points=True),
),
model=GaussianSplattingModelConfig(),
),
Expand Down
4 changes: 2 additions & 2 deletions nerfstudio/data/datamanagers/base_datamanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,8 @@ def _get_pixel_sampler(self, dataset: TDataset, num_rays_per_batch: int) -> Pixe
CONSOLE.print("[bold yellow]Warning: Some cameras are equirectangular, but using default pixel sampler.")

fisheye_crop_radius = None
if dataset.cameras.metadata is not None and "fisheye_crop_radius" in dataset.cameras.metadata:
fisheye_crop_radius = dataset.cameras.metadata["fisheye_crop_radius"]
if dataset.cameras.metadata is not None:
fisheye_crop_radius = dataset.cameras.metadata.get("fisheye_crop_radius")

return self.config.pixel_sampler.setup(
is_equirectangular=is_equirectangular,
Expand Down
Loading

0 comments on commit 36c8a59

Please sign in to comment.