mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-11 10:34:29 +08:00
save renders to a folder and bump viewer version (#733)
save data to renders folder. bump viewer
This commit is contained in:
parent
26a41923e5
commit
b37eae5bb2
6
.gitignore
vendored
6
.gitignore
vendored
@ -168,10 +168,8 @@ outputs/
|
||||
events.out.*
|
||||
|
||||
# Data
|
||||
data/
|
||||
data_*/
|
||||
!nerfstudio/data
|
||||
!docs/tutorials/data/
|
||||
data
|
||||
!*/data
|
||||
|
||||
# Misc
|
||||
old/
|
||||
|
||||
@ -176,7 +176,7 @@ After your model has trained, you can headlessly render out a video of the scene
|
||||
|
||||
```bash
|
||||
# assuming previously ran `ns-train nerfacto`
|
||||
ns-render --load-config=outputs/data-nerfstudio-poster/nerfacto/{TIMESTAMP}/config.yml --traj=spiral --output-path=output.mp4
|
||||
ns-render --load-config=outputs/data-nerfstudio-poster/nerfacto/{TIMESTAMP}/config.yml --traj=spiral --output-path=renders/output.mp4
|
||||
```
|
||||
|
||||
# Learn More
|
||||
|
||||
@ -120,7 +120,7 @@ For slower methods where the viewer is not recommended, we default to [Wandb](ht
|
||||
We also provide options to render out the scene of a trained model with a custom trajectory and save the output to a video.
|
||||
|
||||
```bash
|
||||
ns-render --load-config={PATH_TO_CONFIG} --traj=spiral --output-path=output.mp4
|
||||
ns-render --load-config={PATH_TO_CONFIG} --traj=spiral --output-path=renders/output.mp4
|
||||
```
|
||||
|
||||
While we provide pre-specified trajectory options, `--traj={spiral, interp, filename}` we can also specify a custom trajectory if we specify `--traj=filename --camera-path-filename {PATH}`.
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "viewer",
|
||||
"homepage": ".",
|
||||
"version": "22-10-02-0",
|
||||
"version": "22-10-07-0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.10.4",
|
||||
|
||||
@ -469,7 +469,7 @@ export default function CameraPanel(props) {
|
||||
// Copy the text inside the text field
|
||||
const config_filename = `${config_base_dir}/config.yml`;
|
||||
const camera_path_filename = `${config_base_dir}/camera_path.json`;
|
||||
const cmd = `ns-render --load-config ${config_filename} --traj filename --camera-path-filename ${camera_path_filename} --output-path output.mp4`;
|
||||
const cmd = `ns-render --load-config ${config_filename} --traj filename --camera-path-filename ${camera_path_filename} --output-path renders/output.mp4`;
|
||||
navigator.clipboard.writeText(cmd);
|
||||
|
||||
const camera_path_payload = {
|
||||
|
||||
@ -80,6 +80,8 @@ def _render_trajectory_video(
|
||||
images.append(image)
|
||||
|
||||
fps = len(images) / seconds
|
||||
# make the folder if it doesn't exist
|
||||
output_filename.parent.mkdir(parents=True, exist_ok=True)
|
||||
with console.status("[yellow]Saving video", spinner="bouncingBall"):
|
||||
media.write_video(output_filename, images, fps=fps)
|
||||
console.rule("[green] :tada: :tada: :tada: Success :tada: :tada: :tada:")
|
||||
@ -101,7 +103,7 @@ class RenderTrajectory:
|
||||
# Filename of the camera path to render.
|
||||
camera_path_filename: Path = Path("camera_path.json")
|
||||
# Name of the output file.
|
||||
output_path: Path = Path("output.mp4")
|
||||
output_path: Path = Path("renders/output.mp4")
|
||||
# How long the video should be.
|
||||
seconds: float = 5.0
|
||||
# A hack to double the number of samples for the nerfacto method.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user