Git Product home page Git Product logo

Comments (19)

Haian-Jin avatar Haian-Jin commented on May 1, 2024 2

hi! I met the same problem. Is there any solution now?

I just trained the neural BRDF by myself and it solved the problem.

from nerfactor.

Haian-Jin avatar Haian-Jin commented on May 1, 2024

I met the same problem. Is there any solution now?

from nerfactor.

wangmingyang4 avatar wangmingyang4 commented on May 1, 2024

hi! I met the same problem. Is there any solution now?

from nerfactor.

Haian-Jin avatar Haian-Jin commented on May 1, 2024

Can I add your VX? Thanks! Is it to download the BRDF data set to train the MERL_512 model?

just follow the instructions provided by the author. It is pretty simple.

from nerfactor.

wangmingyang4 avatar wangmingyang4 commented on May 1, 2024

follow the section of Preparation step1 in html:https://github.com/google/nerfactor/tree/main/nerfactor
my email:[email protected]
Can we communicate privately? thanks!

from nerfactor.

Haian-Jin avatar Haian-Jin commented on May 1, 2024

follow the section of Preparation step1 in html:https://github.com/google/nerfactor/tree/main/nerfactor my email:[email protected] Can we communicate privately? thanks!

Send an email to me via [email protected] if you meet any problem. But I prefer to discuss this here since it may help others, too.

from nerfactor.

xiumingzhang avatar xiumingzhang commented on May 1, 2024

@Haian-Jin Thanks for reporting a solution! I wonder if you found the pretrained BRDF MLP problematic? Any info useful for me in debugging this is appreciated.

from nerfactor.

Haian-Jin avatar Haian-Jin commented on May 1, 2024

@Haian-Jin Thanks for reporting a solution! I wonder if you found the pretrained BRDF MLP problematic? Any info useful for me in debugging this is appreciated.

I don‘t know why it happens. I sent the checkpoint that was trained by myself to @wangmingyang4 , and he said he would still meet the same problem. This is prettry strange.

from nerfactor.

Woolseyyy avatar Woolseyyy commented on May 1, 2024

Hi, I meet the same problem either

from nerfactor.

Woolseyyy avatar Woolseyyy commented on May 1, 2024

@Haian-Jin @wangmingyang4 @xiumingzhang
I think I find the problem.
It is caused by https://github.com/google/nerfactor/blob/main/nerfactor/models/brdf.py#L44. If you donnot have merl dataset locally and donnot modify 'data_root' at merl_512/lr1e-2.ini, the terrible thing happens...
One more thing is that I didn't find where to get 'brdf_merl_npz'.... It seems to be different from official merl dataset... What do I miss...

from nerfactor.

Woolseyyy avatar Woolseyyy commented on May 1, 2024

@Haian-Jin @wangmingyang4 @xiumingzhang I think I find the problem. It is caused by https://github.com/google/nerfactor/blob/main/nerfactor/models/brdf.py#L44. If you donnot have merl dataset locally and donnot modify 'data_root' at merl_512/lr1e-2.ini, the terrible thing happens... One more thing is that I didn't find where to get 'brdf_merl_npz'.... It seems to be different from official merl dataset... What do I miss...

haha this is what I miss: https://github.com/google/nerfactor/tree/main/data_gen#converting-the-merl-binary-brdfs-into-a-tensorflow-dataset

from nerfactor.

wangmingyang4 avatar wangmingyang4 commented on May 1, 2024

I'm sorry to reply you so late. @Woolseyyy @Haian-Jin @xiumingzhang

Thanks everyone!

Here, I will summarize how to use the merl_512 trained model provided by the author.

  1. You can use the trinvali_run.sh to train BRDF model. When the lr1e-2.ini file is generated, the training can be canceled.
  2. You should copy the generated lr1e-2.ini file to the downloaded merl_512 folder and replace the original file.

eg:
image
image

from nerfactor.

xiumingzhang avatar xiumingzhang commented on May 1, 2024

@wangmingyang4 Thanks for reporting a potential solution. But hmmm, why does this hack work? I'm trying to understand why this works, and how I can make changes to eliminate the need for such a hack.

from nerfactor.

Woolseyyy avatar Woolseyyy commented on May 1, 2024

@wangmingyang4 Thanks for reporting a potential solution. But hmmm, why does this hack work? I'm trying to understand why this works, and how I can make changes to eliminate the need for such a hack.

the reason is presented here: #24 (comment)
I think changing the corresponding code and adding a name list file of merl would help.

from nerfactor.

wangmingyang4 avatar wangmingyang4 commented on May 1, 2024

@xiumingzhang
Can I set the imh to the original image size for training?

from nerfactor.

Osavalon avatar Osavalon commented on May 1, 2024

I solved this problem after setting the envmaps path.

from nerfactor.

Osavalon avatar Osavalon commented on May 1, 2024

@xiumingzhang I have met a new problem when I run ##2. Compute geometry buffers for all views by querying the trained NeRF

Views (train):   0%|                                          | 0/97 [00:00<?, ?it/s]2022-11-21 23:17:13.473628: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10
/lyy/nerfactor/nerfactor_b/nerfactor/util/geom.py:58: RuntimeWarning: invalid value encountered in true_divide
  arr_norm = (arr - arr.min()) / (arr.max() - arr.min())
