Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: Found array with 0 sample(s) (shape=(0, 3)) while a minimum of 1 is required. #3

Open
WkangLiu opened this issue Sep 24, 2022 · 2 comments

Comments

@WkangLiu
Copy link

WkangLiu commented Sep 24, 2022

Nice work! I've tried to run your method with the provided pretrained models but I got errors.
Do you Know how to solve it?
Traceback (most recent call last):
File "main_ssc_a.py", line 1248, in
main()
File "main_ssc_a.py", line 1244, in main
visualize(opt, config, expr_path)
File "main_ssc_a.py", line 1174, in visualize
visualize_pipeline(D_Seg=D_Seg, D_SSC=D_SSC,
File "main_ssc_a.py", line 1122, in visualize_pipeline
iou_out = evals.scene_save_ssc_a(G_siren, shape_out[0], class_out, raw, label, mask, config, model_dir, indices[0])
File "/home/SISC/evals.py", line 353, in scene_save_ssc_a
convert_sdf_samples_to_ply(
File "/home/SISC/evals.py", line 595, in convert_sdf_samples_to_ply
indexes = k_neigh.kneighbors(mesh_points, return_distance=False).squeeze()
File "/opt/conda/lib/python3.8/site-packages/sklearn/neighbors/_base.py", line 670, in kneighbors
X = check_array(X, accept_sparse='csr')
File "/opt/conda/lib/python3.8/site-packages/sklearn/utils/validation.py", line 63, in inner_f
return f(*args, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/sklearn/utils/validation.py", line 669, in check_array
raise ValueError("Found array with %d sample(s) (shape=%s) while a"
ValueError: Found array with 0 sample(s) (shape=(0, 3)) while a minimum of 1 is required.
Killing subprocess 46136
Traceback (most recent call last):
File "/opt/conda/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/opt/conda/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/opt/conda/lib/python3.8/site-packages/torch/distributed/launch.py", line 340, in
main()
File "/opt/conda/lib/python3.8/site-packages/torch/distributed/launch.py", line 326, in main
sigkill_handler(signal.SIGTERM, None) # not coming back
File "/opt/conda/lib/python3.8/site-packages/torch/distributed/launch.py", line 301, in sigkill_handler
raise subprocess.CalledProcessError(returncode=last_return_code, cmd=cmd)
subprocess.CalledProcessError: Command '['/opt/conda/bin/python', '-u', 'main_ssc_a.py', '--local_rank=0', '--task=visualize', '--experiment_name=test-vis']' returned non-zero exit status 1.

@Philipflyg
Copy link
Collaborator

Thanks for your attention.
You can try to add sdf_values = abs(sdf_values) to line 348 in evals.py.

@WkangLiu
Copy link
Author

WkangLiu commented Oct 5, 2022

Thank you for your reply, but the problem is not solved, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants