Kai-46 / ARF-svox2

Artistic Radiance Fields
BSD 2-Clause "Simplified" License
498 stars 42 forks source link

There's something wrong with style 2 #5

Closed Sim233 closed 1 year ago

Sim233 commented 2 years ago

When I try

. ./try_llff.sh fortress 2

or other scene name, the program will stop with error

Traceback (most recent call last):
  File "opt_style.py", line 765, in <module>
    train_step(optim_type="image")
  File "opt_style.py", line 640, in train_step
    rgb_pred_grad, loss_dict = compute_image_loss()
  File "opt_style.py", line 621, in compute_image_loss
    style_img.permute(2, 0, 1).unsqueeze(0),
RuntimeError: number of dims don't match in permute

and

Traceback (most recent call last):
  File "render_imgs.py", line 115, in <module>
    grid = svox2.SparseGrid.load(args.ckpt, device=device)
  File "[something omitted]/anaconda3/envs/arf-svox2/lib/python3.8/site-packages/svox2/svox2.py", line 1645, in load
    z = np.load(path)
  File "[something omitted]/anaconda3/envs/arf-svox2/lib/python3.8/site-packages/numpy/lib/npyio.py", line 428, in load
    fid = open(os_fspath(file), "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'ckpt_arf/llff/room_2/ckpt.npz/ckpt.npz'

But there's no error with style 14. I didn't try other styles, and I haven't figured out the reason.

I'm currently using python=3.8.8, pytorch=1.7.0, torchvision=0.8.1, cudatoolkit=10.1 (the other packages are the same as environment.yml). I don't know whether it is caused by package version difference.

Sim233 commented 2 years ago

Oh, the error is generated by . ./try_llff.sh room 2, but other scenes perform similarly.

LiquidAmmonia commented 1 year ago

This is because the style 2 image is a grayscale image, which have one less channel than other style images, you might need to change the dataset class to solve this.

Sim233 commented 1 year ago

Thanks a lot!