File tree Expand file tree Collapse file tree 1 file changed +14
-13
lines changed Expand file tree Collapse file tree 1 file changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -90,19 +90,6 @@ def single_gpu_test(model,
9090 with torch .no_grad ():
9191 result = model (return_loss = False , ** data )
9292
93- if efficient_test :
94- result = [np2tmp (_ , tmpdir = '.efficient_test' ) for _ in result ]
95-
96- if format_only :
97- result = dataset .format_results (
98- result , indices = batch_indices , ** format_args )
99- if pre_eval :
100- # TODO: adapt samples_per_gpu > 1.
101- # only samples_per_gpu=1 valid now
102- result = dataset .pre_eval (result , indices = batch_indices )
103-
104- results .extend (result )
105-
10693 if show or out_dir :
10794 img_tensor = data ['img' ][0 ]
10895 img_metas = data ['img_metas' ][0 ].data [0 ]
@@ -129,6 +116,20 @@ def single_gpu_test(model,
129116 out_file = out_file ,
130117 opacity = opacity )
131118
119+ if efficient_test :
120+ result = [np2tmp (_ , tmpdir = '.efficient_test' ) for _ in result ]
121+
122+ if format_only :
123+ result = dataset .format_results (
124+ result , indices = batch_indices , ** format_args )
125+ if pre_eval :
126+ # TODO: adapt samples_per_gpu > 1.
127+ # only samples_per_gpu=1 valid now
128+ result = dataset .pre_eval (result , indices = batch_indices )
129+ results .extend (result )
130+ else :
131+ results .extend (result )
132+
132133 batch_size = len (result )
133134 for _ in range (batch_size ):
134135 prog_bar .update ()
You can’t perform that action at this time.
0 commit comments