QingyongHu / RandLA-Net

🔥RandLA-Net in Tensorflow (CVPR 2020, Oral & IEEE TPAMI 2021)
Other
1.31k stars 321 forks source link

Question about inference #47

Closed XuanAo1016 closed 4 years ago

XuanAo1016 commented 4 years ago

Dear HuQingyong, I have trained the network with my data. It works perfectly. But I have some problem with the inference. with --mode test. my data have 5 classes and I have set class 0 as ignore in training. And the inference has only 4 labels from 1 to 4. But label 0 is the background label for my class. Which means that I have only 4 probs instead of 5 (include background). How could I fix this?

Many thanks!

abhigoku10 commented 4 years ago

@coronax1016 hi just to understand since i am facing issues while training which type of dataset does your custom dataset belong to like semanttick kitti or s3dis ?? what allthe changes you have made while training can you please sharre the information since ia m facing issues #10 THanks for the support

XuanAo1016 commented 4 years ago

sorry, even I use the Semantic3D data or Kitti data. the output always ignores the label 0. Which means the "background" class is missing?

abhigoku10 commented 4 years ago

@coronax1016 how many classes does your custom data consists of ?? what all changes you made during trianing

XuanAo1016 commented 4 years ago

@abhigoku10 I mean even I use the original code for Semantic3D. there are totally of 9 classes that include ignored one (background). For the inference, there is no background class (0).

QingyongHu commented 4 years ago

Hi @coronax1016, thanks for your interest in our work! For your question, the simplest solution is to revise this line as: self.ignored_labels = np.array([])

The points belonging to class '0' would not be ignored in this case.

XuanAo1016 commented 4 years ago

@QingyongHu Thanks for the reply. As in this case, the background will also be learned in the network which will significantly affect the coverage speed and result. And also, in the training step, the acc will be very high case the background is more than 90%. And it's hard to know the "true" acc for the network during training.

QingyongHu commented 4 years ago

Hi @coronax1016, sorry I really cannot understand your question, do you want to segment the background class or ignored? In addition, have you aware that the main evaluation metric in our framework is mean IoU?

XuanAo1016 commented 4 years ago

@QingyongHu Sorry for my poor English. I want to segment the background. I think now I understand what you mean. If I set the ignore label to [0], which will ignore the label 0 for both training and inference, right?

QingyongHu commented 4 years ago

@coronax1016. Yes, because the class '0' in Semantic3D and SemanticKITTI denote unclassified or invalid points, so we need to kick these points out when calculating loss. You definitely should not ignore this if class 0 has real meaning in your data.

XuanAo1016 commented 4 years ago

@QingyongHu Millions of thanks! I always thought it's my fault to get len(class) - 1 output, but It's I use the wrong option. 👍