mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-03 14:28:41 +08:00
save renders to a folder and bump viewer version (#733)
save data to renders folder. bump viewer
This commit is contained in:
1 parent
26a41923e5
commit
b37eae5bb2
6 files changed
+9
-9
No files matched your search
+2
-4
@@ -168,10 +168,8 @@ outputs/
|
|||||||
events.out.*
|
events.out.*
|
||||||
|
|
||||||
# Data
|
# Data
|
||||||
data/
|
data
|
||||||
data_*/
|
!*/data
|
||||||
!nerfstudio/data
|
|
||||||
!docs/tutorials/data/
|
|
||||||
|
|
||||||
# Misc
|
# Misc
|
||||||
old/
|
old/
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ After your model has trained, you can headlessly render out a video of the scene
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# assuming previously ran `ns-train nerfacto`
|
# 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
|
# 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.
|
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
|
```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}`.
|
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",
|
"name": "viewer",
|
||||||
"homepage": ".",
|
"homepage": ".",
|
||||||
"version": "22-10-02-0",
|
"version": "22-10-07-0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/react": "^11.10.4",
|
"@emotion/react": "^11.10.4",
|
||||||
|
|||||||
@@ -469,7 +469,7 @@ export default function CameraPanel(props) {
|
|||||||
// Copy the text inside the text field
|
// Copy the text inside the text field
|
||||||
const config_filename = `${config_base_dir}/config.yml`;
|
const config_filename = `${config_base_dir}/config.yml`;
|
||||||
const camera_path_filename = `${config_base_dir}/camera_path.json`;
|
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);
|
navigator.clipboard.writeText(cmd);
|
||||||
|
|
||||||
const camera_path_payload = {
|
const camera_path_payload = {
|
||||||
|
|||||||
+3
-1
@@ -80,6 +80,8 @@ def _render_trajectory_video(
|
|||||||
images.append(image)
|
images.append(image)
|
||||||
|
|
||||||
fps = len(images) / seconds
|
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"):
|
with console.status("[yellow]Saving video", spinner="bouncingBall"):
|
||||||
media.write_video(output_filename, images, fps=fps)
|
media.write_video(output_filename, images, fps=fps)
|
||||||
console.rule("[green] :tada: :tada: :tada: Success :tada: :tada: :tada:")
|
console.rule("[green] :tada: :tada: :tada: Success :tada: :tada: :tada:")
|
||||||
@@ -101,7 +103,7 @@ class RenderTrajectory:
|
|||||||
# Filename of the camera path to render.
|
# Filename of the camera path to render.
|
||||||
camera_path_filename: Path = Path("camera_path.json")
|
camera_path_filename: Path = Path("camera_path.json")
|
||||||
# Name of the output file.
|
# Name of the output file.
|
||||||
output_path: Path = Path("output.mp4")
|
output_path: Path = Path("renders/output.mp4")
|
||||||
# How long the video should be.
|
# How long the video should be.
|
||||||
seconds: float = 5.0
|
seconds: float = 5.0
|
||||||
# A hack to double the number of samples for the nerfacto method.
|
# A hack to double the number of samples for the nerfacto method.
|
||||||
|
|||||||
Reference in new issue
Block a user