charlesChen02 / RandLA-pytorch

Improved pytorch implementation of RandLA (https://arxiv.org/abs/1911.11236) with easier transferability and reproductibility

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

您好,请问我运行python3 test_SemanticKITTI.py的时候,内存一直标高,疑似内存泄露,该怎么办?

ksama777 opened this issue · comments

您好,我运行python3 train_SemanticKITTI.py的时候是没问题的,但是到test这一步 就疑似内存泄露,卡死了,怎么办?
Hello, There is no problem when I run python3 train_ SemanticKITTI.py . but when it comes to test, it is suspected that memory leaks and gets stuck. What should we do?

您好!
在test_SemanticKitti.py 中, 您可以先尝试标注掉

tqdm.__init__ = partialmethod(tqdm.__init__, disable=True)
以启动tqdm来监测进度, 如果进度确实没有变化的话, 首先可以尝试减小batch_size 防止OOM,

另外, 该段代码中也包含了原版的voting逻辑, 本身的test时间会较长, 而且会将整个validation set全部缓存, 如果确认是内存泄漏, 可以尝试在

self.data_list = sorted(self.data_list)

后进行切片来减小一次性读入的test数据样本, 并反复执行多次来回避内存泄漏的问题.
如果还有什么问题欢迎继续提问.

我运行的配置是单张32G V100.
您可以先尝试在此处进行切片

self.data_list = sorted(self.data_list)

self.data_list = sorted(self.data_list)[:500]

来检查一下是否能够正常运行?

选项有

--dataset path to dataset for visualization

--config dataset config, default utils/semantic-kitti.yaml

--sequence sequence to visualize

--predictions location for predictions

e.g:
python3 evaluate_SemanticKITTI.py --dataset dataset/sequences_0.06/
--predictions runs/supervised/predictions/ --sequences 08

在data_prepare中, 会将原先的.label文件处理成统一的.npy文件, 同时在test SemanticKitti中, 如果没有配置 --index-to-label 的话, 生成的prediction会是.npy文件, 如果配置的话会转换成.label文件.

对于semanticKitti 数据集来说, sequence 11-21 是作为test使用的, 你所下载的本地文件是不包含对应的.label文件的, 如果你需要对这些sequence进行测试的话可以使用test kitti生成对应的.label文件后, 将生成的结果上传到semantickitti codalab中进行test才能得到对应的performance.

你可以使用sequence 00-10 其中的一个sequence 作为evaluate的对象, 建议是使用 seq 08, 因为00-07, 09-10 是作为training set使用的

抱歉回复晚了,
关于之前那封邮件的问题, 我认为应该是你指定的 result-dir路径有点问题, 这是我做test与eval对应的设定

python -u test_SemanticKITTI.py --checkpoint_path pre_train/checkpoint.tar --result_dir result/res

python -u evaluate_SemanticKITTI.py --predictions result/res

简单来说, 你只需要使 eval中prediction指定的目录与test中result_dir目录相同即可

如果您需要上传到网站上, 请记得在测试时使用--index-to-label 将prediction转换回.label文件,
网站上预测的逻辑是与repo中eval的逻辑类似的, 可以在本地代码中确认一下报错原因