PointMLP环境配置
论文地址:Rethinking Network Design and Local Geometry in Point Cloud: A Simple Residual MLP Framework
项目地址:https://github.com/ma-xu/pointMLP-pytorch/
第一步:Pytorch环境搭建
1.1 安装pytorch环境
conda create -n pointmlp python=3.8
conda activate pointmlp
conda install pytorch==1.10.1 torchvision==0.11.2 torchaudio==0.10.1 cudatoolkit=11.3 -c pytorch
1.2 验证pytorch环境
python # 3.8.16
import torch
torch.__version__ # 1.10.1
torch.version.cuda # 11.3
torch.cuda.is_available() # True
exit()
第二步:安装其它包
pip install cycler einops h5py pyyaml==5.4.1 scikit-learn==0.24.2 scipy tqdm matplotlib==3.4.2
第三步:克隆项目
3.1 克隆PointMLP项目地址
git clone https://github.com/ma-xu/pointMLP-pytorch.git
3.2 安装其它依赖
pip install pointnet2_ops_lib/.
第四步:下载 ModelNet40 数据集和 ShapeNet 数据集
4.1 官网下载 ModelNet40 数据集
在Princeton ModelNet下载 modelnet40_ply_hdf5_2048.zip 安装包。
当然,如果在官网下载麻烦的话,可以参考这篇文章的百度网盘下载链接进行下载。
4.2 官网下载 ModelNet40 数据集后的组织结构
在官网下载 ModelNet40 数据集后,并在 pointMLP-pytorch 文件夹下组织成以下所示的结构。
pointMLP-pytorch
├── classification_ModelNet40
│ ├── models
│ ├── utils
│ ├── data.py
│ ├── helper.py
│ ├── main.py
│ ├── test.py
│ ├── voting·Py
│ ├── data
│ │ ├── modelnet40_ply_hdf5_2048
4.3 官网下载 ShapeNet 数据集
在ShapeNet下载 shapenetcore_partanno_segmentation_benchmark_v0_normal.zip 安装包。
当然,如果在官网下载麻烦的话,可以参考这篇文章的百度网盘下载链接进行下载。
4.4 官网下载 ShapeNet 数据集后的组织结构
在官网下载 ShapeNet 数据集后,并在 pointMLP-pytorch 文件夹下组织成以下所示的结构。
pointMLP-pytorch
├── part_segmentation
│ ├── models
│ ├── utils
│ ├── data
│ │ ├── shapenetcore_partanno_segmentation_benchmark_v0_normal
第五步:训练和测试
5.1 训练ModelNet40数据集
cd classification_ModelNet40
# train pointMLP
python main.py --model pointMLP
# train pointMLP-elite
python main.py --model pointMLPElite
5.2 训练ShapeNet数据集
cd part_segmentation
# train pointMLP
python main.py --model pointMLP
5.3 测试训练好的模型
## 测试
python voting.py --model pointMLP --msg demo
至此,PointMLP的环境配置到此结束!感谢大家的观看!