Giter Site home page Giter Site logo

limhoyeon / toothgroupnetwork Goto Github PK

View Code? Open in Web Editor NEW
138.0 4.0 34.0 239 KB

3D Dental surface segmentation with Tooth Group Network

Python 91.02% C++ 3.70% Cuda 5.28%
deep-learning teeth-segmentation tooth-segmentation mesh-segmentation dental-surface-segmentation pointcloud-segmentation miccai2022 3d-teeth-scan-segmentation-and-labeling-challenge tsegnet

toothgroupnetwork's Introduction

ToothGroupNetwork

  • Team CGIP
  • Ho Yeon Lim and Min Chang Kim

Notice

  • Please press the star!
  • This repository contains the code for the tooth segmentation algorithm that won first place at Miccai2022 3D Teeth Scan Segmentation and Labeling Challenge.
  • Official Paper for Challenge: 3DTeethSeg'22: 3D Teeth Scan Segmentation and Labeling Challenge.
  • We used the dataset shared in the challenge git repository.
  • If you only want the inference code, or if you want to use the same checkpoints that we used in the challenge, you can jump to challenge_branch in this repository.
  • Most of the code has been modified. It may be significantly different from the code you downloaded before June 20th. If you downloaded this repository, we recommend download it again.
  • There may be a lot of errors in the initial code. If you encounter any errors, please post them on the issue board, and we will promptly address and fix them(Im sorry for the slow resposes to issues because of personal reasons)...
  • Please post your questions to the issue board as it's hard to see them in emails.

Dataset

  • We used the dataset shared in the challenge git repository. For more information about the data, check out the link.
  • Dataset consists of dental mesh obj files and corresponding ground truth json files.
  • You can also download the challenge training split data in google drive(our codes are based on this data).
    • After you download and unzip these zip files, merge 3D_scans_per_patient_obj_files.zip and 3D_scans_per_patient_obj_files_b2.zip. The parent path of these obj files is data_obj_parent_directory.
    • Apply the same to the ground truth json files(ground-truth_labels_instances.zip and ground-truth_labels_instances_b2.zip. The parent path of these json files is data_json_parent_directory).
    • The directory structure of your data should look like below..
      --data_obj_parent_directory
      ----00OMSZGW
      ------00OMSZGW_lower.obj
      ------00OMSZGW_upper.obj
      ----0EAKT1CU
      ------0EAKT1CU_lower.obj
      ------0EAKT1CU_upper.obj
      and so on..
      
      --data_json_parent_directory
      ----00OMSZGW
      ------00OMSZGW_lower.json
      ------00OMSZGW_upper.jsno
      ----0EAKT1CU
      ------0EAKT1CU_lower.json
      ------0EAKT1CU_upper.json
      and so on..
      
  • If you have your dental mesh data, you can use it.
    • In such cases, you need to adhere to the data name format(casename_upper.obj or casename_lower.obj).

    • All axes must be aligned as shown in the figure below. Note that the Y-axis points towards the back direction(plz note that both lower jaw and upper jaw have the same z-direction!).

Training

Preprocessing

  • For training, you have to execute the preprocess_data.py to save the farthest point sampled vertices of the mesh (.obj) files.
  • Here is an example of how to execute preprocess_data.py.
    python preprocess.py
     --source_obj_data_path data_obj_parent_directory \
     --source_json_data_path data_json_parent_directory \
     --save_data_path path/for/preprocessed_data
    

Training

  • We offer six models(tsegnet | tgnet(ours) | pointnet | pointnetpp | dgcnn | pointtransformer).
  • For experiment tracking, we use wandb. Please replace "entity" with your own wandb ID in the get_default_config function of train_configs/train_config_maker.py.
  • Due to the memory constraints, all functions have been implemented based on batch size 1 (minimum 11GB GPU RAM required). If you want to change the batch size to a different value, you will need to modify most of the functions by yourself.

1. tgnet(Ours)

  • The tgnet is our 3d tooth segmentation method. Please refer to the challenge paper for an explanation of the methodology.
  • You should first train the Farthest Point Sampling model and then train the Boundary Aware Point Sampling model.
  • First, train the Farthest Point Sampling model as follows.
    start_train.py \
     --model_name "tgnet_fps" \
     --config_path "train_configs/tgnet_fps.py" \
     --experiment_name "your_experiment_name" \
     --input_data_dir_path "path/for/preprocessed_data" \
     --train_data_split_txt_path "base_name_train_fold.txt" \
     --val_data_split_txt_path "base_name_val_fold.txt"
    
    • Input the preprocessed data directory path into the --input_data_dir_path.
    • You can provide the train/validation split text files through --train_data_split_txt_path and --val_data_split_txt_path. You can either use the provided text files from the above dataset drive link(base_name_*_fold.txt) or create your own text files for the split.
  • To train the Boundary Aware Point Sampling model, please modify the following four configurations in train_configs/tgnet_bdl.py: original_data_obj_path, original_data_json_path, bdl_cache_path, and load_ckpt_path. image
  • After modifying the configurations, train the Boundary Aware Point Sampling model as follows.
    start_train.py \
     --model_name "tgnet_bdl" \
     --config_path "train_configs/tgnet_bdl.py" \
     --experiment_name "your_experiment_name" \
     --input_data_dir_path "path/to/save/preprocessed_data" \
     --train_data_split_txt_path "base_name_train_fold.txt" \
     --val_data_split_txt_path "base_name_val_fold.txt"
    

2. tsegnet

  • This is the implementation of model TSegNet. Please refer to the paper for detail.
  • First, The centroid prediction module has to be trained first in tsegnet. To train the centroid prediction module, please modify the run_tooth_seg_mentation_module parameter to False in the train_configs/tsegnet.py file. image
  • And train the centroid prediction module by entering the following command.
    start_train.py \
     --model_name "tsegnet" \
     --config_path "train_configs/tsegnet.py" \
     --experiment_name "your_experiment_name" \
     --input_data_dir_path "path/to/save/preprocessed_data" \
     --train_data_split_txt_path "base_name_train_fold.txt" \
     --val_data_split_txt_path "base_name_val_fold.txt"
    
  • Once the training of the centroid prediction module is completed, please update the pretrained_centroid_model_path in train_configs/tsegnet.py with the checkpoint path of the trained centroid prediction module. Also, set run_tooth_segmentation_module to True.
  • And please train the tsegnet model by entering the following command.
    start_train.py \
     --model_name "tsegnet" \
     --config_path "train_configs/tsegnet.py" \
     --experiment_name "your_experiment_name" \
     --input_data_dir_path "path/to/save/preprocessed_data" \
     --train_data_split_txt_path "base_name_train_fold.txt" \
     --val_data_split_txt_path "base_name_val_fold.txt"
    

