@@ -125,6 +125,9 @@ def preparePthFiles(files, split, outPutFolder, AugTimes=0):
125
125
counter += 1
126
126
else :
127
127
torch .save ((coords , colors , sem_labels , instance_labels ), outFilePath )
128
+ # outFilePthPath = outFilePath[:-4]+'.npy'
129
+ # data = np.concatenate((coords, colors, np.expand_dims(sem_labels, axis=1), np.expand_dims(instance_labels, axis=1)), axis=1)
130
+ # np.save(outFilePthPath,data)
128
131
### save text file for each pth file
129
132
# outFilePath = os.path.join(outPutFolder,name+str(blockNum)+'.txt')
130
133
# outFile = open(outFilePath,'w')
@@ -134,9 +137,12 @@ def preparePthFiles(files, split, outPutFolder, AugTimes=0):
134
137
# sem_labels[i],instance_labels[i]))
135
138
else :
136
139
torch .save ((coords , colors ), outFilePath )
137
- # # save text file for each pth file
138
- # outFilePath = os.path.join(outPutFolder,name+str(blockNum)+'.txt')
139
- # outFile = open(outFilePath,'w')
140
+ # outFilePthPath = outFilePath[:-4]+'.npy'
141
+ # data = np.concatenate((coords, colors), axis=1)
142
+ # np.save(outFilePthPath,data)
143
+ # save text file for each pth file
144
+ # outFileTxtPath = outFilePath[:-4]+'.txt'
145
+ # outFile = open(outFileTxtPath,'w')
140
146
# for i in range(len(coords)):
141
147
# outFile.write("%f,%f,%f,%f,%f,%f\n" %(coords[i][0],coords[i][1],coords[i][2],
142
148
# colors[i][0],colors[i][1],colors[i][2]))
@@ -191,3 +197,11 @@ def prepareInstGt(valOutDir, val_gtFolder,semantic_label_idxs):
191
197
val_gtFolder = os .path .join (data_folder ,'val_gt' )
192
198
os .makedirs (val_gtFolder ,exist_ok = True )
193
199
prepareInstGt (valOutDir , val_gtFolder , semantic_label_idxs )
200
+
201
+ testSplit = [26 ,27 ,28 ]
202
+ split = 'test'
203
+ testFiles = getFiles (filesOri , testSplit )
204
+ testOutDir = os .path .join (data_folder ,split )
205
+ os .makedirs (testOutDir ,exist_ok = True )
206
+ if len (testFiles )> 0 :
207
+ preparePthFiles (testFiles , split , testOutDir )
0 commit comments