目录
Open3D点云算法汇总及实战案例汇总的目录地址:
Open3D点云算法与点云深度学习案例汇总(长期更新)-CSDN博客
一、硬件环境
win11 GPU:RTX3090TI
二、安装步骤:
2.1 创建虚拟环境:
# 创建虚拟环境
conda create -n pointnet python=3.8.0
# 激活虚拟环境(切换至这个环境)
conda activate pointnet
# 查看已创建的虚拟环境
conda info -e
2.2 安装pytorch
pip install torch==2.0.0 torchvision==0.15.1 torchaudio==2.0.1 --index-url https://download.pytorch.org/whl/cu118
下载完成后会有报错,我没解决也能照常训练及推测
2.3 下载PointNet++项目
链接:百度网盘 请输入提取码
提取码:6688
2.4 配置pycharm环境
三、报错解决
3.1 numpy版本
报错:AttributeError: module ‘numpy‘ has no attribute ‘float‘
原因:从numpy1.24起删除了numpy.bool、numpy.int、numpy.float、numpy.complex、numpy.object、numpy.str、numpy.long、numpy.unicode类型的支持
pip uninstall numpy
pip install numpy==1.23.5
3.2 路径问题
找不到包,就需要将该文件的路径补充完整
四、数据集下载链接:
https://shapenet.cs.stanford.edu/media/modelnet40_normal_resampled.zip
https://shapenet.cs.stanford.edu/media/shapenetcore_partanno_segmentation_benchmark_v0_normal.zip
均放在data目录下
五、命令行集合
5.1 对象分类ModelNet40
## e.g., pointnet2_ssg without normal features
python train_classification.py --model pointnet2_cls_ssg --log_dir pointnet2_cls_ssg
python test_classification.py --log_dir pointnet2_cls_ssg
## e.g., pointnet2_ssg with normal features
python train_classification.py --model pointnet2_cls_ssg --use_normals --log_dir pointnet2_cls_ssg_normal
python test_classification.py --use_normals --log_dir pointnet2_cls_ssg_normal
## e.g., pointnet2_ssg with uniform sampling
python train_classification.py --model pointnet2_cls_ssg --use_uniform_sample --log_dir pointnet2_cls_ssg_fps
python test_classification.py --use_uniform_sample --log_dir pointnet2_cls_ssg_fps
5.2 零件分割 ShapeNet
shapenet数据集txt文件格式:前三个点是xyz,点云的位置坐标,后三个点是点云的RGB信息,最后一个点是这个点所属的小类别,即1表示所属50个小类别中的第一个。
## e.g., pointnet2_msg
python train_partseg.py --model pointnet2_part_seg_msg --normal --log_dir pointnet2_part_seg_msg
python test_partseg.py --normal --log_dir pointnet2_part_seg_msg
5.3 场景分割
python train_semseg.py --model pointnet2_sem_seg --test_area 5 --log_dir pointnet2_sem_seg
python test_semseg.py --log_dir pointnet2_sem_seg --test_area 5 --visual
参考链接:Windows系统保姆级复现Pointnet++算法教程笔记(基于Pytorch)_pointnet++复现-CSDN博客