Kai-46 / IRON

Inverse rendering by optimizing neural SDF and materials from photometric images
BSD 2-Clause "Simplified" License
299 stars 24 forks source link

result mesh is not good #14

Closed changfali closed 2 years ago

changfali commented 2 years ago

Hi Kai! I just use train_scene.sh with "xmen" data, but the result mesh in ./exp_iron_stage2/xmen/mesh_and_materials_50000 is too smooth: image this is the config file: general { base_exp_dir = ./exp_iron_stage1/CASE_NAME/ recording = [ ./, ./models ] }

dataset { data_dir = ./datasets/Luanetal2021/CASE_NAME/train/ render_cameras_name = cameras_sphere.npz object_cameras_name = cameras_sphere.npz }

train { learning_rate = 5e-4 learning_rate_alpha = 0.05 end_iter = 100001

batch_size = 1800
validate_resolution_level = 4
warm_up_end = 5000
anneal_end = 50000
use_white_bkgd = False

save_freq = 10000
val_freq = 2500
val_mesh_freq = 5000
report_freq = 100

igr_weight = 0.1
mask_weight = 0.0

}

model { nerf { D = 8, d_in = 4, d_in_view = 3, W = 256, multires = 10, multires_view = 4, output_ch = 4, skips=[4], use_viewdirs=True }

sdf_network {
    d_out = 257
    d_in = 3
    d_hidden = 256
    n_layers = 8
    skip_in = [4]
    multires = 6
    bias = 0.5
    scale = 1.0
    geometric_init = True
    weight_norm = True
}

variance_network {
    init_val = 0.3
}

rendering_network {
    d_feature = 256
    mode = idr
    d_in = 9
    d_out = 3
    d_hidden = 256
    n_layers = 8
    skip_in = [4]
    weight_norm = True
    multires = 10
    multires_view = 4
    squeeze_out = True
}

neus_renderer {
    n_samples = 64
    n_importance = 64
    n_outside = 32
    up_sample_steps = 4     # 1 for simple coarse-to-fine sampling
    perturb = 1.0
}

} Do you know why?

And I can't find the data "dragon" for training and testing in the dataset: image could you provide it for me to compare with you results?

changfali commented 2 years ago

this is the logim_50000.png in the folder:exp_iron_stage2/xmen/ image

Kai-46 commented 2 years ago

You might be having similar issue as this one: https://github.com/Kai-46/IRON/issues/7 . I'm not totally sure what went wrong since I could not reproduce it on my side; my biggest guess is that you might be having a discrepancy in python package versions. How did you create your conda environments?

For dragon data, please refer to this: https://github.com/Kai-46/IRON/blob/8e9a7c172542afd52b8e6ef28bc96ad52b5ffd5a/download_data.sh#L4

changfali commented 2 years ago

Thanks Kai! You are right!! It's the reason of python package versions, I re-create my environments just like you, and get good result now. But on your side, which package will lead to that different result: Envi before: Package Version


