Comments (4)
Fixed this issue by re-checking the *.binary
merl dataset. Below is how I solved this issue and load the T/V/T set in a proper way.
TL;DR> The provided path is incorrect in the README, if you are using the downloaded MERL dataset directly, you have to modify the path. The data path that you use in indir
variable should contain the actual MERL dataset, not other unnecessary files that are not ending with *.binary
.
Download Dataset
When you download the MERL BRDF dataset, the directory structure will be as follows:
brdf_merl/
├── Readme.txt
├── Copyright_Notice.txt
├── brdfs
│ ├── Readme.txt
│ └── *.binary (<--100 of them are here, omitted)
└── code
└── BRDFRead.cpp
Modify the path
In the README, the data path is set as follows:
indir="$proj_root/data/brdf_merl"
However, if you use this brdf_merl/
directory directly here, it will give you an error like me because the data generator code is trying to read the invalid folders/files such as Readme.txt
, Copyright_Notice.txt
, code/
, and etc. Your folder path should only contain the *.binary
files.
Also, the brdfs/
folder has another Readme.txt
file, so remember to get rid of this before running the code.
Therefore, fixing the indir
variable into:
indir="$proj_root/data/brdf_merl/brdfs"
will resolve the issue because this brdfs folder contains the actual dataset only.
*Side note: I also set ims='512'
instead of 256 because in the later step where you train brdf priors, it seems like the data_root
variable uses the one with the size of 512.
from nerfactor.
from nerfactor.
I tried to recreate the *.npz
dataset, with train/val/test split. However, it only creates test.npz
and gives this reshape error as follows:
$ REPO_DIR="$repo_dir" "$repo_dir"/data_gen/merl/make_dataset_run.sh "$indir" "$ims" "$outdir"
Training & Validation: 0%| | 0/5 [00:00<?, ?it/s]Loading MERL-BRDF: /Users/jchoi/workspace/nerfactor/data/brdf_merl/Copyright_Notice.txt
Training & Validation: 0%| | 0/5 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/Users/jchoi/workspace/nerfactor/data_gen/merl/make_dataset.py", line 144, in <module>
app.run(main)
File "/Users/jchoi/miniconda3/envs/nerfactor/lib/python3.6/site-packages/absl/app.py", line 312, in run
_run_main(main, args)
File "/Users/jchoi/miniconda3/envs/nerfactor/lib/python3.6/site-packages/absl/app.py", line 258, in _run_main
sys.exit(main(argv))
File "/Users/jchoi/workspace/nerfactor/data_gen/merl/make_dataset.py", line 75, in main
brdf = MERL(path=path)
File "/Users/jchoi/workspace/nerfactor/brdf/merl/merl.py", line 31, in __init__
cube_rgb = merl.readMERLBRDF(path) # (phi_d, theta_h, theta_d, ch)
File "/Users/jchoi/workspace/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 "/Users/jchoi/miniconda3/envs/nerfactor/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 299, in reshape
return _wrapfunc(a, 'reshape', newshape, order=order)
File "/Users/jchoi/miniconda3/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)
I believe the directory where I have saved the donwloaded BRDF dataset does not have issue since it creates the test numpy array.
It seems like someone opened same issue before, not sure how he resolved it by deleting readme inside the downloaded brdf folder.
UPDATE:
I got this message, but no train.npz
nor validation.npz
created.
Training & Validation: 0it [00:00, ?it/s]
from nerfactor.
Hi, I suspect the BRDF data were not even successfully loaded. Could you try inserting a breakpoint right before nerfactor/third_party/nielsen2015on/merlFunctions.py
L19? What is vals
at that point? If vals
is empty there, then that explains the errors you had.
from nerfactor.
Related Issues (20)
- How to calculate geometry buffers from MVS geometry ? HOT 1
- Rendering scripts HOT 1
- questions about hdrs. HOT 1
- Question about incompatible shapes(0,3) and (100,3) at II. Joint Optimization in Training, Validation, and Testing HOT 19
- gradient error in Joint Optimization HOT 6
- brdf_scale HOT 5
- MLPs wrong skip connection
- Crash at shape pre-training HOT 7
- OOM at II. Joint Optimization in Training, Validation, and Testing HOT 2
- Wrong NeRF and surface
- How long will it take to run the third part in the ./nerfactor HOT 1
- Rendering results are all white after training the vanilla NeRF in step1 HOT 1
- Shape error at II. Joint Optimization HOT 1
- Can we extract mesh from the system by marching cubes? HOT 1
- About create my own dataset
- Relighting Results Background Color HOT 1
- When I train vanilla nerf, there are countless threads.
- It is slow to render my own synthetic data, can we use gpu to render? HOT 1
- Shape pre-trained stage error HOT 2
- How about the light direction and the vier direction?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nerfactor.