pointnet复现

准备

验证python版本

python

验证tensorflow版本
在python下输入

import tensorflow as tf
tf.__version__

验证cuda版本

nvcc -V

运行前准备
输入ssh
输入密码
进入环境

conda activate tf

训练
分类用的数据集为modelnet40,该数据集含有40个CAD模型
进入页面

cd autodl-nas/pointnet-master

使用gpu训练代码

CUDA_VISIBLE_DEVICES=0   python  train.py

如果是用cpu训练则需要调整一下参数,因为源代码默认batchsize为32

python train.py \
--batch_size=8 \
--max_epoch=250

查看gpu利用率

nvidia-smi

在这里插入图片描述根据图
在这里插入图片描述可知gpu利用率基本维持在80%以上
获取部分结果截图
在这里插入图片描述

可视化

tensorboard --logdir log

在这里插入图片描述在这里插入图片描述在这里插入图片描述在这里插入图片描述

评估模型及可视化输出错误的预测

CUDA_VISIBLE_DEVICES=0 python evaluate.py --visu

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

部分分割

如果是cpu版本则使用代码

python train.py \
--batch=8 \
--epoch=250

gpu版本

cd part_seg
CUDA_VISIBLE_DEVICES=0 python train.py
CUDA_VISIBLE_DEVICES=0 python test.py

此时报错

tensorflow.python.framework.errors_impl.ResourceExhaustedError: 2 root error(s) found.
  (0) Resource exhausted: OOM when allocating tensor with shape[32,4944,2048,1] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc
         [[{{node gradients/seg/conv1/Conv2D_grad/Conv2DBackpropInput}}]]
Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.

查询百度后说是gpu显存不够,我是rtx2080ti,11gb,4核cpu,16gb。调整代码中的batch,默认是32,设置为8,可以正常运行
在这里插入图片描述
在这里插入图片描述

场景语义分割

cd sem_seg
CUDA_VISIBLE_DEVICES=0 python train.py

在这里插入图片描述
参考文献:
pointnet论文翻译
PointNet代码详解
PointNet复现

  • 4
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

茅蒐Rubia

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值