File size: 1,582 Bytes
3135a01
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import argparse

parser = argparse.ArgumentParser(description='PAN')

# Hardware specifications
parser.add_argument('--n_threads', type=int, default=6,
                    help='Number of threads for data loading')
parser.add_argument('--ipu', action='store_true', help='Use Ipu for interence.')

# Data specifications
parser.add_argument('--dir_data', type=str, default='dataset/',
                    help='Dataset directory')
parser.add_argument('--data_test', type=str, default='Set5',
                    help='Test dataset name')
parser.add_argument('--ext', type=str, default='sep',
                    help='Dataset file extension')
parser.add_argument('--scale', type=str, default='2',
                    help='Super resolution scale')
parser.add_argument('--rgb_range', type=int, default=255,
                    help='Maximum value of RGB')
parser.add_argument('--n_colors', type=int, default=3,
                    help='Number of color channels to use')
parser.add_argument('--onnx_path', type=str, default='PAN_int8.onnx',
                    help='Path to onnx model')
parser.add_argument('--provider_config',
                    type=str,
                    default="vaip_config.json",
                    help="Path of the config file for seting provider_options.")


args = parser.parse_args()

args.scale = list(map(lambda x: int(x), args.scale.split('+')))
args.data_test = args.data_test.split('+')


for arg in vars(args):
    if vars(args)[arg] == 'True':
        vars(args)[arg] = True
    elif vars(args)[arg] == 'False':
        vars(args)[arg] = False