ZhaochongAn / COSeg

[CVPR 2024] This repo contains the code for our paper: Rethinking Few-shot 3D Point Cloud Semantic Segmentation
61 stars 7 forks source link

Problems encountered during training #12

Open lrnb12345 opened 3 weeks ago

lrnb12345 commented 3 weeks ago

Hello, after pre training on my own dataset, I conducted a small sample 1way1shot training, but encountered an accuracy of 0 during this process. I would like to ask if this is normal. Pyhon3 main_f.spy -- config/s3disi_CSeg_fs.yaml savepath/root/autodl-tmp/COSeg-miin/1w1s_train pretrain_mackbone/root/autodl-tmp/COSeg-miin/prtrain cvfold 0 n_way 1 kshot 1 num episode per_comb 1000. This is my instruction. 屏幕截图 2024-08-22 161337

ZhaochongAn commented 3 weeks ago

Hi, it seems not normal. Does the loss decrease during episodic training? What is the pre-training performance? If you are using new dataset, it is also necessary to make sure the input points and labels are correct.

lrnb12345 commented 3 weeks ago

你好,这似乎不正常。在情景训练期间损失会减少吗?预训练性能如何?如果您使用的是新数据集,还需要确保输入点和标签正确。

In the costg.py file, my datasets were created based on the s3dis datasets, with a total of nine categories excluding the clutter'. I noticed that in s3dis, there were 12 categories excluding the'clutter' and six categories were set in each fold. However, I only have 9 categories and cannot be classified into the same category in each fold. What should I do, Also, is there a correlation between setting the fold partition in s3dis_fs.py and setting it in coseg.py? I have doubts about the parameter settings for categorizing these two files. Did this affect my results? It is worth noting that I modified the code to determine if single card GPU training is related to this 屏幕截图 2024-08-22 215654 ![Uploading 屏幕截图 2024-08-22 215654.png…]()

屏幕截图 2024-08-22 213901

ZhaochongAn commented 3 weeks ago

"9 categories"

The category fold division should be fine.

"Also, is there a correlation between setting the fold partition in s3dis_fs.py and setting it in coseg.py? "

You should change the base_class_to_pred_label mapping in coseg.py according to your category division defined in the your dataset. From what you posted here, I could see your base_class_to_pred_label is not changed in terms of your category division. That would lead to incorrect behavier of the base prototype learning.

lrnb12345 commented 3 weeks ago

"9 categories"

The category fold division should be fine.

"Also, is there a correlation between setting the fold partition in s3dis_fs.py and setting it in coseg.py? "

You should change the base_class_to_pred_label mapping in coseg.py according to your category division defined in the your dataset. From what you posted here, I could see your base_class_to_pred_label is not changed in terms of your category division. That would lead to incorrect behavier of the base prototype learning.

Thank you for your reply. Is it right for me to do so? Because the nine categories cannot be evenly divided into six categories per fold according to the s3dis dataset. If I modify my categories according to the s3dis_f.spy file, it will report an error. I will modify them as shown in the figure. The training process results are as follows when cvfold=0 1 way 1shot with few samples 屏幕截图 2024-08-24 115852 屏幕截图 2024-08-24 120209

ZhaochongAn commented 2 weeks ago

It seems that your dataset has 9 categories in total and you are using all the 9 categories as base classes? You should divide the 9 categories to two folds, such as one fold with 4 categories and the other with 5 categories. Please refer to our dataset definition file of S3DIS and ScanNet.

lrnb12345 commented 2 weeks ago

It seems that your dataset has 9 categories in total and you are using all the 9 categories as base classes? You should divide the 9 categories to two folds, such as one fold with 4 categories and the other with 5 categories. Please refer to our dataset definition file of S3DIS and ScanNet.

Thank you for your patient reply. After pre training the backbone, I followed your guidance to conduct few shot training. During the process, the program progress was as shown in the figure, with an accuracy of 1. I would like to ask if this is normal, 屏幕截图 2024-08-27 112720

ZhaochongAn commented 2 weeks ago

I think it is normal. In my experience, it's common to see high accuracy, which indicates that the model's predictions often encompass the ground truth foreground areas, and usually extend beyond them, as reflected by the relatively low IoU metrics. Also note that the accuracy metric is calculated only for the foreground classes.

lrnb12345 commented 2 weeks ago

I think it is normal. In my experience, it's common to see high accuracy, which indicates that the model's predictions often encompass the ground truth foreground areas, and usually extend beyond them, as reflected by the relatively low IoU metrics. Also note that the accuracy metric is calculated only for the foreground classes.

Thank you very much for your patient reply. I have successfully trained and tested to achieve the expected results. However, when I visualized the file generated from the source code (query.npy querylb. npy sup. npy suplb. npy pred. npy), only a small part of the scene appeared, instead of visualizing the entire room like the s3dis dataset. Is it because my data scene is too large? If so, how can I modify the code or related parameters to make the final visualization result a complete visualization of each scene, rather than a small part segmented from a scene. I ran visualizing. py and the result is shown in the following figure, only a small part of my building scene appeared. Even a category within a scene, such as a wall, cannot be fully visualized 屏幕截图 2024-08-29 124346