carlosgomes98 commited on
Commit
d4fb1df
1 Parent(s): 0932147

remove channels last

Browse files
Files changed (1) hide show
  1. app.py +1 -6
app.py CHANGED
@@ -179,12 +179,7 @@ def inference_on_file(target_image, model, custom_test_pipeline):
179
  time_taken=-1
180
  st = time.time()
181
  print('Running inference...')
182
- try:
183
- result = inference_segmentor(model, target_image, custom_test_pipeline)
184
- except:
185
- print('Error: Try different channels order.')
186
- model.cfg.data.test.pipeline[0]['channels_last'] = True
187
- result = inference_segmentor(model, target_image, custom_test_pipeline)
188
  print("Output has shape: " + str(result[0].shape))
189
 
190
  ##### get metadata mask
 
179
  time_taken=-1
180
  st = time.time()
181
  print('Running inference...')
182
+ result = inference_segmentor(model, target_image, custom_test_pipeline)
 
 
 
 
 
183
  print("Output has shape: " + str(result[0].shape))
184
 
185
  ##### get metadata mask