Skip to content

Commit b36cc4e

Browse files
committed
Merge branch 'pytorch-1.0'
2 parents 2ec315f + fab247e commit b36cc4e

22 files changed

+957
-585
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ shapenetcore_partanno_segmentation_benchmark_v0/
77
.idea*
88
cls/
99
seg/
10+
*.egg-info/

README.md

Lines changed: 47 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,66 @@
11
# PointNet.pytorch
2-
This repo is implementation for PointNet(https://arxiv.org/abs/1612.00593) in pytorch. The model is in `pointnet.py`.
2+
This repo is implementation for PointNet(https://arxiv.org/abs/1612.00593) in pytorch. The model is in `pointnet/model.py`.
33

4+
It is tested with pytorch-1.0.
45

56
# Download data and running
67

78
```
9+
git clone https://github.com/fxia22/pointnet.pytorch
10+
cd pointnet.pytorch
11+
pip install -e .
12+
```
13+
14+
Download and build visualization tool
15+
```
16+
cd script
817
bash build.sh #build C++ code for visualization
918
bash download.sh #download dataset
10-
python train_classification.py #train 3D model classification
11-
python python train_segmentation.py # train 3D model segmentaion
19+
```
1220

13-
python show_seg.py --model seg/seg_model_20.pth # show segmentation results
21+
Training
1422
```
23+
cd utils
24+
python train_classification.py --dataset <dataset path> --nepoch=<number epochs> --dataset_type <modelnet40 | shapenet>
25+
python train_segmentation.py --dataset <dataset path> --nepoch=<number epochs>
26+
```
27+
28+
Use `--feature_transform` to use feature transform.
1529

1630
# Performance
17-
Without heavy tuning, PointNet can achieve 80-90% performance in classification and segmentaion on this [dataset](http://web.stanford.edu/~ericyi/project_page/part_annotation/index.html).
31+
32+
## Classification performance
33+
34+
On ModelNet40:
35+
36+
| | Overall Acc |
37+
| :---: | :---: |
38+
| Original implementation | 89.2 |
39+
| this implementation(w/o feature transform) | 86.4 |
40+
| this implementation(w/ feature transform) | 86.8 |
41+
42+
On [A subset of shapenet](http://web.stanford.edu/~ericyi/project_page/part_annotation/index.html)
43+
44+
| | Overall Acc |
45+
| :---: | :---: |
46+
| Original implementation | N/A |
47+
| this implementation(w/o feature transform) | 98.1 |
48+
| this implementation(w/ feature transform) | 96.8 |
49+
50+
## Segmentation performance
51+
52+
Segmentation on [A subset of shapenet](http://web.stanford.edu/~ericyi/project_page/part_annotation/index.html).
53+
54+
| Class(mIOU) | Airplane | Bag| Cap|Car|Chair|Earphone|Guitar|Knife|Lamp|Laptop|Motorbike|Mug|Pistol|Rocket|Skateboard|Table
55+
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
56+
| Original implementation | 83.4 | 78.7 | 82.5| 74.9 |89.6| 73.0| 91.5| 85.9| 80.8| 95.3| 65.2| 93.0| 81.2| 57.9| 72.8| 80.6|
57+
| this implementation(w/o feature transform) | 73.5 | 71.3 | 64.3 | 61.1 | 87.2 | 69.5 | 86.1|81.6| 77.4|92.7|41.3|86.5|78.2|41.2|61.0|81.1|
58+
59+
Note that this implementation trains each class separately, so classes with fewer data will have slightly lower performance than reference implementation.
1860

1961
Sample segmentation result:
2062
![seg](https://raw.githubusercontent.com/fxia22/pointnet.pytorch/master/misc/show3d.png?token=AE638Oy51TL2HDCaeCF273X_-Bsy6-E2ks5Y_BUzwA%3D%3D)
2163

22-
2364
# Links
2465

2566
- [Project Page](http://stanford.edu/~rqi/pointnet/)

build.sh

Lines changed: 0 additions & 1 deletion
This file was deleted.

datasets.py

Lines changed: 0 additions & 102 deletions
This file was deleted.

misc/modelnet_id.txt

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
airplane 0
2+
bathtub 1
3+
bed 2
4+
bench 3
5+
bookshelf 4
6+
bottle 5
7+
bowl 6
8+
car 7
9+
chair 8
10+
cone 9
11+
cup 10
12+
curtain 11
13+
desk 12
14+
door 13
15+
dresser 14
16+
flower_pot 15
17+
glass_box 16
18+
guitar 17
19+
keyboard 18
20+
lamp 19
21+
laptop 20
22+
mantel 21
23+
monitor 22
24+
night_stand 23
25+
person 24
26+
piano 25
27+
plant 26
28+
radio 27
29+
range_hood 28
30+
sink 29
31+
sofa 30
32+
stairs 31
33+
stool 32
34+
table 33
35+
tent 34
36+
toilet 35
37+
tv_stand 36
38+
vase 37
39+
wardrobe 38
40+
xbox 39

misc/num_seg_classes.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Airplane 4
2+
Bag 2
3+
Cap 2
4+
Car 4
5+
Chair 4
6+
Earphone 3
7+
Guitar 3
8+
Knife 2
9+
Lamp 4
10+
Laptop 2
11+
Motorbike 6
12+
Mug 2
13+
Pistol 3
14+
Rocket 3
15+
Skateboard 3
16+
Table 3

pointnet/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)