Commit 56f064a6 by 靓靓

upload files

parent 7f3a9294
-- "a/9-\345\211\215\346\262\277\345\272\224\347\224\250/9.05-\347\202\271\344\272\221\345\210\206\347\261\273\344\270\216\345\210\206\345\211\2621/.gitkeep"
++ /dev/null
# Pytorch Implementation of PointNet and PointNet++
# Pytorch Implementation of PointNet and PointNet++
数据及代码下载:
通过网盘分享的文件:Pointnet_Pointnet2_pytorch-master
链接: https://pan.baidu.com/s/1i3p6AOrfwchn6urCTht0Sw 提取码: xjj3
--来自百度网盘超级会员v2的分享
[PointNet](http://openaccess.thecvf.com/content_cvpr_2017/papers/Qi_PointNet_Deep_Learning_CVPR_2017_paper.pdf)
## 文件介绍
1.分类(Classification):
pointnet_cls:PointNet分类
pointnet2_cls_ssg: PointNet++ 分类,使用单尺度聚合的分类模型。
pointnet2_cls_msg: PointNet++ 分类,使用多尺度聚合的分类模型。
2.语义分割(Semantic Segmentation):
pointnet_sem_seg:PointNet语义分割
pointnet2_sem_seg_ssg: PointNet++ 语义分割,使用单尺度聚合的语义分割模型。
pointnet2_sem_seg_msg: PointNet++ 语义分割,使用多尺度聚合的语义分割模型。
3.局部分割(Part Segmentation):
pointnet_part_seg:PointNet局部分割
pointnet2_part_seg_ssg: PointNet++ 局部分割,使用单尺度聚合的局部分割模型。
pointnet2_part_seg_msg: PointNet++ 局部分割,使用多尺度聚合的局部分割模型。
4.命名解释
ssg(Single Scale Grouping):单尺度聚合,表示在特征提取过程中只使用一种尺度的邻域搜索和特征提取方式。结构简单,计算开销较小。
msg(Multi Scale Grouping):多尺度聚合,表示在特征提取过程中使用多种尺度的邻域搜索和特征提取方式,以捕捉更多层次的几何信息。在处理复杂几何结构和细粒度分割任务时效果更好。
part_seg:用于局部分割任务的模型,通常用于对3D形状中的不同部分进行细粒度分割。
## 环境Install
The latest codes are tested on Ubuntu 18.04, CUDA11.3, PyTorch 1.11 and Python 3.8:
```shell
conda install pytorch==1.11.0 torchvision==0.12.0 torchaudio==0.11.0 cudatoolkit=11.3 -c pytorch
pip install tqdm
```
### Data Preparation 数据准备
Modelnet40数据集
ModelNet40是一个广泛使用的三维物体识别和分类的标准数据集。它由普林斯顿大学的研究小组创建,旨在促进三维形状识别和检索领域的研究。ModelNet40包含了从网络上收集的各种三维CAD模型,这些模型代表了40个不同的类别,如桌子、椅子、飞机、植物等。总共包括12311个模型,其中有9843个用于训练,而剩下的2468个用于测试。
原始的modelnet40是off文件,是cad模型
OFF文件是一种用于存储三维对象信息的文件格式,全称为"Object File Format"。它主要用于存储几何体的顶点、边和面信息,以及可能的颜色和纹理数据,从而描述了一个或多个三维模型的结构。OFF文件的结构相对简单,通常以"OFF"作为文件的开头,随后是顶点(vertices)、面(faces)和(可选的)边(edges)的数量。之后的部分包含了每个顶点的坐标(通常是X、Y、Z三维坐标)以及每个面的信息,包括组成该面的顶点数和这些顶点在文件中的索引。面的部分还可以包含颜色信息。
这里使用的是处理后的modelnet40_normal_resampled 数据集
modelnet40_normal_resampled 数据集是原始 ModelNet40 数据集的点云版本,包含重新采样的点和法线信息。它更适合于点云处理任务,例如点云分类、分割等。通过这种预处理,研究人员可以更方便地在3D深度学习任务中使用这些数据。
### Run运行
```shell
# ModelNet40训练
```shell
python train_classification.py --model pointnet_cls --log_dir pointnet_cls
```
#运行过程
PARAMETER ...
Namespace(batch_size=24, decay_rate=0.0001, epoch=200, gpu='0', learning_rate=0.001, log_dir='pointnet_cls', model='pointnet_cls', num_category=40, num_point=1024, optimizer='Adam', process_data=False, use_cpu=False, use_normals=False, use_uniform_sample=False)
Load dataset ...
The size of train data is 9843
The size of test data is 2468
No existing model, starting training from scratch...
Epoch 1 (1/200):
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 410/410 [00:13<00:00, 30.51it/s]
Train Instance Accuracy: 0.381301
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 103/103 [00:01<00:00, 73.01it/s]
Test Instance Accuracy: 0.351942, Class Accuracy: 0.241432
Best Instance Accuracy: 0.351942, Class Accuracy: 0.241432
Saving at log/classification/pointnet_cls/checkpoints/best_model.pth
Epoch 2 (2/200):
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 410/410 [00:08<00:00, 47.46it/s]
Train Instance Accuracy: 0.524593
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 103/103 [00:01<00:00, 72.86it/s]
Test Instance Accuracy: 0.498786, Class Accuracy: 0.401493
Best Instance Accuracy: 0.498786, Class Accuracy: 0.401493
Saving at log/classification/pointnet_cls/checkpoints/best_model.pth
Epoch 3 (3/200):
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 410/410 [00:08<00:00, 47.03it/s]
Train Instance Accuracy: 0.576626
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 103/103 [00:01<00:00, 73.96it/s]
Test Instance Accuracy: 0.695955, Class Accuracy: 0.551151
Best Instance Accuracy: 0.695955, Class Accuracy: 0.551151
Saving at log/classification/pointnet_cls/checkpoints/best_model.pth
# ModelNet40测试
```shell
python test_classification.py --log_dir pointnet_cls
```
#运行结果
PARAMETER ...
Namespace(batch_size=24, gpu='0', log_dir='pointnet_cls', num_category=40, num_point=1024, num_votes=3, use_cpu=False, use_normals=False, use_uniform_sample=False)
Load dataset ...
The size of test data is 2468
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 103/103 [00:02<00:00, 38.45it/s]
Test Instance Accuracy: 0.905825, Class Accuracy: 0.868414
# Part Segmentation (ShapeNet)
```shell
python train_partseg.py --model pointnet_part_seg --normal --log_dir pointnet_part_seg
python test_partseg.py --normal --log_dir pointnet_part_seg
```
#结果
PARAMETER ...
Namespace(batch_size=24, gpu='0', log_dir='pointnet_part_seg', normal=True, num_point=2048, num_votes=3)
The number of test data is: 2874
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 120/120 [00:11<00:00, 10.62it/s]
eval mIoU of Airplane 0.821580
eval mIoU of Bag 0.728090
eval mIoU of Cap 0.890389
eval mIoU of Car 0.743869
eval mIoU of Chair 0.902274
eval mIoU of Earphone 0.703697
eval mIoU of Guitar 0.905210
eval mIoU of Knife 0.868633
eval mIoU of Lamp 0.800017
eval mIoU of Laptop 0.953860
eval mIoU of Motorbike 0.617138
eval mIoU of Mug 0.926956
eval mIoU of Pistol 0.802641
eval mIoU of Rocket 0.562076
eval mIoU of Skateboard 0.715052
eval mIoU of Table 0.819283
Accuracy is: 0.93544
Class avg accuracy is: 0.83680
Class avg mIOU is: 0.79755
Inctance avg mIOU is: 0.83848
[PointNet++](http://papers.nips.cc/paper/7095-pointnet-deep-hierarchical-feature-learning-on-point-sets-in-a-metric-space.pdf) in pytorch.
## 环境Install(和pointnet一样)
The latest codes are tested on Ubuntu 18.04, CUDA11.3, PyTorch 1.11 and Python 3.8:
```shell
conda install pytorch==1.11.0 torchvision==0.12.0 torchaudio==0.11.0 cudatoolkit=11.3 -c pytorch
pip install tqdm
```
### Run运行
```shell
python train_classification.py --model pointnet2_cls_msg --log_dir pointnet2_cls_msg
```
#运行过程
PARAMETER ...
Namespace(batch_size=24, decay_rate=0.0001, epoch=200, gpu='0', learning_rate=0.001, log_dir='pointnet2_cls_msg', model='pointnet2_cls_msg', num_category=40, num_point=1024, optimizer='Adam', process_data=False, use_cpu=False, use_normals=False, use_uniform_sample=False)
Load dataset ...
The size of train data is 9843
The size of test data is 2468
No existing model, starting training from scratch...
Epoch 1 (1/200):
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 410/410 [01:54<00:00, 3.58it/s]
Train Instance Accuracy: 0.586382
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 103/103 [00:17<00:00, 5.99it/s]
Test Instance Accuracy: 0.684223, Class Accuracy: 0.586467
Best Instance Accuracy: 0.684223, Class Accuracy: 0.586467
Saving at log/classification/pointnet2_cls_msg/checkpoints/best_model.pth
# ModelNet40测试
```shell
python test_classification.py --log_dir pointnet2_cls_msg
```
# 运行结果
PARAMETER ...
Namespace(batch_size=24, gpu='0', log_dir='pointnet2_cls_msg', num_category=40, num_point=1024, num_votes=3, use_cpu=False, use_normals=False, use_uniform_sample=False)
Load dataset ...
The size of test data is 2468
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 103/103 [00:47<00:00, 2.18it/s]
Test Instance Accuracy: 0.928479, Class Accuracy: 0.894388
# Part Segmentation (ShapeNet)
```shell
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
```
-- "a/9-\345\211\215\346\262\277\345\272\224\347\224\250/9.06-\347\202\271\344\272\221\345\210\206\347\261\273\344\270\216\345\210\206\345\211\2622/.gitkeep"
++ /dev/null
# Pytorch Implementation of PointNet and PointNet++
# Pytorch Implementation of PointNet and PointNet++
数据及代码下载:
通过网盘分享的文件:Pointnet_Pointnet2_pytorch-master
链接: https://pan.baidu.com/s/1i3p6AOrfwchn6urCTht0Sw 提取码: xjj3
--来自百度网盘超级会员v2的分享
[PointNet](http://openaccess.thecvf.com/content_cvpr_2017/papers/Qi_PointNet_Deep_Learning_CVPR_2017_paper.pdf)
## 文件介绍
1.分类(Classification):
pointnet_cls:PointNet分类
pointnet2_cls_ssg: PointNet++ 分类,使用单尺度聚合的分类模型。
pointnet2_cls_msg: PointNet++ 分类,使用多尺度聚合的分类模型。
2.语义分割(Semantic Segmentation):
pointnet_sem_seg:PointNet语义分割
pointnet2_sem_seg_ssg: PointNet++ 语义分割,使用单尺度聚合的语义分割模型。
pointnet2_sem_seg_msg: PointNet++ 语义分割,使用多尺度聚合的语义分割模型。
3.局部分割(Part Segmentation):
pointnet_part_seg:PointNet局部分割
pointnet2_part_seg_ssg: PointNet++ 局部分割,使用单尺度聚合的局部分割模型。
pointnet2_part_seg_msg: PointNet++ 局部分割,使用多尺度聚合的局部分割模型。
4.命名解释
ssg(Single Scale Grouping):单尺度聚合,表示在特征提取过程中只使用一种尺度的邻域搜索和特征提取方式。结构简单,计算开销较小。
msg(Multi Scale Grouping):多尺度聚合,表示在特征提取过程中使用多种尺度的邻域搜索和特征提取方式,以捕捉更多层次的几何信息。在处理复杂几何结构和细粒度分割任务时效果更好。
part_seg:用于局部分割任务的模型,通常用于对3D形状中的不同部分进行细粒度分割。
## 环境Install
The latest codes are tested on Ubuntu 18.04, CUDA11.3, PyTorch 1.11 and Python 3.8:
```shell
conda install pytorch==1.11.0 torchvision==0.12.0 torchaudio==0.11.0 cudatoolkit=11.3 -c pytorch
pip install tqdm
```
### Data Preparation 数据准备
Modelnet40数据集
ModelNet40是一个广泛使用的三维物体识别和分类的标准数据集。它由普林斯顿大学的研究小组创建,旨在促进三维形状识别和检索领域的研究。ModelNet40包含了从网络上收集的各种三维CAD模型,这些模型代表了40个不同的类别,如桌子、椅子、飞机、植物等。总共包括12311个模型,其中有9843个用于训练,而剩下的2468个用于测试。
原始的modelnet40是off文件,是cad模型
OFF文件是一种用于存储三维对象信息的文件格式,全称为"Object File Format"。它主要用于存储几何体的顶点、边和面信息,以及可能的颜色和纹理数据,从而描述了一个或多个三维模型的结构。OFF文件的结构相对简单,通常以"OFF"作为文件的开头,随后是顶点(vertices)、面(faces)和(可选的)边(edges)的数量。之后的部分包含了每个顶点的坐标(通常是X、Y、Z三维坐标)以及每个面的信息,包括组成该面的顶点数和这些顶点在文件中的索引。面的部分还可以包含颜色信息。
这里使用的是处理后的modelnet40_normal_resampled 数据集
modelnet40_normal_resampled 数据集是原始 ModelNet40 数据集的点云版本,包含重新采样的点和法线信息。它更适合于点云处理任务,例如点云分类、分割等。通过这种预处理,研究人员可以更方便地在3D深度学习任务中使用这些数据。
### Run运行
```shell
# ModelNet40训练
```shell
python train_classification.py --model pointnet_cls --log_dir pointnet_cls
```
#运行过程
PARAMETER ...
Namespace(batch_size=24, decay_rate=0.0001, epoch=200, gpu='0', learning_rate=0.001, log_dir='pointnet_cls', model='pointnet_cls', num_category=40, num_point=1024, optimizer='Adam', process_data=False, use_cpu=False, use_normals=False, use_uniform_sample=False)
Load dataset ...
The size of train data is 9843
The size of test data is 2468
No existing model, starting training from scratch...
Epoch 1 (1/200):
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 410/410 [00:13<00:00, 30.51it/s]
Train Instance Accuracy: 0.381301
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 103/103 [00:01<00:00, 73.01it/s]
Test Instance Accuracy: 0.351942, Class Accuracy: 0.241432
Best Instance Accuracy: 0.351942, Class Accuracy: 0.241432
Saving at log/classification/pointnet_cls/checkpoints/best_model.pth
Epoch 2 (2/200):
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 410/410 [00:08<00:00, 47.46it/s]
Train Instance Accuracy: 0.524593
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 103/103 [00:01<00:00, 72.86it/s]
Test Instance Accuracy: 0.498786, Class Accuracy: 0.401493
Best Instance Accuracy: 0.498786, Class Accuracy: 0.401493
Saving at log/classification/pointnet_cls/checkpoints/best_model.pth
Epoch 3 (3/200):
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 410/410 [00:08<00:00, 47.03it/s]
Train Instance Accuracy: 0.576626
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 103/103 [00:01<00:00, 73.96it/s]
Test Instance Accuracy: 0.695955, Class Accuracy: 0.551151
Best Instance Accuracy: 0.695955, Class Accuracy: 0.551151
Saving at log/classification/pointnet_cls/checkpoints/best_model.pth
# ModelNet40测试
```shell
python test_classification.py --log_dir pointnet_cls
```
#运行结果
PARAMETER ...
Namespace(batch_size=24, gpu='0', log_dir='pointnet_cls', num_category=40, num_point=1024, num_votes=3, use_cpu=False, use_normals=False, use_uniform_sample=False)
Load dataset ...
The size of test data is 2468
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 103/103 [00:02<00:00, 38.45it/s]
Test Instance Accuracy: 0.905825, Class Accuracy: 0.868414
# Part Segmentation (ShapeNet)
```shell
python train_partseg.py --model pointnet_part_seg --normal --log_dir pointnet_part_seg
python test_partseg.py --normal --log_dir pointnet_part_seg
```
#结果
PARAMETER ...
Namespace(batch_size=24, gpu='0', log_dir='pointnet_part_seg', normal=True, num_point=2048, num_votes=3)
The number of test data is: 2874
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 120/120 [00:11<00:00, 10.62it/s]
eval mIoU of Airplane 0.821580
eval mIoU of Bag 0.728090
eval mIoU of Cap 0.890389
eval mIoU of Car 0.743869
eval mIoU of Chair 0.902274
eval mIoU of Earphone 0.703697
eval mIoU of Guitar 0.905210
eval mIoU of Knife 0.868633
eval mIoU of Lamp 0.800017
eval mIoU of Laptop 0.953860
eval mIoU of Motorbike 0.617138
eval mIoU of Mug 0.926956
eval mIoU of Pistol 0.802641
eval mIoU of Rocket 0.562076
eval mIoU of Skateboard 0.715052
eval mIoU of Table 0.819283
Accuracy is: 0.93544
Class avg accuracy is: 0.83680
Class avg mIOU is: 0.79755
Inctance avg mIOU is: 0.83848
[PointNet++](http://papers.nips.cc/paper/7095-pointnet-deep-hierarchical-feature-learning-on-point-sets-in-a-metric-space.pdf) in pytorch.
## 环境Install(和pointnet一样)
The latest codes are tested on Ubuntu 18.04, CUDA11.3, PyTorch 1.11 and Python 3.8:
```shell
conda install pytorch==1.11.0 torchvision==0.12.0 torchaudio==0.11.0 cudatoolkit=11.3 -c pytorch
pip install tqdm
```
### Run运行
```shell
python train_classification.py --model pointnet2_cls_msg --log_dir pointnet2_cls_msg
```
#运行过程
PARAMETER ...
Namespace(batch_size=24, decay_rate=0.0001, epoch=200, gpu='0', learning_rate=0.001, log_dir='pointnet2_cls_msg', model='pointnet2_cls_msg', num_category=40, num_point=1024, optimizer='Adam', process_data=False, use_cpu=False, use_normals=False, use_uniform_sample=False)
Load dataset ...
The size of train data is 9843
The size of test data is 2468
No existing model, starting training from scratch...
Epoch 1 (1/200):
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 410/410 [01:54<00:00, 3.58it/s]
Train Instance Accuracy: 0.586382
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 103/103 [00:17<00:00, 5.99it/s]
Test Instance Accuracy: 0.684223, Class Accuracy: 0.586467
Best Instance Accuracy: 0.684223, Class Accuracy: 0.586467
Saving at log/classification/pointnet2_cls_msg/checkpoints/best_model.pth
# ModelNet40测试
```shell
python test_classification.py --log_dir pointnet2_cls_msg
```
# 运行结果
PARAMETER ...
Namespace(batch_size=24, gpu='0', log_dir='pointnet2_cls_msg', num_category=40, num_point=1024, num_votes=3, use_cpu=False, use_normals=False, use_uniform_sample=False)
Load dataset ...
The size of test data is 2468
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 103/103 [00:47<00:00, 2.18it/s]
Test Instance Accuracy: 0.928479, Class Accuracy: 0.894388
# Part Segmentation (ShapeNet)
```shell
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
```
-- "a/9-\345\211\215\346\262\277\345\272\224\347\224\250/9.11-\345\244\232\346\250\241\346\200\201\346\203\205\346\204\237\350\257\206\345\210\2531/.gitkeep"
++ /dev/null
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment