Spaces:
Runtime error
Runtime error
File size: 884 Bytes
023485e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# Preprocess images in QNRF and NWPU dataset.
import argparse
parser = argparse.ArgumentParser(description='Preprocess')
parser.add_argument('--dataset', default='qnrf',
help='dataset name, only support qnrf and nwpu')
parser.add_argument('--input-dataset-path', default='data/QNRF',
help='original data directory')
parser.add_argument('--output-dataset-path', default='data/QNRF-Train-Val-Test',
help='processed data directory')
args = parser.parse_args()
if args.dataset.lower() == 'qnrf':
from preprocess.preprocess_dataset_qnrf import main
main(args.input_dataset_path, args.output_dataset_path, 512, 2048)
elif args.dataset.lower() == 'nwpu':
from preprocess.preprocess_dataset_nwpu import main
main(args.input_dataset_path, args.output_dataset_path, 384, 1920)
else:
raise NotImplementedError
|