Open mrcabellom opened 1 year ago
Can you visualize the sampled points(preprocessed .npy files)?
Hello ,I meet this problem too. when I try to run preprocess_data.py to check the sampled points
(torch1.10) E:\ToothGroupNetwork-main>python E:\ToothGroupNetwork-main\ToothGroupNetwork-main\preprocess_data.py
0 E:\ToothGroupNetwork-main\test_results\data\116429353_shell_teethup_l.stl
Traceback (most recent call last):
File "E:\ToothGroupNetwork-main\ToothGroupNetwork-main\preprocess_data.py", line 46, in
pcd = o3d.geometry.PointCloud()
pcd.points = o3d.utility.Vector3dVector(vertices[:,:3])
pcd.paint_uniform_color([0, 0, 1.0])
o3d.visualization.draw_geometries([pcd])
But there is no pointcloud has been shown. How can I solve this problem
Have you check the size of vertices array ?
Hello! I'm using the following command to obtain inference results:
but I'm getting the following error:
Processing: 0 : ./data_obj_parent_directory\013FHA7K\013FHA7K_lower.obj Found array with 0 sample(s) (shape=(0, 3)) while a minimum of 1 is required by DBSCAN. Traceback (most recent call last): File "C:\Users\mrcabello\Documents\Research\code\ToothGroupNetwork\predict_utils.py", line 97, in predict pred_result = self.chl_pipeline(scan_path) File "C:\Users\mrcabello\Documents\Research\code\ToothGroupNetwork\inference_pipelines\inference_pipeline_tgn.py", line 46, in call first_results = self.get_first_module_results(input_cuda_feats, self.first_module) File "C:\Users\mrcabello\Documents\Research\code\ToothGroupNetwork\inference_pipelines\inference_pipeline_tgn.py", line 170, in get_first_module_results output = base_model([points]) File "C:\Users\mrcabello\Miniconda3\envs\tooth_seg\lib\site-packages\torch\nn\modules\module.py", line 1194, in _call_impl return forward_call(*input, *kwargs) File "C:\Users\mrcabello\Documents\Research\code\ToothGroupNetwork\models\modules\grouping_network_module.py", line 65, in forward fg_points_labels_ls = ou.get_clustering_labels(b_moved_points, whole_cls_1) File "C:\Users\mrcabello\Documents\Research\code\ToothGroupNetwork\ops_utils.py", line 98, in get_clustering_labels clustering = DBSCAN(eps=0.03, min_samples=30).fit(moved_points[super_point_cond, :], 3) File "C:\Users\mrcabello\Miniconda3\envs\tooth_seg\lib\site-packages\sklearn\base.py", line 1151, in wrapper return fit_method(estimator, args, kwargs) File "C:\Users\mrcabello\Miniconda3\envs\tooth_seg\lib\site-packages\sklearn\cluster_dbscan.py", line 370, in fit X = self._validate_data(X, accept_sparse="csr") File "C:\Users\mrcabello\Miniconda3\envs\tooth_seg\lib\site-packages\sklearn\base.py", line 604, in _validate_data out = check_array(X, input_name="X", check_params) File "C:\Users\mrcabello\Miniconda3\envs\tooth_seg\lib\site-packages\sklearn\utils\validation.py", line 969, in check_array raise ValueError( ValueError: Found array with 0 sample(s) (shape=(0, 3)) while a minimum of 1 is required by DBSCAN.
Traceback (most recent call last): File "start_inference.py", line 39, in
pred_obj.process(stl_path_ls[i], os.path.join(args.save_path, os.path.basename(stl_path_ls[i]).replace(".obj", ".json")))
File "C:\Users\mrcabello\Documents\Research\code\ToothGroupNetwork\predict_utils.py", line 136, in process
labels, instances, jaw = self.predict([input_path])
File "C:\Users\mrcabello\Documents\Research\code\ToothGroupNetwork\predict_utils.py", line 97, in predict
pred_result = self.chl_pipeline(scan_path)
File "C:\Users\mrcabello\Documents\Research\code\ToothGroupNetwork\inference_pipelines\inference_pipeline_tgn.py", line 46, in call
first_results = self.get_first_module_results(input_cuda_feats, self.first_module)
File "C:\Users\mrcabello\Documents\Research\code\ToothGroupNetwork\inference_pipelines\inference_pipeline_tgn.py", line 170, in get_first_module_results
output = base_model([points])
File "C:\Users\mrcabello\Miniconda3\envs\tooth_seg\lib\site-packages\torch\nn\modules\module.py", line 1194, in _call_impl
return forward_call(*input, *kwargs)
File "C:\Users\mrcabello\Documents\Research\code\ToothGroupNetwork\models\modules\grouping_network_module.py", line 65, in forward
fg_points_labels_ls = ou.get_clustering_labels(b_moved_points, whole_cls_1)
File "C:\Users\mrcabello\Documents\Research\code\ToothGroupNetwork\ops_utils.py", line 98, in get_clustering_labels
clustering = DBSCAN(eps=0.03, min_samples=30).fit(moved_points[super_point_cond, :], 3)
File "C:\Users\mrcabello\Miniconda3\envs\tooth_seg\lib\site-packages\sklearn\base.py", line 1151, in wrapper
return fit_method(estimator, args, kwargs)
File "C:\Users\mrcabello\Miniconda3\envs\tooth_seg\lib\site-packages\sklearn\cluster_dbscan.py", line 370, in fit
X = self._validate_data(X, accept_sparse="csr")
File "C:\Users\mrcabello\Miniconda3\envs\tooth_seg\lib\site-packages\sklearn\base.py", line 604, in _validate_data
out = check_array(X, input_name="X", check_params)
File "C:\Users\mrcabello\Miniconda3\envs\tooth_seg\lib\site-packages\sklearn\utils\validation.py", line 969, in check_array
raise ValueError(
ValueError: Found array with 0 sample(s) (shape=(0, 3)) while a minimum of 1 is required by DBSCAN
I have followed all the steps but may be I'm missing something. Anyone could help me?