Skip to content

fix "ns-render interpolate", so that it can render the input views, add crop box - #2059

Open
f-dy wants to merge 3 commits into
nerfstudio-project:mainfrom
f-dy:nsrender-interpolate-crop
Open

fix "ns-render interpolate", so that it can render the input views, add crop box#2059
f-dy wants to merge 3 commits into
nerfstudio-project:mainfrom
f-dy:nsrender-interpolate-crop

Conversation

@f-dy

@f-dy f-dy commented Jun 9, 2023

Copy link
Copy Markdown
Contributor

Previously, ns-render interpolate:

  • Ignored distortion parameters
  • Used an interpolated focal length, but principal point was from the first camera
  • Rendered all images with the same size, even if input views were of different sizes
  • Forgot to render the last frame
  • There was no default support for crop box and background color, except when rendering from a camera path, where these would exclusively be fetched from the camera_path.json

Now:

  • There is an command-line option --fixed-intrinsics to keep fixed intrinsics through the whole sequence, but they are all interpolated by default
  • Everything is interpolated, even size, so that ns-render interpolate --interpolation-steps 1 should render exactly the input images
  • The last frame is rendered
  • All render modes have the options --use-bounding-box --background-color --bounding-box-min --bouding-box-max (same syntax as ns-export), which can override the json settings when rendering a camera path.

Works great with the gray colormap from #2058 to render object masks.

…d crop box

Previously, ns-render interpolate:
- ignored distortion parameters
- used an interpolated focal length, but principal point was from the first camera
- rendered all images with the same size, even if input views were of different sizes
- forgot to render the last frame
- There was no default support for crop box and background color, except when rendering from a camera path, where these would exclusively be fetched from the camera_path.json

Now:
- There is an command-line option `--fixed-intrinsics` to keep fixed intrinsics through the whole sequence, but they are all interpolated by default
- Everything is interpolated, even size, so that `ns-render interpolate -step 1` should render exactly the input images
- All render modes have the options `--use-bounding-box` `--background-color` `--bounding-box-min` `--bouding-box-max` (same syntax as ns-export), which can override the json settings when rendering a camera path.

Works great with the gray colormap from nerfstudio-project#2058 to render object masks.
@f-dy f-dy changed the title fix "ns-render interpolate", so that it can render the input view, add crop box fix "ns-render interpolate", so that it can render the input views, add crop box Jun 9, 2023
@tancik

tancik commented Jun 10, 2023

Copy link
Copy Markdown
Contributor

This is great!
Can you post example videos before and after.
Also how are the videos saved when the resolution changes?

@tancik

tancik commented Jun 24, 2023

Copy link
Copy Markdown
Contributor

Hi, just checking in on this PR, looking forward to it being incorporated.

Resolve conflicts in camera_utils.py, camera_paths.py, render.py:
- Unify get_interpolated_poses_many to support BOTH main's time
  interpolation and this PR's widths/heights/dist_coeffs, via
  index-based pose ordering (get_ordered_pose_indices).
- Thread times + sizes + dist_coeffs through get_interpolated_camera_path
  and set them on the built Cameras.
- render.py: adopt main's OrientedBox crop and render_nearest_camera
  (superseding this PR's AABB crop) and re-apply the PR's fixed_intrinsics
  option on RenderInterpolated.
f-dy pushed a commit to f-dy/nerfstudio that referenced this pull request Jul 28, 2026
Completes the nerfstudio-project#2059 integration: get_interpolated_camera_path requires
fixed_intrinsics, but RenderInterpolated neither exposed the flag nor
passed it, which would crash 'ns-render interpolate'.
Completes the nerfstudio-project#2059 integration: get_interpolated_camera_path requires
fixed_intrinsics, but RenderInterpolated neither exposed the flag nor
passed it, which would crash 'ns-render interpolate'.
f-dy pushed a commit to f-dy/nerfstudio that referenced this pull request Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants