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.
38 lines
832 B
Python
38 lines
832 B
Python
#coding: utf-8
|
|
from main_process import data_load
|
|
import multiprocessing
|
|
from analysis_data.config_load import get_configs
|
|
from model_load.model_load import Load_model
|
|
import time
|
|
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 = '/home/yaxin/xbank/xbank_poc_test/config_det.yaml'
|
|
args_data = get_configs(ymal_files=args)
|
|
args_list = get_args_list(args_data)
|
|
|
|
process_num = len(args_list)
|
|
|
|
with Pool(process_num) as pool:
|
|
pool.map(data_load, args_list)
|
|
|
|
|