Comments (5)
Thanks for your great implemention! However, it seems that when the gradient of SDF versus xyz is added in loss terms, the backward pass fails with following error:
Traceback (most recent call last):
File "train.py", line 178, in <module>
main()
File "train.py", line 148, in main
train_loss.backward()
File "/home/xxx/anaconda3/envs/torch/lib/python3.8/site-packages/torch/_tensor.py", line 255, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph, inputs=inputs)
File "/home/xxx/anaconda3/envs/torch/lib/python3.8/site-packages/torch/autograd/__init__.py", line 147, in backward
Variable._execution_engine.run_backward(
RuntimeError: trying to differentiate twice a function that was markedwith @once_differentiable
The loss function looks like:
gradient, = torch.autograd.grad(sdf, [xyz], grad_outputs=grad_outputs, create_graph=True)
loss = torch.abs(gradient.norm(dim=-1) - 1)
from torch-ngp.
@MingwuZheng Which backbone are you using? For the implementation in this repo, it has been fixed in 197fd4d. For TCNN, you may check their implementation.
However, I haven't tested this type of training, so it may lead to unstable/buggy results. Feel free to report if you meet other problems ;)
from torch-ngp.
@MingwuZheng Which backbone are you using? For the implementation in this repo, it has been fixed in 197fd4d. For TCNN, you may check their implementation. However, I haven't tested this type of training, so it may lead to unstable/buggy results. Feel free to report if you meet other problems ;)
@ashawkey Thanks for your reply! I am using simple nn.linear
instead of TCNN or FFMLP, and I did fix this issue following 197fd4d. Despite that, the reconstructed results are not desirable. Specifically, the sdf value errors on sampled points are low but the gradients (normal vectors) are noisy and not correct. This is partly due to my surface sampling strategy (without pertubing), but I am wondering perhaps it is mainly because a SMOOTH INTERPOLATION (see Appendix A) is not implemented in your code, making the gradients not smooth under a less constrained sampling strategy. Could you confirm this for me? : )
from torch-ngp.
@MingwuZheng Currently I don't have a use case, but I'll definitely try later. Besides, TCNN's pytorch extension supports smooth step interpolation for hash encoding, and maybe you can try with that first?
from torch-ngp.
@ashawkey Thank you, I will try TCNN first, and report if I found anything interesting. Besides, you may refer to SIREN implementation for more information on surface sampling. If you have any question or would like to discuss neural implicit representation, please feel free to contact me through email. : )
from torch-ngp.
Related Issues (20)
- The value of `self.cascade` becomes 0 when `bound <= 0.5`, causing errors
- Interpolation in GridEncoder might be wrong? HOT 1
- Control Time in GUI for D-NeRF HOT 1
- Hi. I had a question about the dataloading step. Why does all the data need to be loaded in a single step. I am running out of GPU memory. Is it possible to do it in batches.
- Ambient Occlusion (AO) using the (Instant-NGP framework)
- fail to rebuild radiance field. such as fox, lego HOT 1
- ModuleNotFoundError: No module named '_raymarching' HOT 8
- OK. Thank you for your response!
- About environments! HOT 1
- ImportError: No module named '_hash_encoder'
- About GUI
- issues when build extensions:ERROR: Could not build wheels for raymarching, which is required to install pyproject.toml-based projects HOT 1
- CUDA 12
- D-NeRF does not perform well when running the HyperNeRF data set. Does it need to make some adjustments?
- A tip to use smpl camera data to use with torch-ngp? Which transformation do we use?
- build extension problem HOT 1
- This is strange, I haven't met this problem. Could you try to install some other packages that require building extensions? For example, `pip install torch-scatter` following [this](https://github.com/rusty1s/pytorch_scatter#from-source)?
- The growth process of `local_step` seems to have an issue.
- What is tiledgrid? HOT 1
- Depth Output 0 or Nan
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 torch-ngp.