from .DOTA_devkit.ResultMerge_multi_process import mergebypoly result_path, merge_path='result_dota','merge_dota' dsets = dataset_module('./dataPath', phase='test', input_h=608, input_w=608, down_ratio=4) dsets.merge_crop_image_results(result_path, merge_path) func_utils.write_results(args, self.model, dsets, down_ratio, self.device, self.decoder, result_path, print_ps=True) def merge_crop_image_results(self, result_path, merge_path): mergebypoly(result_path, merge_path) def mergebypoly(srcpath, dstpath): """ srcpath: result files before merge and nms dstpath: result files after merge and nms """ # srcpath = r'/home/dingjian/evaluation_task1/result/faster-rcnn-59/comp4_test_results' # dstpath = r'/home/dingjian/evaluation_task1/result/faster-rcnn-59/testtime' # mergebase(srcpath, # dstpath, # py_cpu_nms_poly) mergebase_parallel(srcpath, dstpath, py_cpu_nms_poly_fast)