52Hz commited on
Commit
3d44748
·
1 Parent(s): 28b500f

Update main_test_SRMNet.py

Browse files
Files changed (1) hide show
  1. main_test_SRMNet.py +3 -4
main_test_SRMNet.py CHANGED
@@ -30,9 +30,8 @@ def main():
30
  args = parser.parse_args()
31
 
32
  # Prepare testing data
33
- files = natsorted(glob(os.path.join(inp_dir, '*.JPG')) + glob(os.path.join(inp_dir, '*.PNG')))
34
- if len(files) == 0:
35
- raise Exception("\nNo images in {} \nPlease enter the following tasks: \n\n{}".format(inp_dir, '\n'.join(tasks)))
36
  os.makedirs(args.result_dir, exist_ok=True)
37
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
38
  # Build model
@@ -63,7 +62,7 @@ def main():
63
  restored = img_as_ubyte(restored[0])
64
 
65
  f = os.path.splitext(os.path.split(file_)[-1])[0]
66
- save_img((os.path.join(result_dir, '1.png')), restored)
67
 
68
  print(f"Files saved at {out_dir}")
69
  print('finish !')
 
30
  args = parser.parse_args()
31
 
32
  # Prepare testing data
33
+ files = natsorted(glob(os.path.join(args.input_dir, '*.JPG')) + glob(os.path.join(args.input_dir, '*.PNG')))
34
+
 
35
  os.makedirs(args.result_dir, exist_ok=True)
36
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
37
  # Build model
 
62
  restored = img_as_ubyte(restored[0])
63
 
64
  f = os.path.splitext(os.path.split(file_)[-1])[0]
65
+ save_img((os.path.join(args.result_dir, '1.png')), restored)
66
 
67
  print(f"Files saved at {out_dir}")
68
  print('finish !')