Coder Social home page Coder Social logo

hdr-nerf's Issues

Bug from you recently added code warm_crf

Try to run your code for trainning on your dataset. When code goes to warm_crf, error occurred: Generator type has no operator "+";

While, you just add with "+" model.exps_linears_r.parameters() + model.exps_linears_g.parameters();

But nn.Module.parameters() method returns a iterator of parameters.

I guess you were going to apend all parameters into a list and pass to optimizer.

So, you probably should write it like:

params_to_train = [
    {'params':model.exps_linears_r.parameters()},
    {'params':model.exps_linears_g.parameters()},
    {'params':model.exps_linears_b.parameters()},
    {'params':model.r_l_linner.parameters()},
    {'params':model.g_l_linner.parameters()},
    {'params':model.b_l_linner.parameters()},
]
optimizer_crf = torch.optim.Adam(params_to_train, lr=5e-4)

Please let me know if I was thinking wrong.

sponza weird phenomenon

Hi~ I have tested a lot of data, which all look impressive. But when I try the sponza data, the HDR img and HDR img after tonemapper look weird, the ldr img looks good, could you explain the reason?

image image image

关于论文的一些疑问

作者你好,感谢你的工作和开源的代码,我给你点上 star 了

我在读你文章的过程中,遇到了以下几个问题,希望能得到你的解答:

(i) 首先是 Unit exposure loss. 我对这个 loss 的理解是在 e △t = 1 时加一个限制,让此时的 color 约束在pixel value 中位数。请问你是如何保证 e △t = 1 的呢?不知道我理解得对不对哈 :)

(ii) 第二个问题是为什么不直接采用一个显式的 tone mapping 函数把 HDR 图像转成 LDR 图像,比如说,采用补充材料中的公式 (16),把 EV 直接替换成 △t。这样子不是参数量更小,速度更快,解释性更强,更好控制吗?以及 关于 M(E) 的公式,Eq. (14) 和 Eq. (15) 为什么要采用两种不同的表达式呢?公式 (14) 只是为了做 evaluation 吗?

Question about unit exposure loss

Hi, could you please explain the unit exposure loss in the paper?

In the paper, eq(8) says "C = g(ln(e) + ln(t))" and eq(12) says "Lu = l2(g(0) -C0)"
When ln(e) + ln(t) == 0, both e and t are 1. If this is the case, should we calculate C0 to be the average pixel value when t == 1ms?

ValueError: could not find a format to write the specified file in single-image mode

Hello, I am interested in your related work. But I am facing this error when I run the code "python run_nerf.py --config configs/chair.txt"

