chenhsuanlin / bundle-adjusting-NeRF

BARF: Bundle-Adjusting Neural Radiance Fields 🤮 (ICCV 2021 oral)
MIT License
793 stars 114 forks source link

AttributeError: 'EasyDict' object has no attribute 'trimesh' #72

Closed Terry10086 closed 1 year ago

Terry10086 commented 1 year ago
Traceback (most recent call last):
  File "extract_mesh.py", line 28, in <module>
    t = torch.linspace(*opt.trimesh.range,opt.trimesh.res+1) # the best range might vary from model to model
AttributeError: 'EasyDict' object has no attribute 'trimesh'

This error occured when I ran python extract_mesh.py --group=llff --model=barf --yaml=barf_llff --name=flower --data.scene=flower --data.val_sub= --resume.

So I checked base.yaml, and added the following codes to it.

trimesh:
    range: [-1.2,1.2]
    res: 256
    chunk_size: 1024
    thres: 16

I set these parameters by refering the link https://github.com/chenhsuanlin/bundle-adjusting-NeRF/issues/8. However, I didn't know whether these parameters were the most suitable parameters for the mesh, so I got the results as follows: image image

I changed the parameters(range and thres) to [0,1.2] or 1,12,24. But it didn't show much difference (All of them fail to show color and geometry results). However, the results of novel_view were pretty good, and the corresponding PSNR was high.

Is there any solution to solve this problem?

Sincerely, Terry

chenhsuanlin commented 1 year ago

Hi @Terry10086, as discussed in #8, the mesh extraction script would work only with metric 3D space parametrizations (see here). This is not expected to produce reasonable results with NeRFs under the NDC parametrization (e.g. the LLFF dataset config), which is why the trimesh config was not included in {nerf,barf}_llff.yaml. Hope this helps!

chenhsuanlin commented 1 year ago

Closing due to inactivity.