├── .gitattributes
├── .gitignore
├── LICENSE
├── README.md
├── preprocessing
├── .gitkeep
├── all_shapenet_metadata.csv
├── decimatemeshes.mlx
├── decimatemeshes.py
├── fairSplit.py
├── modelnet10_labels.csv
├── modelnet10_test.csv
├── modelnet10_train.csv
├── modelnet10_trainval.csv
├── modelnet10_trainvaltest.csv
├── modelnet10_val.csv
├── modelnet40_auto_aligned_test.csv
├── modelnet40_auto_aligned_train.csv
├── modelnet40_auto_aligned_trainval.csv
├── modelnet40_auto_aligned_trainvaltest.csv
├── modelnet40_auto_aligned_val.csv
├── modelnet40_labels.csv
├── modelnet40_test.csv
├── modelnet40_train.csv
├── modelnet40_trainval.csv
├── modelnet40_val.csv
├── modelnetFull_500_train.csv
├── modelnetFull_labels.csv
├── pointcloudify.mlx
├── rename_files(shapenet).py
├── shapenet_500_test.csv
├── shapenet_500_train.csv
├── shapenet_500_trainval.csv
├── shapenet_500_val.csv
├── shapenet_labels.csv
├── sydney_labels.csv
├── sydneyfold0.csv
├── sydneyfold1.csv
├── sydneyfold2.csv
├── sydneyfold3.csv
├── sydneyfoldn0.csv
├── sydneyfoldn1.csv
├── sydneyfoldn2.csv
├── sydneyfoldn3.csv
└── sydneyfoldsall.csv
├── run.sh
└── src
├── __init__.py
├── graphcnn
├── __init__.py
├── experiments
│ ├── __init__.py
│ ├── experiment.py
│ └── experiment_pcd.py
├── helper.py
├── layers.py
├── network.py
├── network_description.py
└── util
│ ├── __init__.py
│ ├── modelnet
│ ├── GraphData.py
│ ├── __init__.py
│ ├── decimatemeshes.mlx
│ ├── decimatemeshes.py
│ ├── listfiles.py
│ ├── mesh2graph.py
│ ├── meshresample.mlx
│ ├── modelnet40fix.py
│ ├── plotMesh.py
│ ├── plotPointCloud.py
│ ├── pointCloud2Graph.py
│ ├── pointcloud2list.py
│ └── pointcloudify.mlx
│ ├── pooling
│ ├── AbstractAdjacencyCompander.py
│ ├── AbstractPoolingPyramid.py
│ ├── GeometricAdjacencyCompander.py
│ ├── GraclusPoolingPyramid.py
│ ├── IdentityCompander.py
│ ├── ImageAdjacencyCompander.py
│ ├── LloydPoolingPyramid.py
│ ├── MemoryAdjacencyCompander.py
│ ├── PoolingFactory.py
│ ├── SpectralClusteringPoolingPyramid.py
│ └── __init__.py
│ └── sydney
│ ├── SydneyToPly.py
│ ├── convexhull.mlx
│ ├── resamplePointClouds.py
│ ├── subsamplepoints.mlx
│ └── voronoifilter.mlx
├── run.py
├── run_mlp.py
└── run_svm.py
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.data* filter=lfs diff=lfs merge=lfs -text
2 | *.meta filter=lfs diff=lfs merge=lfs -text
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | summary/
2 | __pycache__/
3 | *.tgz
4 | datasets/
5 | results/
6 | *.txt
7 | *.iml
8 | *.xml
9 | *.tfrecords
10 | *.pyc
11 | .nfs*
12 | *.npy
13 | *.o
14 | src/graphcnn/plots/*.csv
15 | src/graphcnn/plots/*.png
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Miguel Dominguez
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # G3DNet
2 | General-Purpose Point Cloud Feature Extractor
3 |
4 | This is code and a pretrained network for extracting features from point cloud objects. If your 3D objects can be sampled as roughly 500 points in a point cloud, this should generate a reasonable nonlinear feature representation for classification or other applications. The code is sufficient to preprocess 3D mesh data and train the network. The network can take a long time to train though (in our experience, at least a month on a single Titan X GPU).
5 |
6 | The pretrained network can be downloaded from https://drive.google.com/file/d/1VQ2nfBZfeWv60uQzbLv1yHrHTGbt-1Kk/view?usp=sharing and unzipped into the root of code under a directory named /snapshots. The run.sh script in the root directory has options to run the three separate training steps as well as options to extract features from the two pretrained models, G3DNet18 and G3DNet26. Read the contents of run.sh and make sure to fill in information as necessary (such as what dataset you're training on and its root directory).
7 |
8 | ## Prerequisites
9 |
10 | 1. Tensorflow (tested with 1.1)
11 | 2. PyAMG (pip install pyamg)
12 | 3. Transforms3D (pip install Transforms3D)
13 |
14 |
15 | ## Citation
16 |
17 | If you have issues with this code, please register an issue on this Github page. If you find it useful, please cite us:
18 | ```
19 | @InProceedings{Dominguez_WACV_2018,
20 | author = {Dominguez, Miguel and Dhamdhere, Rohan and Petkar, Atir and Jain, Saloni and Sah, Shagan and Ptucha, Ray},
21 | title = {General-Purpose Point Cloud Feature Extractor},
22 | booktitle = {Winter Applications of Computer Vision 2018},
23 | month = {March},
24 | year = {2018}
25 | }
26 | ```
27 |
--------------------------------------------------------------------------------
/preprocessing/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WDot/G3DNet/448e2e26646219de8cbb6d7ec54b168cddab09bb/preprocessing/.gitkeep
--------------------------------------------------------------------------------
/preprocessing/decimatemeshes.mlx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/preprocessing/decimatemeshes.py:
--------------------------------------------------------------------------------
1 |
2 | import os
3 | import os.path
4 | import sys
5 | import subprocess
6 | from subprocess import STDOUT, check_output
7 | import ctypes
8 | SEM_NOGPFAULTERRORBOX = 0x0002 # From MSDN
9 | ctypes.windll.kernel32.SetErrorMode(SEM_NOGPFAULTERRORBOX);
10 | CREATE_NO_WINDOW = 0x08000000 # From Windows API
11 |
12 |
13 | #SCRIPT_PATH = 'decimatemeshes.mlx'
14 | SCRIPT_PATH = './preprocessing/pointcloudify.mlx'
15 |
16 |
17 |
18 | def Main():
19 | if len(sys.argv) > 2 and os.path.isdir(sys.argv[1]):
20 | counter = 0
21 | ignored = 0
22 | garbage = 0
23 | for root, subdirs, files in os.walk(sys.argv[1]):
24 | subDirectory = root[len(sys.argv[1]):]
25 | for file in files:
26 | fname, ext = os.path.splitext(file)
27 | inputPath = root + '/' + file
28 | outputPath = sys.argv[2] + '/' + subDirectory + '/' + fname + '.ply'
29 | if not os.path.isdir(sys.argv[2] + '/' + subDirectory):
30 | os.makedirs(sys.argv[2] + '/' + subDirectory)
31 | if ext == '.off'\
32 | and not os.path.isfile(outputPath)\
33 | and os.stat(inputPath).st_size > 0:
34 | scriptStr = 'C:\Program Files\VCG\MeshLab\meshlabserver.exe -i \"{0}\" -o \"{1}\" -s \"{2}\"'.format(\
35 | inputPath, outputPath,SCRIPT_PATH)
36 | print(scriptStr)
37 | try:
38 | process = subprocess.Popen(scriptStr,creationflags=CREATE_NO_WINDOW, )
39 | output = check_output(scriptStr, stderr=STDOUT, timeout=120)
40 | process.wait()
41 | counter += 1
42 | print('{0} files finished processing'.format(counter))
43 | except:
44 | print("File Ignored!!")
45 | ignored += 1
46 | continue
47 | elif os.stat(inputPath).st_size == 0:
48 | print('Empty File, garbage!')
49 | garbage += 1
50 | else:
51 | print('Could not find path!')
52 | print("Total Files converted = %d" %counter)
53 | print("Total Files ignored = %d" % ignored)
54 | print("Total Empty Files = %d" % garbage)
55 |
56 | Main()
57 |
--------------------------------------------------------------------------------
/preprocessing/fairSplit.py:
--------------------------------------------------------------------------------
1 | from sklearn.model_selection import train_test_split
2 | import sys
3 | import os
4 | import os.path
5 | import numpy as np
6 |
7 | def labelsToDict(classLabelsStringsPath):
8 | labelDict = dict()
9 | counter = 0
10 | with open(classLabelsStringsPath) as f:
11 | labelStrings = f.readlines()
12 | for labelString in labelStrings:
13 | labelDict[labelString.rstrip()] = counter
14 | counter += 1
15 | return labelDict
16 |
17 | def trainingPathToLabel(Xstring,labelDict):
18 | head, _ = os.path.split(Xstring)
19 | head, _ = os.path.split(head)
20 | _, classLabel = os.path.split(head)
21 | return labelDict[classLabel]
22 |
23 | def getSplit(fileStringsPath,classLabelStringsPath,testSplit):
24 | with open(fileStringsPath,'r') as f:
25 | dataset = f.readlines()
26 | labelDict = labelsToDict(classLabelStringsPath)
27 | y = [trainingPathToLabel(X, labelDict) for X in dataset]
28 | Xtrain,Xtest,Ytrain,Ytest = train_test_split(dataset,y,stratify=y,test_size = testSplit)
29 | yArray = np.array(Ytest)
30 | return Xtrain, Xtest, Ytrain, Ytest
31 |
32 |
33 | def Main():
34 | if len(sys.argv) > 2 and \
35 | os.path.isfile(sys.argv[1]) and \
36 | os.path.isfile(sys.argv[2]):
37 | Xtrain, Xtest, Ytrain, Ytest = getSplit(sys.argv[1],sys.argv[2],0.1)
38 | with open('modelnet40_train.csv','w') as fTrain:
39 | fTrain.writelines(Xtrain)
40 | with open('modelnet40_val.csv','w') as fVal:
41 | fVal.writelines(Xtest)
42 |
43 | else:
44 | print('Files not found.')
45 |
46 | Main()
--------------------------------------------------------------------------------
/preprocessing/modelnet10_labels.csv:
--------------------------------------------------------------------------------
1 | chair
2 | sofa
3 | toilet
4 | dresser
5 | night_stand
6 | bed
7 | table
8 | monitor
9 | bathtub
10 | desk
--------------------------------------------------------------------------------
/preprocessing/modelnet10_val.csv:
--------------------------------------------------------------------------------
1 | /chair/train/chair_0629.pcd
2 | /chair/train/chair_0032.pcd
3 | /chair/train/chair_0210.pcd
4 | /sofa/train/sofa_0155.pcd
5 | /table/train/table_0211.pcd
6 | /sofa/train/sofa_0524.pcd
7 | /monitor/train/monitor_0275.pcd
8 | /chair/train/chair_0167.pcd
9 | /bed/train/bed_0171.pcd
10 | /monitor/train/monitor_0244.pcd
11 | /chair/train/chair_0791.pcd
12 | /bed/train/bed_0513.pcd
13 | /monitor/train/monitor_0151.pcd
14 | /chair/train/chair_0528.pcd
15 | /chair/train/chair_0516.pcd
16 | /desk/train/desk_0138.pcd
17 | /chair/train/chair_0855.pcd
18 | /night_stand/train/night_stand_0047.pcd
19 | /monitor/train/monitor_0239.pcd
20 | /monitor/train/monitor_0002.pcd
21 | /sofa/train/sofa_0241.pcd
22 | /toilet/train/toilet_0046.pcd
23 | /bathtub/train/bathtub_0087.pcd
24 | /dresser/train/dresser_0092.pcd
25 | /night_stand/train/night_stand_0129.pcd
26 | /table/train/table_0155.pcd
27 | /sofa/train/sofa_0564.pcd
28 | /sofa/train/sofa_0195.pcd
29 | /chair/train/chair_0626.pcd
30 | /desk/train/desk_0171.pcd
31 | /toilet/train/toilet_0072.pcd
32 | /toilet/train/toilet_0018.pcd
33 | /chair/train/chair_0550.pcd
34 | /sofa/train/sofa_0113.pcd
35 | /sofa/train/sofa_0116.pcd
36 | /toilet/train/toilet_0156.pcd
37 | /sofa/train/sofa_0158.pcd
38 | /sofa/train/sofa_0245.pcd
39 | /toilet/train/toilet_0134.pcd
40 | /sofa/train/sofa_0129.pcd
41 | /bathtub/train/bathtub_0076.pcd
42 | /sofa/train/sofa_0541.pcd
43 | /desk/train/desk_0178.pcd
44 | /table/train/table_0053.pcd
45 | /chair/train/chair_0854.pcd
46 | /toilet/train/toilet_0253.pcd
47 | /night_stand/train/night_stand_0136.pcd
48 | /sofa/train/sofa_0077.pcd
49 | /sofa/train/sofa_0148.pcd
50 | /bed/train/bed_0034.pcd
51 | /toilet/train/toilet_0065.pcd
52 | /toilet/train/toilet_0213.pcd
53 | /toilet/train/toilet_0256.pcd
54 | /desk/train/desk_0193.pcd
55 | /sofa/train/sofa_0201.pcd
56 | /chair/train/chair_0250.pcd
57 | /chair/train/chair_0215.pcd
58 | /sofa/train/sofa_0281.pcd
59 | /sofa/train/sofa_0243.pcd
60 | /chair/train/chair_0670.pcd
61 | /toilet/train/toilet_0182.pcd
62 | /sofa/train/sofa_0587.pcd
63 | /monitor/train/monitor_0017.pcd
64 | /table/train/table_0378.pcd
65 | /desk/train/desk_0068.pcd
66 | /sofa/train/sofa_0596.pcd
67 | /sofa/train/sofa_0487.pcd
68 | /sofa/train/sofa_0096.pcd
69 | /monitor/train/monitor_0431.pcd
70 | /sofa/train/sofa_0035.pcd
71 | /monitor/train/monitor_0269.pcd
72 | /table/train/table_0110.pcd
73 | /chair/train/chair_0176.pcd
74 | /monitor/train/monitor_0228.pcd
75 | /monitor/train/monitor_0113.pcd
76 | /chair/train/chair_0161.pcd
77 | /desk/train/desk_0157.pcd
78 | /monitor/train/monitor_0461.pcd
79 | /sofa/train/sofa_0656.pcd
80 | /table/train/table_0260.pcd
81 | /chair/train/chair_0182.pcd
82 | /dresser/train/dresser_0039.pcd
83 | /night_stand/train/night_stand_0192.pcd
84 | /table/train/table_0241.pcd
85 | /chair/train/chair_0233.pcd
86 | /chair/train/chair_0104.pcd
87 | /bed/train/bed_0294.pcd
88 | /toilet/train/toilet_0089.pcd
89 | /bathtub/train/bathtub_0059.pcd
90 | /chair/train/chair_0499.pcd
91 | /chair/train/chair_0686.pcd
92 | /bed/train/bed_0466.pcd
93 | /monitor/train/monitor_0418.pcd
94 | /dresser/train/dresser_0193.pcd
95 | /dresser/train/dresser_0072.pcd
96 | /toilet/train/toilet_0266.pcd
97 | /bed/train/bed_0356.pcd
98 | /monitor/train/monitor_0209.pcd
99 | /chair/train/chair_0669.pcd
100 | /toilet/train/toilet_0319.pcd
101 | /chair/train/chair_0464.pcd
102 | /chair/train/chair_0034.pcd
103 | /bed/train/bed_0387.pcd
104 | /chair/train/chair_0493.pcd
105 | /chair/train/chair_0860.pcd
106 | /toilet/train/toilet_0064.pcd
107 | /table/train/table_0157.pcd
108 | /monitor/train/monitor_0304.pcd
109 | /bathtub/train/bathtub_0036.pcd
110 | /bathtub/train/bathtub_0081.pcd
111 | /dresser/train/dresser_0089.pcd
112 | /toilet/train/toilet_0028.pcd
113 | /sofa/train/sofa_0597.pcd
114 | /sofa/train/sofa_0250.pcd
115 | /dresser/train/dresser_0099.pcd
116 | /chair/train/chair_0077.pcd
117 | /monitor/train/monitor_0174.pcd
118 | /chair/train/chair_0760.pcd
119 | /chair/train/chair_0324.pcd
120 | /chair/train/chair_0335.pcd
121 | /table/train/table_0348.pcd
122 | /monitor/train/monitor_0365.pcd
123 | /monitor/train/monitor_0149.pcd
124 | /desk/train/desk_0079.pcd
125 | /bed/train/bed_0353.pcd
126 | /bed/train/bed_0275.pcd
127 | /night_stand/train/night_stand_0064.pcd
128 | /chair/train/chair_0349.pcd
129 | /chair/train/chair_0333.pcd
130 | /sofa/train/sofa_0041.pcd
131 | /table/train/table_0350.pcd
132 | /bed/train/bed_0075.pcd
133 | /toilet/train/toilet_0152.pcd
134 | /bed/train/bed_0224.pcd
135 | /bed/train/bed_0363.pcd
136 | /table/train/table_0246.pcd
137 | /bed/train/bed_0284.pcd
138 | /bed/train/bed_0180.pcd
139 | /monitor/train/monitor_0379.pcd
140 | /sofa/train/sofa_0218.pcd
141 | /sofa/train/sofa_0042.pcd
142 | /table/train/table_0364.pcd
143 | /table/train/table_0302.pcd
144 | /toilet/train/toilet_0261.pcd
145 | /sofa/train/sofa_0176.pcd
146 | /night_stand/train/night_stand_0116.pcd
147 | /dresser/train/dresser_0043.pcd
148 | /chair/train/chair_0419.pcd
149 | /monitor/train/monitor_0312.pcd
150 | /chair/train/chair_0019.pcd
151 | /monitor/train/monitor_0112.pcd
152 | /bed/train/bed_0140.pcd
153 | /toilet/train/toilet_0242.pcd
154 | /chair/train/chair_0744.pcd
155 | /desk/train/desk_0119.pcd
156 | /monitor/train/monitor_0358.pcd
157 | /sofa/train/sofa_0101.pcd
158 | /desk/train/desk_0058.pcd
159 | /sofa/train/sofa_0495.pcd
160 | /sofa/train/sofa_0273.pcd
161 | /dresser/train/dresser_0121.pcd
162 | /table/train/table_0300.pcd
163 | /table/train/table_0038.pcd
164 | /desk/train/desk_0084.pcd
165 | /sofa/train/sofa_0240.pcd
166 | /table/train/table_0197.pcd
167 | /desk/train/desk_0198.pcd
168 | /table/train/table_0193.pcd
169 | /chair/train/chair_0736.pcd
170 | /chair/train/chair_0647.pcd
171 | /chair/train/chair_0220.pcd
172 | /monitor/train/monitor_0341.pcd
173 | /chair/train/chair_0808.pcd
174 | /chair/train/chair_0479.pcd
175 | /dresser/train/dresser_0076.pcd
176 | /dresser/train/dresser_0112.pcd
177 | /chair/train/chair_0671.pcd
178 | /bed/train/bed_0201.pcd
179 | /chair/train/chair_0824.pcd
180 | /bed/train/bed_0093.pcd
181 | /chair/train/chair_0151.pcd
182 | /chair/train/chair_0185.pcd
183 | /table/train/table_0066.pcd
184 | /chair/train/chair_0769.pcd
185 | /sofa/train/sofa_0626.pcd
186 | /monitor/train/monitor_0217.pcd
187 | /sofa/train/sofa_0672.pcd
188 | /sofa/train/sofa_0438.pcd
189 | /monitor/train/monitor_0463.pcd
190 | /bed/train/bed_0230.pcd
191 | /night_stand/train/night_stand_0159.pcd
192 | /monitor/train/monitor_0141.pcd
193 | /monitor/train/monitor_0004.pcd
194 | /chair/train/chair_0537.pcd
195 | /monitor/train/monitor_0426.pcd
196 | /chair/train/chair_0270.pcd
197 | /toilet/train/toilet_0277.pcd
198 | /bed/train/bed_0118.pcd
199 | /chair/train/chair_0429.pcd
200 | /desk/train/desk_0091.pcd
201 | /bed/train/bed_0377.pcd
202 | /monitor/train/monitor_0363.pcd
203 | /chair/train/chair_0473.pcd
204 | /desk/train/desk_0124.pcd
205 | /chair/train/chair_0117.pcd
206 | /bed/train/bed_0043.pcd
207 | /chair/train/chair_0170.pcd
208 | /bed/train/bed_0492.pcd
209 | /night_stand/train/night_stand_0118.pcd
210 | /monitor/train/monitor_0128.pcd
211 | /toilet/train/toilet_0290.pcd
212 | /sofa/train/sofa_0548.pcd
213 | /chair/train/chair_0090.pcd
214 | /bed/train/bed_0266.pcd
215 | /monitor/train/monitor_0258.pcd
216 | /toilet/train/toilet_0097.pcd
217 | /desk/train/desk_0176.pcd
218 | /sofa/train/sofa_0181.pcd
219 | /chair/train/chair_0072.pcd
220 | /sofa/train/sofa_0480.pcd
221 | /table/train/table_0084.pcd
222 | /night_stand/train/night_stand_0187.pcd
223 | /bathtub/train/bathtub_0035.pcd
224 | /bed/train/bed_0402.pcd
225 | /table/train/table_0192.pcd
226 | /chair/train/chair_0529.pcd
227 | /chair/train/chair_0680.pcd
228 | /chair/train/chair_0229.pcd
229 | /chair/train/chair_0362.pcd
230 | /dresser/train/dresser_0047.pcd
231 | /table/train/table_0090.pcd
232 | /chair/train/chair_0401.pcd
233 | /sofa/train/sofa_0413.pcd
234 | /chair/train/chair_0756.pcd
235 | /chair/train/chair_0616.pcd
236 | /chair/train/chair_0726.pcd
237 | /chair/train/chair_0814.pcd
238 | /monitor/train/monitor_0055.pcd
239 | /toilet/train/toilet_0298.pcd
240 | /chair/train/chair_0406.pcd
241 | /sofa/train/sofa_0163.pcd
242 | /dresser/train/dresser_0148.pcd
243 | /night_stand/train/night_stand_0151.pcd
244 | /sofa/train/sofa_0156.pcd
245 | /sofa/train/sofa_0447.pcd
246 | /bathtub/train/bathtub_0102.pcd
247 | /bed/train/bed_0207.pcd
248 | /sofa/train/sofa_0392.pcd
249 | /table/train/table_0353.pcd
250 | /sofa/train/sofa_0636.pcd
251 | /sofa/train/sofa_0013.pcd
252 | /sofa/train/sofa_0030.pcd
253 | /bed/train/bed_0421.pcd
254 | /monitor/train/monitor_0137.pcd
255 | /table/train/table_0101.pcd
256 | /toilet/train/toilet_0130.pcd
257 | /sofa/train/sofa_0326.pcd
258 | /sofa/train/sofa_0140.pcd
259 | /sofa/train/sofa_0120.pcd
260 | /chair/train/chair_0481.pcd
261 | /table/train/table_0166.pcd
262 | /chair/train/chair_0118.pcd
263 | /monitor/train/monitor_0071.pcd
264 | /desk/train/desk_0112.pcd
265 | /bed/train/bed_0456.pcd
266 | /sofa/train/sofa_0236.pcd
267 | /bed/train/bed_0463.pcd
268 | /night_stand/train/night_stand_0011.pcd
269 | /sofa/train/sofa_0032.pcd
270 | /bed/train/bed_0445.pcd
271 | /chair/train/chair_0485.pcd
272 | /night_stand/train/night_stand_0089.pcd
273 | /chair/train/chair_0053.pcd
274 | /chair/train/chair_0792.pcd
275 | /sofa/train/sofa_0130.pcd
276 | /chair/train/chair_0143.pcd
277 | /dresser/train/dresser_0019.pcd
278 | /sofa/train/sofa_0322.pcd
279 | /toilet/train/toilet_0247.pcd
280 | /chair/train/chair_0222.pcd
281 | /chair/train/chair_0883.pcd
282 | /bed/train/bed_0355.pcd
283 | /sofa/train/sofa_0512.pcd
284 | /table/train/table_0213.pcd
285 | /toilet/train/toilet_0024.pcd
286 | /dresser/train/dresser_0022.pcd
287 | /bed/train/bed_0509.pcd
288 | /toilet/train/toilet_0186.pcd
289 | /monitor/train/monitor_0266.pcd
290 | /dresser/train/dresser_0079.pcd
291 | /bed/train/bed_0142.pcd
292 | /bed/train/bed_0448.pcd
293 | /desk/train/desk_0036.pcd
294 | /monitor/train/monitor_0447.pcd
295 | /bed/train/bed_0326.pcd
296 | /table/train/table_0367.pcd
297 | /chair/train/chair_0727.pcd
298 | /night_stand/train/night_stand_0072.pcd
299 | /chair/train/chair_0521.pcd
300 | /bed/train/bed_0080.pcd
301 | /bed/train/bed_0395.pcd
302 | /sofa/train/sofa_0207.pcd
303 | /bed/train/bed_0417.pcd
304 | /desk/train/desk_0192.pcd
305 | /bathtub/train/bathtub_0099.pcd
306 | /sofa/train/sofa_0111.pcd
307 | /dresser/train/dresser_0163.pcd
308 | /night_stand/train/night_stand_0110.pcd
309 | /bed/train/bed_0390.pcd
310 | /chair/train/chair_0254.pcd
311 | /monitor/train/monitor_0283.pcd
312 | /monitor/train/monitor_0436.pcd
313 | /toilet/train/toilet_0231.pcd
314 | /table/train/table_0266.pcd
315 | /monitor/train/monitor_0428.pcd
316 | /night_stand/train/night_stand_0068.pcd
317 | /sofa/train/sofa_0189.pcd
318 | /dresser/train/dresser_0151.pcd
319 | /sofa/train/sofa_0164.pcd
320 | /sofa/train/sofa_0668.pcd
321 | /night_stand/train/night_stand_0029.pcd
322 | /bed/train/bed_0360.pcd
323 | /table/train/table_0354.pcd
324 | /bed/train/bed_0425.pcd
325 | /bed/train/bed_0204.pcd
326 | /bathtub/train/bathtub_0021.pcd
327 | /night_stand/train/night_stand_0107.pcd
328 | /bed/train/bed_0166.pcd
329 | /table/train/table_0281.pcd
330 | /chair/train/chair_0368.pcd
331 | /chair/train/chair_0375.pcd
332 | /night_stand/train/night_stand_0143.pcd
333 | /night_stand/train/night_stand_0190.pcd
334 | /bed/train/bed_0254.pcd
335 | /chair/train/chair_0303.pcd
336 | /monitor/train/monitor_0242.pcd
337 | /desk/train/desk_0136.pcd
338 | /chair/train/chair_0217.pcd
339 | /dresser/train/dresser_0179.pcd
340 | /bed/train/bed_0512.pcd
341 | /table/train/table_0272.pcd
342 | /bed/train/bed_0286.pcd
343 | /bed/train/bed_0079.pcd
344 | /monitor/train/monitor_0160.pcd
345 | /table/train/table_0037.pcd
346 | /bathtub/train/bathtub_0004.pcd
347 | /sofa/train/sofa_0521.pcd
348 | /bed/train/bed_0155.pcd
349 | /chair/train/chair_0022.pcd
350 | /toilet/train/toilet_0281.pcd
351 | /sofa/train/sofa_0180.pcd
352 | /sofa/train/sofa_0444.pcd
353 | /chair/train/chair_0868.pcd
354 | /sofa/train/sofa_0081.pcd
355 | /sofa/train/sofa_0198.pcd
356 | /monitor/train/monitor_0040.pcd
357 | /toilet/train/toilet_0202.pcd
358 | /sofa/train/sofa_0665.pcd
359 | /bed/train/bed_0157.pcd
360 | /toilet/train/toilet_0114.pcd
361 | /table/train/table_0274.pcd
362 | /sofa/train/sofa_0209.pcd
363 | /table/train/table_0380.pcd
364 | /toilet/train/toilet_0321.pcd
365 | /table/train/table_0292.pcd
366 | /monitor/train/monitor_0295.pcd
367 | /bed/train/bed_0288.pcd
368 | /table/train/table_0362.pcd
369 | /bed/train/bed_0014.pcd
370 | /night_stand/train/night_stand_0080.pcd
371 | /chair/train/chair_0187.pcd
372 | /chair/train/chair_0878.pcd
373 | /toilet/train/toilet_0188.pcd
374 | /desk/train/desk_0061.pcd
375 | /monitor/train/monitor_0289.pcd
376 | /dresser/train/dresser_0087.pcd
377 | /table/train/table_0089.pcd
378 | /desk/train/desk_0167.pcd
379 | /bed/train/bed_0100.pcd
380 | /bathtub/train/bathtub_0073.pcd
381 | /toilet/train/toilet_0306.pcd
382 | /chair/train/chair_0462.pcd
383 | /chair/train/chair_0295.pcd
384 | /table/train/table_0330.pcd
385 | /toilet/train/toilet_0194.pcd
386 | /chair/train/chair_0692.pcd
387 | /monitor/train/monitor_0317.pcd
388 | /monitor/train/monitor_0191.pcd
389 | /chair/train/chair_0650.pcd
390 | /chair/train/chair_0455.pcd
391 | /table/train/table_0228.pcd
392 | /dresser/train/dresser_0136.pcd
393 | /sofa/train/sofa_0049.pcd
394 | /table/train/table_0270.pcd
395 | /chair/train/chair_0147.pcd
396 | /monitor/train/monitor_0060.pcd
397 | /monitor/train/monitor_0096.pcd
398 | /toilet/train/toilet_0043.pcd
399 | /sofa/train/sofa_0015.pcd
400 | /chair/train/chair_0745.pcd
401 | /table/train/table_0381.pcd
402 | /bed/train/bed_0065.pcd
--------------------------------------------------------------------------------
/preprocessing/modelnet40_labels.csv:
--------------------------------------------------------------------------------
1 | airplane
2 | bathtub
3 | bed
4 | bench
5 | bookshelf
6 | bottle
7 | bowl
8 | car
9 | chair
10 | cone
11 | cup
12 | curtain
13 | desk
14 | door
15 | dresser
16 | flower_pot
17 | glass_box
18 | guitar
19 | keyboard
20 | lamp
21 | laptop
22 | mantel
23 | monitor
24 | night_stand
25 | person
26 | piano
27 | plant
28 | radio
29 | range_hood
30 | sink
31 | sofa
32 | stairs
33 | stool
34 | table
35 | tent
36 | toilet
37 | tv_stand
38 | vase
39 | wardrobe
40 | xbox
--------------------------------------------------------------------------------
/preprocessing/modelnet40_trainval.csv:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WDot/G3DNet/448e2e26646219de8cbb6d7ec54b168cddab09bb/preprocessing/modelnet40_trainval.csv
--------------------------------------------------------------------------------
/preprocessing/modelnetFull_labels.csv:
--------------------------------------------------------------------------------
1 | air_conditioner
2 | aircraft
3 | air_vent
4 | alarm
5 | album
6 | altarpiece
7 | american_flag
8 | antenna
9 | apple
10 | aqueduct
11 | arcade_machine
12 | arch
13 | armchair
14 | ashtray
15 | awning
16 | bag
17 | bagel
18 | baggage_cart
19 | ball
20 | balloon
21 | banana
22 | bar_of_soap
23 | barrel
24 | barren
25 | baseball
26 | basket
27 | basketball
28 | basketball_hoop
29 | bee
30 | bell
31 | belt
32 | bicycle
33 | biplane
34 | blanket
35 | blender
36 | blinds
37 | board
38 | book
39 | boot
40 | box
41 | bread
42 | brick
43 | bridge
44 | briefcase
45 | brush
46 | bucket
47 | bulb
48 | bunk_bed
49 | bush
50 | butcher_knife
51 | butterfly
52 | button
53 | cabinet
54 | cable_box
55 | cables
56 | cactus
57 | cake
58 | calculator
59 | camera
60 | can
61 | candle
62 | candleholder
63 | cane
64 | cart
65 | carton
66 | case
67 | castle
68 | cat
69 | cd
70 | cd_disc
71 | cell_phone
72 | chandelier
73 | charger
74 | chessboard
75 | chess_piece
76 | chess_set
77 | chest
78 | church
79 | cistern
80 | cleaner
81 | clock
82 | clothes
83 | coaster
84 | coat_hanger
85 | coffee_machine
86 | coffee_pot
87 | coffee_table
88 | coins
89 | cologne
90 | comb
91 | commercial
92 | computer
93 | computer_monitor
94 | conical
95 | corn
96 | couch
97 | counter
98 | cradle
99 | crate
100 | cream
101 | crib
102 | cuddly_toy
103 | cutting_board
104 | decorative_platter
105 | desk_chair
106 | desk_drawer
107 | desk_lamp
108 | desktop
109 | dining_chair
110 | dirigible
111 | dirt_track
112 | dishes
113 | dishwasher
114 | display_case
115 | dog
116 | doll
117 | dolly
118 | dolphin
119 | dome_church
120 | door_frame
121 | door_knob
122 | door_lock
123 | door_way
124 | drain
125 | drawer
126 | drawer_handle
127 | drawer_knob
128 | dress
129 | drum
130 | duck
131 | dvd
132 | dvd_player
133 | eggs
134 | electric_box
135 | eraser
136 | exit_sign
137 | eyeglasses
138 | eye_glasses
139 | face
140 | fan
141 | faucet
142 | feline
143 | fighter_jet
144 | file_box
145 | filing_cabinet
146 | filing_shelves
147 | fire_alarm
148 | fireplace
149 | fish
150 | fish_tank
151 | flag
152 | flashlight
153 | flower
154 | flower_box
155 | flowers
156 | flower_with_stem
157 | flying_bird
158 | flying_saucer
159 | football
160 | foot_rest
161 | fork
162 | fruit
163 | fruit_bowl
164 | furnace
165 | furniture
166 | game_table
167 | garage_door
168 | gate
169 | gazebo
170 | gear
171 | geographic_map
172 | glass
173 | glass_set
174 | glider
175 | globe
176 | green_screen
177 | grill
178 | hammer
179 | handgun
180 | handle
181 | hanger
182 | hangers
183 | hat
184 | hatchery
185 | head
186 | headboard
187 | headphones
188 | heater
189 | helicopter
190 | helmet
191 | hooks
192 | horse
193 | hot_air_balloon
194 | hot_dogs
195 | hourglass
196 | human
197 | ice_cream
198 | ipad
199 | iphone
200 | ipod
201 | jar
202 | jeans
203 | jeep
204 | jersey
205 | key
206 | kitchen_items
207 | knife
208 | knob
209 | knobs
210 | ladder
211 | lamp_shade
212 | large_sail_boat
213 | lego
214 | lemon
215 | lid
216 | light
217 | light_bulb
218 | lighthouse
219 | light_switch
220 | lock
221 | lockheed_airplane
222 | luggage
223 | machine
224 | magazine
225 | magnet
226 | mailbox
227 | map
228 | mask
229 | mast
230 | mattress
231 | medal
232 | microchip
233 | microphone
234 | microscope
235 | microwave
236 | military_tank
237 | mirror
238 | model_boat
239 | money
240 | monster_truck
241 | motorcycle
242 | mug
243 | multi_fuselage
244 | multiple__peak_tent
245 | music_keyboard
246 | newspapers
247 | newtonian_toy
248 | notebook
249 | one_peak_tent
250 | one_story_home
251 | onion
252 | orange
253 | oven
254 | pail
255 | palm
256 | pan
257 | paper
258 | papers
259 | pen
260 | pencil
261 | pencil_holder
262 | phone_handle
263 | photo_album
264 | pickup
265 | pig
266 | pillow
267 | ping_pong_table
268 | pipe
269 | pitcher
270 | pizza_box
271 | placard
272 | plank
273 | plant_pot
274 | plastic_box
275 | plastic_chair
276 | plate
277 | pole
278 | pool_ball
279 | pool_table
280 | pot
281 | potted_plant
282 | printer
283 | projector
284 | projector_screen
285 | pyramid
286 | rabbit
287 | race_car
288 | radiator
289 | railing
290 | rectangular_table
291 | refridgerator
292 | remote_control
293 | rifle
294 | roof
295 | room_divider
296 | rope
297 | round
298 | router
299 | rug
300 | ruler
301 | sailboat
302 | sailboat_with_oars
303 | satellite
304 | satellite_dish
305 | saucepan
306 | saucer
307 | scaffolding
308 | scale
309 | school_desk
310 | screwdriver
311 | sculpture
312 | security_camera
313 | sedan
314 | semi
315 | shark
316 | sheets
317 | shelves
318 | ship
319 | shoe
320 | shopping_cart
321 | shorts
322 | shovel
323 | shower
324 | shower_head
325 | side_table
326 | sign
327 | single_leg
328 | skateboard
329 | skeleton
330 | skull
331 | skyscraper
332 | slide
333 | slot_machine
334 | snake
335 | snowman
336 | soap
337 | soccer_ball
338 | space_shuttle
339 | speaker
340 | spider
341 | sponge
342 | spoon
343 | sports_car
344 | spot_light
345 | sprinkler
346 | stacked_chairs
347 | staircase
348 | stamp
349 | standing_bird
350 | stealth_bomber
351 | stereo
352 | sticker
353 | sticks
354 | stones
355 | storage_rack
356 | stove
357 | streetlight
358 | street_sign
359 | submarine
360 | suitcase
361 | suv
362 | swingset
363 | sword
364 | tank
365 | tape
366 | tea_pot
367 | telephone
368 | telescope
369 | television
370 | tie_fighter
371 | tire
372 | toaster
373 | toilet_paper_holder
374 | torch
375 | towel
376 | toy_car
377 | track
378 | track_light
379 | trailer
380 | train
381 | train_car
382 | trampoline
383 | tray
384 | tree
385 | tree_sculpture
386 | trex
387 | tricycle
388 | trolley
389 | trophy
390 | two_story_home
391 | umbrella
392 | urn
393 | usb_drive
394 | vault
395 | vegetables
396 | vent
397 | walking
398 | wall_divider
399 | wall_stand
400 | washing_machine
401 | watch
402 | water_fountain
403 | water_heater
404 | webcam
405 | weights
406 | wheel
407 | window
408 | window_frame
409 | window_seat
410 | window_shelf
411 | wine
412 | wine_bottle
413 | wine_glass
414 | wine_rack
415 | wire
416 | wooden_pillar
417 | wooden_plank
418 | wooden_planks
419 | wooden_toy
420 | wrench
421 | x_wing
422 |
--------------------------------------------------------------------------------
/preprocessing/pointcloudify.mlx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/preprocessing/rename_files(shapenet).py:
--------------------------------------------------------------------------------
1 | import glob2
2 | import numpy as np
3 | import nltk
4 | from nltk.corpus import wordnet
5 | import os
6 | import shutil
7 | import pdb
8 | import csv
9 | import pcl
10 |
11 | src_directory = '/shared/kgcoe-research/mil/modelnet/shapenet_500_pcd/'
12 |
13 | synsetid = []
14 | split=[]
15 | ids=[]
16 | modelid=[]
17 | ids_dict = {}
18 |
19 | with open('all.csv', 'rb') as f:
20 | reader = csv.reader(f) #csv read object file
21 | next(reader) # skip the headers
22 | for row in reader:
23 | ids.append(row[0])
24 | synsetid.append(row[1])
25 | modelid.append(row[3])
26 | split.append(row[4])
27 | #pdb.set_trace()
28 |
29 | syns = list(wordnet.all_synsets())
30 | offsets_list = [(s.offset(), s) for s in syns]
31 | offsets_dict = dict(offsets_list)
32 |
33 | class_ids = set(synsetid)
34 | class_ids = list(class_ids)
35 | class_dict= {}
36 |
37 | for id in class_ids:
38 | #pdb.set_trace()
39 | key=int(id)
40 | class_name = offsets_dict[key]
41 | class_name = str(class_name)
42 | value = class_name.split('.')[0][8:]
43 | class_dict[key] = value
44 |
45 |
46 | path_all_files = '/shared/kgcoe-research/mil/modelnet/shapenet_500_pcd'
47 | all_files = glob2.glob(path_all_files+'/**/*.pcd')
48 | dest_directory = '/home/rnd7528/git/shapnet/shapenet_dataset'
49 | i=0
50 | j=0
51 | #pdb.set_trace()
52 |
53 | for file in all_files:
54 | #i=i+1
55 | print i
56 | pcd_file = pcl.load(file)
57 | name = file.split('/')
58 | try:
59 | idx = modelid.index(name[-3])
60 | split_val = split[idx]
61 | name_id = ids[idx]
62 | except:
63 | #pdb.set_trace()
64 | #j=j+1
65 | continue
66 | class_name = class_dict[int(name[-4])]
67 | dest_path = dest_directory + '/' + class_name + '/' + split_val
68 | if os.path.isdir(dest_path) == False:
69 | os.makedirs(dest_path)
70 | dest_file = dest_path + '/' + name_id + '.pcd'
71 | pcl.save(pcd_file,dest_file)
72 | #pdb.set_trace()
73 |
74 | #pdb.set_trace()
--------------------------------------------------------------------------------
/preprocessing/shapenet_labels.csv:
--------------------------------------------------------------------------------
1 | table
2 | car
3 | bathtub
4 | vessel
5 | bus
6 | rifle
7 | sofa
8 | bottle
9 | lamp
10 | airplane
11 | cabinet
12 | camera
13 | chair
14 | tower
15 | display
16 | pot
17 | train
18 | faucet
19 | washer
20 | bench
21 | telephone
22 | printer
23 | jar
24 | file
25 | loudspeaker
26 | bed
27 | bookshelf
28 | piano
29 | bag
30 | clock
31 | rocket
32 | ashcan
33 | mailbox
34 | laptop
35 | stove
36 | cellular_telephone
37 | guitar
38 | motorcycle
39 | basket
40 | mug
41 | knife
42 | can
43 | microwave
44 | earphone
45 | cap
46 | pistol
47 | computer_keyboard
48 | birdhouse
49 | dishwasher
50 | bowl
51 | microphone
52 | helmet
53 | remote_control
54 | skateboard
55 | pillow
--------------------------------------------------------------------------------
/preprocessing/sydney_labels.csv:
--------------------------------------------------------------------------------
1 | 4wd
2 | building
3 | bus
4 | car
5 | pedestrian
6 | pillar
7 | pole
8 | traffic_lights
9 | traffic_sign
10 | tree
11 | truck
12 | trunk
13 | ute
14 | van
15 |
--------------------------------------------------------------------------------
/preprocessing/sydneyfold0.csv:
--------------------------------------------------------------------------------
1 | /traffic_lights.8.2738.pcd
2 | /trunk.18.2446.pcd
3 | /trunk.15.2446.pcd
4 | /car.69.5100.pcd
5 | /pillar.2.3582.pcd
6 | /ute.7.270.pcd
7 | /pillar.1.25322.pcd
8 | /tree.24.7288.pcd
9 | /car.70.5100.pcd
10 | /pedestrian.58.2299.pcd
11 | /ute.1.0.pcd
12 | /car.67.270.pcd
13 | /car.82.12346.pcd
14 | /building.11.2446.pcd
15 | /car.23.17038.pcd
16 | /pedestrian.151.10974.pcd
17 | /trunk.24.270.pcd
18 | /tree.21.270.pcd
19 | /trunk.25.270.pcd
20 | /pedestrian.37.17589.pcd
21 | /car.85.12715.pcd
22 | /truck.5.270.pcd
23 | /bus.4.23124.pcd
24 | /bus.12.270.pcd
25 | /pedestrian.62.2446.pcd
26 | /van.19.5100.pcd
27 | /tree.22.270.pcd
28 | /pedestrian.152.11204.pcd
29 | /pole.20.10974.pcd
30 | /traffic_lights.7.2446.pcd
31 | /building.0.16217.pcd
32 | /traffic_lights.5.2446.pcd
33 | /ute.8.270.pcd
34 | /car.29.17038.pcd
35 | /car.26.17038.pcd
36 | /pedestrian.53.0.pcd
37 | /pedestrian.57.2299.pcd
38 | /pedestrian.100.270.pcd
39 | /bus.11.270.pcd
40 | /van.16.4093.pcd
41 | /trunk.17.2446.pcd
42 | /van.13.3983.pcd
43 | /pedestrian.47.25322.pcd
44 | /pedestrian.105.270.pcd
45 | /car.22.17038.pcd
46 | /trunk.12.0.pcd
47 | /van.14.3983.pcd
48 | /car.81.12346.pcd
49 | /pedestrian.106.270.pcd
50 | /pedestrian.31.17589.pcd
51 | /traffic_sign.33.270.pcd
52 | /pedestrian.51.0.pcd
53 | /car.80.12346.pcd
54 | /traffic_sign.32.270.pcd
55 | /traffic_sign.19.0.pcd
56 | /car.63.3582.pcd
57 | /pedestrian.50.0.pcd
58 | /pedestrian.54.0.pcd
59 | /building.8.2299.pcd
60 | /car.71.5229.pcd
61 | /4wd.1.2446.pcd
62 | /traffic_sign.28.270.pcd
63 | /4wd.0.2299.pcd
64 | /pole.11.25322.pcd
65 | /car.65.3725.pcd
66 | /van.12.3725.pcd
67 | /pedestrian.52.0.pcd
68 | /building.1.16217.pcd
69 | /traffic_sign.22.2299.pcd
70 | /traffic_lights.4.2446.pcd
71 | /pedestrian.16.16217.pcd
72 | /pedestrian.59.2299.pcd
73 | /pole.10.23124.pcd
74 | /van.10.2738.pcd
75 | /traffic_sign.23.2446.pcd
76 | /pole.14.8444.pcd
77 | /pedestrian.38.17589.pcd
78 | /bus.3.23124.pcd
79 | /pedestrian.101.270.pcd
80 | /trunk.34.7288.pcd
81 | /car.25.17038.pcd
82 | /pedestrian.104.270.pcd
83 | /building.10.2446.pcd
84 | /car.83.12346.pcd
85 | /traffic_lights.20.0.pcd
86 | /pedestrian.49.0.pcd
87 | /tree.18.3582.pcd
88 | /pillar.3.4868.pcd
89 | /trunk.23.5463.pcd
90 | /trunk.22.5463.pcd
91 | /pedestrian.46.25322.pcd
92 | /pedestrian.60.2299.pcd
93 | /pedestrian.17.17038.pcd
94 | /traffic_lights.1.2299.pcd
95 | /tree.20.3582.pcd
96 | /tree.19.3582.pcd
97 | /car.87.12715.pcd
98 | /pedestrian.103.270.pcd
99 | /tree.23.5100.pcd
100 | /trunk.13.0.pcd
101 | /trunk.19.2738.pcd
102 | /traffic_lights.0.2299.pcd
103 | /traffic_sign.21.2299.pcd
104 | /traffic_lights.3.2299.pcd
105 | /pedestrian.34.17589.pcd
106 | /traffic_sign.31.270.pcd
107 | /van.15.4043.pcd
108 | /trunk.14.2299.pcd
109 | /tree.17.2299.pcd
110 | /van.17.4868.pcd
111 | /pedestrian.45.25322.pcd
112 | /pedestrian.61.2446.pcd
113 | /4wd.7.16217.pcd
114 | /car.62.2299.pcd
115 | /pedestrian.56.2299.pcd
116 | /pedestrian.35.17589.pcd
117 | /pole.12.25322.pcd
118 | /traffic_sign.30.270.pcd
119 | /traffic_lights.6.2446.pcd
120 | /bus.7.2299.pcd
121 | /truck.4.2446.pcd
122 | /4wd.13.270.pcd
123 | /pedestrian.33.17589.pcd
124 | /car.66.4043.pcd
125 | /pedestrian.102.270.pcd
126 | /4wd.6.16217.pcd
127 | /truck.3.0.pcd
128 | /traffic_sign.29.270.pcd
129 | /pedestrian.36.17589.pcd
130 | /pedestrian.32.17589.pcd
131 | /trunk.26.270.pcd
132 | /trunk.16.2446.pcd
133 | /car.30.17038.pcd
134 | /car.68.270.pcd
135 | /pole.13.25322.pcd
136 | /pillar.18.10974.pcd
137 | /traffic_sign.27.270.pcd
138 | /car.86.12715.pcd
139 | /car.84.12715.pcd
140 | /pedestrian.63.2446.pcd
141 | /traffic_lights.2.2299.pcd
142 | /pedestrian.55.2299.pcd
143 | /pillar.19.10974.pcd
144 | /van.11.2738.pcd
145 | /ute.2.2299.pcd
146 | /pillar.0.16217.pcd
147 |
--------------------------------------------------------------------------------
/preprocessing/sydneyfold1.csv:
--------------------------------------------------------------------------------
1 | /4wd.2.3582.pcd
2 | /traffic_lights.14.6994.pcd
3 | /pole.9.17589.pcd
4 | /tree.14.10974.pcd
5 | /van.21.5229.pcd
6 | /car.2.5463.pcd
7 | /trunk.27.5100.pcd
8 | /pedestrian.73.3725.pcd
9 | /trunk.36.8444.pcd
10 | /van.20.5229.pcd
11 | /pedestrian.74.3725.pcd
12 | /trunk.32.5229.pcd
13 | /pillar.15.8444.pcd
14 | /pedestrian.70.3582.pcd
15 | /traffic_lights.27.7288.pcd
16 | /traffic_sign.39.5229.pcd
17 | /pedestrian.98.4868.pcd
18 | /pillar.16.8444.pcd
19 | /pedestrian.84.4093.pcd
20 | /ute.3.3582.pcd
21 | /traffic_sign.2.5463.pcd
22 | /pedestrian.80.4093.pcd
23 | /van.1.6994.pcd
24 | /trunk.38.8444.pcd
25 | /bus.6.2299.pcd
26 | /trunk.39.8444.pcd
27 | /traffic_sign.38.5229.pcd
28 | /tree.30.11204.pcd
29 | /van.0.6994.pcd
30 | /traffic_sign.26.3582.pcd
31 | /pedestrian.89.4093.pcd
32 | /tree.27.9824.pcd
33 | /pedestrian.77.3725.pcd
34 | /pole.8.17589.pcd
35 | /pedestrian.99.4868.pcd
36 | /pedestrian.75.3725.pcd
37 | /traffic_lights.9.3582.pcd
38 | /pedestrian.90.4868.pcd
39 | /pole.6.6994.pcd
40 | /traffic_sign.25.2738.pcd
41 | /traffic_sign.0.5463.pcd
42 | /traffic_lights.10.3582.pcd
43 | /van.18.5100.pcd
44 | /4wd.4.17038.pcd
45 | /trunk.29.5100.pcd
46 | /tree.25.8254.pcd
47 | /car.16.7288.pcd
48 | /building.12.2738.pcd
49 | /pedestrian.64.3582.pcd
50 | /pedestrian.76.3725.pcd
51 | /traffic_lights.17.5463.pcd
52 | /pedestrian.81.4093.pcd
53 | /trunk.40.8444.pcd
54 | /traffic_lights.12.4868.pcd
55 | /trunk.28.5100.pcd
56 | /car.36.6994.pcd
57 | /car.32.5463.pcd
58 | /car.7.6994.pcd
59 | /pedestrian.93.4868.pcd
60 | /building.16.5229.pcd
61 | /4wd.8.17038.pcd
62 | /pedestrian.88.4093.pcd
63 | /car.3.5463.pcd
64 | /4wd.3.4043.pcd
65 | /tree.15.10974.pcd
66 | /traffic_sign.34.5100.pcd
67 | /ute.4.4249.pcd
68 | /pedestrian.78.3725.pcd
69 | /pedestrian.68.3582.pcd
70 | /ute.5.4294.pcd
71 | /pedestrian.83.4093.pcd
72 | /car.18.7288.pcd
73 | /car.5.5563.pcd
74 | /trunk.33.5229.pcd
75 | /trunk.30.5229.pcd
76 | /van.24.6123.pcd
77 | /traffic_lights.24.7288.pcd
78 | /tree.29.10974.pcd
79 | /pedestrian.97.4868.pcd
80 | /trunk.31.5229.pcd
81 | /pedestrian.79.3983.pcd
82 | /pole.5.7288.pcd
83 | /bus.4.2446.pcd
84 | /van.22.5229.pcd
85 | /car.1.5463.pcd
86 | /van.25.7288.pcd
87 | /traffic_sign.1.5463.pcd
88 | /traffic_lights.23.7288.pcd
89 | /pedestrian.86.4093.pcd
90 | /trunk.35.8254.pcd
91 | /tree.16.11290.pcd
92 | /pedestrian.72.3725.pcd
93 | /traffic_lights.13.4868.pcd
94 | /car.31.5463.pcd
95 | /traffic_lights.11.4093.pcd
96 | /pedestrian.67.3582.pcd
97 | /pedestrian.96.4868.pcd
98 | /pole.7.17589.pcd
99 | /car.11.6123.pcd
100 | /traffic_sign.5.8254.pcd
101 | /4wd.5.17038.pcd
102 | /pedestrian.82.4093.pcd
103 | /truck.11.8444.pcd
104 | /pedestrian.65.3582.pcd
105 | /pedestrian.92.4868.pcd
106 | /truck.7.5100.pcd
107 | /pedestrian.91.4868.pcd
108 | /building.13.3582.pcd
109 | /traffic_sign.24.2738.pcd
110 | /traffic_sign.13.8254.pcd
111 | /4wd.12.3582.pcd
112 | /tree.26.8444.pcd
113 | /car.37.6994.pcd
114 | /car.10.6994.pcd
115 | /car.0.5463.pcd
116 | /pillar.14.8444.pcd
117 | /traffic_sign.3.8254.pcd
118 | /building.14.3582.pcd
119 | /car.8.6994.pcd
120 | /car.4.6994.pcd
121 | /building.15.270.pcd
122 | /traffic_sign.36.5100.pcd
123 | /van.23.5229.pcd
124 | /traffic_sign.12.8254.pcd
125 | /van.17.6994.pcd
126 | /traffic_lights.16.6994.pcd
127 | /pillar.13.8444.pcd
128 | /pedestrian.71.3582.pcd
129 | /traffic_lights.15.6994.pcd
130 | /pedestrian.85.4093.pcd
131 | /traffic_lights.22.7288.pcd
132 | /pedestrian.95.4868.pcd
133 | /truck.6.5100.pcd
134 | /traffic_sign.37.5100.pcd
135 | /traffic_lights.28.7288.pcd
136 | /trunk.37.8444.pcd
137 | /traffic_lights.25.7288.pcd
138 | /traffic_sign.40.8254.pcd
139 | /traffic_lights.26.7288.pcd
140 | /car.6.6994.pcd
141 | /pedestrian.66.3582.pcd
142 | /traffic_lights.21.7288.pcd
143 | /ute.11.8254.pcd
144 | /pedestrian.94.4868.pcd
145 | /pedestrian.69.3582.pcd
146 | /traffic_sign.4.8254.pcd
147 | /traffic_lights.18.5463.pcd
148 | /pillar.17.8444.pcd
149 | /traffic_sign.35.5100.pcd
150 | /car.9.6994.pcd
151 | /pedestrian.87.4093.pcd
152 | /van.26.7288.pcd
153 | /car.34.6994.pcd
154 | /bus.5.2299.pcd
155 | /car.35.6994.pcd
156 |
--------------------------------------------------------------------------------
/preprocessing/sydneyfold2.csv:
--------------------------------------------------------------------------------
1 | /trunk.42.9824.pcd
2 | /4wd.19.10974.pcd
3 | /car.14.16217.pcd
4 | /car.33.8254.pcd
5 | /pedestrian.115.5229.pcd
6 | /bus.2.6994.pcd
7 | /traffic_sign.44.10974.pcd
8 | /pedestrian.136.8254.pcd
9 | /car.28.8254.pcd
10 | /traffic_lights.31.8254.pcd
11 | /traffic_sign.17.8444.pcd
12 | /pedestrian.148.8444.pcd
13 | /pedestrian.41.23124.pcd
14 | /pedestrian.146.8444.pcd
15 | /traffic_sign.48.12346.pcd
16 | /pedestrian.116.5229.pcd
17 | /pedestrian.112.5100.pcd
18 | /pedestrian.113.5100.pcd
19 | /trunk.11.11886.pcd
20 | /trunk.49.12346.pcd
21 | /van.30.8444.pcd
22 | /building.19.11204.pcd
23 | /pedestrian.118.5229.pcd
24 | /pedestrian.107.5100.pcd
25 | /pedestrian.145.8444.pcd
26 | /pedestrian.42.23124.pcd
27 | /pedestrian.138.8254.pcd
28 | /pedestrian.147.8444.pcd
29 | /traffic_sign.41.9824.pcd
30 | /pedestrian.140.8254.pcd
31 | /van.9.11886.pcd
32 | /pedestrian.109.5100.pcd
33 | /pedestrian.137.8254.pcd
34 | /trunk.50.12346.pcd
35 | /pedestrian.141.8254.pcd
36 | /pillar.9.8254.pcd
37 | /car.15.16217.pcd
38 | /car.64.8444.pcd
39 | /traffic_sign.46.12346.pcd
40 | /car.24.8254.pcd
41 | /tree.32.12715.pcd
42 | /pedestrian.43.23124.pcd
43 | /tree.10.16217.pcd
44 | /tree.33.12715.pcd
45 | /pedestrian.149.8444.pcd
46 | /traffic_lights.32.8254.pcd
47 | /car.73.9824.pcd
48 | /pedestrian.108.5100.pcd
49 | /pillar.11.8254.pcd
50 | /car.20.16217.pcd
51 | /pedestrian.111.5100.pcd
52 | /car.19.16217.pcd
53 | /ute.12.8444.pcd
54 | /traffic_sign.47.12346.pcd
55 | /tree.2.16217.pcd
56 | /4wd.10.17589.pcd
57 | /trunk.43.9824.pcd
58 | /pedestrian.110.5100.pcd
59 | /building.3.16217.pcd
60 | /traffic_sign.51.12715.pcd
61 | /pole.0.5100.pcd
62 | /tree.1.16217.pcd
63 | /4wd.14.5229.pcd
64 | /pedestrian.142.8254.pcd
65 | /traffic_lights.29.8254.pcd
66 | /pedestrian.40.23124.pcd
67 | /ute.9.5100.pcd
68 | /pedestrian.143.8444.pcd
69 | /ute.10.5229.pcd
70 | /pedestrian.144.8444.pcd
71 | /traffic_lights.33.8254.pcd
72 | /trunk.51.12346.pcd
73 | /car.79.11204.pcd
74 | /car.72.9824.pcd
75 | /pedestrian.44.23124.pcd
76 | /pillar.10.8254.pcd
77 | /traffic_sign.49.12715.pcd
78 | /trunk.52.12346.pcd
79 | /trunk.48.11204.pcd
80 | /ute.13.9824.pcd
81 | /truck.8.5563.pcd
82 | /pedestrian.39.23124.pcd
83 | /pedestrian.114.5100.pcd
84 | /traffic_sign.45.11204.pcd
85 | /traffic_lights.30.8254.pcd
86 | /traffic_lights.36.8254.pcd
87 | /tree.0.16217.pcd
88 | /trunk.41.9824.pcd
89 | /van.32.11204.pcd
90 | /building.17.5229.pcd
91 | /car.78.10974.pcd
92 | /car.77.10974.pcd
93 | /car.46.8444.pcd
94 | /pole.2.5100.pcd
95 | /traffic_sign.18.11290.pcd
96 | /van.31.8444.pcd
97 | /building.2.16217.pcd
98 | /tree.3.16217.pcd
99 | /pole.19.5229.pcd
100 | /building.18.7288.pcd
101 | /tree.31.12346.pcd
102 | /traffic_lights.35.8254.pcd
103 | /car.27.8254.pcd
104 | /traffic_sign.50.12715.pcd
105 | /van.27.8254.pcd
106 | /van.29.8444.pcd
107 | /trunk.54.12715.pcd
108 | /trunk.10.11886.pcd
109 | /pillar.12.8254.pcd
110 | /trunk.9.11290.pcd
111 | /car.17.16217.pcd
112 | /bus.14.7288.pcd
113 | /pedestrian.117.5229.pcd
114 | /pedestrian.150.8444.pcd
115 | /car.21.16217.pcd
116 | /van.8.12119.pcd
117 | /truck.10.7288.pcd
118 | /pedestrian.139.8254.pcd
119 | /car.38.8254.pcd
120 | /traffic_lights.34.8254.pcd
121 | /truck.9.6783.pcd
122 | /trunk.45.9824.pcd
123 | /van.28.8254.pcd
124 | /trunk.44.9824.pcd
125 | /4wd.20.12346.pcd
126 | /bus.8.2738.pcd
127 | /car.39.16217.pcd
128 | /trunk.53.12715.pcd
129 | /car.13.16217.pcd
130 | /car.12.16217.pcd
131 | /pedestrian.119.5229.pcd
132 | /pole.3.17038.pcd
133 |
--------------------------------------------------------------------------------
/preprocessing/sydneyfold3.csv:
--------------------------------------------------------------------------------
1 | /car.50.17589.pcd
2 | /pedestrian.133.7288.pcd
3 | /pedestrian.26.6994.pcd
4 | /traffic_sign.42.20631.pcd
5 | /pedestrian.14.6994.pcd
6 | /trunk.46.20631.pcd
7 | /tree.6.17038.pcd
8 | /pillar.7.5229.pcd
9 | /traffic_lights.43.20631.pcd
10 | /4wd.16.6123.pcd
11 | /pole.1.16217.pcd
12 | /tree.12.23124.pcd
13 | /truck.2.11290.pcd
14 | /car.40.17589.pcd
15 | /tree.5.17038.pcd
16 | /pedestrian.20.5463.pcd
17 | /4wd.17.6783.pcd
18 | /tree.9.17038.pcd
19 | /pedestrian.123.6123.pcd
20 | /pedestrian.19.5463.pcd
21 | /building.4.16217.pcd
22 | /van.5.25322.pcd
23 | /bus.10.4548.pcd
24 | /pole.18.270.pcd
25 | /pedestrian.30.6994.pcd
26 | /traffic_lights.42.20631.pcd
27 | /tree.4.17038.pcd
28 | /van.2.16217.pcd
29 | /pedestrian.9.6994.pcd
30 | /bus.13.6783.pcd
31 | /trunk.47.20631.pcd
32 | /car.54.23124.pcd
33 | /trunk.8.25322.pcd
34 | /pedestrian.8.5463.pcd
35 | /car.60.25322.pcd
36 | /ute.6.16217.pcd
37 | /ute.14.20631.pcd
38 | /pillar.6.5100.pcd
39 | /traffic_lights.19.10974.pcd
40 | /pedestrian.7.5463.pcd
41 | /traffic_sign.8.16217.pcd
42 | /bus.9.3725.pcd
43 | /pedestrian.132.7288.pcd
44 | /pedestrian.4.5463.pcd
45 | /traffic_sign.11.17038.pcd
46 | /pedestrian.23.6994.pcd
47 | /trunk.4.25322.pcd
48 | /bus.1.17038.pcd
49 | /4wd.9.6994.pcd
50 | /pedestrian.25.6994.pcd
51 | /pedestrian.129.7288.pcd
52 | /ute.0.25322.pcd
53 | /pedestrian.28.6994.pcd
54 | /pillar.4.5100.pcd
55 | /car.43.17589.pcd
56 | /car.56.23124.pcd
57 | /trunk.21.16217.pcd
58 | /traffic_sign.6.16217.pcd
59 | /car.76.20631.pcd
60 | /car.41.17589.pcd
61 | /van.7.25322.pcd
62 | /building.5.16217.pcd
63 | /pedestrian.124.6783.pcd
64 | /traffic_lights.45.10974.pcd
65 | /pole.16.2446.pcd
66 | /traffic_lights.46.10974.pcd
67 | /traffic_sign.9.17038.pcd
68 | /pedestrian.24.6994.pcd
69 | /car.53.23124.pcd
70 | /pedestrian.126.7288.pcd
71 | /tree.11.17589.pcd
72 | /pole.15.2299.pcd
73 | /truck.0.11290.pcd
74 | /pillar.8.5229.pcd
75 | /bus.0.17038.pcd
76 | /ute.15.12715.pcd
77 | /car.51.23124.pcd
78 | /traffic_sign.16.25322.pcd
79 | /pedestrian.127.7288.pcd
80 | /building.7.17589.pcd
81 | /pedestrian.1.5463.pcd
82 | /car.75.20631.pcd
83 | /pedestrian.134.7288.pcd
84 | /car.74.20631.pcd
85 | /car.47.17589.pcd
86 | /pedestrian.135.7288.pcd
87 | /traffic_lights.37.9824.pcd
88 | /traffic_sign.7.16217.pcd
89 | /pedestrian.29.6994.pcd
90 | /car.55.23124.pcd
91 | /pedestrian.120.6123.pcd
92 | /pedestrian.0.5463.pcd
93 | /pedestrian.21.5463.pcd
94 | /trunk.7.25322.pcd
95 | /traffic_sign.10.17038.pcd
96 | /tree.13.23124.pcd
97 | /pole.17.2738.pcd
98 | /car.61.25322.pcd
99 | /trunk.20.16217.pcd
100 | /pedestrian.5.5463.pcd
101 | /car.42.17589.pcd
102 | /pedestrian.6.5463.pcd
103 | /tree.8.17038.pcd
104 | /pedestrian.12.6994.pcd
105 | /van.33.12346.pcd
106 | /traffic_lights.41.20631.pcd
107 | /4wd.15.5563.pcd
108 | /pole.4.2446.pcd
109 | /pedestrian.128.7288.pcd
110 | /trunk.5.25322.pcd
111 | /truck.1.11290.pcd
112 | /car.48.17589.pcd
113 | /traffic_lights.44.10974.pcd
114 | /van.3.17038.pcd
115 | /van.6.25322.pcd
116 | /traffic_sign.15.25322.pcd
117 | /van.4.17589.pcd
118 | /traffic_sign.43.20631.pcd
119 | /tree.7.17038.pcd
120 | /car.52.23124.pcd
121 | /pedestrian.22.5463.pcd
122 | /pedestrian.18.5463.pcd
123 | /pedestrian.13.6994.pcd
124 | /car.58.23124.pcd
125 | /car.45.17589.pcd
126 | /trunk.6.25322.pcd
127 | /pedestrian.125.7288.pcd
128 | /pedestrian.130.7288.pcd
129 | /car.59.23124.pcd
130 | /pedestrian.27.6994.pcd
131 | /building.6.16217.pcd
132 | /pillar.5.5100.pcd
133 | /trunk.2.23124.pcd
134 | /4wd.18.7288.pcd
135 | /pedestrian.11.6994.pcd
136 | /pedestrian.2.5463.pcd
137 | /car.49.17589.pcd
138 | /pedestrian.122.6123.pcd
139 | /trunk.0.17589.pcd
140 | /car.57.23124.pcd
141 | /pedestrian.121.6123.pcd
142 | /traffic_lights.39.9824.pcd
143 | /pedestrian.131.7288.pcd
144 | /trunk.3.23124.pcd
145 | /traffic_lights.40.9824.pcd
146 | /car.44.17589.pcd
147 | /4wd.11.6994.pcd
148 | /building.9.2299.pcd
149 | /trunk.1.17589.pcd
150 | /pedestrian.3.5463.pcd
151 | /traffic_lights.38.9824.pcd
152 | /tree.28.20631.pcd
153 | /traffic_sign.14.17589.pcd
154 | /pedestrian.15.6994.pcd
155 | /pedestrian.48.7041.pcd
156 |
--------------------------------------------------------------------------------
/preprocessing/sydneyfoldn0.csv:
--------------------------------------------------------------------------------
1 | /pedestrian.87.4093.pcd
2 | /van.0.6994.pcd
3 | /traffic_lights.25.7288.pcd
4 | /pole.6.6994.pcd
5 | /car.79.11204.pcd
6 | /pedestrian.96.4868.pcd
7 | /pedestrian.67.3582.pcd
8 | /pillar.16.8444.pcd
9 | /pedestrian.140.8254.pcd
10 | /pillar.4.5100.pcd
11 | /pillar.5.5100.pcd
12 | /tree.13.23124.pcd
13 | /building.18.7288.pcd
14 | /traffic_sign.1.5463.pcd
15 | /building.17.5229.pcd
16 | /trunk.7.25322.pcd
17 | /pedestrian.82.4093.pcd
18 | /car.40.17589.pcd
19 | /trunk.32.5229.pcd
20 | /pillar.15.8444.pcd
21 | /4wd.11.6994.pcd
22 | /pedestrian.92.4868.pcd
23 | /pedestrian.141.8254.pcd
24 | /pedestrian.136.8254.pcd
25 | /tree.14.10974.pcd
26 | /truck.11.8444.pcd
27 | /pedestrian.77.3725.pcd
28 | /car.57.23124.pcd
29 | /traffic_lights.41.20631.pcd
30 | /tree.11.17589.pcd
31 | /traffic_sign.6.16217.pcd
32 | /pedestrian.139.8254.pcd
33 | /trunk.30.5229.pcd
34 | /trunk.42.9824.pcd
35 | /car.46.8444.pcd
36 | /pedestrian.148.8444.pcd
37 | /traffic_sign.42.20631.pcd
38 | /pole.0.5100.pcd
39 | /tree.28.20631.pcd
40 | /van.5.25322.pcd
41 | /pole.15.2299.pcd
42 | /trunk.29.5100.pcd
43 | /tree.12.23124.pcd
44 | /car.12.16217.pcd
45 | /pedestrian.44.23124.pcd
46 | /car.10.6994.pcd
47 | /pedestrian.5.5463.pcd
48 | /car.27.8254.pcd
49 | /pillar.12.8254.pcd
50 | /trunk.38.8444.pcd
51 | /pedestrian.6.5463.pcd
52 | /traffic_lights.39.9824.pcd
53 | /pillar.6.5100.pcd
54 | /car.15.16217.pcd
55 | /pedestrian.149.8444.pcd
56 | /pedestrian.131.7288.pcd
57 | /pedestrian.13.6994.pcd
58 | /pedestrian.112.5100.pcd
59 | /van.9.11886.pcd
60 | /pole.5.7288.pcd
61 | /pedestrian.20.5463.pcd
62 | /car.18.7288.pcd
63 | /pedestrian.99.4868.pcd
64 | /pedestrian.85.4093.pcd
65 | /traffic_lights.23.7288.pcd
66 | /traffic_sign.25.2738.pcd
67 | /traffic_lights.27.7288.pcd
68 | /trunk.40.8444.pcd
69 | /pedestrian.0.5463.pcd
70 | /pedestrian.24.6994.pcd
71 | /pole.19.5229.pcd
72 | /car.3.5463.pcd
73 | /trunk.53.12715.pcd
74 | /ute.3.3582.pcd
75 | /pedestrian.23.6994.pcd
76 | /trunk.47.20631.pcd
77 | /car.14.16217.pcd
78 | /pedestrian.22.5463.pcd
79 | /trunk.50.12346.pcd
80 | /van.31.8444.pcd
81 | /pedestrian.7.5463.pcd
82 | /car.31.5463.pcd
83 | /traffic_sign.51.12715.pcd
84 | /car.1.5463.pcd
85 | /building.6.16217.pcd
86 | /tree.31.12346.pcd
87 | /car.28.8254.pcd
88 | /car.61.25322.pcd
89 | /van.33.12346.pcd
90 | /traffic_lights.24.7288.pcd
91 | /tree.7.17038.pcd
92 | /tree.6.17038.pcd
93 | /ute.11.8254.pcd
94 | /building.14.3582.pcd
95 | /car.44.17589.pcd
96 | /traffic_lights.36.8254.pcd
97 | /4wd.12.3582.pcd
98 | /car.76.20631.pcd
99 | /pedestrian.108.5100.pcd
100 | /van.6.25322.pcd
101 | /car.73.9824.pcd
102 | /truck.8.5563.pcd
103 | /traffic_sign.2.5463.pcd
104 | /car.59.23124.pcd
105 | /tree.8.17038.pcd
106 | /traffic_lights.38.9824.pcd
107 | /traffic_sign.48.12346.pcd
108 | /traffic_sign.3.8254.pcd
109 | /pedestrian.40.23124.pcd
110 | /pedestrian.114.5100.pcd
111 | /traffic_sign.24.2738.pcd
112 | /traffic_sign.16.25322.pcd
113 | /car.48.17589.pcd
114 | /traffic_lights.31.8254.pcd
115 | /pedestrian.15.6994.pcd
116 | /pedestrian.132.7288.pcd
117 | /pole.18.270.pcd
118 | /pedestrian.11.6994.pcd
119 | /van.25.7288.pcd
120 | /tree.29.10974.pcd
121 | /traffic_sign.9.17038.pcd
122 | /pedestrian.39.23124.pcd
123 | /tree.4.17038.pcd
124 | /traffic_lights.32.8254.pcd
125 | /pedestrian.8.5463.pcd
126 | /car.38.8254.pcd
127 | /car.11.6123.pcd
128 | /car.21.16217.pcd
129 | /pedestrian.93.4868.pcd
130 | /ute.9.5100.pcd
131 | /4wd.17.6783.pcd
132 | /4wd.4.17038.pcd
133 | /pole.2.5100.pcd
134 | /bus.5.2299.pcd
135 | /car.42.17589.pcd
136 | /traffic_lights.46.10974.pcd
137 | /pedestrian.43.23124.pcd
138 | /trunk.28.5100.pcd
139 | /trunk.6.25322.pcd
140 | /4wd.10.17589.pcd
141 | /building.16.5229.pcd
142 | /building.12.2738.pcd
143 | /van.28.8254.pcd
144 | /pedestrian.119.5229.pcd
145 | /trunk.37.8444.pcd
146 | /traffic_sign.26.3582.pcd
147 | /car.5.5563.pcd
148 | /car.54.23124.pcd
149 | /car.2.5463.pcd
150 | /bus.1.17038.pcd
151 | /van.29.8444.pcd
152 | /pedestrian.29.6994.pcd
153 | /pedestrian.74.3725.pcd
154 | /bus.0.17038.pcd
155 | /tree.15.10974.pcd
156 | /pedestrian.78.3725.pcd
157 | /building.3.16217.pcd
158 | /4wd.20.12346.pcd
159 | /car.37.6994.pcd
160 | /pillar.14.8444.pcd
161 | /pedestrian.134.7288.pcd
162 | /trunk.41.9824.pcd
163 | /4wd.9.6994.pcd
164 | /pole.1.16217.pcd
165 | /4wd.8.17038.pcd
166 | /ute.6.16217.pcd
167 | /car.55.23124.pcd
168 | /traffic_lights.16.6994.pcd
169 | /traffic_sign.7.16217.pcd
170 | /pedestrian.75.3725.pcd
171 | /pedestrian.150.8444.pcd
172 | /car.64.8444.pcd
173 | /pedestrian.125.7288.pcd
174 | /van.3.17038.pcd
175 | /pillar.17.8444.pcd
176 | /truck.1.11290.pcd
177 | /traffic_sign.11.17038.pcd
178 | /pedestrian.107.5100.pcd
179 | /pedestrian.12.6994.pcd
180 | /trunk.4.25322.pcd
181 | /car.7.6994.pcd
182 | /car.53.23124.pcd
183 | /pedestrian.90.4868.pcd
184 | /van.30.8444.pcd
185 | /tree.26.8444.pcd
186 | /car.17.16217.pcd
187 | /pedestrian.69.3582.pcd
188 | /car.35.6994.pcd
189 | /traffic_lights.35.8254.pcd
190 | /pedestrian.86.4093.pcd
191 | /traffic_sign.50.12715.pcd
192 | /pedestrian.129.7288.pcd
193 | /4wd.3.4043.pcd
194 | /building.7.17589.pcd
195 | /trunk.33.5229.pcd
196 | /4wd.14.5229.pcd
197 | /van.4.17589.pcd
198 | /car.72.9824.pcd
199 | /car.13.16217.pcd
200 | /ute.5.4294.pcd
201 | /pedestrian.84.4093.pcd
202 | /trunk.0.17589.pcd
203 | /4wd.2.3582.pcd
204 | /traffic_lights.30.8254.pcd
205 | /car.20.16217.pcd
206 | /tree.27.9824.pcd
207 | /traffic_sign.39.5229.pcd
208 | /trunk.44.9824.pcd
209 | /trunk.11.11886.pcd
210 | /pedestrian.111.5100.pcd
211 | /car.36.6994.pcd
212 | /traffic_lights.22.7288.pcd
213 | /pedestrian.98.4868.pcd
214 | /pedestrian.91.4868.pcd
215 | /pedestrian.88.4093.pcd
216 | /trunk.46.20631.pcd
217 | /traffic_lights.45.10974.pcd
218 | /traffic_lights.43.20631.pcd
219 | /pedestrian.83.4093.pcd
220 | /pedestrian.76.3725.pcd
221 | /traffic_lights.10.3582.pcd
222 | /building.4.16217.pcd
223 | /pedestrian.121.6123.pcd
224 | /tree.9.17038.pcd
225 | /traffic_lights.26.7288.pcd
226 | /pedestrian.79.3983.pcd
227 | /pedestrian.95.4868.pcd
228 | /pedestrian.70.3582.pcd
229 | /pedestrian.68.3582.pcd
230 | /pole.9.17589.pcd
231 | /truck.10.7288.pcd
232 | /4wd.5.17038.pcd
233 | /pole.4.2446.pcd
234 | /traffic_sign.15.25322.pcd
235 | /trunk.43.9824.pcd
236 | /pedestrian.3.5463.pcd
237 | /trunk.3.23124.pcd
238 | /car.75.20631.pcd
239 | /ute.13.9824.pcd
240 | /van.20.5229.pcd
241 | /bus.6.2299.pcd
242 | /traffic_sign.40.8254.pcd
243 | /car.32.5463.pcd
244 | /bus.4.2446.pcd
245 | /truck.6.5100.pcd
246 | /pedestrian.4.5463.pcd
247 | /traffic_lights.14.6994.pcd
248 | /building.15.270.pcd
249 | /pedestrian.116.5229.pcd
250 | /traffic_lights.17.5463.pcd
251 | /bus.10.4548.pcd
252 | /ute.15.12715.pcd
253 | /pole.16.2446.pcd
254 | /ute.4.4249.pcd
255 | /tree.32.12715.pcd
256 | /building.5.16217.pcd
257 | /car.58.23124.pcd
258 | /van.27.8254.pcd
259 | /pedestrian.48.7041.pcd
260 | /van.24.6123.pcd
261 | /van.26.7288.pcd
262 | /van.32.11204.pcd
263 | /building.19.11204.pcd
264 | /car.41.17589.pcd
265 | /pole.17.2738.pcd
266 | /ute.0.25322.pcd
267 | /pole.3.17038.pcd
268 | /traffic_lights.13.4868.pcd
269 | /pedestrian.64.3582.pcd
270 | /pedestrian.19.5463.pcd
271 | /traffic_sign.5.8254.pcd
272 | /car.6.6994.pcd
273 | /trunk.31.5229.pcd
274 | /tree.3.16217.pcd
275 | /trunk.39.8444.pcd
276 | /car.4.6994.pcd
277 | /pedestrian.133.7288.pcd
278 | /pedestrian.110.5100.pcd
279 | /tree.0.16217.pcd
280 | /pole.7.17589.pcd
281 | /truck.2.11290.pcd
282 | /traffic_lights.9.3582.pcd
283 | /bus.13.6783.pcd
284 | /traffic_sign.43.20631.pcd
285 | /pedestrian.137.8254.pcd
286 | /traffic_lights.21.7288.pcd
287 | /traffic_sign.44.10974.pcd
288 | /car.8.6994.pcd
289 | /pedestrian.138.8254.pcd
290 | /car.9.6994.pcd
291 | /pedestrian.118.5229.pcd
292 | /pedestrian.28.6994.pcd
293 | /pedestrian.143.8444.pcd
294 | /trunk.49.12346.pcd
295 | /traffic_sign.8.16217.pcd
296 | /car.19.16217.pcd
297 | /bus.8.2738.pcd
298 | /trunk.51.12346.pcd
299 | /pedestrian.117.5229.pcd
300 | /traffic_sign.35.5100.pcd
301 | /traffic_sign.13.8254.pcd
302 | /traffic_lights.15.6994.pcd
303 | /pedestrian.146.8444.pcd
304 | /pedestrian.9.6994.pcd
305 | /pillar.8.5229.pcd
306 | /traffic_sign.47.12346.pcd
307 | /building.13.3582.pcd
308 | /pedestrian.66.3582.pcd
309 | /van.2.16217.pcd
310 | /traffic_sign.37.5100.pcd
311 | /building.2.16217.pcd
312 | /trunk.52.12346.pcd
313 | /pedestrian.89.4093.pcd
314 | /traffic_lights.44.10974.pcd
315 | /pedestrian.97.4868.pcd
316 | /traffic_sign.49.12715.pcd
317 | /trunk.35.8254.pcd
318 | /pedestrian.145.8444.pcd
319 | /pole.8.17589.pcd
320 | /tree.2.16217.pcd
321 | /trunk.21.16217.pcd
322 | /trunk.9.11290.pcd
323 | /car.33.8254.pcd
324 | /trunk.1.17589.pcd
325 | /traffic_lights.12.4868.pcd
326 | /pillar.9.8254.pcd
327 | /pillar.7.5229.pcd
328 | /car.49.17589.pcd
329 | /bus.9.3725.pcd
330 | /car.0.5463.pcd
331 | /pillar.13.8444.pcd
332 | /traffic_sign.18.11290.pcd
333 | /van.22.5229.pcd
334 | /van.17.6994.pcd
335 | /traffic_sign.10.17038.pcd
336 | /pedestrian.2.5463.pcd
337 | /pedestrian.126.7288.pcd
338 | /pedestrian.81.4093.pcd
339 | /traffic_sign.4.8254.pcd
340 | /car.78.10974.pcd
341 | /pedestrian.25.6994.pcd
342 | /car.51.23124.pcd
343 | /pedestrian.1.5463.pcd
344 | /ute.10.5229.pcd
345 | /traffic_lights.28.7288.pcd
346 | /traffic_lights.40.9824.pcd
347 | /trunk.48.11204.pcd
348 | /pedestrian.135.7288.pcd
349 | /car.45.17589.pcd
350 | /4wd.16.6123.pcd
351 | /car.52.23124.pcd
352 | /pedestrian.30.6994.pcd
353 | /traffic_lights.11.4093.pcd
354 | /traffic_sign.14.17589.pcd
355 | /traffic_sign.17.8444.pcd
356 | /pedestrian.120.6123.pcd
357 | /van.18.5100.pcd
358 | /car.16.7288.pcd
359 | /car.60.25322.pcd
360 | /traffic_sign.38.5229.pcd
361 | /pedestrian.128.7288.pcd
362 | /trunk.5.25322.pcd
363 | /pedestrian.71.3582.pcd
364 | /car.39.16217.pcd
365 | /trunk.8.25322.pcd
366 | /pedestrian.130.7288.pcd
367 | /pillar.10.8254.pcd
368 | /bus.14.7288.pcd
369 | /pedestrian.27.6994.pcd
370 | /ute.14.20631.pcd
371 | /tree.10.16217.pcd
372 | /pedestrian.18.5463.pcd
373 | /van.7.25322.pcd
374 | /trunk.36.8444.pcd
375 | /4wd.19.10974.pcd
376 | /pedestrian.73.3725.pcd
377 | /traffic_lights.42.20631.pcd
378 | /4wd.15.5563.pcd
379 | /traffic_lights.34.8254.pcd
380 | /car.50.17589.pcd
381 | /car.74.20631.pcd
382 | /tree.25.8254.pcd
383 | /pedestrian.144.8444.pcd
384 | /tree.16.11290.pcd
385 | /tree.33.12715.pcd
386 | /pedestrian.113.5100.pcd
387 | /pedestrian.80.4093.pcd
388 | /tree.5.17038.pcd
389 | /building.9.2299.pcd
390 | /truck.7.5100.pcd
391 | /pedestrian.26.6994.pcd
392 | /van.21.5229.pcd
393 | /pedestrian.109.5100.pcd
394 | /pedestrian.21.5463.pcd
395 | /traffic_lights.33.8254.pcd
396 | /van.23.5229.pcd
397 | /van.8.12119.pcd
398 | /traffic_lights.18.5463.pcd
399 | /pedestrian.124.6783.pcd
400 | /truck.9.6783.pcd
401 | /pedestrian.14.6994.pcd
402 | /traffic_sign.0.5463.pcd
403 | /4wd.18.7288.pcd
404 | /traffic_lights.29.8254.pcd
405 | /car.34.6994.pcd
406 | /pedestrian.72.3725.pcd
407 | /traffic_sign.41.9824.pcd
408 | /pedestrian.123.6123.pcd
409 | /trunk.54.12715.pcd
410 | /pedestrian.65.3582.pcd
411 | /traffic_sign.46.12346.pcd
412 | /traffic_sign.36.5100.pcd
413 | /car.43.17589.pcd
414 | /pedestrian.147.8444.pcd
415 | /pillar.11.8254.pcd
416 | /car.24.8254.pcd
417 | /traffic_lights.19.10974.pcd
418 | /pedestrian.41.23124.pcd
419 | /traffic_sign.12.8254.pcd
420 | /van.1.6994.pcd
421 | /ute.12.8444.pcd
422 | /pedestrian.94.4868.pcd
423 | /trunk.27.5100.pcd
424 | /trunk.45.9824.pcd
425 | /traffic_lights.37.9824.pcd
426 | /pedestrian.142.8254.pcd
427 | /traffic_sign.34.5100.pcd
428 | /car.77.10974.pcd
429 | /car.56.23124.pcd
430 | /tree.30.11204.pcd
431 | /trunk.20.16217.pcd
432 | /pedestrian.42.23124.pcd
433 | /trunk.2.23124.pcd
434 | /trunk.10.11886.pcd
435 | /tree.1.16217.pcd
436 | /truck.0.11290.pcd
437 | /traffic_sign.45.11204.pcd
438 | /pedestrian.122.6123.pcd
439 | /bus.2.6994.pcd
440 | /pedestrian.115.5229.pcd
441 | /pedestrian.127.7288.pcd
442 | /car.47.17589.pcd
443 |
--------------------------------------------------------------------------------
/preprocessing/sydneyfoldn1.csv:
--------------------------------------------------------------------------------
1 | /trunk.10.11886.pcd
2 | /trunk.41.9824.pcd
3 | /traffic_sign.16.25322.pcd
4 | /pedestrian.138.8254.pcd
5 | /trunk.47.20631.pcd
6 | /pedestrian.28.6994.pcd
7 | /traffic_lights.6.2446.pcd
8 | /pedestrian.61.2446.pcd
9 | /traffic_sign.49.12715.pcd
10 | /ute.0.25322.pcd
11 | /4wd.17.6783.pcd
12 | /pole.13.25322.pcd
13 | /traffic_lights.44.10974.pcd
14 | /car.47.17589.pcd
15 | /building.4.16217.pcd
16 | /pedestrian.32.17589.pcd
17 | /building.19.11204.pcd
18 | /traffic_lights.41.20631.pcd
19 | /trunk.5.25322.pcd
20 | /car.42.17589.pcd
21 | /van.9.11886.pcd
22 | /tree.1.16217.pcd
23 | /van.5.25322.pcd
24 | /car.87.12715.pcd
25 | /traffic_lights.29.8254.pcd
26 | /pedestrian.44.23124.pcd
27 | /van.10.2738.pcd
28 | /car.27.8254.pcd
29 | /pillar.12.8254.pcd
30 | /traffic_sign.27.270.pcd
31 | /building.9.2299.pcd
32 | /trunk.54.12715.pcd
33 | /car.79.11204.pcd
34 | /van.31.8444.pcd
35 | /car.84.12715.pcd
36 | /pedestrian.62.2446.pcd
37 | /4wd.1.2446.pcd
38 | /tree.5.17038.pcd
39 | /traffic_lights.42.20631.pcd
40 | /pedestrian.148.8444.pcd
41 | /trunk.45.9824.pcd
42 | /pedestrian.14.6994.pcd
43 | /pedestrian.25.6994.pcd
44 | /car.54.23124.pcd
45 | /car.81.12346.pcd
46 | /building.2.16217.pcd
47 | /pedestrian.103.270.pcd
48 | /pedestrian.149.8444.pcd
49 | /trunk.18.2446.pcd
50 | /trunk.22.5463.pcd
51 | /tree.3.16217.pcd
52 | /car.19.16217.pcd
53 | /traffic_sign.29.270.pcd
54 | /car.58.23124.pcd
55 | /pedestrian.38.17589.pcd
56 | /car.38.8254.pcd
57 | /4wd.6.16217.pcd
58 | /pedestrian.13.6994.pcd
59 | /pedestrian.122.6123.pcd
60 | /van.2.16217.pcd
61 | /pole.10.23124.pcd
62 | /pedestrian.11.6994.pcd
63 | /bus.9.3725.pcd
64 | /pedestrian.35.17589.pcd
65 | /van.12.3725.pcd
66 | /tree.23.5100.pcd
67 | /trunk.8.25322.pcd
68 | /car.49.17589.pcd
69 | /truck.10.7288.pcd
70 | /building.7.17589.pcd
71 | /traffic_lights.1.2299.pcd
72 | /pedestrian.131.7288.pcd
73 | /pedestrian.6.5463.pcd
74 | /car.13.16217.pcd
75 | /pedestrian.119.5229.pcd
76 | /truck.8.5563.pcd
77 | /pedestrian.55.2299.pcd
78 | /pedestrian.33.17589.pcd
79 | /truck.4.2446.pcd
80 | /trunk.34.7288.pcd
81 | /pole.14.8444.pcd
82 | /car.48.17589.pcd
83 | /pillar.19.10974.pcd
84 | /car.67.270.pcd
85 | /trunk.4.25322.pcd
86 | /van.28.8254.pcd
87 | /tree.19.3582.pcd
88 | /pedestrian.101.270.pcd
89 | /van.29.8444.pcd
90 | /trunk.7.25322.pcd
91 | /traffic_sign.14.17589.pcd
92 | /traffic_sign.7.16217.pcd
93 | /van.15.4043.pcd
94 | /pillar.18.10974.pcd
95 | /pillar.10.8254.pcd
96 | /traffic_sign.51.12715.pcd
97 | /pedestrian.48.7041.pcd
98 | /pillar.2.3582.pcd
99 | /pedestrian.52.0.pcd
100 | /pole.20.10974.pcd
101 | /van.30.8444.pcd
102 | /pedestrian.34.17589.pcd
103 | /building.3.16217.pcd
104 | /tree.33.12715.pcd
105 | /pedestrian.130.7288.pcd
106 | /pedestrian.20.5463.pcd
107 | /pedestrian.26.6994.pcd
108 | /ute.6.16217.pcd
109 | /trunk.46.20631.pcd
110 | /pedestrian.5.5463.pcd
111 | /traffic_lights.3.2299.pcd
112 | /4wd.15.5563.pcd
113 | /car.41.17589.pcd
114 | /pedestrian.16.16217.pcd
115 | /traffic_lights.37.9824.pcd
116 | /car.60.25322.pcd
117 | /pole.17.2738.pcd
118 | /pedestrian.49.0.pcd
119 | /pole.4.2446.pcd
120 | /4wd.11.6994.pcd
121 | /trunk.11.11886.pcd
122 | /trunk.48.11204.pcd
123 | /tree.24.7288.pcd
124 | /car.23.17038.pcd
125 | /truck.5.270.pcd
126 | /van.3.17038.pcd
127 | /car.61.25322.pcd
128 | /pedestrian.22.5463.pcd
129 | /traffic_lights.39.9824.pcd
130 | /car.33.8254.pcd
131 | /bus.0.17038.pcd
132 | /traffic_lights.4.2446.pcd
133 | /pole.18.270.pcd
134 | /bus.12.270.pcd
135 | /car.22.17038.pcd
136 | /pole.1.16217.pcd
137 | /van.32.11204.pcd
138 | /pedestrian.134.7288.pcd
139 | /van.19.5100.pcd
140 | /pedestrian.39.23124.pcd
141 | /traffic_sign.50.12715.pcd
142 | /pedestrian.150.8444.pcd
143 | /trunk.25.270.pcd
144 | /car.75.20631.pcd
145 | /building.0.16217.pcd
146 | /traffic_lights.32.8254.pcd
147 | /car.25.17038.pcd
148 | /pedestrian.106.270.pcd
149 | /tree.7.17038.pcd
150 | /pedestrian.128.7288.pcd
151 | /4wd.14.5229.pcd
152 | /bus.1.17038.pcd
153 | /pedestrian.63.2446.pcd
154 | /tree.17.2299.pcd
155 | /car.46.8444.pcd
156 | /tree.13.23124.pcd
157 | /pedestrian.23.6994.pcd
158 | /trunk.50.12346.pcd
159 | /4wd.7.16217.pcd
160 | /van.4.17589.pcd
161 | /pillar.7.5229.pcd
162 | /pedestrian.15.6994.pcd
163 | /pedestrian.12.6994.pcd
164 | /pedestrian.135.7288.pcd
165 | /tree.2.16217.pcd
166 | /pedestrian.137.8254.pcd
167 | /pedestrian.24.6994.pcd
168 | /pedestrian.54.0.pcd
169 | /trunk.14.2299.pcd
170 | /car.66.4043.pcd
171 | /ute.14.20631.pcd
172 | /pedestrian.46.25322.pcd
173 | /car.30.17038.pcd
174 | /ute.13.9824.pcd
175 | /traffic_lights.2.2299.pcd
176 | /pedestrian.30.6994.pcd
177 | /pedestrian.108.5100.pcd
178 | /building.1.16217.pcd
179 | /tree.10.16217.pcd
180 | /car.51.23124.pcd
181 | /car.69.5100.pcd
182 | /trunk.24.270.pcd
183 | /car.24.8254.pcd
184 | /traffic_sign.10.17038.pcd
185 | /ute.9.5100.pcd
186 | /pedestrian.41.23124.pcd
187 | /pole.2.5100.pcd
188 | /pillar.4.5100.pcd
189 | /tree.11.17589.pcd
190 | /pedestrian.102.270.pcd
191 | /van.6.25322.pcd
192 | /trunk.2.23124.pcd
193 | /car.57.23124.pcd
194 | /traffic_lights.0.2299.pcd
195 | /truck.0.11290.pcd
196 | /car.20.16217.pcd
197 | /trunk.13.0.pcd
198 | /pedestrian.104.270.pcd
199 | /pedestrian.141.8254.pcd
200 | /car.29.17038.pcd
201 | /pedestrian.4.5463.pcd
202 | /tree.0.16217.pcd
203 | /4wd.16.6123.pcd
204 | /car.28.8254.pcd
205 | /traffic_lights.43.20631.pcd
206 | /pedestrian.127.7288.pcd
207 | /traffic_sign.23.2446.pcd
208 | /4wd.9.6994.pcd
209 | /pillar.11.8254.pcd
210 | /building.5.16217.pcd
211 | /pedestrian.132.7288.pcd
212 | /pedestrian.17.17038.pcd
213 | /pedestrian.105.270.pcd
214 | /pedestrian.116.5229.pcd
215 | /tree.4.17038.pcd
216 | /van.16.4093.pcd
217 | /car.39.16217.pcd
218 | /4wd.10.17589.pcd
219 | /pedestrian.107.5100.pcd
220 | /car.62.2299.pcd
221 | /trunk.23.5463.pcd
222 | /pedestrian.142.8254.pcd
223 | /pedestrian.58.2299.pcd
224 | /trunk.6.25322.pcd
225 | /pedestrian.29.6994.pcd
226 | /pillar.5.5100.pcd
227 | /pedestrian.125.7288.pcd
228 | /bus.2.6994.pcd
229 | /pedestrian.100.270.pcd
230 | /traffic_lights.7.2446.pcd
231 | /pedestrian.3.5463.pcd
232 | /traffic_lights.45.10974.pcd
233 | /ute.7.270.pcd
234 | /van.8.12119.pcd
235 | /traffic_sign.43.20631.pcd
236 | /car.68.270.pcd
237 | /trunk.17.2446.pcd
238 | /traffic_lights.20.0.pcd
239 | /bus.8.2738.pcd
240 | /pedestrian.43.23124.pcd
241 | /car.86.12715.pcd
242 | /bus.10.4548.pcd
243 | /traffic_sign.21.2299.pcd
244 | /ute.15.12715.pcd
245 | /traffic_lights.46.10974.pcd
246 | /traffic_sign.15.25322.pcd
247 | /building.18.7288.pcd
248 | /trunk.26.270.pcd
249 | /pedestrian.124.6783.pcd
250 | /pedestrian.140.8254.pcd
251 | /pedestrian.118.5229.pcd
252 | /building.8.2299.pcd
253 | /traffic_sign.18.11290.pcd
254 | /traffic_lights.33.8254.pcd
255 | /traffic_lights.38.9824.pcd
256 | /car.72.9824.pcd
257 | /tree.12.23124.pcd
258 | /pillar.1.25322.pcd
259 | /tree.6.17038.pcd
260 | /bus.3.23124.pcd
261 | /traffic_lights.35.8254.pcd
262 | /car.83.12346.pcd
263 | /pedestrian.47.25322.pcd
264 | /traffic_sign.28.270.pcd
265 | /car.45.17589.pcd
266 | /pedestrian.31.17589.pcd
267 | /car.71.5229.pcd
268 | /trunk.0.17589.pcd
269 | /car.43.17589.pcd
270 | /pedestrian.8.5463.pcd
271 | /pedestrian.126.7288.pcd
272 | /ute.1.0.pcd
273 | /car.76.20631.pcd
274 | /pedestrian.147.8444.pcd
275 | /pedestrian.36.17589.pcd
276 | /car.59.23124.pcd
277 | /traffic_sign.48.12346.pcd
278 | /tree.8.17038.pcd
279 | /traffic_lights.31.8254.pcd
280 | /car.50.17589.pcd
281 | /trunk.21.16217.pcd
282 | /truck.3.0.pcd
283 | /pedestrian.145.8444.pcd
284 | /traffic_sign.17.8444.pcd
285 | /pole.15.2299.pcd
286 | /pedestrian.117.5229.pcd
287 | /pedestrian.143.8444.pcd
288 | /trunk.53.12715.pcd
289 | /trunk.1.17589.pcd
290 | /ute.10.5229.pcd
291 | /pole.12.25322.pcd
292 | /traffic_lights.34.8254.pcd
293 | /ute.8.270.pcd
294 | /tree.28.20631.pcd
295 | /building.17.5229.pcd
296 | /pedestrian.42.23124.pcd
297 | /car.85.12715.pcd
298 | /trunk.43.9824.pcd
299 | /car.26.17038.pcd
300 | /van.27.8254.pcd
301 | /pole.19.5229.pcd
302 | /pedestrian.144.8444.pcd
303 | /pillar.6.5100.pcd
304 | /pedestrian.0.5463.pcd
305 | /traffic_sign.32.270.pcd
306 | /car.52.23124.pcd
307 | /4wd.20.12346.pcd
308 | /pillar.8.5229.pcd
309 | /pedestrian.123.6123.pcd
310 | /trunk.9.11290.pcd
311 | /traffic_sign.45.11204.pcd
312 | /bus.11.270.pcd
313 | /trunk.19.2738.pcd
314 | /trunk.15.2446.pcd
315 | /trunk.51.12346.pcd
316 | /truck.9.6783.pcd
317 | /car.63.3582.pcd
318 | /building.6.16217.pcd
319 | /traffic_sign.30.270.pcd
320 | /building.10.2446.pcd
321 | /car.40.17589.pcd
322 | /traffic_sign.11.17038.pcd
323 | /traffic_lights.8.2738.pcd
324 | /car.82.12346.pcd
325 | /pedestrian.112.5100.pcd
326 | /pedestrian.109.5100.pcd
327 | /pole.3.17038.pcd
328 | /tree.32.12715.pcd
329 | /pedestrian.59.2299.pcd
330 | /trunk.20.16217.pcd
331 | /bus.4.23124.pcd
332 | /pedestrian.37.17589.pcd
333 | /pedestrian.110.5100.pcd
334 | /traffic_sign.6.16217.pcd
335 | /pedestrian.60.2299.pcd
336 | /truck.1.11290.pcd
337 | /van.13.3983.pcd
338 | /pedestrian.111.5100.pcd
339 | /bus.14.7288.pcd
340 | /pedestrian.19.5463.pcd
341 | /car.78.10974.pcd
342 | /car.44.17589.pcd
343 | /traffic_sign.42.20631.pcd
344 | /ute.2.2299.pcd
345 | /pedestrian.51.0.pcd
346 | /building.11.2446.pcd
347 | /pedestrian.121.6123.pcd
348 | /van.11.2738.pcd
349 | /pedestrian.151.10974.pcd
350 | /pedestrian.114.5100.pcd
351 | /traffic_lights.5.2446.pcd
352 | /traffic_lights.36.8254.pcd
353 | /pedestrian.139.8254.pcd
354 | /trunk.16.2446.pcd
355 | /bus.7.2299.pcd
356 | /traffic_sign.46.12346.pcd
357 | /trunk.3.23124.pcd
358 | /pillar.3.4868.pcd
359 | /car.73.9824.pcd
360 | /van.7.25322.pcd
361 | /pedestrian.2.5463.pcd
362 | /pedestrian.7.5463.pcd
363 | /pole.11.25322.pcd
364 | /tree.22.270.pcd
365 | /pedestrian.56.2299.pcd
366 | /traffic_lights.30.8254.pcd
367 | /traffic_sign.47.12346.pcd
368 | /trunk.44.9824.pcd
369 | /pedestrian.9.6994.pcd
370 | /pedestrian.129.7288.pcd
371 | /pedestrian.115.5229.pcd
372 | /van.14.3983.pcd
373 | /pedestrian.53.0.pcd
374 | /pedestrian.136.8254.pcd
375 | /pillar.0.16217.pcd
376 | /pole.0.5100.pcd
377 | /traffic_sign.41.9824.pcd
378 | /traffic_sign.19.0.pcd
379 | /4wd.0.2299.pcd
380 | /car.64.8444.pcd
381 | /pedestrian.27.6994.pcd
382 | /traffic_lights.19.10974.pcd
383 | /traffic_sign.31.270.pcd
384 | /trunk.52.12346.pcd
385 | /van.17.4868.pcd
386 | /car.70.5100.pcd
387 | /pedestrian.40.23124.pcd
388 | /4wd.19.10974.pcd
389 | /pedestrian.18.5463.pcd
390 | /traffic_sign.33.270.pcd
391 | /4wd.18.7288.pcd
392 | /truck.2.11290.pcd
393 | /traffic_sign.9.17038.pcd
394 | /car.14.16217.pcd
395 | /van.33.12346.pcd
396 | /car.12.16217.pcd
397 | /pedestrian.21.5463.pcd
398 | /bus.13.6783.pcd
399 | /car.56.23124.pcd
400 | /car.55.23124.pcd
401 | /trunk.12.0.pcd
402 | /tree.21.270.pcd
403 | /trunk.42.9824.pcd
404 | /tree.9.17038.pcd
405 | /tree.31.12346.pcd
406 | /car.74.20631.pcd
407 | /4wd.13.270.pcd
408 | /car.77.10974.pcd
409 | /traffic_sign.44.10974.pcd
410 | /traffic_lights.40.9824.pcd
411 | /car.80.12346.pcd
412 | /tree.18.3582.pcd
413 | /car.21.16217.pcd
414 | /pedestrian.133.7288.pcd
415 | /car.53.23124.pcd
416 | /pedestrian.152.11204.pcd
417 | /car.15.16217.pcd
418 | /pedestrian.146.8444.pcd
419 | /pillar.9.8254.pcd
420 | /pedestrian.50.0.pcd
421 | /ute.12.8444.pcd
422 | /pole.16.2446.pcd
423 | /trunk.49.12346.pcd
424 | /car.17.16217.pcd
425 | /pedestrian.113.5100.pcd
426 | /traffic_sign.22.2299.pcd
427 | /traffic_sign.8.16217.pcd
428 | /pedestrian.45.25322.pcd
429 | /pedestrian.57.2299.pcd
430 | /car.65.3725.pcd
431 | /tree.20.3582.pcd
432 | /pedestrian.1.5463.pcd
433 | /pedestrian.120.6123.pcd
434 |
--------------------------------------------------------------------------------
/preprocessing/sydneyfoldn2.csv:
--------------------------------------------------------------------------------
1 | /trunk.5.25322.pcd
2 | /pedestrian.121.6123.pcd
3 | /trunk.30.5229.pcd
4 | /bus.11.270.pcd
5 | /car.35.6994.pcd
6 | /tree.8.17038.pcd
7 | /building.6.16217.pcd
8 | /traffic_sign.21.2299.pcd
9 | /pole.1.16217.pcd
10 | /pedestrian.86.4093.pcd
11 | /car.1.5463.pcd
12 | /building.11.2446.pcd
13 | /trunk.38.8444.pcd
14 | /van.1.6994.pcd
15 | /truck.3.0.pcd
16 | /traffic_sign.38.5229.pcd
17 | /traffic_sign.19.0.pcd
18 | /4wd.17.6783.pcd
19 | /pedestrian.125.7288.pcd
20 | /bus.9.3725.pcd
21 | /4wd.5.17038.pcd
22 | /car.4.6994.pcd
23 | /pedestrian.87.4093.pcd
24 | /car.66.4043.pcd
25 | /tree.7.17038.pcd
26 | /truck.11.8444.pcd
27 | /trunk.36.8444.pcd
28 | /building.9.2299.pcd
29 | /pillar.6.5100.pcd
30 | /traffic_lights.17.5463.pcd
31 | /van.4.17589.pcd
32 | /pedestrian.131.7288.pcd
33 | /tree.28.20631.pcd
34 | /car.3.5463.pcd
35 | /tree.19.3582.pcd
36 | /pedestrian.128.7288.pcd
37 | /pedestrian.127.7288.pcd
38 | /traffic_sign.6.16217.pcd
39 | /traffic_sign.31.270.pcd
40 | /pedestrian.100.270.pcd
41 | /pedestrian.33.17589.pcd
42 | /car.82.12346.pcd
43 | /car.61.25322.pcd
44 | /trunk.2.23124.pcd
45 | /traffic_sign.4.8254.pcd
46 | /traffic_lights.44.10974.pcd
47 | /truck.6.5100.pcd
48 | /traffic_lights.45.10974.pcd
49 | /pole.5.7288.pcd
50 | /pedestrian.28.6994.pcd
51 | /building.12.2738.pcd
52 | /pedestrian.54.0.pcd
53 | /traffic_lights.12.4868.pcd
54 | /pedestrian.53.0.pcd
55 | /pedestrian.15.6994.pcd
56 | /pillar.15.8444.pcd
57 | /traffic_lights.16.6994.pcd
58 | /pedestrian.37.17589.pcd
59 | /traffic_lights.11.4093.pcd
60 | /car.49.17589.pcd
61 | /trunk.1.17589.pcd
62 | /car.34.6994.pcd
63 | /car.57.23124.pcd
64 | /traffic_sign.25.2738.pcd
65 | /tree.11.17589.pcd
66 | /pole.12.25322.pcd
67 | /4wd.9.6994.pcd
68 | /tree.21.270.pcd
69 | /van.5.25322.pcd
70 | /car.68.270.pcd
71 | /traffic_sign.39.5229.pcd
72 | /bus.12.270.pcd
73 | /pedestrian.95.4868.pcd
74 | /pedestrian.9.6994.pcd
75 | /van.33.12346.pcd
76 | /traffic_sign.27.270.pcd
77 | /pedestrian.70.3582.pcd
78 | /pedestrian.0.5463.pcd
79 | /pedestrian.99.4868.pcd
80 | /ute.15.12715.pcd
81 | /car.71.5229.pcd
82 | /pillar.4.5100.pcd
83 | /pedestrian.14.6994.pcd
84 | /pole.13.25322.pcd
85 | /pedestrian.76.3725.pcd
86 | /traffic_lights.46.10974.pcd
87 | /car.9.6994.pcd
88 | /pedestrian.77.3725.pcd
89 | /pedestrian.135.7288.pcd
90 | /tree.15.10974.pcd
91 | /trunk.18.2446.pcd
92 | /pedestrian.66.3582.pcd
93 | /pedestrian.134.7288.pcd
94 | /van.20.5229.pcd
95 | /pedestrian.52.0.pcd
96 | /pedestrian.49.0.pcd
97 | /trunk.46.20631.pcd
98 | /pillar.8.5229.pcd
99 | /pedestrian.105.270.pcd
100 | /van.0.6994.pcd
101 | /van.16.4093.pcd
102 | /car.83.12346.pcd
103 | /car.60.25322.pcd
104 | /van.18.5100.pcd
105 | /pedestrian.88.4093.pcd
106 | /pedestrian.12.6994.pcd
107 | /van.14.3983.pcd
108 | /traffic_sign.43.20631.pcd
109 | /car.56.23124.pcd
110 | /pedestrian.11.6994.pcd
111 | /pedestrian.17.17038.pcd
112 | /traffic_lights.23.7288.pcd
113 | /car.32.5463.pcd
114 | /pedestrian.23.6994.pcd
115 | /pedestrian.7.5463.pcd
116 | /car.69.5100.pcd
117 | /traffic_lights.13.4868.pcd
118 | /bus.13.6783.pcd
119 | /car.87.12715.pcd
120 | /pole.7.17589.pcd
121 | /pillar.0.16217.pcd
122 | /tree.24.7288.pcd
123 | /traffic_sign.29.270.pcd
124 | /pole.14.8444.pcd
125 | /pedestrian.46.25322.pcd
126 | /pedestrian.64.3582.pcd
127 | /pedestrian.30.6994.pcd
128 | /trunk.21.16217.pcd
129 | /building.13.3582.pcd
130 | /ute.7.270.pcd
131 | /building.1.16217.pcd
132 | /car.80.12346.pcd
133 | /trunk.20.16217.pcd
134 | /pedestrian.96.4868.pcd
135 | /traffic_lights.18.5463.pcd
136 | /pedestrian.20.5463.pcd
137 | /car.70.5100.pcd
138 | /car.6.6994.pcd
139 | /car.76.20631.pcd
140 | /pedestrian.120.6123.pcd
141 | /traffic_sign.34.5100.pcd
142 | /car.43.17589.pcd
143 | /trunk.23.5463.pcd
144 | /traffic_lights.8.2738.pcd
145 | /traffic_lights.26.7288.pcd
146 | /tree.6.17038.pcd
147 | /pedestrian.81.4093.pcd
148 | /trunk.27.5100.pcd
149 | /traffic_lights.43.20631.pcd
150 | /car.59.23124.pcd
151 | /ute.1.0.pcd
152 | /traffic_lights.5.2446.pcd
153 | /trunk.25.270.pcd
154 | /pedestrian.36.17589.pcd
155 | /pedestrian.16.16217.pcd
156 | /traffic_sign.24.2738.pcd
157 | /pedestrian.98.4868.pcd
158 | /building.0.16217.pcd
159 | /pedestrian.68.3582.pcd
160 | /car.53.23124.pcd
161 | /car.58.23124.pcd
162 | /car.31.5463.pcd
163 | /traffic_sign.7.16217.pcd
164 | /car.0.5463.pcd
165 | /pedestrian.89.4093.pcd
166 | /pedestrian.32.17589.pcd
167 | /traffic_sign.10.17038.pcd
168 | /pedestrian.104.270.pcd
169 | /car.26.17038.pcd
170 | /traffic_sign.22.2299.pcd
171 | /pole.8.17589.pcd
172 | /ute.0.25322.pcd
173 | /pedestrian.4.5463.pcd
174 | /truck.4.2446.pcd
175 | /building.10.2446.pcd
176 | /car.45.17589.pcd
177 | /pedestrian.2.5463.pcd
178 | /car.50.17589.pcd
179 | /trunk.29.5100.pcd
180 | /trunk.37.8444.pcd
181 | /car.44.17589.pcd
182 | /tree.30.11204.pcd
183 | /traffic_lights.2.2299.pcd
184 | /building.5.16217.pcd
185 | /4wd.2.3582.pcd
186 | /bus.0.17038.pcd
187 | /pedestrian.72.3725.pcd
188 | /4wd.7.16217.pcd
189 | /pedestrian.103.270.pcd
190 | /pedestrian.67.3582.pcd
191 | /pedestrian.18.5463.pcd
192 | /truck.0.11290.pcd
193 | /pedestrian.26.6994.pcd
194 | /car.42.17589.pcd
195 | /bus.10.4548.pcd
196 | /car.18.7288.pcd
197 | /van.15.4043.pcd
198 | /pedestrian.133.7288.pcd
199 | /pole.9.17589.pcd
200 | /pole.4.2446.pcd
201 | /pedestrian.85.4093.pcd
202 | /pillar.5.5100.pcd
203 | /tree.20.3582.pcd
204 | /traffic_lights.3.2299.pcd
205 | /car.16.7288.pcd
206 | /car.81.12346.pcd
207 | /traffic_sign.3.8254.pcd
208 | /car.62.2299.pcd
209 | /pedestrian.74.3725.pcd
210 | /car.85.12715.pcd
211 | /traffic_sign.26.3582.pcd
212 | /traffic_sign.14.17589.pcd
213 | /4wd.8.17038.pcd
214 | /4wd.15.5563.pcd
215 | /pedestrian.27.6994.pcd
216 | /pole.17.2738.pcd
217 | /pole.18.270.pcd
218 | /pillar.16.8444.pcd
219 | /car.22.17038.pcd
220 | /pedestrian.122.6123.pcd
221 | /pedestrian.19.5463.pcd
222 | /pedestrian.71.3582.pcd
223 | /pedestrian.78.3725.pcd
224 | /trunk.4.25322.pcd
225 | /4wd.6.16217.pcd
226 | /car.74.20631.pcd
227 | /car.2.5463.pcd
228 | /pillar.7.5229.pcd
229 | /car.75.20631.pcd
230 | /pillar.1.25322.pcd
231 | /pedestrian.47.25322.pcd
232 | /traffic_sign.42.20631.pcd
233 | /traffic_lights.22.7288.pcd
234 | /building.16.5229.pcd
235 | /ute.8.270.pcd
236 | /pedestrian.55.2299.pcd
237 | /car.54.23124.pcd
238 | /van.6.25322.pcd
239 | /4wd.11.6994.pcd
240 | /van.23.5229.pcd
241 | /trunk.32.5229.pcd
242 | /van.26.7288.pcd
243 | /traffic_lights.15.6994.pcd
244 | /pedestrian.3.5463.pcd
245 | /trunk.15.2446.pcd
246 | /car.10.6994.pcd
247 | /car.67.270.pcd
248 | /trunk.8.25322.pcd
249 | /pedestrian.90.4868.pcd
250 | /pedestrian.61.2446.pcd
251 | /traffic_lights.20.0.pcd
252 | /pedestrian.21.5463.pcd
253 | /traffic_lights.40.9824.pcd
254 | /pedestrian.35.17589.pcd
255 | /car.11.6123.pcd
256 | /trunk.24.270.pcd
257 | /traffic_lights.21.7288.pcd
258 | /pedestrian.101.270.pcd
259 | /traffic_lights.7.2446.pcd
260 | /pedestrian.62.2446.pcd
261 | /trunk.17.2446.pcd
262 | /pedestrian.13.6994.pcd
263 | /pedestrian.82.4093.pcd
264 | /ute.6.16217.pcd
265 | /pillar.14.8444.pcd
266 | /car.86.12715.pcd
267 | /pole.15.2299.pcd
268 | /truck.5.270.pcd
269 | /traffic_lights.27.7288.pcd
270 | /building.8.2299.pcd
271 | /pedestrian.8.5463.pcd
272 | /truck.7.5100.pcd
273 | /pedestrian.124.6783.pcd
274 | /pedestrian.5.5463.pcd
275 | /trunk.12.0.pcd
276 | /pedestrian.106.270.pcd
277 | /pole.6.6994.pcd
278 | /pedestrian.126.7288.pcd
279 | /pedestrian.59.2299.pcd
280 | /tree.12.23124.pcd
281 | /ute.5.4294.pcd
282 | /pedestrian.93.4868.pcd
283 | /car.48.17589.pcd
284 | /tree.14.10974.pcd
285 | /van.22.5229.pcd
286 | /traffic_lights.37.9824.pcd
287 | /truck.1.11290.pcd
288 | /tree.4.17038.pcd
289 | /traffic_lights.1.2299.pcd
290 | /traffic_lights.0.2299.pcd
291 | /bus.5.2299.pcd
292 | /traffic_sign.11.17038.pcd
293 | /traffic_lights.6.2446.pcd
294 | /trunk.34.7288.pcd
295 | /pedestrian.29.6994.pcd
296 | /pedestrian.34.17589.pcd
297 | /pedestrian.51.0.pcd
298 | /pedestrian.132.7288.pcd
299 | /traffic_sign.35.5100.pcd
300 | /bus.7.2299.pcd
301 | /tree.17.2299.pcd
302 | /pedestrian.129.7288.pcd
303 | /van.10.2738.pcd
304 | /traffic_sign.36.5100.pcd
305 | /car.52.23124.pcd
306 | /ute.11.8254.pcd
307 | /pedestrian.151.10974.pcd
308 | /traffic_sign.33.270.pcd
309 | /van.24.6123.pcd
310 | /trunk.6.25322.pcd
311 | /pedestrian.6.5463.pcd
312 | /traffic_sign.23.2446.pcd
313 | /4wd.3.4043.pcd
314 | /pedestrian.58.2299.pcd
315 | /van.13.3983.pcd
316 | /tree.13.23124.pcd
317 | /trunk.13.0.pcd
318 | /traffic_lights.39.9824.pcd
319 | /truck.2.11290.pcd
320 | /trunk.7.25322.pcd
321 | /van.21.5229.pcd
322 | /van.25.7288.pcd
323 | /van.3.17038.pcd
324 | /tree.25.8254.pcd
325 | /pillar.13.8444.pcd
326 | /pedestrian.123.6123.pcd
327 | /pedestrian.102.270.pcd
328 | /4wd.1.2446.pcd
329 | /trunk.0.17589.pcd
330 | /traffic_sign.12.8254.pcd
331 | /traffic_lights.4.2446.pcd
332 | /car.65.3725.pcd
333 | /traffic_sign.40.8254.pcd
334 | /car.41.17589.pcd
335 | /trunk.26.270.pcd
336 | /pedestrian.69.3582.pcd
337 | /tree.23.5100.pcd
338 | /pedestrian.80.4093.pcd
339 | /van.11.2738.pcd
340 | /van.12.3725.pcd
341 | /traffic_sign.5.8254.pcd
342 | /pedestrian.91.4868.pcd
343 | /4wd.18.7288.pcd
344 | /pedestrian.65.3582.pcd
345 | /tree.29.10974.pcd
346 | /trunk.47.20631.pcd
347 | /pedestrian.25.6994.pcd
348 | /tree.16.11290.pcd
349 | /pillar.3.4868.pcd
350 | /tree.26.8444.pcd
351 | /ute.14.20631.pcd
352 | /bus.6.2299.pcd
353 | /trunk.28.5100.pcd
354 | /car.8.6994.pcd
355 | /bus.4.2446.pcd
356 | /car.23.17038.pcd
357 | /pedestrian.97.4868.pcd
358 | /traffic_sign.16.25322.pcd
359 | /trunk.22.5463.pcd
360 | /car.84.12715.pcd
361 | /pedestrian.22.5463.pcd
362 | /pedestrian.56.2299.pcd
363 | /traffic_lights.10.3582.pcd
364 | /pole.16.2446.pcd
365 | /4wd.0.2299.pcd
366 | /pillar.2.3582.pcd
367 | /pedestrian.63.2446.pcd
368 | /4wd.16.6123.pcd
369 | /trunk.39.8444.pcd
370 | /trunk.19.2738.pcd
371 | /pedestrian.83.4093.pcd
372 | /traffic_lights.9.3582.pcd
373 | /4wd.12.3582.pcd
374 | /pedestrian.31.17589.pcd
375 | /traffic_lights.38.9824.pcd
376 | /traffic_sign.32.270.pcd
377 | /van.7.25322.pcd
378 | /traffic_sign.8.16217.pcd
379 | /pedestrian.1.5463.pcd
380 | /building.4.16217.pcd
381 | /trunk.14.2299.pcd
382 | /traffic_sign.9.17038.pcd
383 | /ute.4.4249.pcd
384 | /tree.9.17038.pcd
385 | /pedestrian.84.4093.pcd
386 | /car.40.17589.pcd
387 | /trunk.40.8444.pcd
388 | /trunk.3.23124.pcd
389 | /traffic_lights.42.20631.pcd
390 | /van.17.4868.pcd
391 | /trunk.31.5229.pcd
392 | /bus.1.17038.pcd
393 | /pillar.19.10974.pcd
394 | /pedestrian.130.7288.pcd
395 | /tree.5.17038.pcd
396 | /4wd.13.270.pcd
397 | /car.29.17038.pcd
398 | /pedestrian.73.3725.pcd
399 | /trunk.16.2446.pcd
400 | /traffic_lights.28.7288.pcd
401 | /car.25.17038.pcd
402 | /traffic_lights.41.20631.pcd
403 | /pedestrian.92.4868.pcd
404 | /car.55.23124.pcd
405 | /bus.4.23124.pcd
406 | /4wd.4.17038.pcd
407 | /pole.11.25322.pcd
408 | /tree.22.270.pcd
409 | /pedestrian.75.3725.pcd
410 | /traffic_sign.28.270.pcd
411 | /trunk.35.8254.pcd
412 | /car.63.3582.pcd
413 | /traffic_sign.13.8254.pcd
414 | /pedestrian.60.2299.pcd
415 | /bus.3.23124.pcd
416 | /traffic_lights.14.6994.pcd
417 | /pedestrian.57.2299.pcd
418 | /tree.27.9824.pcd
419 | /traffic_lights.24.7288.pcd
420 | /traffic_sign.37.5100.pcd
421 | /pole.20.10974.pcd
422 | /pedestrian.94.4868.pcd
423 | /pillar.18.10974.pcd
424 | /van.2.16217.pcd
425 | /pedestrian.79.3983.pcd
426 | /traffic_sign.30.270.pcd
427 | /pedestrian.24.6994.pcd
428 | /tree.18.3582.pcd
429 | /car.37.6994.pcd
430 | /pole.10.23124.pcd
431 | /pedestrian.152.11204.pcd
432 | /car.36.6994.pcd
433 | /traffic_lights.19.10974.pcd
434 | /ute.3.3582.pcd
435 | /traffic_sign.2.5463.pcd
436 | /building.7.17589.pcd
437 | /traffic_sign.15.25322.pcd
438 | /traffic_lights.25.7288.pcd
439 | /pedestrian.48.7041.pcd
440 | /pillar.17.8444.pcd
441 | /van.19.5100.pcd
442 | /traffic_sign.1.5463.pcd
443 | /pedestrian.45.25322.pcd
444 | /pedestrian.50.0.pcd
445 | /car.30.17038.pcd
446 | /car.47.17589.pcd
447 | /van.17.6994.pcd
448 | /building.15.270.pcd
449 | /traffic_sign.0.5463.pcd
450 | /car.7.6994.pcd
451 | /trunk.33.5229.pcd
452 | /building.14.3582.pcd
453 | /car.51.23124.pcd
454 | /ute.2.2299.pcd
455 | /pedestrian.38.17589.pcd
456 | /car.5.5563.pcd
457 |
--------------------------------------------------------------------------------
/preprocessing/sydneyfoldn3.csv:
--------------------------------------------------------------------------------
1 | /car.68.270.pcd
2 | /traffic_lights.29.8254.pcd
3 | /traffic_sign.29.270.pcd
4 | /bus.4.2446.pcd
5 | /car.3.5463.pcd
6 | /truck.11.8444.pcd
7 | /traffic_sign.39.5229.pcd
8 | /traffic_lights.17.5463.pcd
9 | /pedestrian.107.5100.pcd
10 | /pedestrian.142.8254.pcd
11 | /tree.29.10974.pcd
12 | /4wd.6.16217.pcd
13 | /traffic_sign.3.8254.pcd
14 | /pedestrian.79.3983.pcd
15 | /van.0.6994.pcd
16 | /traffic_lights.0.2299.pcd
17 | /4wd.1.2446.pcd
18 | /car.87.12715.pcd
19 | /pillar.11.8254.pcd
20 | /4wd.8.17038.pcd
21 | /traffic_lights.1.2299.pcd
22 | /car.77.10974.pcd
23 | /car.72.9824.pcd
24 | /tree.18.3582.pcd
25 | /pillar.15.8444.pcd
26 | /pedestrian.57.2299.pcd
27 | /van.13.3983.pcd
28 | /truck.7.5100.pcd
29 | /car.29.17038.pcd
30 | /car.28.8254.pcd
31 | /car.64.8444.pcd
32 | /traffic_sign.32.270.pcd
33 | /tree.30.11204.pcd
34 | /traffic_sign.24.2738.pcd
35 | /car.25.17038.pcd
36 | /pedestrian.74.3725.pcd
37 | /trunk.28.5100.pcd
38 | /car.27.8254.pcd
39 | /car.5.5563.pcd
40 | /bus.7.2299.pcd
41 | /pillar.2.3582.pcd
42 | /traffic_sign.38.5229.pcd
43 | /4wd.10.17589.pcd
44 | /tree.14.10974.pcd
45 | /pedestrian.58.2299.pcd
46 | /pedestrian.42.23124.pcd
47 | /ute.11.8254.pcd
48 | /pedestrian.90.4868.pcd
49 | /car.67.270.pcd
50 | /van.10.2738.pcd
51 | /building.0.16217.pcd
52 | /car.2.5463.pcd
53 | /traffic_sign.18.11290.pcd
54 | /trunk.16.2446.pcd
55 | /pole.12.25322.pcd
56 | /tree.24.7288.pcd
57 | /car.24.8254.pcd
58 | /pedestrian.17.17038.pcd
59 | /van.31.8444.pcd
60 | /trunk.10.11886.pcd
61 | /pedestrian.139.8254.pcd
62 | /pedestrian.152.11204.pcd
63 | /pedestrian.39.23124.pcd
64 | /pedestrian.77.3725.pcd
65 | /pillar.13.8444.pcd
66 | /pedestrian.92.4868.pcd
67 | /pedestrian.115.5229.pcd
68 | /car.63.3582.pcd
69 | /pedestrian.94.4868.pcd
70 | /building.15.270.pcd
71 | /car.26.17038.pcd
72 | /ute.7.270.pcd
73 | /trunk.12.0.pcd
74 | /building.14.3582.pcd
75 | /4wd.13.270.pcd
76 | /car.12.16217.pcd
77 | /tree.17.2299.pcd
78 | /van.22.5229.pcd
79 | /traffic_sign.27.270.pcd
80 | /tree.3.16217.pcd
81 | /pillar.10.8254.pcd
82 | /tree.22.270.pcd
83 | /van.17.4868.pcd
84 | /trunk.30.5229.pcd
85 | /pedestrian.70.3582.pcd
86 | /car.10.6994.pcd
87 | /pedestrian.144.8444.pcd
88 | /pedestrian.117.5229.pcd
89 | /pedestrian.40.23124.pcd
90 | /van.30.8444.pcd
91 | /tree.23.5100.pcd
92 | /pillar.18.10974.pcd
93 | /traffic_lights.34.8254.pcd
94 | /pedestrian.35.17589.pcd
95 | /traffic_sign.41.9824.pcd
96 | /pedestrian.147.8444.pcd
97 | /4wd.19.10974.pcd
98 | /car.85.12715.pcd
99 | /pedestrian.91.4868.pcd
100 | /pole.5.7288.pcd
101 | /building.18.7288.pcd
102 | /car.81.12346.pcd
103 | /pedestrian.116.5229.pcd
104 | /pedestrian.71.3582.pcd
105 | /pedestrian.89.4093.pcd
106 | /building.19.11204.pcd
107 | /ute.13.9824.pcd
108 | /van.8.12119.pcd
109 | /traffic_lights.31.8254.pcd
110 | /pedestrian.88.4093.pcd
111 | /trunk.31.5229.pcd
112 | /ute.8.270.pcd
113 | /car.83.12346.pcd
114 | /pedestrian.76.3725.pcd
115 | /trunk.29.5100.pcd
116 | /pedestrian.108.5100.pcd
117 | /building.8.2299.pcd
118 | /pedestrian.55.2299.pcd
119 | /ute.3.3582.pcd
120 | /trunk.22.5463.pcd
121 | /car.84.12715.pcd
122 | /car.38.8254.pcd
123 | /bus.5.2299.pcd
124 | /traffic_lights.16.6994.pcd
125 | /4wd.5.17038.pcd
126 | /truck.6.5100.pcd
127 | /trunk.11.11886.pcd
128 | /trunk.27.5100.pcd
129 | /trunk.54.12715.pcd
130 | /building.3.16217.pcd
131 | /pole.8.17589.pcd
132 | /trunk.25.270.pcd
133 | /car.46.8444.pcd
134 | /pedestrian.146.8444.pcd
135 | /pillar.9.8254.pcd
136 | /trunk.37.8444.pcd
137 | /tree.15.10974.pcd
138 | /trunk.33.5229.pcd
139 | /car.79.11204.pcd
140 | /pole.20.10974.pcd
141 | /pedestrian.105.270.pcd
142 | /van.14.3983.pcd
143 | /car.14.16217.pcd
144 | /pedestrian.73.3725.pcd
145 | /pedestrian.34.17589.pcd
146 | /trunk.52.12346.pcd
147 | /bus.3.23124.pcd
148 | /traffic_lights.18.5463.pcd
149 | /pedestrian.145.8444.pcd
150 | /traffic_lights.2.2299.pcd
151 | /4wd.12.3582.pcd
152 | /pillar.14.8444.pcd
153 | /car.18.7288.pcd
154 | /pedestrian.106.270.pcd
155 | /pedestrian.46.25322.pcd
156 | /pole.13.25322.pcd
157 | /pedestrian.52.0.pcd
158 | /traffic_sign.46.12346.pcd
159 | /pole.2.5100.pcd
160 | /pedestrian.99.4868.pcd
161 | /pedestrian.37.17589.pcd
162 | /traffic_lights.36.8254.pcd
163 | /car.4.6994.pcd
164 | /car.30.17038.pcd
165 | /trunk.9.11290.pcd
166 | /pillar.16.8444.pcd
167 | /pedestrian.148.8444.pcd
168 | /car.8.6994.pcd
169 | /traffic_lights.15.6994.pcd
170 | /traffic_sign.4.8254.pcd
171 | /traffic_sign.47.12346.pcd
172 | /trunk.45.9824.pcd
173 | /pedestrian.86.4093.pcd
174 | /pedestrian.87.4093.pcd
175 | /traffic_lights.9.3582.pcd
176 | /trunk.53.12715.pcd
177 | /traffic_lights.23.7288.pcd
178 | /car.6.6994.pcd
179 | /pedestrian.82.4093.pcd
180 | /pedestrian.98.4868.pcd
181 | /trunk.43.9824.pcd
182 | /traffic_lights.22.7288.pcd
183 | /traffic_lights.27.7288.pcd
184 | /ute.4.4249.pcd
185 | /pedestrian.65.3582.pcd
186 | /car.13.16217.pcd
187 | /pedestrian.113.5100.pcd
188 | /car.36.6994.pcd
189 | /traffic_sign.17.8444.pcd
190 | /4wd.3.4043.pcd
191 | /traffic_lights.11.4093.pcd
192 | /traffic_lights.33.8254.pcd
193 | /ute.5.4294.pcd
194 | /car.34.6994.pcd
195 | /pedestrian.119.5229.pcd
196 | /trunk.42.9824.pcd
197 | /traffic_lights.24.7288.pcd
198 | /pole.7.17589.pcd
199 | /pillar.3.4868.pcd
200 | /traffic_sign.28.270.pcd
201 | /pedestrian.96.4868.pcd
202 | /trunk.41.9824.pcd
203 | /van.28.8254.pcd
204 | /traffic_sign.40.8254.pcd
205 | /ute.9.5100.pcd
206 | /pedestrian.141.8254.pcd
207 | /van.21.5229.pcd
208 | /van.18.5100.pcd
209 | /pedestrian.51.0.pcd
210 | /traffic_lights.12.4868.pcd
211 | /pedestrian.32.17589.pcd
212 | /car.15.16217.pcd
213 | /trunk.26.270.pcd
214 | /ute.2.2299.pcd
215 | /4wd.14.5229.pcd
216 | /trunk.18.2446.pcd
217 | /pedestrian.60.2299.pcd
218 | /pillar.1.25322.pcd
219 | /pedestrian.97.4868.pcd
220 | /pedestrian.75.3725.pcd
221 | /bus.6.2299.pcd
222 | /pedestrian.85.4093.pcd
223 | /pedestrian.138.8254.pcd
224 | /traffic_lights.28.7288.pcd
225 | /pedestrian.100.270.pcd
226 | /building.16.5229.pcd
227 | /traffic_lights.6.2446.pcd
228 | /trunk.14.2299.pcd
229 | /car.73.9824.pcd
230 | /traffic_lights.7.2446.pcd
231 | /traffic_sign.25.2738.pcd
232 | /traffic_lights.35.8254.pcd
233 | /traffic_sign.26.3582.pcd
234 | /pedestrian.69.3582.pcd
235 | /traffic_lights.8.2738.pcd
236 | /bus.12.270.pcd
237 | /traffic_sign.13.8254.pcd
238 | /pillar.0.16217.pcd
239 | /car.37.6994.pcd
240 | /building.11.2446.pcd
241 | /building.12.2738.pcd
242 | /van.20.5229.pcd
243 | /tree.21.270.pcd
244 | /pedestrian.49.0.pcd
245 | /pedestrian.136.8254.pcd
246 | /traffic_sign.48.12346.pcd
247 | /van.23.5229.pcd
248 | /pole.9.17589.pcd
249 | /car.86.12715.pcd
250 | /4wd.7.16217.pcd
251 | /4wd.4.17038.pcd
252 | /4wd.20.12346.pcd
253 | /building.17.5229.pcd
254 | /pedestrian.112.5100.pcd
255 | /tree.2.16217.pcd
256 | /car.19.16217.pcd
257 | /pedestrian.43.23124.pcd
258 | /trunk.36.8444.pcd
259 | /pillar.17.8444.pcd
260 | /truck.3.0.pcd
261 | /pedestrian.31.17589.pcd
262 | /trunk.51.12346.pcd
263 | /traffic_lights.10.3582.pcd
264 | /traffic_sign.49.12715.pcd
265 | /car.66.4043.pcd
266 | /car.32.5463.pcd
267 | /car.31.5463.pcd
268 | /pedestrian.137.8254.pcd
269 | /tree.19.3582.pcd
270 | /car.69.5100.pcd
271 | /pedestrian.47.25322.pcd
272 | /van.26.7288.pcd
273 | /trunk.40.8444.pcd
274 | /pedestrian.101.270.pcd
275 | /car.9.6994.pcd
276 | /traffic_lights.4.2446.pcd
277 | /trunk.34.7288.pcd
278 | /pedestrian.16.16217.pcd
279 | /pedestrian.118.5229.pcd
280 | /traffic_sign.5.8254.pcd
281 | /building.13.3582.pcd
282 | /pedestrian.44.23124.pcd
283 | /pedestrian.50.0.pcd
284 | /traffic_sign.31.270.pcd
285 | /building.2.16217.pcd
286 | /pedestrian.151.10974.pcd
287 | /trunk.44.9824.pcd
288 | /pedestrian.104.270.pcd
289 | /car.21.16217.pcd
290 | /traffic_sign.12.8254.pcd
291 | /traffic_sign.30.270.pcd
292 | /bus.4.23124.pcd
293 | /pole.10.23124.pcd
294 | /traffic_sign.34.5100.pcd
295 | /traffic_sign.35.5100.pcd
296 | /van.25.7288.pcd
297 | /pedestrian.67.3582.pcd
298 | /truck.9.6783.pcd
299 | /pedestrian.143.8444.pcd
300 | /car.17.16217.pcd
301 | /traffic_lights.25.7288.pcd
302 | /car.7.6994.pcd
303 | /traffic_sign.1.5463.pcd
304 | /traffic_sign.21.2299.pcd
305 | /pedestrian.61.2446.pcd
306 | /pole.6.6994.pcd
307 | /traffic_lights.21.7288.pcd
308 | /tree.31.12346.pcd
309 | /pedestrian.103.270.pcd
310 | /car.23.17038.pcd
311 | /trunk.39.8444.pcd
312 | /van.1.6994.pcd
313 | /car.82.12346.pcd
314 | /van.29.8444.pcd
315 | /tree.25.8254.pcd
316 | /pedestrian.110.5100.pcd
317 | /pedestrian.83.4093.pcd
318 | /traffic_sign.33.270.pcd
319 | /tree.27.9824.pcd
320 | /van.16.4093.pcd
321 | /trunk.50.12346.pcd
322 | /pedestrian.56.2299.pcd
323 | /bus.11.270.pcd
324 | /traffic_lights.26.7288.pcd
325 | /pole.0.5100.pcd
326 | /car.33.8254.pcd
327 | /van.17.6994.pcd
328 | /pedestrian.80.4093.pcd
329 | /traffic_sign.22.2299.pcd
330 | /pedestrian.45.25322.pcd
331 | /tree.33.12715.pcd
332 | /trunk.35.8254.pcd
333 | /traffic_sign.44.10974.pcd
334 | /bus.2.6994.pcd
335 | /trunk.15.2446.pcd
336 | /pedestrian.114.5100.pcd
337 | /pedestrian.140.8254.pcd
338 | /pedestrian.72.3725.pcd
339 | /car.62.2299.pcd
340 | /building.10.2446.pcd
341 | /traffic_sign.2.5463.pcd
342 | /van.12.3725.pcd
343 | /pillar.12.8254.pcd
344 | /trunk.49.12346.pcd
345 | /truck.10.7288.pcd
346 | /pedestrian.93.4868.pcd
347 | /pedestrian.78.3725.pcd
348 | /traffic_lights.5.2446.pcd
349 | /tree.16.11290.pcd
350 | /4wd.2.3582.pcd
351 | /truck.8.5563.pcd
352 | /traffic_lights.13.4868.pcd
353 | /pedestrian.150.8444.pcd
354 | /trunk.13.0.pcd
355 | /tree.20.3582.pcd
356 | /tree.32.12715.pcd
357 | /pole.11.25322.pcd
358 | /4wd.0.2299.pcd
359 | /car.11.6123.pcd
360 | /car.39.16217.pcd
361 | /pedestrian.41.23124.pcd
362 | /pedestrian.68.3582.pcd
363 | /car.1.5463.pcd
364 | /trunk.24.270.pcd
365 | /tree.26.8444.pcd
366 | /pole.19.5229.pcd
367 | /ute.10.5229.pcd
368 | /traffic_lights.3.2299.pcd
369 | /car.71.5229.pcd
370 | /traffic_sign.37.5100.pcd
371 | /traffic_sign.19.0.pcd
372 | /pedestrian.109.5100.pcd
373 | /traffic_lights.30.8254.pcd
374 | /van.11.2738.pcd
375 | /van.15.4043.pcd
376 | /truck.5.270.pcd
377 | /traffic_lights.32.8254.pcd
378 | /pedestrian.64.3582.pcd
379 | /trunk.38.8444.pcd
380 | /pole.3.17038.pcd
381 | /trunk.32.5229.pcd
382 | /pedestrian.66.3582.pcd
383 | /car.20.16217.pcd
384 | /van.24.6123.pcd
385 | /pedestrian.95.4868.pcd
386 | /traffic_lights.20.0.pcd
387 | /trunk.17.2446.pcd
388 | /car.22.17038.pcd
389 | /car.16.7288.pcd
390 | /pedestrian.149.8444.pcd
391 | /pole.14.8444.pcd
392 | /pedestrian.33.17589.pcd
393 | /pedestrian.81.4093.pcd
394 | /car.78.10974.pcd
395 | /building.1.16217.pcd
396 | /pedestrian.53.0.pcd
397 | /ute.1.0.pcd
398 | /traffic_sign.0.5463.pcd
399 | /pedestrian.63.2446.pcd
400 | /traffic_sign.50.12715.pcd
401 | /trunk.48.11204.pcd
402 | /truck.4.2446.pcd
403 | /car.65.3725.pcd
404 | /tree.10.16217.pcd
405 | /tree.1.16217.pcd
406 | /pedestrian.54.0.pcd
407 | /traffic_lights.14.6994.pcd
408 | /trunk.23.5463.pcd
409 | /pedestrian.62.2446.pcd
410 | /ute.12.8444.pcd
411 | /car.0.5463.pcd
412 | /pedestrian.102.270.pcd
413 | /traffic_sign.51.12715.pcd
414 | /pillar.19.10974.pcd
415 | /tree.0.16217.pcd
416 | /pedestrian.36.17589.pcd
417 | /traffic_sign.23.2446.pcd
418 | /van.32.11204.pcd
419 | /van.27.8254.pcd
420 | /pedestrian.59.2299.pcd
421 | /bus.8.2738.pcd
422 | /bus.14.7288.pcd
423 | /pedestrian.111.5100.pcd
424 | /van.9.11886.pcd
425 | /pedestrian.84.4093.pcd
426 | /car.70.5100.pcd
427 | /traffic_sign.36.5100.pcd
428 | /van.19.5100.pcd
429 | /car.35.6994.pcd
430 | /trunk.19.2738.pcd
431 | /traffic_sign.45.11204.pcd
432 | /car.80.12346.pcd
433 | /pedestrian.38.17589.pcd
434 |
--------------------------------------------------------------------------------
/run.sh:
--------------------------------------------------------------------------------
1 | #FOR ALL STEPS, MAKE SURE TO INCLUDE THE ARGUMENT --prefix WHICH IS THE ROOT OF YOUR DATASET PATH
2 | #The code also makes an assumption: That each of the datasets is preprocessed so that one of the directories in the path is the label name, specifically 3 tokens away from the end (the individual sample filename)
3 | #Also choose a dataset name with --dataset to make use of the preset lists of train/test sets.
4 |
5 | #Training Step 1
6 | python src/run.py --arch 'OC,c_128_1_1,rc0_128-128_1-1_1-1_1-1_1-1,gp_0,c_256_1_1,rc0_256-256_1-1_1-1_1-1_1-1,gp_1,c_512_1_1,rc0_512-512_1-1_1-1_1-1_1-1,gp_2,c_1024_1_1,rc0_1024-1024_1-1_1-1_1-1_1-1,gp_3,fc_2048_1_1,fc_421_0_0' --feature_type 1 --group_name 'WACV2018' --trial_name 'train_step_1' --debug_flag 0 --iterations_per_test 50 --l2=0.00000 --num_iter 89850 --train_batch_size 50 --test_batch_size 50 --num_vertices 516 --learning_rate_step 30000 --optimizer 'momentum' --pool_ratios '0.5_0.5_0.5_0.5' --num_classes 421 --starter_learning_rate 0.01 --prefix '[ROOT DIRECTORY OF DATASET]' --dataset 'modelnetfull'
7 |
8 | #Training Step 2
9 | #python src/run.py --arch 'OC,c_128_1_1,rc0_128-128_1-1_1-1_1-1_1-1,gp_0,c_256_1_1,rc0_256-256_1-1_1-1_1-1_1-1,gp_1,c_512_1_1,rc0_512-512_1-1_1-1_1-1_1-1,gp_2,c_1024_1_1,rc0_1024-1024_1-1_1-1_1-1_1-1,gp_3,fc_2048_1_1,fc_55_0_0' --feature_type 1 --group_name 'WACV2018' --trial_name 'G3DNet18' --debug_flag 0 --iterations_per_test 50 --l2=0.00000 --num_iter 120000 --train_batch_size 50 --test_batch_size 50 --num_vertices 516 --learning_rate_step 60000 --optimizer 'momentum' --pool_ratios '0.5_0.5_0.5_0.5' --num_classes 55 --starter_learning_rate 0.001 --prefix '[ROOT DIRECTORY OF DATASET]' --dataset 'shapenetcore' --loading_weights_flag 1 --arch_loading 'OC,c_128_1_1,rc0_128-128_1-1_1-1_1-1_1-1,gp_0,c_256_1_1,rc0_256-256_1-1_1-1_1-1_1-1,gp_1,c_512_1_1,rc0_512-512_1-1_1-1_1-1_1-1,gp_2,c_1024_1_1,rc0_1024-1024_1-1_1-1_1-1_1-1,gp_3,fc_2048_1_1' --path_pretrained_weights '[PATH AND ITERATION OF TRAINED MODEL]'
10 |
11 | #Training Step 3
12 | #python src/run.py --arch 'OC,c_128_1_1,rc0_128-128_1-1_1-1_1-1_1-1,gp_0,c_256_1_1,rc0_256-256_1-1_1-1_1-1_1-1,gp_1,c_512_1_1,rc0_512-512_1-1_1-1_1-1_1-1,gp_2,c_1024_1_1,rc0_1024-1024_1-1_1-1_1-1_1-1,gp_3,c_1024_1_1,rc0_1024-1024_1-1_1-1_1-1_1-1,gp_4,c_2048_1_1,rc0_2048-2048_1-1_1-1_1-1_1-1,gp_5,fc_4096_1_1,fc_55_0_0' --feature_type 1 --group_name 'WACV2018' --trial_name 'G3DNet26' --debug_flag 0 --iterations_per_test 50 --l2=0.00000 --num_iter 120000 --train_batch_size 50 --test_batch_size 50 --num_vertices 516 --learning_rate_step 50000 --optimizer 'momentum' --pool_ratios '0.5_0.5_0.5_0.5_0.5_0.5' --num_classes 55 --starter_learning_rate 0.001 --prefix '[ROOT DIRECTORY OF DATASET]' --dataset 'shapenetcore' --loading_weights_flag 1 --arch_loading 'OC,c_128_1_1,rc0_128-128_1-1_1-1_1-1_1-1,gp_0,c_256_1_1,rc0_256-256_1-1_1-1_1-1_1-1,gp_1,c_512_1_1,rc0_512-512_1-1_1-1_1-1_1-1,gp_2,c_1024_1_1,rc0_1024-1024_1-1_1-1_1-1_1-1,gp_3' --path_pretrained_weights '[PATH AND ITERATION OF TRAINED MODEL]'
13 |
14 | #Run G3DNET18 Pretrained
15 | #python src/run.py --arch 'OC,c_128_1_1,rc0_128-128_1-1_1-1_1-1_1-1,gp_0,c_256_1_1,rc0_256-256_1-1_1-1_1-1_1-1,gp_1,c_512_1_1,rc0_512-512_1-1_1-1_1-1_1-1,gp_2,c_1024_1_1,rc0_1024-1024_1-1_1-1_1-1_1-1,gp_3,fc_2048_1_1,fc_55_0_0' --feature_type 1 --group_name 'WACV2018' --trial_name 'G3DNet18' --debug_flag 0 --iterations_per_test 50 --l2=0.00000 --num_iter 120000 --train_batch_size 50 --test_batch_size 50 --num_vertices 516 --learning_rate_step 60000 --optimizer 'momentum' --pool_ratios '0.5_0.5_0.5_0.5' --num_classes 55 --starter_learning_rate 0.001 --train_flag 0 --dataset '[DATASET NAME]' --prefix '[ROOT DIRECTORY OF DATASET]'
16 |
17 | #Run G3DNET26 Pretrained
18 | #python src/run.py --arch 'OC,c_128_1_1,rc0_128-128_1-1_1-1_1-1_1-1,gp_0,c_256_1_1,rc0_256-256_1-1_1-1_1-1_1-1,gp_1,c_512_1_1,rc0_512-512_1-1_1-1_1-1_1-1,gp_2,c_1024_1_1,rc0_1024-1024_1-1_1-1_1-1_1-1,gp_3,c_1024_1_1,rc0_1024-1024_1-1_1-1_1-1_1-1,gp_4,c_2048_1_1,rc0_2048-2048_1-1_1-1_1-1_1-1,gp_5,fc_4096_1_1,fc_55_0_0' --feature_type 1 --group_name 'WACV2018' --trial_name 'G3DNet26' --debug_flag 0 --iterations_per_test 50 --l2=0.00000 --num_iter 120000 --train_batch_size 50 --test_batch_size 50 --num_vertices 516 --learning_rate_step 50000 --optimizer 'momentum' --pool_ratios '0.5_0.5_0.5_0.5_0.5_0.5' --num_classes 55 --starter_learning_rate 0.001 --train_flag 0 --dataset '[DATASET NAME]' --prefix '[ROOT DIRECTORY OF DATASET]'
--------------------------------------------------------------------------------
/src/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WDot/G3DNet/448e2e26646219de8cbb6d7ec54b168cddab09bb/src/__init__.py
--------------------------------------------------------------------------------
/src/graphcnn/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WDot/G3DNet/448e2e26646219de8cbb6d7ec54b168cddab09bb/src/graphcnn/__init__.py
--------------------------------------------------------------------------------
/src/graphcnn/experiments/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WDot/G3DNet/448e2e26646219de8cbb6d7ec54b168cddab09bb/src/graphcnn/experiments/__init__.py
--------------------------------------------------------------------------------
/src/graphcnn/experiments/experiment_pcd.py:
--------------------------------------------------------------------------------
1 | from graphcnn.helper import *
2 | from graphcnn.network import *
3 | from graphcnn.layers import *
4 | # from sklearn.model_selection import KFold
5 | import numpy as np
6 | import tensorflow as tf
7 | import pcl
8 | import time
9 | from graphcnn.experiments.experiment import GraphCNNExperiment
10 | from tensorflow.python.training import queue_runner
11 | import pickle as pkl
12 | from collections import defaultdict
13 | import transforms3d
14 | import numpy.random as random
15 | import math
16 | from graphcnn.util.pooling.GeometricAdjacencyCompander import GeometricAdjacencyCompander
17 | from graphcnn.util.pooling.PoolingFactory import PoolingFactory
18 | import scipy.spatial
19 | from PIL import Image
20 |
21 | # This function is used to create tf.cond compatible tf.train.batch alternative
22 | def _make_batch_queue(input, capacity, num_threads=1):
23 | queue = tf.PaddingFIFOQueue(capacity=capacity, dtypes=[s.dtype for s in input],shapes=[s.get_shape() for s in input])
24 | tf.summary.scalar("fraction_of_%d_full" % capacity,
25 | tf.cast(queue.size(), tf.float32) *
26 | (1. / capacity))
27 | enqueue_ops = [queue.enqueue(input)]*num_threads
28 | queue_runner.add_queue_runner(queue_runner.QueueRunner(queue, enqueue_ops))
29 | return queue
30 |
31 |
32 | # This class is responsible for setting up and running experiments
33 | # Also provides helper functions related to experiments (e.g. get accuracy)
34 | class GraphCNNPCDExperiment(GraphCNNExperiment):
35 | def __init__(self, dataset_name, model_name, net_constructor, prefix, N, C, L, K, numClasses, trainFile, testFile,\
36 | label_file, isTrain,l2=0,l1=0,feature_type=1,poolRatios=None,path_pretrained_weights=None,\
37 | poolingId='Lloyd'):
38 | GraphCNNExperiment.__init__(self, dataset_name, model_name, net_constructor,l2,l1,path_pretrained_weights)
39 | self.prefix = prefix
40 | self.N = N
41 | self.C = C
42 | self.L = L
43 | self.K = K
44 | self.numClasses = numClasses
45 | self.trainFile = trainFile
46 | self.testFile = testFile
47 | self.isTrain = isTrain
48 | self.feature_type = feature_type
49 | with open(label_file, 'r') as f:
50 | labels = f.read().splitlines()
51 | self.labels = dict(zip(labels, range(len(labels))))
52 | self.poolRatios = poolRatios
53 | self.poolingId = poolingId
54 | if self.poolRatios is not None:
55 | self.poolFactory = PoolingFactory()
56 |
57 | # Create input_producers and batch queues
58 | def read_file_path(self, file):
59 | labels = []
60 | with open(file, 'r') as f:
61 | list_files = pkl.load(f)
62 | return map(lambda x: tf.convert_to_tensor(x), list_files)
63 |
64 | def calculate_features_wrap_train(self, file):
65 | return tf.py_func(self.calculate_features_train, [file], [tf.float32, tf.float32, tf.int64])
66 |
67 | def calculate_features_wrap_test(self, file):
68 | return tf.py_func(self.calculate_features_test, [file], [tf.float32, tf.float32, tf.int64])
69 |
70 | def get_single_sample(self, trainExample,isTrain):
71 |
72 | if isTrain:
73 | trainV, trainA, trainLabel = self.calculate_features_wrap_train(trainExample)
74 | else:
75 | trainV, trainA, trainLabel = self.calculate_features_wrap_test(trainExample)
76 | trainV = tf.reshape(trainV, [self.N, self.C])
77 | trainA = tf.reshape(trainA, [self.N, self.L, self.N])
78 | trainLabel = tf.one_hot(trainLabel,self.numClasses)
79 | trainLabel.set_shape([self.numClasses])
80 | single_sample = [trainV, trainA, trainLabel]
81 | if self.poolRatios is not None:
82 | pooler = self.poolFactory.CreatePoolingPyramid(len(self.poolRatios), GeometricAdjacencyCompander,\
83 | self.poolRatios,self.poolingId)
84 | Plist = tf.py_func(pooler.makeP,[trainA,trainV],[tf.float32]*len(self.poolRatios),stateful=False)
85 | prevSize = self.N
86 | for P in Plist:
87 | currentSize = np.floor(prevSize * 0.5)
88 | P.set_shape([prevSize, currentSize])
89 | prevSize = currentSize
90 | single_sample += Plist
91 |
92 | return single_sample
93 |
94 | def create_data(self):
95 | with tf.device("/cpu:0"):
96 | with tf.variable_scope('input') as scope:
97 | # Create the training queue
98 | with tf.variable_scope('train_data') as scope:
99 | self.print_ext('Creating training Tensorflow Tensors')
100 | trainQueue_file = tf.train.string_input_producer([self.trainFile], shuffle=True, seed=1000)
101 | reader = tf.TextLineReader()
102 | _, trainExample = reader.read(trainQueue_file)
103 |
104 | single_sample_train = self.get_single_sample(trainExample,True)
105 | train_queue = _make_batch_queue(single_sample_train, capacity=self.train_batch_size * 2, num_threads=1)
106 | # Create the test queue
107 | with tf.variable_scope('test_data') as scope:
108 | self.print_ext('Creating test Tensorflow Tensors')
109 |
110 | testQueue_file = tf.train.string_input_producer([self.testFile])
111 | reader = tf.TextLineReader()
112 | _, testExample = reader.read(testQueue_file)
113 |
114 | single_sample_test = self.get_single_sample(testExample,False)
115 | test_queue = _make_batch_queue(single_sample_test, capacity=self.test_batch_size * 2, num_threads=1)
116 | return tf.cond(self.net.is_training, lambda: train_queue.dequeue_many(self.train_batch_size), lambda: test_queue.dequeue_many(self.test_batch_size) )
117 |
118 | def create_data_test(self):
119 | with tf.device("/cpu:0"):
120 | with tf.variable_scope('test_data') as scope:
121 | self.print_ext('Creating test Tensorflow Tensors')
122 |
123 | testQueue_file = tf.train.string_input_producer([self.testFile], num_epochs=1, shuffle=False)
124 | reader = tf.TextLineReader()
125 | _, testExample = reader.read(testQueue_file)
126 |
127 | single_sample_test = self.get_single_sample(testExample,False)
128 | test_queue = _make_batch_queue(single_sample_test, capacity=self.test_batch_size * 2, num_threads=1)
129 | # return test_queue.dequeue_many(self.test_batch_size)
130 | # return test_queue.dequeue_up_to(self.test_batch_size)
131 | return tf.train.batch(test_queue.dequeue(), self.test_batch_size, num_threads=1,dynamic_pad=True, allow_smaller_final_batch=True)
132 |
133 | def calculate_features_test(self,input):
134 | return self.calculate_features(input,self.K,self.N,False,self.feature_type)
135 |
136 | def calculate_features_train(self,input):
137 | return self.calculate_features(input,self.K,self.N,True,self.feature_type)
138 |
139 | def calculate_features(self, input, K=3, MAX_SIZE=500, splitNeighbors=True, aug=False,feature_type=1):##input tensor = NxNx3
140 |
141 | inputData = self.prefix + '/' + input
142 | label = self.labels[input.split('/')[-3]]
143 | cloud = pcl.load(inputData)
144 | #stolen from ECC code, drops out random points
145 | #if aug:
146 | #Probability a point is dropped
147 | p = 0.1
148 | cloudArray = cloud.to_array()
149 | keptIndices = random.choice(range(cloudArray.shape[0]), size=int(math.ceil((1-p)*cloudArray.shape[0])),replace=False)
150 | cloudArray = cloudArray[keptIndices,:]
151 | cloud.from_array(cloudArray)
152 | cloud.resize(MAX_SIZE)
153 |
154 | xyz = cloud.to_array()[:,:3]
155 |
156 | #Stolen from ECC code
157 | if aug:
158 | M = np.eye(3)
159 | s = random.uniform(1/1.1, 1.1)
160 | M = np.dot(transforms3d.zooms.zfdir2mat(s), M)
161 | #angle = random.uniform(0, 2*math.pi)
162 | #M = np.dot(transforms3d.axangles.axangle2mat([0,0,1], angle), M) # z=upright assumption
163 | if random.random() < 0.5/2:
164 | M = np.dot(transforms3d.zooms.zfdir2mat(-1, [1,0,0]), M)
165 | if random.random() < 0.5/2:
166 | M = np.dot(transforms3d.zooms.zfdir2mat(-1, [0,1,0]), M)
167 | xyz = np.dot(xyz,M.T)
168 | if feature_type == 1:
169 | kd = pcl.KdTreeFLANN(cloud)
170 | #if aug:
171 | # currentK = random.randint(np.maximum(1,K-2),K+2)
172 | # indices, sqr_distances = kd.nearest_k_search_for_cloud(cloud, currentK)
173 | #else:
174 | indices, sqr_distances = kd.nearest_k_search_for_cloud(cloud, K) # K = 2 gives itself and other point from cloud which is closest
175 |
176 | vertexMean = np.mean(xyz, axis=0)
177 | vertexStd = np.std(xyz, axis=0)
178 | #Jiggle the model a little bit if it is perfectly aligned with the axes
179 | #print(input)
180 | if not vertexStd.all():
181 | M = np.eye(3)
182 | angle = random.uniform(0.01,0.1,size=3)
183 | sign = random.choice([-1,1],size=3,replace=True)
184 | M = np.dot(transforms3d.axangles.axangle2mat([0,0,1], sign[0] * angle[0]), M)
185 | M = np.dot(transforms3d.axangles.axangle2mat([0,1,0], sign[1] * angle[1]), M)
186 | M = np.dot(transforms3d.axangles.axangle2mat([1,0,0], sign[2] * angle[2]), M)
187 | xyz = np.dot(xyz,M.T)
188 | vertexMean = np.mean(xyz, axis=0)
189 | vertexStd = np.std(xyz, axis=0)
190 | xyz = (xyz - vertexMean)/vertexStd
191 |
192 | num_nodes = xyz.shape[0]
193 |
194 | sqr_distances[:,0] += 1 #includes self-loops
195 | valid = np.logical_or(indices > 0, sqr_distances>1e-10)
196 | rowi, coli = np.nonzero(valid)
197 | idx = indices[(rowi,coli)]
198 |
199 | #print("XYZ Shape {0}".format(xyz.shape))
200 | edges = np.vstack([idx, rowi]).transpose()
201 | #print("Edge Shape {0}".format(edges.shape))
202 | A = np.zeros(shape=(MAX_SIZE,8, MAX_SIZE))
203 | zindices = np.dot([4, 2, 1], np.greater((xyz[edges[:,0],:] - xyz[edges[:,1],:]).transpose(), np.zeros((3,edges.shape[0]))));
204 | edgeLen = 1
205 | # print('From {0} to {1}: Len {2}',i,j,edgeLen)
206 | A[edges[:,0], zindices, edges[:,1]] = edgeLen
207 | A[edges[:,1], zindices, edges[:,0]] = edgeLen
208 |
209 | elif feature_type == 0:
210 | RADIUS = 0.5
211 | vertexMean = np.mean(xyz, axis=0)
212 | vertexStd = np.std(xyz, axis=0)
213 | #Jiggle the model a little bit if it is perfectly aligned with the axes
214 | #print(input)
215 | if not vertexStd.all():
216 | M = np.eye(3)
217 | angle = np.random.uniform(0.01,0.1,size=3)
218 | sign = np.random.choice([-1,1],size=3,replace=True)
219 | M = np.dot(transforms3d.axangles.axangle2mat([0,0,1], sign[0] * angle[0]), M)
220 | M = np.dot(transforms3d.axangles.axangle2mat([0,1,0], sign[1] * angle[1]), M)
221 | M = np.dot(transforms3d.axangles.axangle2mat([1,0,0], sign[2] * angle[2]), M)
222 | V = np.dot(V,M.T)
223 | vertexMean = np.mean(V, axis=0)
224 | vertexStd = np.std(V, axis=0)
225 | V = (V - vertexMean)/vertexStd
226 | #V = np.pad(V,pad_width=((0,MAX_SIZE - V.shape[0]),(0,0)),mode='constant')
227 | kdtree = scipy.spatial.KDTree(V)
228 | knns = kdtree.query_ball_tree(kdtree,r=RADIUS)
229 | A = np.zeros(shape=(MAX_SIZE,8, MAX_SIZE))
230 | numNeighbors = [len(x) for x in knns]
231 | v1 = np.repeat(np.arange(V.shape[0]),numNeighbors)
232 | knnsStack = np.concatenate(knns)
233 | zindex = np.dot([4, 2, 1], np.greater((V[v1] - V[knnsStack]).transpose(), np.zeros((3,len(knnsStack)))));
234 | edgeLen = 1
235 | A[v1, zindex, knnsStack] = edgeLen
236 | A[knnsStack,zindex, v1] = edgeLen
237 |
238 | return xyz.astype(np.float32), A.astype(np.float32), label
239 |
--------------------------------------------------------------------------------
/src/graphcnn/helper.py:
--------------------------------------------------------------------------------
1 | from __future__ import print_function
2 | from datetime import datetime
3 | import os
4 | import numpy as np
5 |
6 | class GraphCNNKeys(object):
7 | TRAIN_SUMMARIES = "train_summaries"
8 | TEST_SUMMARIES = "test_summaries"
9 |
10 | class GraphCNNGlobal(object):
11 | BN_DECAY = 0.999
12 | GRAPHCNN_INIT_FACTOR = 1.
13 | GRAPHCNN_I_FACTOR = 1.0
14 |
15 | def print_ext(*args):
16 | print(str(datetime.now()), *args)
17 |
18 | def verify_dir_exists(dirname):
19 | if os.path.isdir(os.path.dirname(dirname)) == False:
20 | os.makedirs(os.path.dirname(dirname))
21 |
22 | def get_node_mask(graph_size, max_size=None):
23 | if max_size == None:
24 | max_size = np.max(graph_size)
25 | return np.array([np.pad(np.ones([s, 1]), ((0, max_size-s), (0, 0)), 'constant', constant_values=(0)) for s in graph_size], dtype=np.float32)
26 |
27 | def _tf_print(*args):
28 | for i in range(len(args)):
29 | print(args[i].shape)
30 | print(args[i])
31 | return args
32 |
33 | def make_print(*args):
34 | import tensorflow as tf
35 |
36 | result = tf.py_func(_tf_print, args, [ s.dtype for s in args])
37 | for i in range(len(args)):
38 | result[i].set_shape(args[i].get_shape())
39 | return result
--------------------------------------------------------------------------------
/src/graphcnn/layers.py:
--------------------------------------------------------------------------------
1 | from graphcnn.helper import *
2 | import tensorflow as tf
3 | import numpy as np
4 | import math
5 | import os
6 | import os.path
7 | from tensorflow.contrib.layers.python.layers import utils
8 | import pdb
9 |
10 | def _histogram_summaries(var, name=None):
11 | if name is None:
12 | return tf.summary.histogram(var.name, var)
13 | else:
14 | return tf.summary.histogram(name, var)
15 |
16 | def make_variable(name, shape, initializer=tf.truncated_normal_initializer(), regularizer=None):
17 | dtype = tf.float32
18 | var = tf.get_variable(name, shape, initializer=initializer, regularizer=regularizer, dtype=dtype)
19 | _histogram_summaries(var)
20 | return var
21 |
22 | def make_bias_variable(name, shape):
23 | dtype = tf.float32
24 | var = tf.get_variable(name, shape, initializer=tf.constant_initializer(0.1), dtype=dtype)
25 | _histogram_summaries(var)
26 | return var
27 |
28 | def make_variable_with_weight_decay(name, shape, stddev=0.01, wd=0.005):
29 | dtype = tf.float32
30 | regularizer = None
31 | if wd is not None and wd > 1e-7:
32 | def regularizer(var):
33 | return tf.multiply(tf.nn.l2_loss(var), wd, name='weight_loss')
34 | var = make_variable(name, shape, initializer=tf.truncated_normal_initializer(stddev=stddev), regularizer=regularizer)
35 | return var
36 |
37 | def make_bn(input, phase, axis=-1, epsilon=0.001, mask=None, num_updates=None, name=None):
38 | default_decay = GraphCNNGlobal.BN_DECAY
39 | with tf.variable_scope(name, default_name='BatchNorm') as scope:
40 | input_size = input.get_shape()[axis].value
41 | if axis == -1:
42 | axis = len(input.get_shape())-1
43 | axis_arr = [i for i in range(len(input.get_shape())) if i != axis]
44 | if mask == None:
45 | batch_mean, batch_var = tf.nn.moments(input, axis_arr)
46 | else:
47 | batch_mean, batch_var = tf.nn.weighted_moments(input, axis_arr, mask)
48 | gamma = make_variable('gamma', input_size, initializer=tf.constant_initializer(1))
49 | beta = make_bias_variable('bias', input_size)
50 | ema = tf.train.ExponentialMovingAverage(decay=default_decay, num_updates=num_updates)
51 |
52 | def mean_var_with_update():
53 | ema_apply_op = ema.apply([batch_mean, batch_var])
54 | with tf.control_dependencies([ema_apply_op]):
55 | return tf.identity(batch_mean), tf.identity(batch_var)
56 | mean, var = tf.cond(phase, mean_var_with_update, lambda: (ema.average(batch_mean), ema.average(batch_var)))
57 | batch_norm = tf.nn.batch_normalization(input, mean, var, beta, gamma, 1e-3)
58 | _histogram_summaries(batch_norm, 'batch_norm')
59 | return batch_norm
60 |
61 |
62 | def batch_mat_mult(A, B):
63 | A_shape = tf.shape(A)
64 | A_reshape = tf.reshape(A, [-1, A_shape[-1]])
65 |
66 | # So the Tensor has known dimensions
67 | if B.get_shape()[1] == None:
68 | axis_2 = -1
69 | else:
70 | axis_2 = B.get_shape()[1]
71 | result = tf.matmul(A_reshape, B)
72 | result = tf.reshape(result, tf.stack([A_shape[0], A_shape[1], axis_2]))
73 | return result
74 |
75 | def make_softmax_layer(V, axis=1, name=None):
76 | with tf.variable_scope(name, default_name='Softmax') as scope:
77 | max_value = tf.reduce_max(V, axis=axis, keep_dims=True)
78 | exp = tf.exp(tf.subtract(V, max_value))
79 | prob = tf.div(exp, tf.reduce_sum(exp, axis=axis, keep_dims=True))
80 | _histogram_summaries(prob)
81 | return prob
82 |
83 | def make_graphcnn_layer(V, A, no_filters, stride=1, order=1, name=None):
84 | with tf.variable_scope(name, default_name='Graph-CNN') as scope:
85 | weightList = []
86 | no_A = A.get_shape()[2].value
87 | no_features = V.get_shape()[2].value
88 | W_I = make_variable_with_weight_decay('weights_I', [no_features, no_filters], stddev=math.sqrt(GraphCNNGlobal.GRAPHCNN_I_FACTOR/(no_features*(no_A+1)*GraphCNNGlobal.GRAPHCNN_INIT_FACTOR)))
89 | b = make_bias_variable('bias', [no_filters])
90 | result = batch_mat_mult(V, W_I) + b
91 | weightList.append(W_I)
92 |
93 | Acurrent = A
94 | for k in range(1,order + 1):
95 | if k % stride == 0:
96 | with tf.variable_scope('Order' + str(k)) as scope:
97 | W = make_variable_with_weight_decay('weights', [no_features*no_A, no_filters], stddev=math.sqrt(1.0/(no_features*(no_A+1)*GraphCNNGlobal.GRAPHCNN_INIT_FACTOR)))
98 | A_shape = tf.shape(Acurrent)
99 | A_reshape = tf.reshape(Acurrent, tf.stack([-1, A_shape[1]*no_A, A_shape[1]]))
100 | n = tf.matmul(A_reshape, V)
101 | n = tf.reshape(n, [-1, A_shape[1], no_A*no_features])
102 | result = batch_mat_mult(n, W)
103 | weightList.append(W)
104 | Acurrent = tf.transpose(tf.matmul(tf.transpose(Acurrent,[0,2,1,3]), tf.transpose(A,[0,2,1,3])),[0,2,1,3])
105 | _histogram_summaries(Acurrent, "Acurrent")
106 | _histogram_summaries(result, "Result")
107 | return result, weightList
108 |
109 | def make_sparse_graphcnn_layer(V, A, no_filters, stride=1, order=1, name=None):
110 | here = os.path.dirname(__file__) + '/util/ops/'
111 | #For now, assume no weights. This just tests A*V
112 | if os.path.isfile(os.path.join(here, 'SparseConv.so')):
113 | _graphcnn_conv_sparse_module = tf.load_op_library(os.path.join(here, 'SparseConv.so'))
114 | if isinstance(A, tf.Tensor):
115 | no_A = A.get_shape()[2].value
116 | no_features = V.get_shape()[2].value
117 |
118 | Acurrent = A
119 | for k in range(1,order + 1):
120 | if k % stride == 0:
121 | with tf.variable_scope('Order' + str(k)) as scope:
122 | #W = make_variable_with_weight_decay('weights', [no_features*no_A, no_filters], stddev=math.sqrt(1.0/(no_features*(no_A+1)*GraphCNNGlobal.GRAPHCNN_INIT_FACTOR)))
123 | A_shape = tf.shape(Acurrent)
124 | A_reshape = tf.reshape(Acurrent, tf.stack([-1, A_shape[1]*no_A, A_shape[1]]))
125 | n = tf.matmul(A_reshape, V)
126 | n = tf.reshape(n, [-1, A_shape[1], no_A*no_features])
127 | result = tf.reduce_sum(n,axis=2)
128 | Acurrent = tf.transpose(tf.matmul(tf.transpose(Acurrent,[0,2,1,3]), tf.transpose(A,[0,2,1,3])),[0,2,1,3])
129 | _histogram_summaries(Acurrent, "Acurrent")
130 | _histogram_summaries(result, "Result")
131 | return result, []
132 | elif isinstance(A, tf.SparseTensorValue):
133 | return _graphcnn_conv_sparse_module.sparse_graph_convolution(V, A.indices, A.values, num_filters=no_filters), []
134 |
135 |
136 | def make_graph_embed_pooling(V, A, no_vertices=1, mask=None, name=None):
137 | with tf.variable_scope(name, default_name='GraphEmbedPooling') as scope:
138 | factors, W = make_embedding_layer(V, no_vertices, name='Factors')
139 |
140 | if mask is not None:
141 | factors = tf.multiply(factors, mask)
142 | factors = make_softmax_layer(factors)
143 |
144 | result = tf.matmul(factors, V, transpose_a=True)
145 |
146 | if no_vertices == 1:
147 | no_features = V.get_shape()[2].value
148 | return tf.reshape(result, [-1, no_features]), A
149 |
150 | result_A = tf.reshape(A, (tf.shape(A)[0], -1, tf.shape(A)[-1]))
151 | result_A = tf.matmul(result_A, factors)
152 | result_A = tf.reshape(result_A, (tf.shape(A)[0], tf.shape(A)[-1], -1))
153 | result_A = tf.matmul(factors, result_A, transpose_a=True)
154 | result_A = tf.reshape(result_A, (tf.shape(A)[0], no_vertices, A.get_shape()[2].value, no_vertices))
155 | _histogram_summaries(result, "result")
156 | _histogram_summaries(result_A, "result_a")
157 | return result, result_A, W
158 |
159 | def make_embedding_layer(V, no_filters, name=None):
160 | with tf.variable_scope(name, default_name='Embed') as scope:
161 | no_features = V.get_shape()[-1].value
162 | W = make_variable_with_weight_decay('weights', [no_features, no_filters], stddev=1.0/math.sqrt(no_features))
163 | b = make_bias_variable('bias', [no_filters])
164 | V_reshape = tf.reshape(V, (-1, no_features))
165 | s = tf.slice(tf.shape(V), [0], [len(V.get_shape())-1])
166 | s = tf.concat([s, tf.stack([no_filters])], 0)
167 | result = tf.reshape(tf.matmul(V_reshape, W) + b, s)
168 | _histogram_summaries(result, "result")
169 | return result, W
170 |
171 | #MASK should be LxNxN, even if L = 1
172 | #Will of course need to reshape later
173 | def make_mask_block(Aaccprev, Akprev, A, name=None):
174 | with tf.name_scope(name, default_name='MaskBlock') as scope:
175 | Aacc = tf.minimum(Aaccprev + Akprev, tf.ones(tf.shape(Aaccprev)))
176 | # pdb.set_trace()
177 | mm = tf.transpose(tf.matmul(tf.transpose(Akprev,[0,2,1,3]), tf.transpose(A,[0,2,1,3])),[0,2,1,3])
178 | Ak = tf.minimum(mm, tf.ones(tf.shape(Akprev)))
179 | Amask = Ak - Aacc
180 | # Aout = A
181 |
182 | _histogram_summaries(Amask, "Amask")
183 | return Amask, Aacc, Ak, A
184 |
185 | def make_init_mask_block(A, name=None):
186 | with tf.name_scope(name, default_name='InitMaskBlock') as scope:
187 | Ashape = tf.shape(A)
188 | no_A = Ashape[2]
189 | I = tf.eye(Ashape[1],batch_shape=[Ashape[0]])
190 | I = tf.transpose(tf.tile(tf.expand_dims(I,0), tf.stack([no_A,1,1,1])), [1,2,0,3])
191 | Aacc = tf.minimum(I + A, tf.ones(tf.shape(A)))
192 | Ak = A
193 | # Aout = Aacc
194 | # pdb.set_trace()
195 | Amask = tf.maximum(A - I, tf.zeros(tf.shape(A)))
196 | _histogram_summaries(Amask, "init_Amask")
197 | return Amask, Aacc, Ak, Aacc
198 |
199 | def make_graphcnn_unbiased_layer(V, A, no_filters, Amask, Aaccprev, Akprev, Aout, stride=1, order=1, name=None, prev_layer=None):
200 | with tf.variable_scope(name, default_name='Graph-CNN') as scope:
201 | weightList = []
202 | if 'conv1' in scope.name:
203 | Amask, Aaccprev, Akprev, Aout = make_init_mask_block(A)
204 | A = Aout
205 |
206 | Amasked = tf.multiply(A,Amask)
207 | no_A = A.get_shape()[2].value
208 | no_features = V.get_shape()[2].value
209 | W_I = make_variable_with_weight_decay('weights_I', [no_features, no_filters], stddev=math.sqrt(GraphCNNGlobal.GRAPHCNN_I_FACTOR/(no_features*(no_A+1)*GraphCNNGlobal.GRAPHCNN_INIT_FACTOR)))
210 | b = make_bias_variable('bias', [no_filters])
211 | Vout = batch_mat_mult(V, W_I) + b
212 | weightList.append(W_I)
213 | for k in range(1,order + 1):
214 | if k % stride == 0:
215 | with tf.variable_scope('Order' + str(k)) as scope:
216 | W = make_variable_with_weight_decay('weights', [no_features*no_A, no_filters], stddev=math.sqrt(1.0/(no_features*(no_A+1)*GraphCNNGlobal.GRAPHCNN_INIT_FACTOR)))
217 | A_shape = tf.shape(Amasked)
218 | A_reshape = tf.reshape(Amasked, tf.stack([-1, A_shape[1]*no_A, A_shape[1]]))
219 | n = tf.matmul(A_reshape, V)
220 | n = tf.reshape(n, [-1, A_shape[1], no_A*no_features])
221 | Vout = Vout + batch_mat_mult(n, W)
222 | weightList.append(W)
223 | Amask, Aaccprev, Akprev, Aout = make_mask_block(Aaccprev, Akprev, A)
224 | Amasked = tf.multiply(Akprev,Amask)
225 | # pdb.set_trace()
226 | _histogram_summaries(Amasked, "Amasked")
227 | return Vout, Amask, Aaccprev, Akprev, Aout, weightList
228 |
229 | def make_graph_pooling_layer(V, A, P, name=None):
230 | with tf.variable_scope(name,default_name='Graph-Pooling') as scope:
231 | Vout = tf.matmul(tf.transpose(P,perm=[0,2,1]),V)
232 | Ashape = tf.shape(A)
233 | Prep = tf.tile(tf.expand_dims(P,2),[1,1,Ashape[2],1])
234 | Ptranspose = tf.transpose(Prep,perm=[0,2,3,1])
235 | Pnottranspose = tf.transpose(Prep,perm=[0,2,1,3])
236 | Abatched = tf.transpose(A,perm=[0,2,1,3])
237 | leftMultiply = tf.matmul(Ptranspose,Abatched)
238 | rightMultiply = tf.matmul(leftMultiply,Pnottranspose)
239 | Aout = tf.transpose(rightMultiply,perm=[0,2,1,3])
240 | return Vout, Aout
241 |
242 | def make_graph_maxpooling_layer(V, A, P, name=None):
243 | with tf.variable_scope(name,default_name='Graph-Pooling') as scope:
244 | Pextend = tf.expand_dims(tf.transpose(P,perm=[0,2,1]),3)
245 | Vextend = tf.expand_dims(V,1)
246 | #Use broadcasting tricks to get the maximum vertex of each cluster
247 | #Each column of P^T is an indicator of whether that vertex is a candidate
248 | #in a given coarse cluster
249 | #The number of rows is the number of coarse vertices
250 | #We want to mutiply each individual vertex feature vector by the scalar indicator
251 | #Then take the maximum for each coarse vertex
252 | Vout = tf.reduce_max(tf.multiply(Pextend,Vextend),axis=2)
253 | #Vout = tf.matmul(tf.transpose(P,perm=[0,2,1]),V)
254 | Ashape = tf.shape(A)
255 | Prep = tf.tile(tf.expand_dims(P,2),[1,1,Ashape[2],1])
256 | Ptranspose = tf.transpose(Prep,perm=[0,2,3,1])
257 | Pnottranspose = tf.transpose(Prep,perm=[0,2,1,3])
258 | Abatched = tf.transpose(A,perm=[0,2,1,3])
259 | leftMultiply = tf.matmul(Ptranspose,Abatched)
260 | rightMultiply = tf.matmul(leftMultiply,Pnottranspose)
261 | Aout = tf.transpose(rightMultiply,perm=[0,2,1,3])
262 | return Vout, Aout
263 |
264 |
265 | def make_graph_unpooling_layer(V, A, P, name=None):
266 | with tf.variable_scope(name, default_name='Graph-Unpooling') as scope:
267 | Vout = tf.matmul(P, V)
268 | Ashape = tf.shape(A)
269 | Prep = tf.tile(tf.expand_dims(P, 2), [1, 1, Ashape[2], 1])
270 | Ptranspose = tf.transpose(Prep, perm=[0, 2, 3, 1])
271 | Pnottranspose = tf.transpose(Prep, perm=[0, 2, 1, 3])
272 | Abatched = tf.transpose(A, perm=[0, 2, 1, 3])
273 | leftMultiply = tf.matmul(Pnottranspose, Abatched)
274 | rightMultiply = tf.matmul(leftMultiply, Ptranspose)
275 | Aout = tf.transpose(rightMultiply, perm=[0, 2, 1, 3])
276 | return Vout, Aout
277 |
278 |
279 |
280 |
--------------------------------------------------------------------------------
/src/graphcnn/network.py:
--------------------------------------------------------------------------------
1 | from graphcnn.layers import *
2 | from graphcnn.network_description import GraphCNNNetworkDescription
3 | import tensorflow as tf
4 | import pdb
5 | class GraphCNNNetwork(object):
6 | def __init__(self):
7 | self.current_V = None
8 | self.current_A = None
9 | self.weightList = []
10 | self.current_mask = None
11 | self.labels = None
12 | self.network_debug = False
13 |
14 | with tf.device("/cpu:0"):
15 | self.Amask = None
16 | self.Aaccprev = None
17 | self.Akprev = None
18 | self.Aout = None
19 |
20 |
21 |
22 | def create_network(self, input):
23 | self.current_V = input[0]
24 | self.current_A = input[1]
25 | self.labels = input[2]
26 | #if len(input) > 3:
27 | # self.current_mask = input[3]
28 | #else:
29 | # self.current_mask = None
30 |
31 | if len(input) > 3:
32 | self.current_Ps = input[3:]
33 | else:
34 | self.current_Ps = None
35 |
36 | if self.network_debug:
37 | if self.current_mask:
38 | size = tf.reduce_sum(self.current_mask, axis=1)
39 | self.current_V = tf.Print(self.current_V, [tf.shape(self.current_V), tf.reduce_max(size), tf.reduce_mean(size)], message='Input V Shape, Max size, Avg. Size:')
40 | else:
41 | self.current_V = tf.Print(self.current_V, [tf.shape(self.current_V)], message='Input V Shape')
42 | return input
43 |
44 |
45 | def make_batchnorm_layer(self):
46 | self.current_V = make_bn(self.current_V, self.is_training, mask=self.current_mask, num_updates = self.global_step)
47 | return self.current_V
48 |
49 | # Equivalent to 0-hop filter
50 | def make_embedding_layer(self, no_filters, name=None, with_bn=True, with_act_func=True):
51 | with tf.variable_scope(name, default_name='Embed') as scope:
52 | self.current_V, W = make_embedding_layer(self.current_V, no_filters)
53 | self.weightList.append(W)
54 | if with_bn:
55 | self.make_batchnorm_layer()
56 | if with_act_func:
57 | self.current_V = tf.nn.relu(self.current_V)
58 | return self.current_V, self.current_A, self.current_mask
59 |
60 | def make_dropout_layer(self, keep_prob=0.5):
61 | self.current_V = tf.cond(self.is_training, lambda:tf.nn.dropout(self.current_V, keep_prob=keep_prob), lambda:(self.current_V))
62 | return self.current_V
63 |
64 | def make_graphcnn_layer(self, no_filters, stride=1, order=1, name=None, with_bn=True, with_act_func=True):
65 | with tf.variable_scope(name, default_name='Graph-CNN') as scope:
66 | self.current_V, weightList = make_graphcnn_layer(self.current_V, self.current_A, no_filters, stride, order)
67 | self.weightList += weightList
68 | if with_bn:
69 | self.make_batchnorm_layer()
70 | if with_act_func:
71 | self.current_V = tf.nn.relu(self.current_V)
72 | if self.network_debug:
73 | batch_mean, batch_var = tf.nn.moments(self.current_V, np.arange(len(self.current_V.get_shape())-1))
74 | self.current_V = tf.Print(self.current_V, [tf.shape(self.current_V), batch_mean, batch_var], message='"%s" V Shape, Mean, Var:' % scope.name)
75 | return self.current_V
76 |
77 | def make_graphcnn_resnet_layer(self, no_filters, stride=1, order=1, name=None, with_bn=True, with_act_func=True):
78 | with tf.variable_scope(name, default_name='Graph-CNN-resnet') as scope:
79 | V_origin = tf.identity(self.current_V)
80 | self.make_graphcnn_layer(no_filters, stride, order,name+'-conv1')
81 | self.make_graphcnn_layer(no_filters, stride, order,name+'-conv2')
82 | self.make_graphcnn_layer(no_filters, stride, order,name+'-conv3')
83 | self.current_V+=V_origin
84 | return self.current_V
85 |
86 | def make_graphcnn_resnet_or_densenet_layer(self, no_filters=[16,16,16], stride=[1,1,1], order=[1,1,1], name=None, with_bn=[True,True, True], with_act_func=[True, True, True],type=0):
87 | ###type==0: Resnet skip connection block
88 | ###type==1: Densenet block, all are connected to each other
89 | if type==0:
90 | with tf.variable_scope(name, default_name='Graph-CNN-resnet') as scope:
91 | V_origin = tf.identity(self.current_V)
92 | for i in xrange(len(no_filters)):
93 | self.make_graphcnn_layer(no_filters[i], stride[i], order[i],name+'-conv'+str(i))
94 | self.current_V+=V_origin
95 | elif type==1:
96 | with tf.variable_scope(name, default_name='Graph-CNN-resnet') as scope:
97 | # V_origin = tf.identity(self.current_V)
98 | list_V = []
99 | for i in xrange(len(no_filters)):
100 | list_V.append(tf.identity(self.current_V))
101 | self.make_graphcnn_layer(no_filters[i], stride[i], order[i],name+'-conv'+str(i))
102 | for j in xrange(len(list_V)):
103 | self.current_V+=list_V[j]
104 | return self.current_V
105 |
106 | def make_graphcnn_unbiased_resnet_or_densenet_layer(self, no_filters=[16,16,16], stride=[1,1,1], order=[1,1,1], name=None, with_bn=[True,True, True], with_act_func=[True, True, True],type=0):
107 | ###type==0: Resnet skip connection block
108 | ###type==1: Densenet block, all are connected to each other
109 | if type==0:
110 | with tf.variable_scope(name, default_name='Graph-CNN-resnet') as scope:
111 | V_origin = tf.identity(self.current_V)
112 | for i in xrange(len(no_filters)):
113 | self.make_graphcnn_unbiased_layer(no_filters[i], stride[i], order[i],name+'-conv'+str(i))
114 | self.current_V+=V_origin
115 | elif type==1:
116 | with tf.variable_scope(name, default_name='Graph-CNN-resnet') as scope:
117 | # V_origin = tf.identity(self.current_V)
118 | list_V = []
119 | for i in xrange(len(no_filters)):
120 | list_V.append(tf.identity(self.current_V))
121 | self.make_graphcnn_unbiased_layer(no_filters[i], stride[i], order[i],name+'-conv'+str(i))
122 | for j in xrange(len(list_V)):
123 | self.current_V+=list_V[j]
124 | return self.current_V
125 |
126 | def make_graphcnn_unbiased_layer(self, no_filters, stride=1, order=1, name=None, with_bn=True, with_act_func=True, prev_layer=None):
127 | # pdb.set_trace()
128 | with tf.variable_scope(name, default_name='Graph-CNN-biased') as scope:
129 | self.current_V, self.Amask, self.Aaccprev, self.Akprev, self.Aout, weightList = make_graphcnn_unbiased_layer(self.current_V, self.current_A, no_filters, self.Amask, self.Aaccprev, self.Akprev, self.Aout, stride, order, name=None, prev_layer=prev_layer)
130 | self.weightList += weightList
131 | self.current_A = self.Akprev
132 | if with_bn:
133 | self.make_batchnorm_layer()
134 | if with_act_func:
135 | self.current_V = tf.nn.relu(self.current_V)
136 | if self.network_debug:
137 | batch_mean, batch_var = tf.nn.moments(self.current_V, np.arange(len(self.current_V.get_shape())-1))
138 | self.current_V = tf.Print(self.current_V, [tf.shape(self.current_V), batch_mean, batch_var], message='"%s" V Shape, Mean, Var:' % scope.name)
139 | return self.current_V, self.Amask, self.Aaccprev, self.Akprev, self.Aout
140 |
141 | def make_graph_embed_pooling(self, no_vertices=1, name=None, with_bn=True, with_act_func=True):
142 | with tf.variable_scope(name, default_name='GraphEmbedPool') as scope:
143 | self.current_V, self.current_A, W = make_graph_embed_pooling(self.current_V, self.current_A, mask=self.current_mask, no_vertices=no_vertices)
144 | self.current_mask = None
145 | self.weightList.append(W)
146 | if with_bn:
147 | self.make_batchnorm_layer()
148 | if with_act_func:
149 | self.current_V = tf.nn.relu(self.current_V)
150 | if self.network_debug:
151 | batch_mean, batch_var = tf.nn.moments(self.current_V, np.arange(len(self.current_V.get_shape())-1))
152 | self.current_V = tf.Print(self.current_V, [tf.shape(self.current_V), batch_mean, batch_var], message='Pool "%s" V Shape, Mean, Var:' % scope.name)
153 | return self.current_V, self.current_A, self.current_mask
154 |
155 | def make_fc_layer(self, no_filters, name=None, with_bn=False, with_act_func=True):
156 | with tf.variable_scope(name, default_name='FC') as scope:
157 | self.current_mask = None
158 |
159 | if len(self.current_V.get_shape()) > 2:
160 | no_input_features = int(np.prod(self.current_V.get_shape()[1:]))
161 | self.current_V = tf.reshape(self.current_V, [-1, no_input_features])
162 | self.current_V, W = make_embedding_layer(self.current_V, no_filters)
163 | self.weightList.append(W)
164 | if with_bn:
165 | self.make_batchnorm_layer()
166 | if with_act_func:
167 | self.current_V = tf.nn.relu(self.current_V)
168 | return self.current_V
169 |
170 |
171 | def make_cnn_layer(self, no_filters, name=None, with_bn=False, with_act_func=True, filter_size=3, stride=1, padding='SAME'):
172 | with tf.variable_scope(None, default_name='conv') as scope:
173 | dim = self.current_V.get_shape()[-1]
174 | kernel = make_variable_with_weight_decay('weights',
175 | shape=[filter_size, filter_size, dim, no_filters],
176 | stddev=math.sqrt(1.0/(no_filters*filter_size*filter_size)),
177 | wd=0.0005)
178 | conv = tf.nn.conv2d(self.current_V, kernel, [1, stride, stride, 1], padding=padding)
179 | biases = make_bias_variable('biases', [no_filters])
180 | self.current_V = tf.nn.bias_add(conv, biases)
181 | if with_bn:
182 | self.make_batchnorm_layer()
183 | if with_act_func:
184 | self.current_V = tf.nn.relu(self.current_V)
185 | return self.current_V
186 |
187 | def make_pool_layer(self, padding='SAME'):
188 | with tf.variable_scope(None, default_name='pool') as scope:
189 | dim = self.current_V.get_shape()[-1]
190 | self.current_V = tf.nn.max_pool(self.current_V, ksize=[1, 3, 3, 1], strides=[1, 2, 2, 1], padding=padding, name=scope.name)
191 |
192 | return self.current_V
193 |
194 | def make_graph_pooling_layer(self, Pindex, name=None):
195 | with tf.variable_scope(name, default_name='graph pooling') as scope:
196 | self.current_V,self.current_A = make_graph_pooling_layer(self.current_V, self.current_A, self.current_Ps[Pindex], name)
197 | return self.current_V,self.current_A
198 |
199 | def make_graph_maxpooling_layer(self, Pindex, name=None):
200 | with tf.variable_scope(name, default_name='graph pooling') as scope:
201 | self.current_V,self.current_A = make_graph_maxpooling_layer(self.current_V, self.current_A, self.current_Ps[Pindex], name)
202 | return self.current_V,self.current_A
203 |
204 | def make_graph_unpooling_layer(self, Pindex, name=None):
205 | with tf.variable_scope(name, default_name='graph pooling') as scope:
206 | self.current_V,self.current_A = make_graph_unpooling_layer(self.current_V, self.current_A, self.current_Ps[Pindex], name)
207 | return self.current_V,self.current_A
208 |
--------------------------------------------------------------------------------
/src/graphcnn/network_description.py:
--------------------------------------------------------------------------------
1 |
2 | class GraphCNNNetworkDescription(object):
3 | def __init__(self):
4 | self.network_description = []
5 |
6 | def create_network(self, input):
7 | self.network_description = []
8 | return input
9 |
10 | def get_description(self):
11 | return '-'.join(self.network_description)
12 |
13 | # Default names
14 | def __getattr__(self, name):
15 | return lambda *x, **key_x: self.make_default_layer(name, x, key_x)
16 |
17 | def make_default_layer(self, name, x, key_x):
18 | if name.startswith('make_'):
19 | name = name[5:]
20 | if name.endswith('_layer'):
21 | name = name[:-6]
22 |
23 | name = name.upper()
24 |
25 | if len(x) > 0:
26 | name = name + '(' + ','.join([str(s) for s in x]) +')'
27 |
28 | self.add_layer_desc(name)
29 |
30 | def add_layer_desc(self, desc):
31 | self.network_description.append(desc)
32 |
33 | def make_batchnorm_layer(self):
34 | pass
35 |
36 | # Equivalent to 0-hop filter
37 | def make_embedding_layer(self, no_filters, name=None, with_bn=True, with_act_func=True):
38 | self.add_layer_desc('Embed(%d)' % no_filters)
39 |
40 | def make_dropout_layer(self, keep_prob=0.5):
41 | self.add_layer_desc('Dropout(%.2f)' % keep_prob)
42 |
43 | def make_graphcnn_layer(self, no_filters, name=None, with_bn=True, with_act_func=True):
44 | self.add_layer_desc('CNN(%d)' % no_filters)
45 |
46 | def make_graph_embed_pooling(self, no_vertices=1, name=None, with_bn=True, with_act_func=True):
47 | self.add_layer_desc('GEP(%d)' % no_vertices)
48 |
--------------------------------------------------------------------------------
/src/graphcnn/util/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WDot/G3DNet/448e2e26646219de8cbb6d7ec54b168cddab09bb/src/graphcnn/util/__init__.py
--------------------------------------------------------------------------------
/src/graphcnn/util/modelnet/GraphData.py:
--------------------------------------------------------------------------------
1 | import numpy
2 | import itertools
3 | import scipy
4 | import numpy.random
5 | import math
6 | import transforms3d
7 |
8 | class GraphData(object):
9 | def __init__(self,numDir):
10 | self.vertexCount = 0
11 | self.V = []
12 | self.vertexLock = False
13 | self.numDir = numDir
14 |
15 | def addVertex(self, vertex):
16 | if not self.vertexLock:
17 | # print(numpy.array((vertex['x'],vertex['y'],vertex['z'])))
18 | self.vertexCount += 1
19 | self.V.append(numpy.array((vertex['x'], vertex['y'], vertex['z'])))
20 |
21 | def dropVertices(self,p):
22 | removedIndices = numpy.random.choice(range(self.vertexCount), size=int(math.ceil(p * self.vertexCount)), replace=False)
23 | for index in sorted(removedIndices,reverse=True):
24 | self.V.pop(index)
25 | self.vertexCount -= len(removedIndices)
26 |
27 | def lockVertices(self):
28 | self.vertexLock = True
29 | self.A = []
30 | for i in range(self.numDir):
31 | self.A.append(numpy.zeros((self.vertexCount, self.vertexCount)))
32 |
33 | def normalizeVertices(self):
34 | mean = numpy.mean(self.V,axis=0)
35 | std = numpy.std(self.V,axis=0)
36 | if not std.all():
37 | M = numpy.eye(3)
38 | angle = numpy.random.uniform(0.001, 0.1, size=3)
39 | sign = -1 * numpy.random.choice([0, 1], size=3, replace=True)
40 | M = numpy.dot(transforms3d.axangles.axangle2mat([0, 0, 1], sign[0] * angle[0]), M)
41 | M = numpy.dot(transforms3d.axangles.axangle2mat([0, 1, 0], sign[1] * angle[1]), M)
42 | M = numpy.dot(transforms3d.axangles.axangle2mat([1, 0, 0], sign[2] * angle[2]), M)
43 | for i in range(len(self.V)):
44 | self.V[i] = numpy.dot(self.V[i], M.T)
45 |
46 | mean = numpy.mean(self.V, axis=0)
47 | std = numpy.std(self.V, axis=0)
48 | for i in range(len(self.V)):
49 | self.V[i] -= mean
50 | self.V[i] /= std
51 |
52 | # Inspired by Python's "pairwise" recipe, but creates a cycle
53 |
54 | def __edgeIter(self, face):
55 | faceCycle = numpy.append(face[0], face[0][0])
56 | a, b = itertools.tee(faceCycle)
57 | next(b, None)
58 | return zip(a, b)
59 |
60 | def addEdge(self,vertex1,vertex2,edgeFeature):
61 | zindex = numpy.dot([4, 2, 1], numpy.greater((self.V[vertex1] - self.V[vertex2]), numpy.zeros(3)));
62 | edgeLen = 1
63 | # print('From {0} to {1}: Len {2}',i,j,edgeLen)
64 | self.A[zindex][vertex1, vertex2] = edgeFeature
65 | self.A[zindex][vertex2, vertex1] = edgeFeature
66 | #print('Edge Feature: {0}'.format(edgeFeature))
67 |
68 | def addFace(self, face):
69 | for i, j in self.__edgeIter(face):
70 | # edgeLen = 1./numpy.linalg.norm(self.V[i] - self.V[j],2).astype(numpy.float32)
71 | # Let's try this for simplicity, the information should theoretically
72 | # be in the nodes
73 | # Ignore edges on the -z axis
74 | #if self.V[i][2] >= 0 and self.V[j][2] >= 0:
75 | zindex = numpy.dot([4, 2, 1], numpy.greater((self.V[i] - self.V[j]), numpy.zeros(3)));
76 | edgeLen = 1
77 | # print('From {0} to {1}: Len {2}',i,j,edgeLen)
78 | self.A[zindex][i, j] = edgeLen
79 | self.A[zindex][j, i] = edgeLen
80 |
81 | def flattenA(self):
82 | Aout = numpy.zeros((self.vertexCount,self.vertexCount))
83 | for i in range(self.numDir):
84 | Aout += self.A[i]
85 | return Aout
86 |
87 |
88 |
89 |
90 | def saveAsMat(self, fileOut):
91 | # Need to compress otherwise each sample is way too big!
92 | #for i in range(self.numDir):
93 | # self.A[i] = scipy.sparse.coo_matrix(self.A[i])
94 | scipy.io.savemat(fileOut, mdict={'vCount': self.vertexCount, 'V': numpy.asarray(self.V, dtype=numpy.float32),
95 | 'A': self.A}, do_compression=True)
96 |
97 | def loadFromMat(self,fileIn):
98 | inDict = scipy.io.loadmat(fileIn)
99 | self.V = []
100 | for v in range(inDict['vCount']):
101 | self.V.append(inDict['V'][v][:])
102 |
103 | [_,L] = inDict['A'].shape
104 |
105 | self.A = []
106 | for l in range(L):
107 | print(inDict['A'][l].shape)
108 | self.A.append(inDict['A'][l][:][:])
109 |
110 | def plotGraph(self):
111 | pass
112 |
--------------------------------------------------------------------------------
/src/graphcnn/util/modelnet/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WDot/G3DNet/448e2e26646219de8cbb6d7ec54b168cddab09bb/src/graphcnn/util/modelnet/__init__.py
--------------------------------------------------------------------------------
/src/graphcnn/util/modelnet/decimatemeshes.mlx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/graphcnn/util/modelnet/decimatemeshes.py:
--------------------------------------------------------------------------------
1 | import os
2 | import os.path
3 | import sys
4 | import subprocess
5 | import ctypes
6 | SEM_NOGPFAULTERRORBOX = 0x0002 # From MSDN
7 | ctypes.windll.kernel32.SetErrorMode(SEM_NOGPFAULTERRORBOX);
8 | CREATE_NO_WINDOW = 0x08000000 # From Windows API
9 |
10 | #SCRIPT_PATH = 'decimatemeshes.mlx'
11 | SCRIPT_PATH = 'pointcloudify.mlx'
12 |
13 | def Main():
14 | if len(sys.argv) > 2 and os.path.isdir(sys.argv[1]):
15 | counter = 0
16 | for root, subdirs, files in os.walk(sys.argv[1]):
17 | subDirectory = root[len(sys.argv[1]):]
18 | for file in files:
19 | fname, ext = os.path.splitext(file)
20 | inputPath = root + '/' + file
21 | outputPath = sys.argv[2] + '/' + subDirectory + '/' + fname + '.ply'
22 | if not os.path.isdir(sys.argv[2] + '/' + subDirectory):
23 | os.makedirs(sys.argv[2] + '/' + subDirectory)
24 | if ext == '.off'\
25 | and not os.path.isfile(outputPath)\
26 | and os.stat(inputPath).st_size > 0:
27 | scriptStr = 'C:\Program Files\VCG\MeshLab\meshlabserver.exe -i \"{0}\" -o \"{1}\" -s \"{2}\"'.format(\
28 | inputPath, outputPath,SCRIPT_PATH)
29 | print(scriptStr)
30 | process = subprocess.Popen(scriptStr,creationflags=CREATE_NO_WINDOW)
31 | process.wait()
32 | counter += 1
33 | print('{0} files finished processing'.format(counter))
34 | elif os.stat(inputPath).st_size == 0:
35 | print('Empty File, garbage!')
36 | else:
37 | print('Could not find path!')
38 |
39 |
40 | Main()
41 |
--------------------------------------------------------------------------------
/src/graphcnn/util/modelnet/listfiles.py:
--------------------------------------------------------------------------------
1 | import os
2 | import os.path
3 | import sys
4 |
5 | def Main():
6 | if len(sys.argv) > 1 and os.path.isdir(sys.argv[1]):
7 | with open('testData516.txt','w') as testFile, open('trainData516.txt','w') as trainFile:
8 | for root, subdirs, files in os.walk(sys.argv[1]):
9 | subDirectory = root[len(sys.argv[1]):]
10 | for file in files:
11 | fname, ext = os.path.splitext(file)
12 | inputPath = root + '/' + file
13 | if 'test' in inputPath:
14 | testFile.write(inputPath + '\n')
15 | elif 'train' in inputPath:
16 | trainFile.write(inputPath + '\n')
17 |
18 | else:
19 | print('Could not find path!')
20 |
21 |
22 | Main()
23 |
--------------------------------------------------------------------------------
/src/graphcnn/util/modelnet/mesh2graph.py:
--------------------------------------------------------------------------------
1 | import plyfile
2 | import os
3 | import os.path
4 | import sys
5 | import numpy
6 | import itertools
7 | import numpy.linalg
8 | import scipy.io
9 | import scipy.sparse
10 | import GraphData as GD
11 |
12 | NUM_DIR = 8
13 |
14 | def ply2graph(plyPath):
15 | plydata = plyfile.PlyData.read(plyPath)
16 | graphData = GD.GraphData(NUM_DIR)
17 | for i in range(plydata['vertex'].count):
18 | graphData.addVertex(plydata['vertex'][i])
19 | graphData.lockVertices()
20 | for i in range(plydata['face'].count):
21 | # print(plydata['face'][i])
22 | graphData.addFace(plydata['face'][i])
23 | return graphData
24 |
25 |
26 | def Main():
27 | if len(sys.argv) > 2 and os.path.isdir(sys.argv[1]):
28 | # dirFiles = [f for f in os.listdir(sys.argv[1]) if os.path.isfile(os.path.join(sys.argv[1], f))]
29 | if not os.path.isdir(sys.argv[2]):
30 | os.mkdir(sys.argv[2])
31 | # for dirFile in dirFiles:
32 | # fname,ext = os.path.splitext(dirFile)
33 | for root, subdirs, files in os.walk(sys.argv[1]):
34 | subDirectory = root[len(sys.argv[1]):]
35 | for file in files:
36 | fname, ext = os.path.splitext(file)
37 | inputPath = root + '/' + file
38 | outputPath = sys.argv[2] + '/' + subDirectory + '/' + fname + '.mat'
39 | if not os.path.isdir(sys.argv[2] + '/' + subDirectory):
40 | os.makedirs(sys.argv[2] + '/' + subDirectory)
41 | if ext == '.ply' and not os.path.isfile(outputPath):
42 | graphData = ply2graph(inputPath)
43 | graphData.saveAsMat(outputPath)
44 | print('Saved {0}'.format(outputPath))
45 |
46 | else:
47 | print('Could not find path!')
48 |
49 | Main()
50 |
--------------------------------------------------------------------------------
/src/graphcnn/util/modelnet/meshresample.mlx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/src/graphcnn/util/modelnet/modelnet40fix.py:
--------------------------------------------------------------------------------
1 | #The usual Modelnet model header has a structure like this:
2 | #OFF
3 | #X Y Z
4 | #Some of the Modelnet40 model headers have a structure like this:
5 | #OFFX Y Z
6 | #This makes MeshlabServer unhappy. This script basically adds a newline at the appropriate place.
7 |
8 | import sys
9 | import os
10 | import os.path
11 | import re
12 |
13 | MATCH_HEADER = re.compile('(OFF)(([\d]+[\s]*)+)')
14 |
15 | def FixHeader(inPath,outPath):
16 | with open(inPath) as f:
17 | lines = f.read().splitlines()
18 | matches = MATCH_HEADER.findall(lines[0])
19 | if len(matches) > 0:
20 | newLine1 = matches[0][0]
21 | newLine2 = matches[0][1]
22 | print(newLine1)
23 | print(newLine2)
24 | lines[0] = newLine1
25 | lines.insert(1,newLine2)
26 | with open(outPath,'w+') as f:
27 | for line in lines:
28 | f.write(line + '\n')
29 |
30 |
31 |
32 |
33 | def Main():
34 | if len(sys.argv) > 2 and os.path.isdir(sys.argv[1]):
35 | counter = 0
36 | for root, subdirs, files in os.walk(sys.argv[1]):
37 | subDirectory = root[len(sys.argv[1]):]
38 | for file in files:
39 | fname, ext = os.path.splitext(file)
40 | inputPath = root + '/' + file
41 | outputPath = sys.argv[2] + '/' + subDirectory + '/' + fname + '.off'
42 | if not os.path.isdir(sys.argv[2] + '/' + subDirectory):
43 | os.makedirs(sys.argv[2] + '/' + subDirectory)
44 | if ext == '.off' and not os.path.isfile(outputPath):
45 | FixHeader(inputPath,outputPath)
46 | counter += 1
47 | #print('{0} files finished processing'.format(counter))
48 | else:
49 | print('Could not find path!')
50 |
51 |
52 | Main()
--------------------------------------------------------------------------------
/src/graphcnn/util/modelnet/plotMesh.py:
--------------------------------------------------------------------------------
1 | import sys
2 | import os
3 | import os.path
4 | import plyfile
5 | import numpy
6 | import scipy
7 | import scipy.spatial
8 | import scipy.io
9 | import GraphData as GD
10 |
11 | def Main():
12 | if len(sys.argv) > 2 and os.path.isfile(sys.argv[1]):
13 | graphData = GD.GraphData(int(sys.argv[2]))
14 | graphData.loadFromMat(sys.argv[1])
15 |
16 |
17 | else:
18 | print('Could not find path!')
19 |
20 | Main()
21 |
22 |
--------------------------------------------------------------------------------
/src/graphcnn/util/modelnet/plotPointCloud.py:
--------------------------------------------------------------------------------
1 | import sys
2 | import os
3 | import os.path
4 | import plyfile
5 | import numpy
6 | from mpl_toolkits.mplot3d import Axes3D
7 | import matplotlib.pyplot as plt
8 |
9 | def ply2structarray(plyPath):
10 | plydata = plyfile.PlyData.read(plyPath)
11 | vertices = numpy.array(plydata['vertex'][0],dtype=[('x','f4'),('y','f4'),('z','f4')])
12 | for i in range(1,plydata['vertex'].count):
13 | vertices = numpy.append(vertices,numpy.array([plydata['vertex'][i]],dtype=vertices.dtype))
14 | return vertices
15 |
16 | def Main():
17 | if len(sys.argv) > 1 and os.path.isfile(sys.argv[1]):
18 | points = ply2structarray(sys.argv[1])
19 |
20 | fig = plt.figure()
21 | ax = fig.add_subplot(111, projection='3d')
22 | ax.scatter(points['x'], points['y'], points['z'], c='r', marker='o')
23 |
24 | ax.set_xlabel('X Label')
25 | ax.set_ylabel('Y Label')
26 | ax.set_zlabel('Z Label')
27 |
28 | plt.show()
29 |
30 | else:
31 | print('Could not find path!')
32 |
33 | Main()
--------------------------------------------------------------------------------
/src/graphcnn/util/modelnet/pointCloud2Graph.py:
--------------------------------------------------------------------------------
1 | import sys
2 | import os
3 | import os.path
4 | import plyfile
5 | import numpy
6 | import scipy
7 | import scipy.spatial
8 | import scipy.io
9 | from .GraphData import GraphData as GD
10 |
11 | NUM_DIR = 6
12 |
13 | def ply2graph(plyPath):
14 | plydata = plyfile.PlyData.read(plyPath)
15 | graphData = GD.GraphData(NUM_DIR)
16 | for i in range(plydata['vertex'].count):
17 | graphData.addVertex(plydata['vertex'][i])
18 | graphData.lockVertices()
19 | graphData.normalizeVertices()
20 | kdtree = scipy.spatial.KDTree(graphData.V)
21 | #First nearest neighbor is always the point itself!
22 | knns = kdtree.query(graphData.V,k=(NUM_DIR+1))
23 | [vertexCount,edgeCount] = knns[0].shape
24 | for v1 in range(vertexCount):
25 | for v2 in range(1,edgeCount):
26 | graphData.addEdge(v1,knns[1][v1][v2],knns[0][v1][v2])
27 | return graphData
28 |
29 | def Main():
30 | if len(sys.argv) > 2 and os.path.isdir(sys.argv[1]):
31 | # dirFiles = [f for f in os.listdir(sys.argv[1]) if os.path.isfile(os.path.join(sys.argv[1], f))]
32 | if not os.path.isdir(sys.argv[2]):
33 | os.mkdir(sys.argv[2])
34 | # for dirFile in dirFiles:
35 | # fname,ext = os.path.splitext(dirFile)
36 | for root, subdirs, files in os.walk(sys.argv[1]):
37 | subDirectory = root[len(sys.argv[1]):]
38 | for file in files:
39 | fname, ext = os.path.splitext(file)
40 | inputPath = root + '/' + file
41 | outputPath = sys.argv[2] + '/' + subDirectory + '/' + fname + '.mat'
42 | if not os.path.isdir(sys.argv[2] + '/' + subDirectory):
43 | os.makedirs(sys.argv[2] + '/' + subDirectory)
44 | if ext == '.ply' and not os.path.isfile(outputPath):
45 | graphData = ply2graph(inputPath)
46 | graphData.saveAsMat(outputPath)
47 | print('Saved {0}'.format(outputPath))
48 |
49 | else:
50 | print('Could not find path!')
51 |
52 | Main()
53 |
--------------------------------------------------------------------------------
/src/graphcnn/util/modelnet/pointcloud2list.py:
--------------------------------------------------------------------------------
1 | import sys
2 | import os
3 | import os.path
4 | import plyfile
5 | import numpy
6 | import pcl
7 |
8 | NUM_DIR = 6
9 |
10 | def ply2array(plyPath):
11 | plydata = plyfile.PlyData.read(plyPath)
12 | vertices = []
13 | #vertices = numpy.array(plydata['vertex'][0])
14 | for i in range(plydata['vertex'].count):
15 | vertices.append(list(plydata['vertex'][i]))
16 | vertices = numpy.array(vertices)
17 | return vertices
18 |
19 | def ply2structarray(plyPath):
20 | plydata = plyfile.PlyData.read(plyPath)
21 | vertices = numpy.array(plydata['vertex'][0],dtype=[('x','f4'),('y','f4'),('z','f4')])
22 | for i in range(1,plydata['vertex'].count):
23 | vertices = numpy.append(vertices,numpy.array([plydata['vertex'][i]],dtype=vertices.dtype))
24 | return vertices
25 |
26 |
27 | def Main():
28 | if len(sys.argv) > 3 and os.path.isdir(sys.argv[1]):
29 | # dirFiles = [f for f in os.listdir(sys.argv[1]) if os.path.isfile(os.path.join(sys.argv[1], f))]
30 | if not os.path.isdir(sys.argv[2]):
31 | os.mkdir(sys.argv[2])
32 | # for dirFile in dirFiles:
33 | # fname,ext = os.path.splitext(dirFile)
34 | for root, subdirs, files in os.walk(sys.argv[1]):
35 | subDirectory = root[len(sys.argv[1]):]
36 | for file in files:
37 | fname, ext = os.path.splitext(file)
38 | inputPath = root + '/' + file
39 | outputPath = sys.argv[2] + '/' + subDirectory + '/' + fname + '.' + sys.argv[3]
40 | if not os.path.isdir(sys.argv[2] + '/' + subDirectory):
41 | os.makedirs(sys.argv[2] + '/' + subDirectory)
42 | if ext == '.ply' and not os.path.isfile(outputPath):
43 | if sys.argv[3] == 'npy':
44 | vertices = ply2structarray(inputPath)
45 | numpy.save(outputPath,vertices)
46 | elif sys.argv[3] == 'pcd':
47 | vertices = ply2array(inputPath)
48 | print(vertices.shape)
49 | pc = pcl.PointCloud(vertices)
50 | pcl.save(pc,outputPath)
51 | print('Saved {0}'.format(outputPath))
52 |
53 | else:
54 | print('Could not find path!')
55 |
56 | Main()
57 |
--------------------------------------------------------------------------------
/src/graphcnn/util/modelnet/pointcloudify.mlx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/src/graphcnn/util/pooling/AbstractAdjacencyCompander.py:
--------------------------------------------------------------------------------
1 | from abc import ABCMeta, abstractmethod
2 | import numpy as np
3 |
4 |
5 | class AbstractAdjacencyCompander(object):
6 | __metaclass__ = ABCMeta
7 |
8 | def __init__(self,V,A):
9 | self.V = V
10 | self.A = A
11 | self.N = V.shape[0]
12 | self.numDirs = 8
13 | self.flatA = 0
14 |
15 | @abstractmethod
16 | def contractA(self):
17 | pass
18 | @abstractmethod
19 | def expandA(self):
20 | pass
21 |
22 | def update(self,P):
23 | self.flatA = np.dot(np.dot(P.transpose(),self.flatA),P)
24 | self.V = np.dot(P.transpose(),self.V)
25 | self.N = self.V.shape[0]
26 |
27 |
--------------------------------------------------------------------------------
/src/graphcnn/util/pooling/AbstractPoolingPyramid.py:
--------------------------------------------------------------------------------
1 | from abc import ABCMeta, abstractmethod
2 |
3 | class AbstractPoolingPyramid:
4 | __metaclass__ = ABCMeta
5 |
6 | def __init__(self,numRepresentations,companderConstructor):
7 | self.numRepresentations = numRepresentations
8 | self.companderConstructor = companderConstructor
9 |
10 | @abstractmethod
11 | def makeP(self,A,V=None):
12 |
13 | pass
14 |
15 | @abstractmethod
16 | def write(self,Ps):
17 | pass
18 |
--------------------------------------------------------------------------------
/src/graphcnn/util/pooling/GeometricAdjacencyCompander.py:
--------------------------------------------------------------------------------
1 | from .AbstractAdjacencyCompander import AbstractAdjacencyCompander
2 | import numpy as np
3 |
4 | class GeometricAdjacencyCompander(AbstractAdjacencyCompander):
5 |
6 | def __init__(self,V,A):
7 | super(GeometricAdjacencyCompander, self).__init__(V, A)
8 |
9 | def contractA(self):
10 | self.flatA = self.A.sum(axis=1)
11 | return self.flatA
12 |
13 | def expandA(self):
14 | expandedA = np.zeros((self.N,self.numDirs,self.N))
15 | #print(self.N)
16 | #print(self.flatA.shape)
17 | (iVals,jVals) = np.nonzero(self.flatA)
18 | zindex = np.dot([4, 2, 1], np.greater((self.V[iVals,:] - self.V[jVals,:]).transpose(), np.zeros((3,iVals.shape[0]))));
19 | edgeLen = np.linalg.norm(self.V[iVals,:] - self.V[jVals,:],axis=1)
20 | # print('From {0} to {1}: Len {2}',i,j,edgeLen)
21 | expandedA[iVals, zindex, jVals] = edgeLen
22 | expandedA[jVals, zindex, iVals] = edgeLen
23 | self.A = expandedA
24 |
25 |
26 | return expandedA
27 |
--------------------------------------------------------------------------------
/src/graphcnn/util/pooling/GraclusPoolingPyramid.py:
--------------------------------------------------------------------------------
1 | from .AbstractPoolingPyramid import AbstractPoolingPyramid
2 | import scipy.sparse
3 | import pyamg
4 | import numpy as np
5 | #from graphcnn.util.modelnet.pointCloud2Graph import ply2graph
6 | import tensorflow as tf
7 | #import matlab.engine
8 | import sys
9 | import os
10 | import os.path
11 | #import matlab
12 | import scipy.sparse
13 | import time
14 | import datetime
15 | import subprocess
16 | from subprocess import STDOUT, check_output
17 |
18 | class GraclusPoolingPyramid(AbstractPoolingPyramid):
19 |
20 | def __init__(self,numRepresentations,companderConstructor, ratios):#, matlabEngine):
21 | super(GraclusPoolingPyramid, self).__init__(numRepresentations,companderConstructor)
22 | self.ratios = ratios
23 | #self.eng = matlabEngine
24 |
25 | #Assumes normalized cut
26 | #k is number of clusters
27 | def GraclusByHand(self,A,k):
28 | numVertices = A.shape[0]
29 | #Initial labels
30 | pi = np.random.randint(0,k,size=numVertices)
31 | #Weights of each vertex
32 | w = np.sum(A,axis=1)
33 | #Diagonal degree matrix
34 | D = np.diag(w)
35 | #print(D)
36 | #Should be high enough so that K is positive definite?
37 | #This essentially says any weighted sum z^T*A*z will always be positive for any z
38 | #Heck if I know how to do that
39 | sigma = 1
40 | wInv = w
41 | wInv[wInv == 0] = 1
42 | Dinv = np.diag(1/wInv)
43 | #Dinv = np.linalg.pinv(D)
44 | #print(Dinv)
45 | #Kernel matrix
46 | #The kernel matrix entries Kij are basically the kernel function phi applied to phi(a_i)phi(a_j)
47 | K = sigma * Dinv + np.dot(np.dot(Dinv,A),Dinv)
48 | ignoreDiagsK = np.invert(np.eye(K.shape[0]).astype(np.bool)).astype(np.float32)
49 | KignoreDiags = K * ignoreDiagsK
50 | #print(K)
51 | #Should technically check for convergence, but since I'm hacking I'll just set it to 10 every time
52 | tmax = 10
53 | for t in range(tmax):
54 | piOld = pi
55 | d = 1000000000*np.ones((A.shape[0],k))
56 | #Calculate distortion(cost)
57 | for c in range(k):
58 | i = np.arange(A.shape[0])
59 | j = np.where(pi == c)[0]
60 | l = np.where(pi == c)[0]
61 | if j.size > 0:
62 | wjsum = np.sum(w[j])
63 | if wjsum > 0:
64 | jv, lv = np.meshgrid(j,l)
65 | term1 = K[i,i]
66 | term2 = 2 * np.dot(w[j],KignoreDiags[np.ix_(i,j)].transpose()) / wjsum
67 | #print(w[jv])
68 | #print(w[lv])
69 | #print(K[jv,lv])
70 | #print(w[jv]*w[lv]*K[jv,lv])
71 | ignoreDiags = np.invert(np.eye(len(j)).astype(np.bool)).astype(np.float32)
72 |
73 | term3 = np.sum(w[jv]*w[lv]*K[jv,lv]*ignoreDiags) / (wjsum*wjsum)
74 | #Calculate mc for reals
75 | #NOT d(i,c), d(i,mc)!
76 | d[i,c] = term1 - term2 + term3
77 | #if np.isnan(d).any():
78 | # print('WHAAAAT')
79 | #Find minimum cost for each vertex i
80 | #print(pi)
81 | #print(d)
82 | pi = np.argmin(d,axis=1)
83 | if (pi == piOld).all():
84 | print('Number of Iterations: {0}'.format(t))
85 | break
86 | return pi
87 |
88 | def makeP(self,A,V=None):
89 | Plist = []
90 | companderInstance = self.companderConstructor(V,A)
91 |
92 | for pIndex in range(self.numRepresentations):
93 | outSize = int(np.floor(self.ratios[pIndex]*A.shape[0]))
94 | flatA = companderInstance.contractA()
95 | t = time.time()
96 | labels = self.GraclusByHand(flatA,outSize)
97 | print(labels)
98 | elapsed = time.time() - t
99 | print('Time Elapsed: {0}'.format(elapsed))
100 | #filename = datetime.datetime.now().strftime('adjacency-%Y%m%d-%H%M%S')
101 | #self.writeGraclusFile(flatA, filename)
102 | #scriptStr = '../util/pooling/graclus1.2/graclus.exe ' + filename + ' ' + str(outSize)
103 | #process = subprocess.Popen(scriptStr,stdout=STDOUT)
104 | #output = check_output(scriptStr, stderr=STDOUT, timeout=120)
105 | #process.wait()
106 | #sys.exit()
107 |
108 | #labels = self.eng.graclus(matlab.double(companderInstance.contractA().tolist()),outSize)
109 | #P = pyamg.aggregation.aggregate.lloyd_aggregation(\
110 | #scipy.sparse.csr_matrix(companderInstance.contractA()),ratio=self.ratios[pIndex],distance='same',maxiter=10)[0]
111 | labels = np.squeeze(np.array(labels).astype(np.int32) - 1)
112 | #print(labels)
113 | P = np.zeros((A.shape[0],outSize))
114 | P[np.arange(A.shape[0]),labels] = 1
115 | #print('Nonzero P: {0}'.format(np.count_nonzero(P)))
116 | Pcolsum = np.tile(np.count_nonzero(P,axis=0),(P.shape[0],1))
117 | Pcolsum[Pcolsum == 0] = 1
118 | P = np.divide(P,Pcolsum.astype(np.float64))
119 | Plist.append(P.astype(np.float32))
120 | #print(P.shape)
121 | companderInstance.update(P)
122 | A = companderInstance.expandA()
123 | V = companderInstance.V
124 | return Plist
125 |
126 | def write(self,Ps,As):
127 | AsparseList = []
128 | for A in As:
129 | currentA = A.tolist()
130 | pass
131 |
--------------------------------------------------------------------------------
/src/graphcnn/util/pooling/IdentityCompander.py:
--------------------------------------------------------------------------------
1 | from .AbstractAdjacencyCompander import AbstractAdjacencyCompander
2 | import numpy as np
3 |
4 | class IdentityCompander(AbstractAdjacencyCompander):
5 | def __init__(self,V,A):
6 | super(IdentityCompander, self).__init__(V, A)
7 |
8 | def contractA(self):
9 | self.flatA = self.A
10 | return self.flatA
11 |
12 | def expandA(self):
13 | self.A = self.flatA
14 | return self.A
15 |
--------------------------------------------------------------------------------
/src/graphcnn/util/pooling/ImageAdjacencyCompander.py:
--------------------------------------------------------------------------------
1 | from .AbstractAdjacencyCompander import AbstractAdjacencyCompander
2 | import numpy as np
3 | import sys
4 | import os
5 | import os.path
6 | sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__),'../../../../preprocessing')))
7 | from mnist_to_graph_tensor import mnist_adj_mat
8 |
9 | class ImageAdjacencyCompander(AbstractAdjacencyCompander):
10 | def __init__(self,V,A):
11 | super(ImageAdjacencyCompander, self).__init__(V, A)
12 | self.NUM_DIRS = 8
13 |
14 | def contractA(self):
15 | self.flatA = self.A.sum(axis=1)
16 | return self.flatA
17 |
18 | def expandA(self):
19 | return self.A
20 |
21 | def update(self, P):
22 | Ptiled = np.tile(np.expand_dims(P,axis=1),(1,self.NUM_DIRS,1))
23 | Ptranspose = np.transpose(Ptiled, axes=[1, 2, 0])
24 | Pnottranspose = np.transpose(Ptiled, axes=[1, 0, 2])
25 | Abatched = np.transpose(self.A, axes=[1, 0, 2])
26 | leftMultiply = np.matmul(Ptranspose, Abatched)
27 | rightMultiply = np.matmul(leftMultiply, Pnottranspose)
28 | self.A = np.transpose(rightMultiply, axes=[1, 0, 2])
29 | self.V = np.dot(P.transpose(), self.V)
30 | self.N = self.V.shape[0]
--------------------------------------------------------------------------------
/src/graphcnn/util/pooling/LloydPoolingPyramid.py:
--------------------------------------------------------------------------------
1 | from .AbstractPoolingPyramid import AbstractPoolingPyramid
2 | import scipy.sparse
3 | import pyamg
4 | import numpy as np
5 | #from graphcnn.util.modelnet.pointCloud2Graph import ply2graph
6 | import tensorflow as tf
7 |
8 | class LloydPoolingPyramid(AbstractPoolingPyramid):
9 |
10 | def __init__(self,numRepresentations,companderConstructor, ratios):
11 | super(LloydPoolingPyramid, self).__init__(numRepresentations,companderConstructor)
12 | self.ratios = ratios
13 |
14 | def makeP(self,A,V=None):
15 | Plist = []
16 | companderInstance = self.companderConstructor(V,A)
17 |
18 | for pIndex in range(self.numRepresentations):
19 | P = pyamg.aggregation.aggregate.lloyd_aggregation(\
20 | scipy.sparse.csr_matrix(companderInstance.contractA()),ratio=self.ratios[pIndex],distance='same',maxiter=10)[0]
21 | P = P.todense()
22 | Pcolsum = np.tile(np.count_nonzero(P,axis=0),(P.shape[0],1))
23 | Pcolsum[Pcolsum == 0] = 1
24 | P = np.divide(P,Pcolsum.astype(np.float64))
25 | Plist.append(P.astype(np.float32))
26 | #print(P.shape)
27 | companderInstance.update(P)
28 | A = companderInstance.expandA()
29 | V = companderInstance.V
30 | return Plist
31 |
32 | def write(self,Ps,As):
33 | AsparseList = []
34 | for A in As:
35 | currentA = A.tolist()
36 | pass
37 |
--------------------------------------------------------------------------------
/src/graphcnn/util/pooling/MemoryAdjacencyCompander.py:
--------------------------------------------------------------------------------
1 | from .AbstractAdjacencyCompander import AbstractAdjacencyCompander
2 | import numpy as np
3 |
4 | class MemoryAdjacencyCompander(AbstractAdjacencyCompander):
5 |
6 | def __init__(self,V,A):
7 | super(MemoryAdjacencyCompander, self).__init__(V, A)
8 |
9 | def contractA(self):
10 | self.flatA = self.A.sum(axis=1)
11 | return self.flatA
12 |
13 | def expandA(self):
14 | return self.A
15 | def update(self,P):
16 | # print(P.shape)
17 | Aposcorrelation = np.asarray(np.dot(np.dot(P.transpose(),self.A[:,0,:].squeeze()),P))
18 | Anegcorrelation = np.asarray(np.dot(np.dot(P.transpose(),self.A[:,1,:].squeeze()),P))
19 | Azerocorrelation = np.asarray(np.dot(np.dot(P.transpose(),self.A[:,2,:].squeeze()),P))
20 | #print(Aposcorrelation.shape)
21 | #print(Anegcorrelation.shape)
22 | #print(Azerocorrelation.shape)
23 | #print(type(Aposcorrelation))
24 | self.A = np.stack((Aposcorrelation,Anegcorrelation,Azerocorrelation),axis=1).astype(np.float32)
25 | self.V = np.dot(P.transpose(),self.V).astype(np.float32)
26 | self.N = self.V.shape[0]
27 |
--------------------------------------------------------------------------------
/src/graphcnn/util/pooling/PoolingFactory.py:
--------------------------------------------------------------------------------
1 | import sys
2 | import os
3 | import os.path
4 | from .AbstractPoolingPyramid import AbstractPoolingPyramid
5 | from .GraclusPoolingPyramid import GraclusPoolingPyramid
6 | from .LloydPoolingPyramid import LloydPoolingPyramid
7 | from .SpectralClusteringPoolingPyramid import SpectralClusteringPoolingPyramid
8 | #import matlab.engine
9 |
10 | class PoolingFactory():
11 |
12 | #def __init__(self):
13 | # pass
14 | #self.eng = matlab.engine.start_matlab()
15 | #self.eng.addpath(os.path.abspath(os.path.join(os.path.dirname(__file__),'./graclus1.2/matlab/')))
16 |
17 | def CreatePoolingPyramid(self,numRepresentations, companderConstructor, ratios, id='Lloyd'):
18 | if id == 'Lloyd':
19 | return LloydPoolingPyramid(numRepresentations,companderConstructor,ratios)
20 | elif id == 'Spectral':
21 | return SpectralClusteringPoolingPyramid(numRepresentations,companderConstructor,ratios)
22 | elif id == 'Graclus':
23 | return GraclusPoolingPyramid(numRepresentations,companderConstructor,ratios)#,self.eng)
24 |
--------------------------------------------------------------------------------
/src/graphcnn/util/pooling/SpectralClusteringPoolingPyramid.py:
--------------------------------------------------------------------------------
1 | from .AbstractPoolingPyramid import AbstractPoolingPyramid
2 | import scipy.sparse
3 | import pyamg
4 | import numpy as np
5 | #from graphcnn.util.modelnet.pointCloud2Graph import ply2graph
6 | import tensorflow as tf
7 | import sklearn.cluster
8 | import scipy.sparse
9 | import time
10 |
11 | class SpectralClusteringPoolingPyramid(AbstractPoolingPyramid):
12 |
13 | def __init__(self,numRepresentations,companderConstructor, ratios):
14 | super(SpectralClusteringPoolingPyramid, self).__init__(numRepresentations,companderConstructor)
15 | self.ratios = ratios
16 |
17 | def makeP(self,A,V=None):
18 | Plist = []
19 | companderInstance = self.companderConstructor(V,A)
20 |
21 | for pIndex in range(self.numRepresentations):
22 | outSize = int(np.floor(self.ratios[pIndex]*A.shape[0]))
23 | #t = time.time()
24 | numComponents = int(np.maximum(np.floor(outSize/4),1))
25 | labels = sklearn.cluster.spectral_clustering(scipy.sparse.csr_matrix(companderInstance.contractA()),\
26 | n_clusters=outSize,eigen_solver='arpack',n_init=1,n_components=numComponents)
27 | #elapsed = time.time() - t
28 | #print('Elapsed: {0}'.format(elapsed))
29 | #P = pyamg.aggregation.aggregate.lloyd_aggregation(\
30 | #scipy.sparse.csr_matrix(companderInstance.contractA()),ratio=self.ratios[pIndex],distance='same',maxiter=10)[0]
31 |
32 | P = np.zeros((A.shape[0],outSize))
33 | P[np.arange(A.shape[0]),labels] = 1
34 | #print('Nonzero P: {0}'.format(np.count_nonzero(P)))
35 | Pcolsum = np.tile(np.count_nonzero(P,axis=0),(P.shape[0],1))
36 | Pcolsum[Pcolsum == 0] = 1
37 | P = np.divide(P,Pcolsum.astype(np.float64))
38 | Plist.append(P.astype(np.float32))
39 | #print(P.shape)
40 | companderInstance.update(P)
41 | A = companderInstance.expandA()
42 | V = companderInstance.V
43 | return Plist
44 |
45 | def write(self,Ps,As):
46 | AsparseList = []
47 | for A in As:
48 | currentA = A.tolist()
49 | pass
50 |
--------------------------------------------------------------------------------
/src/graphcnn/util/pooling/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WDot/G3DNet/448e2e26646219de8cbb6d7ec54b168cddab09bb/src/graphcnn/util/pooling/__init__.py
--------------------------------------------------------------------------------
/src/graphcnn/util/sydney/SydneyToPly.py:
--------------------------------------------------------------------------------
1 | import sys
2 | import os
3 | import os.path
4 | import plyfile
5 | import numpy as np
6 | import csv
7 |
8 | def sydneyToPly(inPath,outPath):
9 | vertices = []
10 | filename = os.path.basename(inPath)
11 | filename, ext = os.path.splitext(filename)
12 | with open(inPath,'r') as csvFile:
13 | csvReader = csv.reader(csvFile)
14 | for row in csvReader:
15 | vertices.append((float(row[3]),float(row[4]),float(row[5])))
16 | #print(str(row[3]) + ' ' + str(row[4]) + ' ' + str(row[5]))
17 | vertices = np.array(vertices,dtype=[('x', 'f4'), ('y', 'f4'),('z', 'f4')])
18 | el = plyfile.PlyElement.describe(vertices,'vertex',val_types={'vertex': 'f4'})
19 | plyfile.PlyData([el],text=True).write(outPath + '/' + filename + '.ply')
20 |
21 | #print(vertices.shape)
22 |
23 | INPATH = 'C:/data/sydney-urban-objects-dataset/objects'
24 | OUTPATH = 'C:/data/sydney_ply'
25 | for item in os.listdir(INPATH):
26 | filename, ext = os.path.splitext(item)
27 | if ext == '.csv':
28 | #print(item)
29 | sydneyToPly(INPATH + '/' + item,OUTPATH)
30 |
31 |
--------------------------------------------------------------------------------
/src/graphcnn/util/sydney/convexhull.mlx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/src/graphcnn/util/sydney/resamplePointClouds.py:
--------------------------------------------------------------------------------
1 |
2 | import os
3 | import os.path
4 | import sys
5 | import subprocess
6 | import shutil
7 | from subprocess import STDOUT, check_output
8 | import ctypes
9 | import plyfile
10 | SEM_NOGPFAULTERRORBOX = 0x0002 # From MSDN
11 | ctypes.windll.kernel32.SetErrorMode(SEM_NOGPFAULTERRORBOX);
12 | CREATE_NO_WINDOW = 0x08000000 # From Windows API
13 |
14 | MAX_VERTICES = 500
15 | MIN_VERTICES = 500
16 | SUBSAMPLE_SCRIPT = './subsamplepoints.mlx'
17 | OVERSAMPLE_SCRIPT = './voronoifilter.mlx'
18 |
19 |
20 |
21 | def Main():
22 | if len(sys.argv) > 2 and os.path.isdir(sys.argv[1]):
23 | counter = 0
24 | ignored = 0
25 | garbage = 0
26 | for root, subdirs, files in os.walk(sys.argv[1]):
27 | subDirectory = root[len(sys.argv[1]):]
28 | for file in files:
29 | fname, ext = os.path.splitext(file)
30 | inputPath = root + '/' + file
31 | outputPath = sys.argv[2] + '/' + subDirectory + '/' + fname + '.ply'
32 | if not os.path.isdir(sys.argv[2] + '/' + subDirectory):
33 | os.makedirs(sys.argv[2] + '/' + subDirectory)
34 | if ext == '.ply'\
35 | and not os.path.isfile(outputPath)\
36 | and os.stat(inputPath).st_size > 0:
37 | data = plyfile.PlyData.read(inputPath)
38 | if data['vertex']['x'].shape[0] > MAX_VERTICES:
39 | scriptCmd = SUBSAMPLE_SCRIPT
40 | elif data['vertex']['x'].shape[0] < MIN_VERTICES:
41 | scriptCmd = OVERSAMPLE_SCRIPT
42 | else:
43 | scriptCmd = 'SKIP'
44 | if scriptCmd != 'SKIP':
45 | print(data['vertex']['x'].shape)
46 | scriptStr = 'C:\Program Files\VCG\MeshLab\meshlabserver.exe -i \"{0}\" -o \"{1}\" -s \"{2}\"'.format(\
47 | inputPath, outputPath,scriptCmd)
48 | print(scriptStr)
49 | try:
50 | process = subprocess.Popen(scriptStr,creationflags=CREATE_NO_WINDOW, )
51 | output = check_output(scriptStr, stderr=STDOUT, timeout=120)
52 | process.wait()
53 | counter += 1
54 | print('{0} files finished processing'.format(counter))
55 | except:
56 | print("File Ignored!!")
57 | ignored += 1
58 | continue
59 | else:
60 | shutil.copy2(inputPath,outputPath)
61 | elif os.stat(inputPath).st_size == 0:
62 | print('Empty File, garbage!')
63 | garbage += 1
64 | else:
65 | print('Could not find path!')
66 | print("Total Files converted = %d" %counter)
67 | print("Total Files ignored = %d" % ignored)
68 | print("Total Empty Files = %d" % garbage)
69 |
70 | Main()
71 |
--------------------------------------------------------------------------------
/src/graphcnn/util/sydney/subsamplepoints.mlx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/src/graphcnn/util/sydney/voronoifilter.mlx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/src/run.py:
--------------------------------------------------------------------------------
1 | import os
2 | os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
3 | from graphcnn.experiments.experiment_pcd import *
4 | import pdb
5 | import argparse
6 |
7 | class Modelnet10Experiment():
8 | def __init__(self, architecture):
9 | self.arch = architecture.split(',')
10 | self.num_layers = len(self.arch)
11 | def create_network(self, net, input):
12 | net.create_network(input)
13 | conv_no = 1
14 | resnet_conv_no = 1
15 | pool_no = 1
16 | fc = 1
17 | gp = 1
18 | gup = 1
19 | gmp = 1
20 | convolution_type = self.arch[0]
21 | if convolution_type == 'OC':
22 | make_conv = net.make_graphcnn_layer
23 | make_conv_resnet_or_densenet = net.make_graphcnn_resnet_or_densenet_layer
24 | elif convolution_type =='UC':
25 | make_conv = net.make_graphcnn_unbiased_layer
26 | make_conv_resnet_or_densenet = net.make_graphcnn_unbiased_resnet_or_densenet_layer
27 |
28 | for i in xrange(1, self.num_layers):
29 | config = self.arch[i].split('_')
30 | if config[0]=='c':
31 | make_conv(int(config[1]),stride=int(config[2]), order=int(config[3]),name='conv'+str(conv_no), with_bn=True, with_act_func=True)
32 | conv_no+=1
33 | elif config[0]=='p':
34 | net.make_graph_embed_pooling(no_vertices=int(config[1]), name='pool1'+str(pool_no), with_bn=False, with_act_func=False)
35 | pool_no+=1
36 | elif config[0]=='fc':
37 | net.make_fc_layer(int(config[1]),name='fc'+str(fc), with_bn=int(config[2]), with_act_func=int(config[3]))
38 | fc+=1
39 | elif 'rc' in config[0]:
40 | if config[0][-1] == '0' :
41 | name_layer = 'resnet_conv_block'
42 | elif config[0][-1] == '1' :
43 | name_layer = 'densenet_conv_block'
44 | make_conv_resnet_or_densenet(no_filters=[int(j) for j in config[1].split('-')] , stride=[int(j) for j in config[2].split('-')], order=[int(j) for j in config[3].split('-')],name=name_layer+str(resnet_conv_no), with_bn=[bool(j) for j in config[4].split('-')], with_act_func=[bool(j) for j in config[5].split('-')])
45 | resnet_conv_no+=1
46 | elif config[0]=='gp':
47 | net.make_graph_pooling_layer(int(config[1]), name='gp' + str(gp))
48 | gp += 1
49 | elif config[0]=='gmp':
50 | net.make_graph_maxpooling_layer(int(config[1]), name='gmp' + str(gp))
51 | gmp += 1
52 | elif config[0] == 'gup':
53 | net.make_graph_unpooling_layer(int(config[1]), name='gup' + str(gup))
54 | gup += 1
55 |
56 | #net.make_graph_embed_pooling(32, with_bn=False, with_act_func=False)
57 | # net.make_fc_layer(32,name='fc1', with_bn=True, with_act_func=True)
58 | # net.make_fc_layer(10,name='final', with_bn=False, with_act_func=False)
59 |
60 | parser = argparse.ArgumentParser(description='Process input architecture')
61 | parser.add_argument('--arch', default='OC,c_16_1_1,c_16_1_1,c_16_1_1,c_16_1_1,p_16,fc_10_0_0', help='Defines the model')
62 | parser.add_argument('--date', default='Sept02', help='Data run model')
63 | parser.add_argument('--dataset_name', default='Modelnet10', help='Dataset name')
64 | #Add loading pretrained weights option
65 | parser.add_argument('--loading_weights_flag', default=0, type=int,help='loading weights flag')
66 |
67 | parser.add_argument('--path_pretrained_weights', default='/home/thn2079/git/GraphCNN_WACV/GraphCNN/Graph-CNN/snapshots/Modelnet10-Oct6/Modelnet10-OC-c_16_1_1-c_16_1_1-c_16_1_1-c_16_1_1-p_16-fc_10_0_0-l2=0.0-l1=0.0/model-7', help='Path to pretrained weights')
68 | parser.add_argument('--arch_loading', default='OC,c_16_1_1,c_16_1_1,c_16_1_1,c_16_1_1', help='Specific architecture to load weights from')
69 | # parser.add_argument('--test_file', default=TEST_FILE, help='test file path')
70 | parser.add_argument('--train_flag', default=1, type=int,help='training flag')
71 | parser.add_argument('--debug_flag', default=0, type=int,help='debugging flag, if set as true will not save anything to summary writer')
72 | parser.add_argument('--num_iter', default=4000, type=int,help='Number of iterations')
73 | ##feature_type==1: binary feature
74 | ##feature_type==0: 6 features
75 | parser.add_argument('--feature_type', default=1, type=int,help='Feature type flag for modelnet')
76 | ###If feature_type==0,we need k nearest neighbor
77 | parser.add_argument('--K', default=6, type=int,help='K nearest neighbors')
78 | parser.add_argument('--num_vertices', default=516, type=int,help='Number of vertices in the graph')
79 | parser.add_argument('--num_channels', default=3, type=int,help='Number of channels')
80 | parser.add_argument('--num_classes', default=10, type=int,help='Number of classes')
81 |
82 | parser.add_argument('--train_batch_size', default=60, type=int,help='Batch size for training')
83 | parser.add_argument('--test_batch_size', default=50, type=int,help='Batch size for testing')
84 | parser.add_argument('--snapshot_iter', default=200, type=int,help='Take snapshot each number of iterations')
85 | parser.add_argument('--starter_learning_rate', default=0.01, type=float,help='Started learning rate')
86 | parser.add_argument('--learning_rate_step', default=1000, type=int,help='Learning rate step decay')
87 | parser.add_argument('--learning_rate_exp', default=0.1, type=float,help='Learning rate exponential')
88 | parser.add_argument('--optimizer', default='adam', help='Choose optimizer type')
89 | parser.add_argument('--iterations_per_test', default=4000, type=int,help='Test model by validation set each number of iterations')
90 | parser.add_argument('--display_iter', default=5, type=int,help='Display training info each number of iterations')
91 | parser.add_argument('--l2',default=0.0,type=float,help="L2 Regularization parameter")
92 | parser.add_argument('--l1',default=0.0,type=float,help="L1 Regularization parameter")
93 | parser.add_argument('--pool_ratios',default='0.5_0.5_0.5',help="Ratio of vertex reductions for each pooling")
94 | parser.add_argument('--cluster_alg',default='Lloyd',help='How should pooling cluster vertices?')
95 | parser.add_argument('--prefix',default='/home/data/',help='Prefix of Data Location')
96 | parser.add_argument('--dataset',default='modelnet10',help='Dataset to train')
97 | parser.add_argument('--group_name',default='WACV2018',help='Experiment Directory Name')
98 | parser.add_argument('--trial_name',default='G3DNet18',help='Experiment Directory Name')
99 |
100 | args = parser.parse_args()
101 |
102 | if args.dataset == 'modelnet10':
103 | TRAIN_FILE = './preprocessing/modelnet10_trainval.csv'
104 | TEST_FILE = './preprocessing/modelnet10_test.csv'
105 | # TEST_FILE = './preprocessing/modelnet10_test.csv'
106 | LABEL_FILE = './preprocessing/modelnet10_labels.csv'
107 | #MODELNET10_NUM_CLASSES = 10
108 | elif args.dataset == 'modelnet40':
109 | TRAIN_FILE = './preprocessing/modelnet40_auto_aligned_trainval.csv'
110 | TEST_FILE = './preprocessing/modelnet40_auto_aligned_test.csv'
111 | # TEST_FILE = './preprocessing/modelnet40_test.csv'
112 | LABEL_FILE = './preprocessing/modelnet40_labels.csv'
113 | #MODELNET10_NUM_CLASSES = 40
114 | elif args.dataset == 'modelnetfull':
115 | #There is no such thing as separate train/val sets for modelnetFull, this is just
116 | #pure extra samples to learn from
117 | TRAIN_FILE = './preprocessing/modelnetFull_500_train.csv'
118 | TEST_FILE = './preprocessing/modelnetFull_500_train.csv'
119 | LABEL_FILE = './preprocessing/modelnetFull_labels.csv'
120 | #MODELNET10_NUM_CLASSES = 421
121 | elif args.dataset == 'shapenetcore':
122 | #We don't predict on Shapenet, so we use both train and val for more samples
123 | TRAIN_FILE = './preprocessing/shapenet_500_trainval.csv'
124 | TEST_FILE = './preprocessing/shapenet_500_test.csv'
125 | LABEL_FILE = './preprocessing/shapenet_labels.csv'
126 | #MODELNET10_NUM_CLASSES = 55
127 | elif args.dataset == 'sydney0':
128 | #There is no such thing as separate train/val sets for modelnetFull, this is just
129 | #pure extra samples to learn from
130 | TRAIN_FILE = './preprocessing/sydneyfoldn0.csv'
131 | TEST_FILE = './preprocessing/sydneyfold0.csv'
132 | LABEL_FILE = './preprocessing/sydney_labels.csv'
133 | #MODELNET10_NUM_CLASSES = 14
134 | elif args.dataset == 'sydney1':
135 | #There is no such thing as separate train/val sets for modelnetFull, this is just
136 | #pure extra samples to learn from
137 | TRAIN_FILE = './preprocessing/sydneyfoldn1.csv'
138 | TEST_FILE = './preprocessing/sydneyfold1.csv'
139 | LABEL_FILE = './preprocessing/sydney_labels.csv'
140 | #MODELNET10_NUM_CLASSES = 14
141 | elif args.dataset == 'sydney2':
142 | #There is no such thing as separate train/val sets for modelnetFull, this is just
143 | #pure extra samples to learn from
144 | TRAIN_FILE = './preprocessing/sydneyfoldn2.csv'
145 | TEST_FILE = './preprocessing/sydneyfold2.csv'
146 | LABEL_FILE = './preprocessing/sydney_labels.csv'
147 | #MODELNET10_NUM_CLASSES = 14
148 | elif args.dataset == 'sydney3':
149 | #There is no such thing as separate train/val sets for modelnetFull, this is just
150 | #pure extra samples to learn from
151 | TRAIN_FILE = './preprocessing/sydneyfoldn3.csv'
152 | TEST_FILE = './preprocessing/sydneyfold3.csv'
153 | LABEL_FILE = './preprocessing/sydney_labels.csv'
154 | #MODELNET10_NUM_CLASSES = 14
155 |
156 |
157 | if args.feature_type==1:
158 | MODELNET10_L = 8
159 | elif args.feature_type==0:
160 | MODELNET10_L = args.K * 6
161 | MODELNET10_N = args.num_vertices
162 | MODELNET10_C = args.num_channels
163 | MODELNET10_NUM_CLASSES = args.num_classes
164 |
165 | poolRatiosList = [float(x) for x in args.pool_ratios.split('_')]
166 |
167 | exp = GraphCNNPCDExperiment(args.group_name, args.trial_name, Modelnet10Experiment(args.arch),args.prefix,MODELNET10_N,MODELNET10_C, \
168 | MODELNET10_L, args.K, MODELNET10_NUM_CLASSES, TRAIN_FILE, TEST_FILE, LABEL_FILE,\
169 | args.train_flag, args.l2, args.l1, args.feature_type,poolRatiosList,\
170 | args.path_pretrained_weights,args.cluster_alg)
171 |
172 |
173 |
174 | exp.num_iterations = args.num_iter
175 | exp.optimizer = args.optimizer
176 | exp.debug = bool(args.debug_flag)
177 | exp.train_batch_size = args.train_batch_size
178 | exp.test_batch_size = args.test_batch_size
179 | exp.loading_weights_flag = bool(args.loading_weights_flag)
180 | exp.arch_loading=args.arch_loading
181 | exp.crop_if_possible = True
182 | exp.snapshot_iter = args.snapshot_iter
183 | exp.learning_rate_step = args.learning_rate_step
184 | exp.starter_learning_rate = args.starter_learning_rate
185 | exp.learning_rate_exp = args.learning_rate_exp
186 | exp.iterations_per_test = args.iterations_per_test
187 | exp.display_iter = args.display_iter
188 |
189 | #exp.preprocess_data(dataset)
190 |
191 | acc, std = exp.run()
192 | print_ext('Result: %.4f (+- %.4f)' % (acc, std))
193 |
--------------------------------------------------------------------------------