Error:
" Traceback (most recent call last):
File "run_nerf.py", line 788, in
train()
File "run_nerf.py", line 743, in train
render_path(torch.Tensor(poses[i_test]).to(device), torch.Tensor(exps_source[i_test]).to(device), hwf, K, args.chunk, render_kwargs_test,
File "run_nerf.py", line 205, in render_path
imageio.imwrite(filename3, rgbs_h[-1])
File "/home/z3/anaconda3/envs/HDR-NeRF/lib/python3.8/site-packages/imageio/core/functions.py", line 303, in imwrite
writer = get_writer(uri, format, "i", **kwargs)
File "/home/z3/anaconda3/envs/HDR-NeRF/lib/python3.8/site-packages/imageio/core/functions.py", line 226, in get_writer
raise ValueError(
ValueError: Could not find a format to write the specified file in single-image mode"

data split for real dataset

Which are the training views and which are the testing views for the real data?
The images are roughly in 5x7 grid but the order is not usual.

python process is 'killed'

HI @shsf0817,

whenever I run this command
python3 run_nerf.py --config configs/flower.txt

I get this output on the ubuntu terminal
killed

could you help?

No such file or directory: '/your_data_path/flower/poses_bounds_exps.npy'

Hello @shsf0817,

This is amazing work. I am facing this error after running command

python3 run_nerf.py --config configs/flower.txt

Error

Traceback (most recent call last):
  File "/home/adwait/hdr-nerf/run_nerf.py", line 790, in <module>
    train()
  File "/home/adwait/hdr-nerf/run_nerf.py", line 458, in train
    images, poses, bds, exps_source, render_poses, render_exps, i_test = load_real_llff_data(args.datadir, args.factor,
  File "/home/adwait/hdr-nerf/load_real_llff.py", line 236, in load_real_llff_data
    poses, bds, exp, imgs = _load_data(basedir, factor=factor) # factor=8 downsamples original imgs by 8x
  File "/home/adwait/hdr-nerf/load_real_llff.py", line 61, in _load_data
    poses_arr = np.load(os.path.join(basedir, 'poses_bounds_exps.npy'))
  File "/home/adwait/.local/lib/python3.10/site-packages/numpy/lib/npyio.py", line 390, in load
    fid = stack.enter_context(open(os_fspath(file), "rb"))
FileNotFoundError: [Errno 2] No such file or directory: '/your_data_path/flower/poses_bounds_exps.npy'

Please could you help?

code deprecation

Hi @shsf0817,

Apologies for creating an issue again.

The two lines you can see below are deprecated.

from skimage.measure import compare_ssim
from skimage.measure import compare_psnr

The functions compare_ssim and compare_psnr are changed in the skimage library.
These lines are to be changed with

from skimage.metrics import structural_similarity
from skimage.metrics import peak_signal_noise_ratio

For more info, see this issue: scikit-image/scikit-image#3567

why $cp imgdir_orig imgdir when factor=4

In load_real_llff.py, you use $cp imgdir_orig imgidr to produce input_images_4.
It seems not reasonable.
I think we should actually scale the original images and then put them into the folder input_images_4, right?

Which OS to run this rep on?

Hi! I would be greatly helped if you could tell me which OS this was run on? I ran through WSL and the packages were not installed. However, using anaconda prompt on windows installed all the packages but the command for rendering a demo fails: (python3 run_nerf.py --config configs/demo.txt --render_only)

Thank you

无法复现论文中的结果

你好,我直接用你提供的weights和代码来跑 render only 做测试,

但是却发现跑出来的hdr图片和论文中的相差甚远

这是跑出来的:
图片 1
WechatIMG11442

这是论文中的:
截屏2024-04-12 下午2 17 25

我已经采用了 Phontomatix 来看并截图了。可以解答一下吗?以及论文中,synthetic 数据上的 HDR 指标是怎么计算的。我跑synthetic 实验,指标也跑不到论文中的指标。

关于论文复现的一些疑问

J%(4~06@YT%IDC)2)S7{7`U

036_ours
第一张图像是你们的代码第20w轮渲染出来的测试集的HDR图像,第二张是对应的LDR图像 我们在测试你们模型的时候,发现会出现一些问题:

  1. 有时候HDR图像出现以上情况,但是LDR图像却正确
  2. 有时候HDR全白,而LDR全黑
    请问能解释一下吗?这种情况我们在跑你们代码的时候出现好多次了,同一个场景可能得跑好几次才也有可能出现正确情况。而且我们还发现如果将同一视角的各种光照放进去训练,这种情况不太出现。

无法打开数据集里面的test_hdr里面的exr文件

image

感谢作者的开源工作,但是我有个问题,请问为啥我用phototmatrix打不开test_hdr里面的exr文件呢?其他代码里创建的exr文件可以打开,唯独打不开这个数据集里面的exr文件

did overfitting problem appear since every view has different exposure image

I'm working on a similar nerf reconstruction problem, and each view contains 20 different exposure of images, and I randomly select 2 or 3 images for each view.
Here's the problem, nerf got trapped into local minima, like overfitting, in order to get less loss at each view, I wonder how you overcome the overfitting problem (exposure ambiguity) at each view

''camera_angle_x'' seems to be wrong for several scenes

When I use colmap to process the synthetic scene chair, I find that the focal length is far away from that computed by camera_angle_x in transforms_train.json. Then I check the blender files for all 8 synthetic scenes. 5 scenes are correct while 3 scenes (chair, diningroom, sponza) are wrong.

1.chair: blender data is CAMERA_FOV = 33.8984° (0.5916387 in radian) while json data is camera_angle_x = 0.8575548529624939 in radian.
2.diningroom: blender data is CAMERA_FOV = 48.498° (0.8464498 in radian) while json data is camera_angle_x = 1.1884186267852783 in radian.
3.sponza: blender data is CAMERA_FOV = 22.8952° (0.39959663 in radian) while json data is camera_angle_x = 0.5897874236106873 in radian.

When using the blender data instead json data for the 3 scenes, I can obtain focal length close to the colmap results.

Cannot reproduce the results reported in your paper

Hi, thanks for your work and datasets.

I am a little confused because I cannot reproduce the HDR results reported in your paper.

By using your code, the reconstructed HDR PSNR results on the synthetic dataset is
截屏2024-04-13 上午11 48 19

But the results reported in the paper is
截屏2024-04-13 上午11 48 30

Could you please help me explain this? Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.