Pointnet_Pointnet2_pytorch icon indicating copy to clipboard operation
Pointnet_Pointnet2_pytorch copied to clipboard

Semantic segmentation tests its own dataset and reports errors

Open bukeyan4318 opened this issue 3 years ago • 7 comments

Hi, thanks for your nice work. When I tested semantic segmentation, I reported an error and couldn't understand it. I hope I can get your help. Thank you in advance. Traceback (most recent call last): File "test_semseg.py", line 202, in main(args) File "test_semseg.py", line 118, in main scene_data, scene_label, scene_smpw, scene_point_index = TEST_DATASET_WHOLE_SCENE[batch_idx] File "/shiyanshi2/user/sunyijun/code/Pointnet2-own/data_utils/S3DISDataLoader.py", line 164, in getitem data_room = data_room.reshape((-1, self.block_points, data_room.shape[1])) IndexError: tuple index out of range

bukeyan4318 avatar Oct 15 '21 01:10 bukeyan4318

hi,I am also testing my semantic segmentation dataset!The original pointcloud data has been collected,which file format is pcd. Could you tell how to mark labels?and change code to train it just like you?

wyz5008 avatar Feb 21 '22 12:02 wyz5008

hello,same error,have you solved that?

jiayaozi avatar Jun 17 '22 10:06 jiayaozi

@jiayaozi @bukeyan4318 @wyz5008 have you solved this problem?

foysalahmed10 avatar May 06 '23 10:05 foysalahmed10

Hi, I solved this by adding a 7th element in data array. maybe your dataset is composed of (x, y, z, r, g, b). transform this -> (x, y, z, r, g, b, label) where 0<= label <= num_class. but I just initialized lebel = 0 for all point cloud. and the result was fine. anyway, you need to give initial label index which can be set as random number btw 0~ num_class.

morankim avatar Jul 21 '23 01:07 morankim