3. pointnet | pointnetpp | dgcnn | pointtransformer

  • pointnet | pointnet++ | dgcnn | pointtransformer
  • This model directly applies the point cloud segmentation method to tooth segmentation.
  • train models by entering the following command.
    start_train.py \
     --model_name "pointnet" \
     --config_path "train_configs/pointnet.py" \
     --experiment_name "your_experiment_name" \
     --input_data_dir_path "path/to/save/preprocessed_data" \
     --train_data_split_txt_path "base_name_train_fold.txt" \
     --val_data_split_txt_path "base_name_val_fold.txt"
    

Inference

  • To test the performance of the model used in the challenge, please switch to the challenge_branch (refer to the notice at the top).
  • We offer six models(tsegnet | tgnet(ours) | pointnet | pointnetpp | dgcnn | pointtransformer).
  • All of the checkpoint files for each model are in (https://drive.google.com/drive/folders/15oP0CZM_O_-Bir18VbSM8wRUEzoyLXby?usp=sharing). Download ckpts(new).zip and unzip all of the checkpoints.
  • Inference with tsegnet / pointnet / pointnetpp / dgcnn / pointtransformer
    python start_inference.py \
     --input_dir_path obj/file/parent/path \
     --split_txt_path base_name_test_fold.txt \
     --save_path path/to/save/results \
     --model_name tgnet_fps \
     --checkpoint_path your/model/checkpoint/path
    
  • Inference with tgnet(ours)
    python start_inference.py \
     --input_dir_path obj/file/parent/path \
     --split_txt_path base_name_test_fold.txt \
     --save_path path/to/save/results \
     --model_name tgnet_fps \
     --checkpoint_path your/tgnet_fps/checkpoint/path
     --checkpoint_path_bdl your/tgnet_bdl/checkpoint/path
    
    • Please input the parent path of the original mesh obj files instead of the preprocessed sampling points in --input_data_dir_path for training. The inference process will handle the farthest point sampling internally.
    • For split_txt_path, provide the test split fold's casenames in the same format as used during training.
  • Predicted results are saved in save_path like below... It has the same format as the ground truth json file.
    --save_path
    ----00OMSZGW_lower.json
    ----00OMSZGW_upper.json
    ----0EAKT1CU_lower.json
    ----0EAKT1CU_upper.json
    and so on...
    
  • the inference config in "inference_pipelines.infenrece_pipeline_maker.py" has to be the same as the model of the train config. If you change the train config, then you have to change the inference config.

Test results

  • The checkpoints we provided were trained for 60 epochs using the train-validation split provided in the dataset drive link(base_name_train_fold.txt, base_name_val_fold.txt). The results obtained using the test split(base_name_test_fold.txt) are as follows

    image

    (IoU -> Intersection over Union(TSA in challenge) // CLS -> classification accuracy(TIR in challenge)).

  • The results may look like this.

    image

Evaulation & Visualization

  • We provide the evaluation and visualization code.
  • You can execute the following code to test on a pair of obj/gt json file:
    eval_visualize_results.py \
     --mesh_path path/to/obj_file \ 
     --gt_json_path path/to/gt_json_file \
     --pred_json_path path/to/predicted_json_file(a result of inference code)
    
  • With just a few modifications to the provided code, you can write code to test all the results.

Installation

  • Installtion is tested on pytorch/pytorch:1.7.1-cuda11.0-cudnn8-devel(ubuntu, pytorch 1.7.1) docker image.
  • It can be installed on other OS(window, etc..)
  • There are some issues with RTX40XX graphic cards. plz report in issue board.
  • if you have any issues while installing pointops library, please install another pointops library source in (https://github.com/POSTECH-CVLab/point-transformer).
    pip install wandb
    pip install --ignore-installed PyYAML
    pip install open3d
    pip install multimethod
    pip install termcolor
    pip install trimesh
    pip install easydict
    cd external_libs/pointops && python setup.py install
    

Reference codes

toothgroupnetwork's People

Contributors

limhoyeon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

toothgroupnetwork's Issues

Changing the from batch_size=1 to anything else in TSegNet causes an error.

Hello.
You've done a great job with this repository.
Unfortunately I wasn't able to train TGNet due to VRam constraints.
However, I tried training TSegNet since it doesn't take much VRam.

Training TSegNet with batch_size=1 is working fine.
However when I tried to change the batch_size into a bigger number, an error occurred

I assume that the loss for TSegNet is not coded to support a batch_size that doesn't equal to 1?
Does it only accept singular datapoints at a time?

  File "C:\Users\User\Desktop\ToothGroupNetwork\start_train.py", line 55, in <module>
    runner(config, model)
  File "C:\Users\User\Desktop\ToothGroupNetwork\runner.py", line 57, in runner
    trainner.run()
  File "C:\Users\User\Desktop\ToothGroupNetwork\trainer.py", line 118, in run
    self.train(epoch, train_data_loader)
  File "C:\Users\User\Desktop\ToothGroupNetwork\trainer.py", line 38, in train
    loss = self.model.step(batch_idx, batch_item, "train")
  File "C:\Users\Desktop\ToothGroupNetwork\models\tsegnet_model.py", line 49, in step
    gt_centroid_coords, gt_centroid_exists = ou.seg_label_to_cent(batch_item["feat"][:,:3,:], batch_item["gt_seg_label"])
  File "C:\Users\User\Desktop\ToothGroupNetwork\ops_utils.py", line 173, in seg_label_to_cent
    gt_coords = gt_coords.view(-1,3)
RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.```

Paper

Have you submitted paper about your methods? Could you please give me some links?

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

args.input_dir_path= H:\teeth\3DTeethSeg\ToothGroupNetwork-main\in_obj
args.split_txt_path= test_id.txt
stl_path_ls= ['H:\teeth\3DTeethSeg\ToothGroupNetwork-main\in_obj\00OMSZGW\00OMSZGW_lower.obj', 'H:\teeth\3DTeethSeg\ToothGroupNetwork-main\in_obj\00OMSZGW\00OMSZGW_upper.obj']
Processing: 0 : H:\teeth\3DTeethSeg\ToothGroupNetwork-main\in_obj\00OMSZGW\00OMSZGW_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 "h:\teeth\3DTeethSeg\ToothGroupNetwork-main\predict_utils.py", line 97, in predict
pred_result = self.chl_pipeline(scan_path)
File "h:\teeth\3DTeethSeg\ToothGroupNetwork-main\inference_pipelines\inference_pipeline_tgn.py", line 46, in call
first_results = self.get_first_module_results(input_cuda_feats, self.first_module)
File "h:\teeth\3DTeethSeg\ToothGroupNetwork-main\inference_pipelines\inference_pipeline_tgn.py", line 170, in get_first_module_results
output = base_model([points])
File "C:\ProgramData\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "h:\teeth\3DTeethSeg\ToothGroupNetwork-main\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 "h:\teeth\3DTeethSeg\ToothGroupNetwork-main\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:\ProgramData\Anaconda3\lib\site-packages\sklearn\base.py", line 1151, in wrapper
return fit_method(estimator, *args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\sklearn\cluster_dbscan.py", line 370, in fit
X = self._validate_data(X, accept_sparse="csr")
File "C:\ProgramData\Anaconda3\lib\site-packages\sklearn\base.py", line 604, in _validate_data
out = check_array(X, input_name="X", **check_params)
File "C:\ProgramData\Anaconda3\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.

Cuda out of memory error

I am using the challenge branch to run inference this project.
But there is an error - Cuda out of memory.
I searched many articles on google but can't resolved.

my GPU is NVIDIA GeForce RTX 3050 Ti Laptop GPU. and this is the error log.

Processing: 0 : D:/ToothGroupNetwork-challenge_branch/input_path\0EJBIPTC\0EJBIPTC_lower.obj
CUDA out of memory. Tried to allocate 972.00 MiB (GPU 0; 4.00 GiB total capacity; 3.24 GiB already allocated; 0 bytes free; 3.28 GiB reserved in
total by PyTorch)
Traceback (most recent call last):
File "D:\ToothGroupNetwork-challenge_branch\predict_utils.py", line 101, in predict
pred_result = self.chl_pipeline(scan_path)
File "D:\ToothGroupNetwork-challenge_branch\inference_pipeline_final.py", line 212, in call
bdl_results = self.get_bdl_module_results(input_cuda_bdl_feats, sampled_boundary_seg_label, self.bdl_module)
File "D:\ToothGroupNetwork-challenge_branch\inference_pipeline_final.py", line 720, in get_bdl_module_results
output = base_model([points, sampled_boundary_seg_label], test=True)
File "C:\Users\Lee\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "D:\ToothGroupNetwork-challenge_branch\models\tf_cbl_two_step_half_num_model.py", line 182, in forward
sem_2, offset_2, mask_2, _ = self.second_ins_cent_model([crop_input_features])
File "C:\Users\Lee\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "D:\ToothGroupNetwork-challenge_branch\models\modules\cbl_point_transformer\cbl_point_transformer_module.py", line 124, in forward
p1, x1, o1 = self.enc1([p0, x0, o0])
File "C:\Users\Lee\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "C:\Users\Lee\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\nn\modules\container.py", line 124, in forward
input = module(input)
File "C:\Users\Lee\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "D:\ToothGroupNetwork-challenge_branch\models\modules\cbl_point_transformer\blocks.py", line 132, in forward
x = self.relu(self.bn2(self.transformer2([p, x, o]))) # - seems like trans/convolute - bn - relu
File "C:\Users\Lee\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "D:\ToothGroupNetwork-challenge_branch\models\modules\cbl_point_transformer\blocks.py", line 40, in forward
w = x_k - x_q.unsqueeze(1) + p_r.view(p_r.shape[0], p_r.shape[1], self.out_planes // self.mid_planes, self.mid_planes).sum(2) # (n, nsample, c)
RuntimeError: CUDA out of memory. Tried to allocate 972.00 MiB (GPU 0; 4.00 GiB total capacity; 3.24 GiB already allocated; 0 bytes free; 3.28 GiB reserved in total by PyTorch)

Backend TkAgg is interactive backend. Turning interactive mode on.

may i have some mistakes, can anybody help me?

How to train on other data

Hi,
I just got other dental data in obj format, but I do not know how to label it correctly and create right json file, do you have any suggestions?
Thank you! @limhoyeon

about first_ins_cent_model Problem

Hello, I used the challenge dataset and your shared model for prediction. However, there seems to be an issue with the ’self.first_ins_cent_model‘ method in the ’grouping_network_module.py‘ file, which results in all 0 values for whole_cls_1.
Snipaste_2023-06-14_11-11-46

BatchSize set to 1

Hello! I have a question for your inspiring work. Did you set batch size to 1 when training? Cause I find that you use BatchNorm in your network

将bath_size设置为大于1时会报错

作者您好,感谢您的开源贡献,有一个问题需要请教一下,我的显卡为3090,24G显存,我在训练tgnet_bdl时将batch_size设置为1时训练一个epoch需要40分钟,对gpu的利用很小,我想充分利用gpu的作用,但是当我增大batch_size为2或者4时就会报错:
image

when I was training I got the following error

Hello:

I'm using the main branch an follow the procedure:

  1. use challenger dataset to process,
    2.use processing data to train
    3.train command:
    python start_train.py --model_name tgnet_fps --config_path train_configs/tgnet_fps.py --experiment_name tgnet --input_data_dir_path processDir --train_data_split_txt_path split/base_name_train_fold.txt --val_data_split_txt_path split/base_name_val_fold.txt
    However, the following error occure
    image

When I comment out the code ‘raise’:
the following error occurre
39d08ca81aeab5de92173beaf461f0a

My running environment:
The graphics card is RTX 3090
Python 3.7.16
torch: 1.13.1+cu117, cuda 11.7,cudnn 8500
Ubuntu 20.4

Now I don't know where the problem is, Can you help me?

The memory of the tgnet model

Hello, I would like to ask what is the memory usage of the tgnet model? This is important for my subsequent training setup

CPU inference/predict

How to modify project to be able to do predictions on CPU (on machine without GPU or pytorch-cuda configuration)? Please help

Training on custom data

Good day, I see in the inference branch that you use several models, like
0809_sched_v2_fixed_Flip(fixed)_weight0.1_val.h5
0809_reverse_sched_v2_fixed_Flip(fixed)_weight0.1_val
0809_reverse_sched_fixed_tf_cbl_2.0_second_Flip_val
0808_sched_fixed_tf_cbl_2.0_second_Flip_val
0805_mask_model_val

Is there any code related to training this models?

Visualization code

Hello ,When I was using your visualization code to visualize the segmentation results, I find a problem
屏幕截图 2024-04-28 164149
why one teeth not in color.I check the FDI: [ 0 11 12 13 14 15 16 17 21 22 23 24 25 26 27],it's correct

Training checkpoints

Thanks for posting your code. The folder you are sharing the training checkpoint, you have posted 'ckpts(new).egg' file. I was wondering if this is a typo or if not, how I can install it. From what I know, .egg python package files are deprecated. Thanks!

error to run y to run inference_mid.py

try to run inference_mid.py --input_path D:\Tooth\3D_scans_per_patient_obj_files_b2 --save_path D:\Tooth\S ,errors,How to Sovle?
"C:\Program Files\Python39\python.exe" D:\Tooth\3DTeethSeg_MICCAI\ToothGroupNetwork-challenge_branch\inference_mid.py --input_path D:\Tooth\3D_scans_per_patient_obj_files_b2 --save_path D:\Tooth\S
The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than right now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
Processing: 0 : D:\Tooth\3D_scans_per_patient_obj_files_b2\00OMSZGW\00OMSZGW_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 "D:\Tooth\3DTeethSeg_MICCAI\ToothGroupNetwork-challenge_branch\predict_utils.py", line 101, in predict
pred_result = self.chl_pipeline(scan_path)
File "D:\Tooth\3DTeethSeg_MICCAI\ToothGroupNetwork-challenge_branch\inference_pipeline_mid.py", line 52, in call
first_results = self.get_first_module_results(input_cuda_feats, self.first_module)
File "D:\Tooth\3DTeethSeg_MICCAI\ToothGroupNetwork-challenge_branch\inference_pipeline_mid.py", line 176, in get_first_module_results
output = base_model([points])
File "C:\Users\User\AppData\Roaming\Python\Python39\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "D:\Tooth\3DTeethSeg_MICCAI\ToothGroupNetwork-challenge_branch\models\modules\grouping_network_module.py", line 65, in forward
fg_points_labels_ls = tu.get_clustering_labels(b_moved_points, whole_cls_1)
File "D:\Tooth\3DTeethSeg_MICCAI\ToothGroupNetwork-challenge_branch\tsg_utils.py", line 88, in get_clustering_labels
clustering = DBSCAN(eps=0.03, min_samples=60).fit(moved_points[super_point_cond, :], 3)
File "C:\Program Files\Python39\lib\site-packages\sklearn\base.py", line 1474, in wrapper
return fit_method(estimator, *args, **kwargs)
File "C:\Program Files\Python39\lib\site-packages\sklearn\cluster_dbscan.py", line 393, in fit
X = self._validate_data(X, accept_sparse="csr")
File "C:\Program Files\Python39\lib\site-packages\sklearn\base.py", line 633, in _validate_data
out = check_array(X, input_name="X", **check_params)
File "C:\Program Files\Python39\lib\site-packages\sklearn\utils\validation.py", line 1072, 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 "D:\Tooth\3DTeethSeg_MICCAI\ToothGroupNetwork-challenge_branch\inference_mid.py", line 65, 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 "D:\Tooth\3DTeethSeg_MICCAI\ToothGroupNetwork-challenge_branch\predict_utils.py", line 140, in process
labels, instances, jaw = self.predict([input_path])
File "D:\Tooth\3DTeethSeg_MICCAI\ToothGroupNetwork-challenge_branch\predict_utils.py", line 101, in predict
pred_result = self.chl_pipeline(scan_path)
File "D:\Tooth\3DTeethSeg_MICCAI\ToothGroupNetwork-challenge_branch\inference_pipeline_mid.py", line 52, in call
first_results = self.get_first_module_results(input_cuda_feats, self.first_module)
File "D:\Tooth\3DTeethSeg_MICCAI\ToothGroupNetwork-challenge_branch\inference_pipeline_mid.py", line 176, in get_first_module_results
output = base_model([points])
File "C:\Users\User\AppData\Roaming\Python\Python39\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "D:\Tooth\3DTeethSeg_MICCAI\ToothGroupNetwork-challenge_branch\models\modules\grouping_network_module.py", line 65, in forward
fg_points_labels_ls = tu.get_clustering_labels(b_moved_points, whole_cls_1)
File "D:\Tooth\3DTeethSeg_MICCAI\ToothGroupNetwork-challenge_branch\tsg_utils.py", line 88, in get_clustering_labels
clustering = DBSCAN(eps=0.03, min_samples=60).fit(moved_points[super_point_cond, :], 3)
File "C:\Program Files\Python39\lib\site-packages\sklearn\base.py", line 1474, in wrapper
return fit_method(estimator, *args, **kwargs)
File "C:\Program Files\Python39\lib\site-packages\sklearn\cluster_dbscan.py", line 393, in fit
X = self._validate_data(X, accept_sparse="csr")
File "C:\Program Files\Python39\lib\site-packages\sklearn\base.py", line 633, in _validate_data
out = check_array(X, input_name="X", **check_params)
File "C:\Program Files\Python39\lib\site-packages\sklearn\utils\validation.py", line 1072, in check_array
raise ValueError(
ValueError: Found array with 0 sample(s) (shape=(0, 3)) while a minimum of 1 is required by DBSCAN.

Issue installing pointops

Hello, I created a conda env with the specified version for cuda (11.0) and pytorch (1.7.1) and used the command in the installation section, but an error occurs when installing pointops:

Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/6] /usr/bin/nvcc -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/TH -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/THC -I/home/renan/anaconda3/envs/ToothGroupNetwork/include/python3.8 -c -c /home/renan/ToothGroupNetwork/external_libs/pointops/src/subtraction/subtraction_cuda_kernel.cu -o /home/renan/ToothGroupNetwork/external_libs/pointops/build/temp.linux-x86_64-cpython-38/src/subtraction/subtraction_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O2 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=pointops_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=sm_86 -std=c++14
FAILED: /home/renan/ToothGroupNetwork/external_libs/pointops/build/temp.linux-x86_64-cpython-38/src/subtraction/subtraction_cuda_kernel.o
/usr/bin/nvcc -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/TH -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/THC -I/home/renan/anaconda3/envs/ToothGroupNetwork/include/python3.8 -c -c /home/renan/ToothGroupNetwork/external_libs/pointops/src/subtraction/subtraction_cuda_kernel.cu -o /home/renan/ToothGroupNetwork/external_libs/pointops/build/temp.linux-x86_64-cpython-38/src/subtraction/subtraction_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O2 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=pointops_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=sm_86 -std=c++14
/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/ATen/core/boxing/impl/boxing.h(100): warning #68-D: integer conversion resulted in a change of sign

/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/ATen/core/op_registration/op_whitelist.h(39): warning #68-D: integer conversion resulted in a change of sign

/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/ATen/core/boxing/impl/boxing.h(100): warning #68-D: integer conversion resulted in a change of sign

/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/ATen/core/op_registration/op_whitelist.h(39): warning #68-D: integer conversion resulted in a change of sign

/usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
  435 |         function(_Functor&& __f)
      |
                     ^
/usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
  530 |         operator=(_Functor&& __f)
      |
                      ^
/usr/include/c++/11/bits/std_function.h:530:146: note:         ‘_ArgTypes’
[2/6] /usr/bin/nvcc -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/TH -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/THC -I/home/renan/anaconda3/envs/ToothGroupNetwork/include/python3.8 -c -c /home/renan/ToothGroupNetwork/external_libs/pointops/src/knnquery/knnquery_cuda_kernel.cu -o /home/renan/ToothGroupNetwork/external_libs/pointops/build/temp.linux-x86_64-cpython-38/src/knnquery/knnquery_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O2 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=pointops_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=sm_86 -std=c++14
FAILED: /home/renan/ToothGroupNetwork/external_libs/pointops/build/temp.linux-x86_64-cpython-38/src/knnquery/knnquery_cuda_kernel.o

/usr/bin/nvcc -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/TH -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/THC -I/home/renan/anaconda3/envs/ToothGroupNetwork/include/python3.8 -c -c /home/renan/ToothGroupNetwork/external_libs/pointops/src/knnquery/knnquery_cuda_kernel.cu -o /home/renan/ToothGroupNetwork/external_libs/pointops/build/temp.linux-x86_64-cpython-38/src/knnquery/knnquery_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O2 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=pointops_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=sm_86 -std=c++14
/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/ATen/core/boxing/impl/boxing.h(100): warning #68-D: integer conversion resulted in a change of sign

/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/ATen/core/op_registration/op_whitelist.h(39): warning #68-D: integer conversion resulted in a change of sign

/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/ATen/core/boxing/impl/boxing.h(100): warning #68-D: integer conversion resulted in a change of sign

/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/ATen/core/op_registration/op_whitelist.h(39): warning #68-D: integer conversion resulted in a change of sign

/usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
  435 |         function(_Functor&& __f)
      |
                     ^
/usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
  530 |         operator=(_Functor&& __f)
      |
                      ^
/usr/include/c++/11/bits/std_function.h:530:146: note:         ‘_ArgTypes’
[3/6] /usr/bin/nvcc -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/TH -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/THC -I/home/renan/anaconda3/envs/ToothGroupNetwork/include/python3.8 -c -c /home/renan/ToothGroupNetwork/external_libs/pointops/src/interpolation/interpolation_cuda_kernel.cu -o /home/renan/ToothGroupNetwork/external_libs/pointops/build/temp.linux-x86_64-cpython-38/src/interpolation/interpolation_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O2 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=pointops_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=sm_86 -std=c++14
FAILED: /home/renan/ToothGroupNetwork/external_libs/pointops/build/temp.linux-x86_64-cpython-38/src/interpolation/interpolation_cuda_kernel.o
/usr/bin/nvcc -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/TH -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/THC -I/home/renan/anaconda3/envs/ToothGroupNetwork/include/python3.8 -c -c /home/renan/ToothGroupNetwork/external_libs/pointops/src/interpolation/interpolation_cuda_kernel.cu -o /home/renan/ToothGroupNetwork/external_libs/pointops/build/temp.linux-x86_64-cpython-38/src/interpolation/interpolation_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O2 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=pointops_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=sm_86 -std=c++14
/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/ATen/core/boxing/impl/boxing.h(100): warning #68-D: integer conversion resulted in a change of sign

/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/ATen/core/op_registration/op_whitelist.h(39): warning #68-D: integer conversion resulted in a change of sign

/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/ATen/core/boxing/impl/boxing.h(100): warning #68-D: integer conversion resulted in a change of sign

/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/ATen/core/op_registration/op_whitelist.h(39): warning #68-D: integer conversion resulted in a change of sign

/usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
  435 |         function(_Functor&& __f)
      |
                     ^
/usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
  530 |         operator=(_Functor&& __f)
      |
                      ^
/usr/include/c++/11/bits/std_function.h:530:146: note:         ‘_ArgTypes’
[4/6] /usr/bin/nvcc -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/TH -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/THC -I/home/renan/anaconda3/envs/ToothGroupNetwork/include/python3.8 -c -c /home/renan/ToothGroupNetwork/external_libs/pointops/src/grouping/grouping_cuda_kernel.cu -o /home/renan/ToothGroupNetwork/external_libs/pointops/build/temp.linux-x86_64-cpython-38/src/grouping/grouping_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O2 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=pointops_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=sm_86 -std=c++14
FAILED: /home/renan/ToothGroupNetwork/external_libs/pointops/build/temp.linux-x86_64-cpython-38/src/grouping/grouping_cuda_kernel.o

/usr/bin/nvcc -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/TH -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/THC -I/home/renan/anaconda3/envs/ToothGroupNetwork/include/python3.8 -c -c /home/renan/ToothGroupNetwork/external_libs/pointops/src/grouping/grouping_cuda_kernel.cu -o /home/renan/ToothGroupNetwork/external_libs/pointops/build/temp.linux-x86_64-cpython-38/src/grouping/grouping_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O2 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=pointops_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=sm_86 -std=c++14
/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/ATen/core/boxing/impl/boxing.h(100): warning #68-D: integer conversion resulted in a change of sign

/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/ATen/core/op_registration/op_whitelist.h(39): warning #68-D: integer conversion resulted in a change of sign

/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/ATen/core/boxing/impl/boxing.h(100): warning #68-D: integer conversion resulted in a change of sign

/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/ATen/core/op_registration/op_whitelist.h(39): warning #68-D: integer conversion resulted in a change of sign

/usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
  435 |         function(_Functor&& __f)
      |
                     ^
/usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
  530 |         operator=(_Functor&& __f)
      |
                      ^
/usr/include/c++/11/bits/std_function.h:530:146: note:         ‘_ArgTypes’
[5/6] /usr/bin/nvcc -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/TH -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/THC -I/home/renan/anaconda3/envs/ToothGroupNetwork/include/python3.8 -c -c /home/renan/ToothGroupNetwork/external_libs/pointops/src/aggregation/aggregation_cuda_kernel.cu -o /home/renan/ToothGroupNetwork/external_libs/pointops/build/temp.linux-x86_64-cpython-38/src/aggregation/aggregation_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O2 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=pointops_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=sm_86 -std=c++14
FAILED: /home/renan/ToothGroupNetwork/external_libs/pointops/build/temp.linux-x86_64-cpython-38/src/aggregation/aggregation_cuda_kernel.o
/usr/bin/nvcc -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/TH -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/THC -I/home/renan/anaconda3/envs/ToothGroupNetwork/include/python3.8 -c -c /home/renan/ToothGroupNetwork/external_libs/pointops/src/aggregation/aggregation_cuda_kernel.cu -o /home/renan/ToothGroupNetwork/external_libs/pointops/build/temp.linux-x86_64-cpython-38/src/aggregation/aggregation_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O2 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=pointops_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=sm_86 -std=c++14
/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/ATen/core/boxing/impl/boxing.h(100): warning #68-D: integer conversion resulted in a change of sign

/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/ATen/core/op_registration/op_whitelist.h(39): warning #68-D: integer conversion resulted in a change of sign

/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/ATen/core/boxing/impl/boxing.h(100): warning #68-D: integer conversion resulted in a change of sign

/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/ATen/core/op_registration/op_whitelist.h(39): warning #68-D: integer conversion resulted in a change of sign

/usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
  435 |         function(_Functor&& __f)
      |
                     ^
/usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
  530 |         operator=(_Functor&& __f)
      |
                      ^
/usr/include/c++/11/bits/std_function.h:530:146: note:         ‘_ArgTypes’
[6/6] /usr/bin/nvcc -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/TH -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/THC -I/home/renan/anaconda3/envs/ToothGroupNetwork/include/python3.8 -c -c /home/renan/ToothGroupNetwork/external_libs/pointops/src/sampling/sampling_cuda_kernel.cu -o /home/renan/ToothGroupNetwork/external_libs/pointops/build/temp.linux-x86_64-cpython-38/src/sampling/sampling_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O2 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=pointops_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=sm_86 -std=c++14
FAILED: /home/renan/ToothGroupNetwork/external_libs/pointops/build/temp.linux-x86_64-cpython-38/src/sampling/sampling_cuda_kernel.o

/usr/bin/nvcc -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/TH -I/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/THC -I/home/renan/anaconda3/envs/ToothGroupNetwork/include/python3.8 -c -c /home/renan/ToothGroupNetwork/external_libs/pointops/src/sampling/sampling_cuda_kernel.cu -o /home/renan/ToothGroupNetwork/external_libs/pointops/build/temp.linux-x86_64-cpython-38/src/sampling/sampling_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O2 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=pointops_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=sm_86 -std=c++14
/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/ATen/core/boxing/impl/boxing.h(100): warning #68-D: integer conversion resulted in a change of sign

/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/ATen/core/op_registration/op_whitelist.h(39): warning #68-D: integer conversion resulted in a change of sign

/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/ATen/core/boxing/impl/boxing.h(100): warning #68-D: integer conversion resulted in a change of sign

/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/include/ATen/core/op_registration/op_whitelist.h(39): warning #68-D: integer conversion resulted in a change of sign

/usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
  435 |         function(_Functor&& __f)
      |
                     ^
/usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
  530 |         operator=(_Functor&& __f)
      |
                      ^
/usr/include/c++/11/bits/std_function.h:530:146: note:         ‘_ArgTypes’
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1533, in _run_ninja_build
    subprocess.run(
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "setup.py", line 12, in <module>
    setup(
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/setuptools/__init__.py", line 107, in setup
    return distutils.core.setup(**attrs)
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/setuptools/dist.py", line 1234, in run_command
    super().run_command(command)
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/setuptools/command/install.py", line 80, in run
    self.do_egg_install()
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/setuptools/command/install.py", line 129, in do_egg_install
    self.run_command('bdist_egg')
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
    self.distribution.run_command(command)
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/setuptools/dist.py", line 1234, in run_command
    super().run_command(command)
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 164, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 150, in call_command
    self.run_command(cmdname)
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
    self.distribution.run_command(command)
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/setuptools/dist.py", line 1234, in run_command
    super().run_command(command)
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/setuptools/command/install_lib.py", line 11, in run
    self.build()
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/setuptools/_distutils/command/install_lib.py", line 111, in build
    self.run_command('build_ext')
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
    self.distribution.run_command(command)
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/setuptools/dist.py", line 1234, in run_command
    super().run_command(command)
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 84, in run
    _build_ext.run(self)
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
    self.build_extensions()
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 670, in build_extensions
    build_ext.build_extensions(self)
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions
    self._build_extensions_serial()
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial
    self.build_extension(ext)
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 246, in build_extension
    _build_ext.build_extension(self, ext)
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 548, in build_extension
    objects = self.compiler.compile(
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 491, in unix_wrap_ninja_compile
    _write_ninja_file_and_compile_objects(
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1250, in _write_ninja_file_and_compile_objects
    _run_ninja_build(
  File "/home/renan/anaconda3/envs/ToothGroupNetwork/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1555, in _run_ninja_build
    raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension

I tried pulling the version from the git that is linked as a suggestion, and the same error occurs. This is my system:

WSL2 (Ubuntu)
I7-12700KF
RTX 3080

The A10 graphics card exhibits abnormal partitioning

Hello, I encountered several issues as shown in the picture when performing segmentation on the A10 graphics card. However, the same mesh model segments normally on a 3090. In the A10, I also made corresponding modifications to the compilation parameters for pointops.
Could there be any other reasons for the issue I'm experiencing with segmentation on the A10 graphics card, despite having adjusted the compilation parameters for pointops?

微信图片_20240426093826
微信图片_20240426093832
Snipaste_2024-04-26_09-39-00

ground-truth_labels_instances

Hello

First of all, thank you for doing good research.

The json file in the ground-truth_labels_instances folder has 'labels' and 'instances', what does each mean?
When I open the json file, I think labels are tooth numbers, but I don't know the meaning of instances. (In the paper, instances are tooth numbers. Which one is right?)

I would appreciate it if you could tell me the meaning of 'labels' and 'instances' in the json file.

thank you

Sent email to request the dataset

Hi Ho Yeon Lim,

Hope all is well.

I've sent you dataset requirement several days ago but not received any response, it would be great if you can response for the dataset.

data axes

Thank you for your excellent research.

I have a question.

Is there a reason why the axis alignment of the data is fixed in the data set?

Is there a problem when training data with an undefined data axis?

thank you.

start_inference.py error : ZeroDivisionError: division by zero

Dear author,
I used trained model to run start_inference.py and then visualize the predict result use eval_visualize_results.py. An error occurred:
Traceback (most recent call last):
File "C:\Users\1\Desktop\ToothGroupNetwork-main\eval_visualize_results.py", line 66, in
IoU, F1, Acc, SEM_ACC, _ = cal_metric(gt_labels, pred_labels, pred_labels) # F1 -> TSA, SEM_ACC -> TIR
File "C:\Users\1\Desktop\ToothGroupNetwork-main\eval_visualize_results.py", line 58, in cal_metric
return IOU/len(ins_label_names), F1/len(ins_label_names), ACC/len(ins_label_names), SEM_ACC/len(ins_label_names), IOU_arr
ZeroDivisionError: division by zero

And I notice that label value in in the predict json files all zero. Can you help me?
图片1

Replicating the docker environment

Great job on this repository!
I was trying to replicate the docker environment for the past few days but to no avail.
I would debug an error and then another error would pop up out of nowhere.

I was able to run the code on Windows 11 and Ubuntu 18.04 and it worked great!
However I'm having a hard time replicating the docker environment that you mentioned in the Installation paragraph.

Are you able to share the Dockerfile & Docker-compose.yml files?

That will be greatly appreciated!

How to run ToothGroupNetwork

Hello:

I'm using the main branch an follow the procedure:

  1. use challenger dataset to process,
  2. use processing data to train
  3. use the training results to verify
    However, the following error occurred
    微信图片_20230710100957
    My running environment:
  • The graphics card is RTX 3090
  • Python 3.7.0
  • torch: 1.13.1+cu117, cuda 11.7,cudnn 8500
  • Ubuntu 20.4
    Now I don't know where the problem is, Can you help me?

Training on other data

excellent work!
I encounter a problem when I train my own dataset, how can you get the values of these 2 variants:
in your preprocess_data.py(line 16 and 17)

Y_AXIS_MAX = 33.15232091532151
Y_AXIS_MIN = -36.9843781139949

Problems executing Inference (a minimum of 1 is required by DBSCAN.)

Hello! I'm using the following command to obtain inference results:

 python start_inference.py --model_name tgnet --input_dir_path ./data_obj_parent_directory --split_txt_path base_name_test_fold.txt --checkpoint_path ckpts/tgnet_fps --checkpoint_path_bdl ckpts/tgnet_bdl

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?

How to train ToothGroupNetwork

Hello,

"if you want to train our model, please contact me.
The training code will be updated and released during May 2023."

How to train this model and I don't find your email.

Please let me know.

Thanks!

bad result when inputting mirrored data

1 what happened

  • when i input a normal data, the model gives out a perfect result. however when i mirror(Left-right) the data then input it, the model gives out a bad result using a abnormal mount of time

2 problem

  • i believe that, as teeth, the mirrored data should have the similar result as normal data. Becuase teeth should have the property of symmetry
  • so what's the sitution?Did i do something wrong?
  • how should i solve it?
  • Thank you for your help!

3 results of normal data and mirrored data

normal data mirrored data
Runtime duration 30s 210s
segment result image-20240328202646030 image-20240328185736523-1711623553771-2
segment result image-20240328202658408 image-20240328185935952

4 detail

  • The input data follows the principle of coordinate alignment
  • the input data is not from the dataset of this model. i will try this on dataset of this model later

Question about npy file generated by preprocess_data.py

I try to use preprocess_data.py to generated processed npy file. But the data in npy file makes me confused.
[[ 0.2485581 -0.29567248 0.1667352 -0.85212744 0.42836872 0.30063109]
[ 0.2485581 -0.29567248 0.1667352 -0.85212744 0.42836872 0.30063109]
[ 0.2485581 -0.29567248 0.1667352 -0.85212744 0.42836872 0.30063109]
...
[ 0.2485581 -0.29567248 0.1667352 -0.85212744 0.42836872 0.30063109]
[ 0.2485581 -0.29567248 0.1667352 -0.85212744 0.42836872 0.30063109]
[ 0.2485581 -0.29567248 0.1667352 -0.85212744 0.42836872 0.30063109]]

[2. 2. 2. ... 2. 2. 2.]

I think for each npy file, there should be different coordinates and different labels. But for the npy file above, only label 2 exists and all coordianates are the same. How can i solve it ?

Train tgnet_fps and find the error

Hello, when I train the tgnet_fps model, I got following error
Traceback (most recent call last):
File "start_train.py", line 51, in
runner(config, model)
File "/workspace/ToothGroupNetwork-main/ToothGroupNetwork-main/runner.py", line 53, in runner
gen_set = [get_generator_set(config["generator"], False)]
File "/workspace/ToothGroupNetwork-main/ToothGroupNetwork-main/runner.py", line 28, in get_generator_set
point_loader = DataLoader(
File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 268, in init
sampler = RandomSampler(dataset, generator=generator)
File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/sampler.py", line 102, in init
raise ValueError("num_samples should be a positive integer "
ValueError: num_samples should be a positive integer value, but got num_samples=0

How to solve this issue? By the way , I use the challange dataset.

Error when Install pointops

Hello, my configuration is
Ubuntu 22.04LTS
GPU: 1080Ti, 4090 both tried
gcc: 10,11,12 all tried
libtorch(1.8.1),

following your install option, I first use torch(1.7.1) and cuda(11.0), and run cd external_libs/pointops && python setup.py install to install pointops. But I comes to this error:

Traceback (most recent call last):
  File "setup.py", line 12, in <module>
    setup(
  File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/__init__.py", line 107, in setup
    return distutils.core.setup(**attrs)
  File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
  File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/dist.py", line 1244, in run_command
    super().run_command(command)
  File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/command/install.py", line 80, in run
    self.do_egg_install()
  File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/command/install.py", line 129, in do_egg_install
    self.run_command('bdist_egg')
  File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
    self.distribution.run_command(command)
  File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/dist.py", line 1244, in run_command
    super().run_command(command)
  File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 164, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 150, in call_command
    self.run_command(cmdname)
  File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
    self.distribution.run_command(command)
  File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/dist.py", line 1244, in run_command
    super().run_command(command)
  File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/command/install_lib.py", line 11, in run
    self.build()
  File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/_distutils/command/install_lib.py", line 111, in build
    self.run_command('build_ext')
  File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
    self.distribution.run_command(command)
  File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/dist.py", line 1244, in run_command
    super().run_command(command)
  File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 84, in run
    _build_ext.run(self)
  File "/home/zxh/.local/lib/python3.8/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
    _build_ext.build_ext.run(self)
  File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
    self.build_extensions()
  File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 670, in build_extensions
    build_ext.build_extensions(self)
  File "/home/zxh/.local/lib/python3.8/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
    _build_ext.build_ext.build_extensions(self)
  File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions
    self._build_extensions_serial()
  File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial
    self.build_extension(ext)
  File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 246, in build_extension
    _build_ext.build_extension(self, ext)
  File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 548, in build_extension
    objects = self.compiler.compile(
  File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 491, in unix_wrap_ninja_compile
    _write_ninja_file_and_compile_objects(
  File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1250, in _write_ninja_file_and_compile_objects
    _run_ninja_build(
  File "/home/zxh/anaconda3/envs/TSGNet2/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1555, in _run_ninja_build
    raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension

Then I solve this issue by change version in a new env conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=10.0 -c pytorch, but another issue arise:

src/aggregation/aggregation_cuda.cpp: In function ‘void aggregation_forward_cuda(int, int, int, int, at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor)’:
src/aggregation/aggregation_cuda.cpp:10:48: error: expected primary-expression before ‘float’
   10 |     const float *input = input_tensor.data_ptr<float>();
      |                                                ^~~~~
src/aggregation/aggregation_cuda.cpp:11:54: error: expected primary-expression before ‘float11 |     const float *position = position_tensor.data_ptr<float>();
      |                                                      ^~~~~
src/aggregation/aggregation_cuda.cpp:12:50: error: expected primary-expression before ‘float12 |     const float *weight = weight_tensor.data_ptr<float>();
      |                                                  ^~~~~
src/aggregation/aggregation_cuda.cpp:13:42: error: expected primary-expression before ‘int13 |     const int *idx = idx_tensor.data_ptr<int>();
      |                                          ^~~
src/aggregation/aggregation_cuda.cpp:14:44: error: expected primary-expression before ‘float14 |     float *output = output_tensor.data_ptr<float>();

I have no good ideal about it, can you give me some prompts?

about inference result

When I tested the pretrained model on my own data, I encountered some prediction errors:
image
Why does this situation occur and what parameters need to be adjusted?

installing pointops

I have same pytorch and cuda versions on Windows and Ubuntu.

Pointops could be installed correctly and worked correctly on Windows, but when I use Ubuntu, it could be installed correctly but worked incorrectly.

To be detail, pointops_cuda functions throws "CUDA error: no kernel image is available for execution on the device"

People who encountered this problem could try to install original pointops from https://github.com/POSTECH-CVLab/point-transformer/tree/master/lib, that works for me.

How to train other data

Thank you for your help, The model can now be split normally
微信图片_20230724093341
However, the segmentation of our own model using the training set after training is not very good, we want to train the dental model that meets our requirement,But it need some split_json data, How to generate a split json file,Plase help me.

While trying to train TSegNet fully, I got IndexError: too many indices for array.

Greetings.

I was able to train the centroid prediction of TSegNet.
However when I tried to train the full model as you explained in your Readme, I got this IndexError.

teeth-train_1  | Traceback (most recent call last):
teeth-train_1  |   File "/opt/conda/lib/python3.8/runpy.py", line 194, in _run_module_as_main
teeth-train_1  |     return _run_code(code, main_globals, None,
teeth-train_1  |   File "/opt/conda/lib/python3.8/runpy.py", line 87, in _run_code
teeth-train_1  |     exec(code, run_globals)
teeth-train_1  |   File "/opt/algorithm/start_train.py", line 103, in <module>
teeth-train_1  |     runner(config, model)
teeth-train_1  |   File "/opt/algorithm/runner.py", line 55, in runner
teeth-train_1  |     trainner.run()
teeth-train_1  |   File "/opt/algorithm/trainer.py", line 137, in run
teeth-train_1  |     self.train(epoch, train_data_loader, logger)
teeth-train_1  |   File "/opt/algorithm/trainer.py", line 50, in train
teeth-train_1  |     loss = self.model.step(batch_idx, batch_item, "train")
teeth-train_1  |   File "/opt/algorithm/models/tsegnet_model.py", line 72, in step
teeth-train_1  |     output = self.module(inputs)
teeth-train_1  |   File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
teeth-train_1  |     result = self.forward(*input, **kwargs)
teeth-train_1  |   File "/opt/algorithm/models/modules/tsegnet.py", line 67, in forward
teeth-train_1  |     center_points = center_points[None,:,:]
teeth-train_1  | IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed

After further investigation in the code, I found that the algorithm was trying to specify 2 index values in a numpy array that was original a one-dimensional python list.

moved_points = gu.torch_to_numpy(l3_xyz + offset_result).T.reshape(-1,3)
moved_points = moved_points[gu.torch_to_numpy(dist_result).reshape(-1)<0.3,:]
dbscan_results = DBSCAN(eps=0.05, min_samples=3).fit(moved_points, 3)
#gu.print_3d(gu.np_to_pcd_with_label(moved_points, dbscan_results.labels_))

center_points = [] # one dimensional list
for label in np.unique(dbscan_results.labels_):
    if label == -1: continue
    center_points.append(moved_points[dbscan_results.labels_==label].mean(axis=0))
center_points = np.array(center_points) # one dimensional numpy array
center_points = center_points[None,:,:] # specifying 2 index values from a one dimensional numpy array
#gu.print_3d(gu.np_to_pcd(moved_points,color=[0,1,0]), center_points[0])

rand_indexes = np.random.permutation(center_points.shape[1])[:8]
center_points = center_points.transpose(0,2,1)[:,:,rand_indexes].transpose(0,2,1)

Do you know how I proceed from that?
was something supposed to be concatenated with this numpy array?

CUDA error: no kernel image is available for execution on the device

Under the 'ToothGroupNetwork-challenge_branch' fold, exec the code:
python inference_final.py --input_path ./tmp --save_path ./results

Error::
Error(s) in loading state_dict for TfCblFirstModule:
While copying the parameter named "first_ins_cent_model.enc1.0.linear.weight", whose dimensions in the model are torch.Size([32, 6]) and whose dimensions in the checkpoint are torch.Size([32, 6]), an exception occurred : ('CUDA error: no kernel image is available for execution on the device',).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.