Closed ryoukawanamixm closed 5 months ago
This error occurred only for Custom data, and worked fine for the following data.
ns-train bad-gaussians \
--data data/real_camera_motion_blur/blurdecoration \
--pipeline.model.camera-optimizer.mode "cubic" \
--vis viewer+tensorboard \
deblur-nerf-data
Hi, this problem should be related to OpenCV's bug with image undistortion, and has been discussed in https://github.com/nerfstudio-project/nerfstudio/pull/2683.
If you don't want to touch nerfstudio's code, here's another workaround: I provided an option to disable the undistortion process in the DeblurNerfDataParser
, you can use it instead of the NerfstudioDataParser
(with some additional parameters to revert some special settings for the deblur-nerf dataset)
ns-train bad-gaussians \
--data ../data/badgs/custom_dataset/my_data \
--vis viewer+tensorboard \
deblur-nerf-data \
--drop-distortion True \
--colmap_path colmap/sparse/0 \
--scale_factor 1.0
Thanks for the quick reply!! However, I got the similar error.
File "/workspaces/nerfstudio/nerfstudio/pipelines/base_pipeline.py", line 340, in get_eval_image_metrics_and_images
metrics_dict, images_dict = self.model.get_image_metrics_and_images(outputs, batch)
File "/workspaces/nerfstudio/nerfstudio/models/splatfacto.py", line 913, in get_image_metrics_and_images
combined_rgb = torch.cat([gt_rgb, predicted_rgb], dim=1)
RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 3024 but got size 3023 for tensor number 1 in the list.
Hi, I will try to reproduce this problem, and it may take some time. Before that, you can finish the training by disabling the evaluation during training: simply replace --vis viewer+tensorboard
with --vis viewer
.
(FYI, I noticed that the resolution of your custom dataset is quite high. Thus maybe you will need to add the downsampling --downscale_factor 2
or coarse-to-fine training --pipeline.model.num_downscales 2 --pipeline.model.resolution_schedule 3000
parameters in the CLI.)
I saw https://github.com/nerfstudio-project/nerfstudio/pull/2683. And changed image = image[y : y + h, x : x + w] image = image[y : y + h + 1, x : x + w + 1] and other relevant part. It works!
I got
RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 756 but got size 755 for tensor number 1 in the list.
Does anyone know how to solve this?Environment
packages
Setup
Script
Error