Comments (16)
Ah, i have solved this based on this comment:
ashawkey/stable-dreamfusion#17 (comment)
and have made these changes: (removing const
from the at:Tensor
variables
-void composite_rays(const uint32_t n_alive, const uint32_t n_step, const float T_thresh, at::Tensor rays_alive, at::Tensor rays_t, const at::Tensor sigmas, const at::Tensor rgbs, const at::Tensor deltas, at::Tensor weights, at::Tensor depth, at::Tensor image) {
+void composite_rays(const uint32_t n_alive, const uint32_t n_step, const float T_thresh, at::Tensor rays_alive, at::Tensor rays_t, at::Tensor sigmas, at::Tensor rgbs, at::Tensor deltas, at::Tensor weights, at::Tensor depth, at::Tensor image) {
from nerf2mesh.
@antithing Thanks for reporting and sorry for that, I'll fix it soon.
from nerf2mesh.
Thanks! One more thing to report...
i have run the first stage successfully, now i am running:
python main.py data/garden/ --workspace trial_360_garden -O --data_format colmap --bound 16 --enable_cam_center --enable_cam_near_far --scale 0.3 --downscale 4 --stage 1 --iters 10000
And i get the following error:
0% 0/161 [00:00<?, ?it/s]Traceback (most recent call last):
File "D:\NERF\SDF\nerf2mesh\main.py", line 243, in <module>
trainer.train(train_loader, valid_loader, max_epoch)
File "D:\NERF\SDF\nerf2mesh\nerf\utils.py", line 931, in train
self.train_one_epoch(train_loader)
File "D:\NERF\SDF\nerf2mesh\nerf\utils.py", line 1164, in train_one_epoch
preds, truths, loss_net = self.train_step(data)
File "D:\NERF\SDF\nerf2mesh\nerf\utils.py", line 720, in train_step
self.model.update_triangles_errors(loss.detach())
File "C:\Users\B\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "D:\NERF\SDF\nerf2mesh\nerf\renderer.py", line 854, in update_triangles_errors
import torch_scatter
File "C:\Users\B\AppData\Local\Programs\Python\Python39\lib\site-packages\torch_scatter\__init__.py", line 16, in <module>
torch.ops.load_library(spec.origin)
File "C:\Users\B\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\_ops.py", line 255, in load_library
ctypes.CDLL(path)
File "C:\Users\B\AppData\Local\Programs\Python\Python39\lib\ctypes\__init__.py", line 374, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 127] The specified procedure could not be found
0% 0/161 [00:25<?, ?it/s]
from nerf2mesh.
Have you installed torch-scatter
correctly? You could check here for Windows binaries or build it from source.
from nerf2mesh.
Ah, you are right. This was because I had scatter installed for a different CUDA version than torch. Resolved! Thanks again. :)
from nerf2mesh.
Ah, but I get another error! training starts, then:
refine and decimate mesh at 1000 step
Traceback (most recent call last):
File "D:\NERF\SDF\nerf2mesh\main.py", line 243, in <module>
trainer.train(train_loader, valid_loader, max_epoch)
File "D:\NERF\SDF\nerf2mesh\nerf\utils.py", line 931, in train
self.train_one_epoch(train_loader)
File "D:\NERF\SDF\nerf2mesh\nerf\utils.py", line 1206, in train_one_epoch
self.model.refine_and_decimate()
File "C:\Users\B\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "D:\NERF\SDF\nerf2mesh\nerf\renderer.py", line 219, in refine_and_decimate
mask[(errors > thresh_refine) & cnt_mask] = 2
IndexError: boolean index did not match indexed array along dimension 0; dimension is 870831 but corresponding boolean dimension is 299999
loss=0.006328 (0.006733) lr=0.000089: : 21% 34/161 [00:05<00:21, 5.97it/s]
from nerf2mesh.
I try the same with --sdf
and i see:
refine and decimate mesh at 1000 step
Traceback (most recent call last):
File "D:\NERF\SDF\nerf2mesh\main.py", line 243, in <module>
trainer.train(train_loader, valid_loader, max_epoch)
File "D:\NERF\SDF\nerf2mesh\nerf\utils.py", line 931, in train
self.train_one_epoch(train_loader)
File "D:\NERF\SDF\nerf2mesh\nerf\utils.py", line 1206, in train_one_epoch
self.model.refine_and_decimate()
File "C:\Users\B\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "D:\NERF\SDF\nerf2mesh\nerf\renderer.py", line 251, in refine_and_decimate
cur_v, cur_f = decimate_and_refine_mesh(cur_v, cur_f, mask, decimate_ratio=self.opt.refine_decimate_ratio, refine_size=self.opt.refine_size, refine_remesh_size=self.opt.refine_remesh_size)
File "D:\NERF\SDF\nerf2mesh\meshutils.py", line 199, in decimate_and_refine_mesh
m = pml.Mesh(verts, faces, f_scalar_array=mask)
pymeshlab.pmeshlab.PyMeshLabException: Error while creating mesh: the number of face quality values is different from the number of faces.
from nerf2mesh.
Hi @ashawkey sorry to bother you, do you have any thoughts on what might be going wrong for me here? Thanks again!
from nerf2mesh.
Both seem strange to me, and they seem to indicate something wrong with the extracted mesh. Could you check the mesh from stage0? Are you using a custom dataset?
from nerf2mesh.
I am using the mipnerf360/garden dataset. I am running:
python main.py data/garden/ --workspace trial_360_garden -O --data_format colmap --bound 16 --enable_cam_center --enable_cam_near_far --scale 0.3 --downscale 4 --stage 0 --lambda_entropy 1e-3 --clean_min_f 16 --clean_min_d 10 --lambda_tv 2e-8 --visibility_mask_dilation 50
for stage 0, and then:
python main.py data/garden/ --workspace trial_360_garden -O --data_format colmap --bound 16 --enable_cam_center --enable_cam_near_far --scale 0.3 --downscale 4 --stage 1 --iters 10000
for stage 1
the dtage 0 mesh output folder looks like:
And the mesh_0.ply
looks like:
from nerf2mesh.
Sorry it's my mistake, I have fixed it in the latest commit. Thanks for reporting this bug!
from nerf2mesh.
Thank you! It works :)
One more question, what settings should I change to get a smoother output mesh? I am using the example commands, and i get:
Thank you again!
from nerf2mesh.
You may use --sdf
if aiming at smooth mesh, but currently it only supports object-centric captures, and not suitable for 360 dataset (you need to remove the background for best mesh quality).
from nerf2mesh.
I try the same with
--sdf
and i see:refine and decimate mesh at 1000 step Traceback (most recent call last): File "D:\NERF\SDF\nerf2mesh\main.py", line 243, in <module> trainer.train(train_loader, valid_loader, max_epoch) File "D:\NERF\SDF\nerf2mesh\nerf\utils.py", line 931, in train self.train_one_epoch(train_loader) File "D:\NERF\SDF\nerf2mesh\nerf\utils.py", line 1206, in train_one_epoch self.model.refine_and_decimate() File "C:\Users\B\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context return func(*args, **kwargs) File "D:\NERF\SDF\nerf2mesh\nerf\renderer.py", line 251, in refine_and_decimate cur_v, cur_f = decimate_and_refine_mesh(cur_v, cur_f, mask, decimate_ratio=self.opt.refine_decimate_ratio, refine_size=self.opt.refine_size, refine_remesh_size=self.opt.refine_remesh_size) File "D:\NERF\SDF\nerf2mesh\meshutils.py", line 199, in decimate_and_refine_mesh m = pml.Mesh(verts, faces, f_scalar_array=mask) pymeshlab.pmeshlab.PyMeshLabException: Error while creating mesh: the number of face quality values is different from the number of faces.
Hi, I am receiving the same error when using SDF with the latest commit. BTW, amazing project. I'm looking into the details right now, hoping to contribute as well. @ashawkey
from nerf2mesh.
Hi, SDF mode is currently only suitable for single-object datasets with bound == 1
. For the garden dataset, you could try the original NeRF mode.
from nerf2mesh.
after pull the lastest version, I still meet the same problem when I run 'python setup.py build_ext --inplace'
build\lib.win-amd64-cpython-39_raymarching_mob.cp39-win_amd64.pyd : fatal error LNK1120: 3 个无法解析的外部命令
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\link.exe' failed with exit code 1120
from nerf2mesh.
Related Issues (20)
- Best settings for the garden dataset? HOT 1
- Question about Chamfer distance HOT 5
- Can a 2080s 8g test the code and generate meshes (dont train)? HOT 1
- Question about exporting mesh HOT 2
- " running: mkdir data/custom\colmap_text FATAL: command failed" at step 1,how can i fix it? HOT 2
- Question for using multi GPU HOT 2
- Protrusions in final Mesh: Stage 0 > Stage 1 HOT 2
- Training doesnt converge for LLFF dataset HOT 1
- The problem that the object exceeds the screen during the reconstruction process HOT 2
- 设置sacle为0.3的时候报错 HOT 2
- about the code of colmap2nerf.py HOT 1
- About NeuS reconstruction
- Proplem while recentering the pose in my own way
- sdf mode PSNR problem HOT 2
- resconstruction quality HOT 1
- about AssertionError: sphere init is only for sdf mode! HOT 1
- the mesh of my own data is bad HOT 7
- Cant get depth supervision to work HOT 1
- The reconstruction quality of garden dataset is bad by using the script of scripts\runall_360_outdoor.sh HOT 3
- Mip-NeRF 360 dataset means? Fisheye, Equirectangular data?
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 nerf2mesh.