三维深度学习(二)win10 PointNet pytorch版本测试

1. 环境

win10

Anaconda3.6

Pytorch1.4

2. PointNet pytorch下载,并下载好数据集

https://github.com/fxia22/pointnet.pytorch

3. Open Terminal

打开Anaconda Navigator——ENvironmens——Pytorch_envs(自己创建的虚拟环境)

左键点击三角图标-Open Terminal

4. 运行命令

(1)进入到pointnet代码文件夹主目录,输入以下命令,安装环境

pip install -e .

(2) 进入utils文件夹

训练 train_classification.py

python train_classification.py --dataset=D:\work\paper\0323PointNet\pointnet.pytorch-master\shapenetcore_partanno_segmentation_benchmark_v0\ --nepoch=5 --dataset_type=shapenet

备注:

报错1:Detected call of `lr_scheduler.step()` before `optimizer.step()`

解决办法:https://blog.csdn.net/zfjBIT/article/details/105114526

报错2:The "freeze_support()" line can be omitted if the program is not going to be frozen to produce an executable.

解决办法:https://blog.csdn.net/zfjBIT/article/details/105117206

报错3:PermissionError: [WinError 5] 拒绝访问

解决办法:https://blog.csdn.net/zfjBIT/article/details/105121116

训练结果:

 

会生成cls文件夹以及model 

训练 train_segmentation.py 

python train_segmentation.py --dataset=D:\work\paper\0323PointNet\pointnet.pytorch-master\shapenetcore_partanno_segmentation_benchmark_v0\ --nepoch=5

报错:

[0: 0/83] train loss: 1.375747 accuracy: 0.370837
[0: 0/83] [94mtest[0m loss: 1.389753 accuracy: 0.490475
Traceback (most recent call last):
  File "train_segmentation.py", line 88, in <module>
    pred, trans, trans_feat = classifier(points)
  File "E:\softwareInstallation\Anaconda3\envs\Pytorch_envs\lib\site-packages\torch\nn\modules\module.py", line 532, in __call__
    result = self.forward(*input, **kwargs)
  File "d:\work\paper\0323pointnet\pointnet.pytorch-master\pointnet\model.py", line 167, in forward
    x, trans, trans_feat = self.feat(x)
  File "E:\softwareInstallation\Anaconda3\envs\Pytorch_envs\lib\site-packages\torch\nn\modules\module.py", line 532, in __call__
    result = self.forward(*input, **kwargs)
  File "d:\work\paper\0323pointnet\pointnet.pytorch-master\pointnet\model.py", line 127, in forward
    return torch.cat([x, pointfeat], 1), trans, trans_feat
RuntimeError: CUDA out of memory. Tried to allocate 334.00 MiB (GPU 0; 6.00 GiB total capacity; 3.99 GiB already allocated; 320.14 MiB free; 4.29 GiB reserved in total by PyTorch)

将batchSize降低到8后可以运行(默认为32):

python train_segmentation.py --dataset=D:\work\paper\0323PointNet\pointnet.pytorch-master\shapenetcore_partanno_segmentation_benchmark_v0\ --nepoch=5 --batchSize=8

训练结果: 

会生成seg文件夹以及model 

 

未完待续~~~~~~~~~~ 

评论 16
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

JoannaJuanCV

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

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

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

打赏作者

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

抵扣说明:

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

余额充值