Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running the Data Example #1

Closed
ntseng450 opened this issue Jun 29, 2021 · 1 comment
Closed

Running the Data Example #1

ntseng450 opened this issue Jun 29, 2021 · 1 comment

Comments

@ntseng450
Copy link

ntseng450 commented Jun 29, 2021

Hello, the results look very impressive in the paper and I'm excited to try out the repository myself but am having some issues with getting the scripts in the Read-Me to run without error.

I downloaded the data and went to the nerfactor section step 1 for learn data-driven BRDF priors. At this point I don't have data/brdf_merl_npz/ims512_envmaph16_spp1, is this something that needs to be generated with data_gen/merl/make_dataset_run.sh? If so, when I follow the instructions in the data_gen folder, I get the following error message when running data_gen/merl/make_dataset_run.sh.

Training & Validation: 0%| | 0/4 [00:00<?, ?it/s]Loading MERL-BRDF:
/mnt/c/Users/Documents/wrk_dir/data/brdf_merl/Copyright_Notice.txt
Training & Validation: 0%| | 0/4 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/mnt/c/Users/Documents/wrk_dir/code/nerfactor/data_gen/merl/make_dataset.py", line 144, in
app.run(main)
File "/home/user/anaconda3/envs/nerfactor/lib/python3.6/site-packages/absl/app.py", line 312, in run
_run_main(main, args)
File "/home/user/anaconda3/envs/nerfactor/lib/python3.6/site-packages/absl/app.py", line 258, in _run_main
sys.exit(main(argv))
File "/mnt/c/Users/Documents/wrk_dir/code/nerfactor/data_gen/merl/make_dataset.py", line 75, in main
brdf = MERL(path=path)
File "/mnt/c/Users/Documents/wrk_dir/code/nerfactor/brdf/merl/merl.py", line 31, in init
cube_rgb = merl.readMERLBRDF(path) # (phi_d, theta_h, theta_d, ch)
File "/mnt/c/Users/Documents/wrk_dir/code/nerfactor/third_party/nielsen2015on/merlFunctions.py", line 19, in readMERLBRDF
BRDFVals = np.swapaxes(np.reshape(vals,(dims[2], dims[1], dims[0], 3),'F'),1,2)
File "<array_function internals>", line 6, in reshape
File "/home/user/anaconda3/envs/nerfactor/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 299, in reshape
return _wrapfunc(a, 'reshape', newshape, order=order)
File "/home/user/anaconda3/envs/nerfactor/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 58, in _wrapfunc
return bound(*args, **kwds)
ValueError: cannot reshape array of size 144 into shape (808591476,1751607666,2037411651,3)

Resolved: need to move the brdfs folder out of the downloaded data and move/delete the Readme inside the folder.

@cjw531
Copy link

cjw531 commented Sep 3, 2021

Here is a more detailed explanation how to address this shape mismatch / incorrectly loaded MERL dataset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants