ashawkey / nerf2mesh

[ICCV2023] Delicate Textured Mesh Recovery from NeRF via Adaptive Surface Refinement
https://me.kiui.moe/nerf2mesh/
MIT License
879 stars 87 forks source link

ValueError: Cannot take a larger sample than population when 'replace=False' #79

Open stupidyoh opened 10 months ago

stupidyoh commented 10 months ago

Hello

I use my own image dataset that i captured. But when i run stage 0 code as following.

python main.py data/banana2/ --workspace trial_banana2 -O --data_format colmap --bound 1 --dt_gamma 0 --stage 0 --clean_min_f 16 --clean_min_d 10 --visibility_mask_dilation 50 --iters 10000 --decimate_target 3e5 --sdf

I got this error message.

Traceback (most recent call last): File "/home/vision/nerf2mesh/main.py", line 258, in test_loader = NeRFDataset(opt, device=device, type='test').dataloader() File "/home/vision/nerf2mesh/nerf/colmap_provider.py", line 383, in init fs = np.random.choice(len(self.poses), 5, replace=False) File "mtrand.pyx", line 965, in numpy.random.mtrand.RandomState.choice ValueError: Cannot take a larger sample than population when 'replace=False'

I test with various objects and input images. Usually works well, but sometime error happen. I want to know why this error occurs. What can I do to solov this problem.

Thank you.

a1445605672 commented 7 months ago

I also encountered this problem, have you solved it?