naver/PUMP
1
1# Copyright 2022-present NAVER Corp.2# CC BY-NC-SA 4.03# Available only for non-commercial use4 5import test_singlescale as ss6import test_singlescale_recursive as ssr7import test_multiscale as ms8 9def arg_parser():10 parser = ssr.arg_parser(ms.arg_parser())11 return parser12 13class Main (ms.Main):14 @staticmethod15 def build_matcher(args, device):16 # get a single-scale recursive matcher17 matcher = ssr.Main.build_matcher(args, device)18 type(matcher).demultiplex_img_trf = ms.demultiplex_img_trf # update transformer19 20 options = Main.get_options(args)21 return Main.tune_matcher(args, ms.MultiScalePUMP(matcher, **options), device).to(device)22 23if __name__ == '__main__':24 Main().run_from_args(arg_parser().parse_args())25 