WU-CVGL / BAD-NeRF

[CVPR 2023] 😈BAD-NeRF: Bundle Adjusted Deblur Neural Radiance Fields
https://wangpeng000.github.io/BAD-NeRF/
MIT License
185 stars 13 forks source link

An Error during training #1

Closed tingxueronghua closed 1 year ago

tingxueronghua commented 1 year ago

Thanks for your great work! I am trying to do experiments on your code. I am not familiar with the code now, so I am inquiring some bugs. By the way, I noticed that there is no "ignoregamma" in the imageio.read function now, so I remove the "ignoregamma=True". This is the only change in my codebase.

But during training, I noticed an error:

Traceback (most recent call last): File "train.py", line 324, in train() File "train.py", line 257, in train ssim_render = compute_img_metric(imgs_sharp, imgs_render, 'ssim') File "/data/data2/nerf/BAD-NeRF/metrics.py", line 82, in compute_img_metric value, ssimmap = photometric["ssim"]( File "/data/data1/anaconda3/envs/deblur/lib/python3.8/site-packages/skimage/metrics/_structural_similarity.py", line 178, in structural_similarity raise ValueError( ValueError: win_size exceeds image extent. Either ensure that your images are at least 7x7; or pass win_size explicitly in the function call, with an odd value less than or equal to the smaller side of your images. If your images are multichannel (with color channels), set channel_axis to the axis number corresponding to the channels.

Do you have any idea about this?

wangpeng000 commented 1 year ago

Hello, thanks for your attention to our work. About the "compute_img_metric" error, I think it is mainly caused by the "scikit-image" version. I guess your version may be very new and my version is 0.19.2. You can downgrade your scikit-image version and try again.

LingzheZhao commented 1 year ago

I reproduced this error with scikit-image==0.20.0, and confirmed that downgrading with pip install -U "scikit-image<0.20" resolves this issue. If you still have any questions or concerns, please feel free to let us know how we can help.

tingxueronghua commented 1 year ago

Thanks!