@@ -33,11 +33,11 @@ def parse_args():
33
33
parser = argparse .ArgumentParser ('Model' )
34
34
parser .add_argument ('--batch_size' , type = int , default = 32 , help = 'batch size in testing [default: 32]' )
35
35
parser .add_argument ('--gpu' , type = str , default = '0' , help = 'specify gpu device' )
36
- parser .add_argument ('--num_point' , type = int , default = 4096 , help = 'Point Number [default: 4096]' )
37
- parser .add_argument ('--log_dir' , type = str , default = 'pointnet2_sem_seg' , help = 'Experiment root' )
38
- parser .add_argument ('--visual' , action = 'store_true' , default = False , help = 'Whether visualize result [default: False]' )
39
- parser .add_argument ('--test_area' , type = int , default = 5 , help = 'Which area to use for test , option: 1-6 [default: 5]' )
40
- parser .add_argument ('--num_votes' , type = int , default = 5 , help = 'Aggregate segmentation scores with voting [default: 5]' )
36
+ parser .add_argument ('--num_point' , type = int , default = 4096 , help = 'point number [default: 4096]' )
37
+ parser .add_argument ('--log_dir' , type = str , required = True , help = 'experiment root' )
38
+ parser .add_argument ('--visual' , action = 'store_true' , default = False , help = 'visualize result [default: False]' )
39
+ parser .add_argument ('--test_area' , type = int , default = 5 , help = 'area for testing , option: 1-6 [default: 5]' )
40
+ parser .add_argument ('--num_votes' , type = int , default = 3 , help = 'aggregate segmentation scores with voting [default: 5]' )
41
41
return parser .parse_args ()
42
42
43
43
@@ -46,7 +46,7 @@ def add_vote(vote_label_pool, point_idx, pred_label, weight):
46
46
N = pred_label .shape [1 ]
47
47
for b in range (B ):
48
48
for n in range (N ):
49
- if weight [b , n ]:
49
+ if weight [b , n ] != 0 and not np . isinf ( weight [ b , n ]) :
50
50
vote_label_pool [int (point_idx [b , n ]), int (pred_label [b , n ])] += 1
51
51
return vote_label_pool
52
52
@@ -104,7 +104,7 @@ def log_string(str):
104
104
log_string ('---- EVALUATION WHOLE SCENE----' )
105
105
106
106
for batch_idx in range (num_batches ):
107
- print ("visualize [%d/%d] %s ..." % (batch_idx + 1 , num_batches , scene_id [batch_idx ]))
107
+ print ("Inference [%d/%d] %s ..." % (batch_idx + 1 , num_batches , scene_id [batch_idx ]))
108
108
total_seen_class_tmp = [0 for _ in range (NUM_CLASSES )]
109
109
total_correct_class_tmp = [0 for _ in range (NUM_CLASSES )]
110
110
total_iou_deno_class_tmp = [0 for _ in range (NUM_CLASSES )]
0 commit comments