You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
758 B
Python
37 lines
758 B
Python
#coding: utf-8
|
|
from main_process import data_load
|
|
from analysis_data.config_load import get_configs
|
|
from multiprocessing import Pool
|
|
|
|
|
|
def get_args_list(args_data):
|
|
|
|
args_list = []
|
|
|
|
for args in args_data:
|
|
|
|
args_det = args_data[args]
|
|
det_config = args_det['model']
|
|
det_source = args_det['source']
|
|
det_list = [det_source, det_config]
|
|
args_list.append(det_list)
|
|
|
|
return args_list
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
# 加载配置文件
|
|
args = './config_det.yaml'
|
|
args_data = get_configs(yaml_files=args)
|
|
args_list = get_args_list(args_data)
|
|
|
|
process_num = len(args_list)
|
|
|
|
print(f"args_list:{args_list}")
|
|
|
|
with Pool(process_num) as pool:
|
|
pool.map(data_load, args_list)
|
|
|
|
|