absl-py 1.2.0 asttokens 2.0.5 beautifulsoup4 4.11.1 bleach 5.0.1 cachetools 5.2.0 certifi 2022.6.15 cffi 1.15.1 charset-normalizer 2.1.0 colorama 0.4.5 ConfigArgParse 1.5.3 cycler 0.11.0 Cython 0.29.28 debugpy 1.6.2 decorator 5.1.1 defusedxml 0.7.1 deprecation 2.1.0 entrypoints 0.4 executing 0.8.3 fastjsonschema 2.16.1 filelock 3.7.1 fonttools 4.33.3 gdown 4.5.1 google-auth 2.10.0 google-auth-oauthlib 0.4.6 grpcio 1.47.0 icecream 2.1.3 idna 3.3 igl 2.2.1 imageio 2.21.1 imageio-ffmpeg 0.4.7 importlib-metadata 4.12.0 importlib-resources 5.9.0 ipykernel 6.15.1 ipython 8.2.0 ipython-genutils 0.2.0 ipywidgets 7.7.1 jedi 0.18.1 Jinja2 3.1.2 joblib 1.1.0 json5 0.9.9 jsonschema 4.9.1 jupyter-client 7.3.4 jupyter-core 4.11.1 jupyter-packaging 0.12.2 jupyter-server 1.18.1 jupyterlab 3.4.5 jupyterlab-pygments 0.2.2 jupyterlab-server 2.15.0 jupyterlab-widgets 1.1.1 kiwisolver 1.4.3 kornia 0.6.6 lxml 4.9.1 Markdown 3.4.1 MarkupSafe 2.1.1 mathutils 2.81.2 matplotlib 3.5.2 matplotlib-inline 0.1.3 mistune 0.8.4 nbclassic 0.4.3 nbclient 0.6.6 nbconvert 6.5.3 nbformat 5.4.0 nest-asyncio 1.5.5 networkx 2.8.5 notebook 6.4.12 notebook-shim 0.1.0 numpy 1.22.3 oauthlib 3.2.0 open3d 0.15.2 opencv-python 4.6.0.66 packaging 21.3 pandas 1.4.3 pandocfilters 1.5.0 parso 0.8.3 pexpect 4.8.0 pickleshare 0.7.5 Pillow 9.1.0 pip 21.2.4 pkgutil_resolve_name 1.3.10 plyfile 0.7.4 prometheus-client 0.14.1 prompt-toolkit 3.0.29 protobuf 3.19.4 psutil 5.9.1 ptyprocess 0.7.0 pure-eval 0.2.2 pyasn1 0.4.8 pyasn1-modules 0.2.8 pycparser 2.21 Pygments 2.11.2 pyhocon 0.3.59 PyMCubes 0.1.2 pyparsing 2.4.7 pypoisson 0.10 pyquaternion 0.9.9 pyrsistent 0.18.1 PySocks 1.7.1 python-dateutil 2.8.2 pytz 2022.2 PyWavelets 1.3.0 PyYAML 6.0 pyzmq 23.2.0 requests 2.28.1 requests-oauthlib 1.3.1 rsa 4.9 scikit-image 0.19.3 scikit-learn 1.1.2 scipy 1.8.1 Send2Trash 1.8.0 setuptools 64.0.1 six 1.16.0 sniffio 1.2.0 soupsieve 2.3.2.post1 stack-data 0.2.0 tensorboard 2.10.0 tensorboard-data-server 0.6.1 tensorboard-plugin-wit 1.8.1 tensorboardX 2.5.1 terminado 0.15.0 threadpoolctl 3.1.0 tifffile 2022.8.8 tinycss2 1.1.1 tomlkit 0.11.3 torch 1.9.1+cu111 torchaudio 0.9.1 torchvision 0.10.1+cu111 tornado 6.2 tqdm 4.64.0 traitlets 5.3.0 trimesh 3.13.0 typing_extensions 4.1.1 urllib3 1.26.11 wcwidth 0.2.5 webencodings 0.5.1 websocket-client 1.3.3 Werkzeug 2.2.2 wheel 0.37.1 widgetsnbextension 3.6.1 zipp 3.8.1

Envi now: Package Version


absl-py 1.2.0 asttokens 2.0.8 beautifulsoup4 4.11.1 cachetools 5.2.0 certifi 2022.6.15 charset-normalizer 2.1.0 colorama 0.4.5 ConfigArgParse 1.5.3 executing 0.10.0 filelock 3.8.0 gdown 4.5.1 google-auth 2.10.0 google-auth-oauthlib 0.4.6 grpcio 1.47.0 icecream 2.1.3 idna 3.3 igl 2.2.1 imageio 2.21.1 imageio-ffmpeg 0.4.7 importlib-metadata 4.12.0 kornia 0.6.6 Markdown 3.4.1 MarkupSafe 2.1.1 networkx 2.8.5 numpy 1.23.2 oauthlib 3.2.0 opencv-python 4.6.0.66 packaging 21.3 Pillow 9.2.0 pip 22.1.2 protobuf 3.19.4 pyasn1 0.4.8 pyasn1-modules 0.2.8 Pygments 2.13.0 pyhocon 0.3.59 PyMCubes 0.1.2 pyparsing 2.4.7 PySocks 1.7.1 PyWavelets 1.3.0 requests 2.28.1 requests-oauthlib 1.3.1 rsa 4.9 scikit-image 0.19.3 scipy 1.9.0 setuptools 61.2.0 six 1.16.0 soupsieve 2.3.2.post1 tensorboard 2.10.0 tensorboard-data-server 0.6.1 tensorboard-plugin-wit 1.8.1 tifffile 2022.8.12 torch 1.11.0+cu113 torchvision 0.12.0+cu113 tqdm 4.64.0 trimesh 3.13.4 typing_extensions 4.3.0 urllib3 1.26.11 Werkzeug 2.2.2 wheel 0.37.1 zipp 3.8.1