AlexZou commited on
Commit
c4d8d8b
1 Parent(s): 607107f

Upload 4 files

Browse files
Files changed (4) hide show
  1. Dehazing.py +1 -1
  2. Lowlight.py +1 -1
  3. SuperResolution.py +1 -1
  4. Underwater.py +1 -1
Dehazing.py CHANGED
@@ -42,4 +42,4 @@ if __name__ == '__main__':
42
  image = opt.test_path
43
  print(image)
44
  restored2,time_num = inference_img(image,Net)
45
- torchvision.utils.save_image(restored2,opt.save_path+os.path.split(image)[-1])
 
42
  image = opt.test_path
43
  print(image)
44
  restored2,time_num = inference_img(image,Net)
45
+ torchvision.utils.save_image(restored2,opt.save_path+'output.png')
Lowlight.py CHANGED
@@ -34,7 +34,7 @@ try:
34
  onnx_output = onnx_session.run(['output'], onnx_input)
35
  torch_output = np.squeeze(onnx_output[0], 0)
36
  torch_output = np.transpose(torch_output * 255, [1, 2, 0]).astype(np.uint8)
37
- plt.imsave(config.save_path+os.path.split(config.test_path)[-1], torch_output)
38
  except Exception as e:
39
  print(f'Input on model:{model_name} failed')
40
  print(e)
 
34
  onnx_output = onnx_session.run(['output'], onnx_input)
35
  torch_output = np.squeeze(onnx_output[0], 0)
36
  torch_output = np.transpose(torch_output * 255, [1, 2, 0]).astype(np.uint8)
37
+ plt.imsave(config.save_path+'output.png', torch_output)
38
  except Exception as e:
39
  print(f'Input on model:{model_name} failed')
40
  print(e)
SuperResolution.py CHANGED
@@ -44,4 +44,4 @@ if __name__ == '__main__':
44
  image=opt.test_path
45
  print(image)
46
  restored2,time_num=inference_img(image,Net,device)
47
- torchvision.utils.save_image(restored2,opt.save_path+os.path.split(image)[-1])
 
44
  image=opt.test_path
45
  print(image)
46
  restored2,time_num=inference_img(image,Net,device)
47
+ torchvision.utils.save_image(restored2,opt.save_path+'output.png')
Underwater.py CHANGED
@@ -44,4 +44,4 @@ if __name__ == '__main__':
44
  image = opt.test_path
45
  print(image)
46
  restored2,time_num = inference_img(image,Net,device)
47
- torchvision.utils.save_image(restored2,opt.save_path+os.path.split(image)[-1])
 
44
  image = opt.test_path
45
  print(image)
46
  restored2,time_num = inference_img(image,Net,device)
47
+ torchvision.utils.save_image(restored2,opt.save_path+'output.png')