I1121 23:22:47.950219 140528241899328 animation.py:1118] Animation.save using <class 'matplotlib.animation.FFMpegWriter'>
I1121 23:22:47.951245 140528241899328 animation.py:326] figure size in inches has been adjusted from 7.104166666666667 x 5.333333333333333 to 7.1 x 5.32
I1121 23:22:47.951492 140528241899328 animation.py:346] MovieWriter._run: running command: ffmpeg -f rawvideo -vcodec rawvideo -s 710x532 -pix_fmt rgba -r 12 -loglevel error -i pipe: -vcodec h264 -pix_fmt yuv420p -y /lyy/nerfactor/nerfactor_b/output/surf/pinecone512rays1024/train_000/lvis.mp4
Views (train):   1%|▎                             | 1/97 [06:24<10:15:51, 384.91s/it]/lyy/nerfactor/nerfactor_b/nerfactor/util/geom.py:58: RuntimeWarning: invalid value encountered in true_divide
  arr_norm = (arr - arr.min()) / (arr.max() - arr.min())
I1121 23:28:57.483244 140528241899328 animation.py:1118] Animation.save using <class 'matplotlib.animation.FFMpegWriter'>
I1121 23:28:57.484086 140528241899328 animation.py:326] figure size in inches has been adjusted from 7.104166666666667 x 5.333333333333333 to 7.1 x 5.32
I1121 23:28:57.484405 140528241899328 animation.py:346] MovieWriter._run: running command: ffmpeg -f rawvideo -vcodec rawvideo -s 710x532 -pix_fmt rgba -r 12 -loglevel error -i pipe: -vcodec h264 -pix_fmt yuv420p -y /lyy/nerfactor/nerfactor_b/output/surf/pinecone512rays1024/train_001/lvis.mp4
Views (train):   2%|▋                              | 2/97 [12:25<9:46:54, 370.68s/it]/lyy/nerfactor/nerfactor_b/nerfactor/util/geom.py:58: RuntimeWarning: invalid value encountered in true_divide
  arr_norm = (arr - arr.min()) / (arr.max() - arr.min())

I’d appreciate some help.My script is:

##1. Train a vanilla NeRF, optionally using multiple GPUs:
    
    scene='pinecone'
    gpus='3'
    proj_root='/lyy/nerfactor/nerfactor_b'
    repo_dir="$proj_root/nerfactor"
    viewer_prefix=''
    data_root="/lyy/nerfactor/data/nerf_real_360_proc/$scene"
    near='0.1'
    far='2'
    lr='5e-4'
    imh='512'
    n_rays_per_step='1024'
    outroot="$proj_root/output/train/${scene}_nerf${imh}rays${n_rays_per_step}n${near}f${far}"
    REPO_DIR="$proj_root" "$proj_root/nerfactor/trainvali_run.sh" "$gpus" --config='nerf.ini' --config_override="n_rays_per_step=$n_rays_per_step,data_root=$data_root,imh=$imh,near=$near,far=$far,lr=$lr,outroot=$outroot,viewer_prefix=$viewer_prefix"

    # Optionally, render the test trajectory with the trained NeRF, only can use 1 gpu
    gpus='3'
    scene='pinecone'
    imh='512'
    near='0.1'
    far='2'
    proj_root='/lyy/nerfactor/nerfactor_b'
    n_rays_per_step='1024'
   outroot="$proj_root/output/train/${scene}_nerf${imh}rays${n_rays_per_step}n${near}f${far}"
    lr='5e-4'
    ckpt="$outroot/lr$lr/checkpoints/ckpt-2"
    REPO_DIR="$proj_root" "$proj_root/nerfactor/nerf_test_run.sh" "$gpus" --ckpt="$ckpt"
    
    
  ## Check the quality of this NeRF geometry by inspecting the visualization HTML for the alpha and normal maps. You might
  ## need to re-run this with anothe r learning rate if the estimated NeRF geometry is too off.
    

##2. Compute geometry buffers for all views by querying the trained NeRF: (single GPU)
    
    scene='pinecone'
    gpus='3'
    proj_root='/lyy/nerfactor/nerfactor_b'
    repo_dir="$proj_root/nerfactor"
    viewer_prefix=''
    data_root="/lyy/nerfactor/data/nerf_real_360_proc/$scene"
    imh='512'
    lr='5e-4'
    near='0.1'
    far='2'
    n_rays_per_step='1024'
    trained_nerf="$proj_root/output/train/${scene}_nerf${imh}rays${n_rays_per_step}n${near}f${far}/lr${lr}"
    occu_thres='0.5'
    if [[ "$scene" == pinecone* || "$scene" == scan* ]]; then
        # pinecone and DTU scenes
        scene_bbox='-0.3,0.3,-0.3,0.3,-0.3,0.3'
    elif [[ "$scene" == vasedeck* ]]; then
        scene_bbox='-0.2,0.2,-0.4,0.4,-0.5,0.5'
    else
        # We don't need to bound the synthetic scenes
        scene_bbox=''
    fi
    out_root="$proj_root/output/surf/$scene${imh}rays${n_rays_per_step}"
    ##bump this up until GPU gets OOM for faster computation
    mlp_chunk='375000'
    REPO_DIR="$proj_root" "$proj_root/nerfactor/geometry_from_nerf_run.sh" "$gpus" --data_root="$data_root" --trained_nerf="$trained_nerf" --out_root="$out_root" --imh="$imh" --scene_bbox="$scene_bbox" --occu_thres="$occu_thres" --mlp_chunk="$mlp_chunk"

from nerfactor.

xiumingzhang avatar xiumingzhang commented on May 1, 2024

@wangmingyang4 Yes, I think so.

from nerfactor.

xiumingzhang avatar xiumingzhang commented on May 1, 2024

@Osavalon Looks like your arr is all-zero. You can try looking into how that happened? Sounds like this is another issue, so let me close this one. Please feel free to reopen this (or create a new one if this is a separate issue).

from nerfactor.

Related Issues (20)

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.