./log/plots文件夹是空的问题
# 将./Upsampling/configs.py文件中的--vis变量默认值修改,如下:
parser.add_argument('--vis', action='store_true') # 运行时--vis有传参,action就设置为sore_true
# 修改为
parser.add_argument('--vis', default=True)
nvidia-smi查看GPU编号:
这里的GPU编号是:0
这里传入关于GPU的参数:0
CUDA_VISIBLE_DEVICES=${GPU}这里的意思是说GPU的编号是多少。选择自己有的GPU编号传入相应的参数,我这里GPU编号是0,传入参数0。
方式一:python代码中指定使用GPU
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
方式二:终端执行程序时指定GPU
% CUDA_VISIBLE_DEVICES=0 python main.py
使用cuda==10.0即可解决
需要修改代码中需要传入的参数:将原来的代码修改为如下
# test_realscan_allmodels.sh文件中的代码
# 这个文件夹是评估真实扫描的数据的,为了检验模型的一般性。
bash test_realscan.sh pretrain/pugan-punet/ ./data/PU1K/test/input_2048/input_2048 0 --model punet --upsampler original
bash test_realscan.sh pretrain/pugan-mpu/ ./data/PU1K/test/input_2048/input_2048 0 --model mpu --upsampler duplicate
bash test_realscan.sh pretrain/pugan-pugan/ ./data/PU1K/test/input_2048/input_2048 0 --model pugan --more_up 2
bash test_realscan.sh pretrain/pugan-pugc/ ./data/PU1K/test/input_2048/input_2048 0 --model pugcn --k 20
这里需要注意的是,有些服务器没有可视化工具,可以将运行的数据下载至本地,进行可视化。
# 相应的有九个路径需要修改
parser.add_argument('--input_path', # 这里的路径
default=None,
type=str,
help='path to the input')
parser.add_argument('--input_path', # 输入的数据
default='./data/PU1K/test/input_2048/input_2048',
type=str,
help='path to the input')
parser.add_argument('--gt_path', # 真实的数据
default='./data/PU1K/test/input_2048/gt_8192',
type=str,
help='path to the gt')
parser.add_argument('--punet_path', # 评估以后得到的数据
default='./pretrain/pu1k-punet/result-pu1k',
type=str, help='path to the result')
parser.add_argument('--mpu_path',
default='./pretrain/pu1k-mpu/result-pu1k',
type=str, help='path to the result')
# parser.add_argument('--pugan_path',
# default='./evaluation_code/result/',
# type=str, help='path to the result')
parser.add_argument('--pugcn_path',
default='./pretrain/pu1k-pugcn/result-pu1k',
type=str, help='path to the result') # 评估以后得到的数据
parser.add_argument('--png_path',
required=True,
type=str, help='name of file to show') # 将结果要输出的文件路径
parser.add_argument('--filename',
required=True,
type=str, help='name of file to show') # 要查看的点云模型名称.xyz文件名