|
import argparse |
|
|
|
parser = argparse.ArgumentParser(description='PAN') |
|
|
|
|
|
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.') |
|
|
|
|
|
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 |
|
|
|
|