Spaces:
Runtime error
Runtime error
Update main_test_SRMNet.py
Browse files- main_test_SRMNet.py +8 -3
main_test_SRMNet.py
CHANGED
|
@@ -34,10 +34,10 @@ def load_checkpoint(model, weights):
|
|
| 34 |
|
| 35 |
def main():
|
| 36 |
parser = argparse.ArgumentParser(description='Demo Image Denoising')
|
| 37 |
-
parser.add_argument('--input_dir', default='
|
| 38 |
-
parser.add_argument('--result_dir', default='
|
| 39 |
parser.add_argument('--weights',
|
| 40 |
-
default='
|
| 41 |
help='Path to weights')
|
| 42 |
|
| 43 |
args = parser.parse_args()
|
|
@@ -82,6 +82,11 @@ def main():
|
|
| 82 |
save_img((os.path.join(out_dir, f + '.png')), restored)
|
| 83 |
|
| 84 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
|
| 86 |
if __name__ == '__main__':
|
| 87 |
main()
|
|
|
|
| 34 |
|
| 35 |
def main():
|
| 36 |
parser = argparse.ArgumentParser(description='Demo Image Denoising')
|
| 37 |
+
parser.add_argument('--input_dir', default='test/', type=str, help='Input images')
|
| 38 |
+
parser.add_argument('--result_dir', default='result/', type=str, help='Directory for results')
|
| 39 |
parser.add_argument('--weights',
|
| 40 |
+
default='experiments/pretrained_models/AWGN_denoising_SRMNet.pth', type=str,
|
| 41 |
help='Path to weights')
|
| 42 |
|
| 43 |
args = parser.parse_args()
|
|
|
|
| 82 |
save_img((os.path.join(out_dir, f + '.png')), restored)
|
| 83 |
|
| 84 |
|
| 85 |
+
def setup(args):
|
| 86 |
+
save_dir = 'result/'
|
| 87 |
+
folder = 'test/'
|
| 88 |
+
|
| 89 |
+
return folder, save_dir
|
| 90 |
|
| 91 |
if __name__ == '__main__':
|
| 92 |
main()
|