Blame view

src/ai_platform/task_param_manager.h 1.44 KB
09c2d08c   Hu Chunming   arm交付版
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
  /*
   * @Author: yangzilong
   * @Date: 2021-11-30 18:58:46
   * @Last Modified by: yangzilong
   * @Last Modified time: Do not edit
   * @Email: yangzilong@objecteye.com
   * @Description:
   */
  #pragma once
  #include "header.h"
  #include "det_obj_header.h"
  
  #include <map>
  #include <set>
  using namespace std;
  
  struct algor_open_config_param
  {
  	set<algo_type> human_face_algors;
  	set<algo_type> human_algors;
  	set<algo_type> nonmotor_vehicle_algors;
  	set<algo_type> vehicle_algors;
  };
  
  class task_param_manager
  {
  public:
  	using algo_param_type_t_ = algor_init_config_param_t;
  
  	static task_param_manager* getInstance()
  	{
  		static task_param_manager task_param_instance;
  		return &task_param_instance;
  	}
  
  	void add_task_param(string task_id, task_param task_param);
  	void delete_task_param(string task_id);
  	const algor_open_config_param *const get_task_algor_param(const string &task_id);
  	const map<algo_type, algo_param_type_t_*> *const get_task_other_param(const string& task_id);
  	const algo_param_type_t_ *const get_task_other_param(const string& task_id, const algo_type &_algo_type);
  
  	map<string, algor_open_config_param> get_task_algor_params();
  	map<string, map<algo_type, algo_param_type_t_*>> get_task_other_params();
  	void task_param_manager_release();
  
  private:
  	task_param_manager();
  	task_param_manager(const task_param_manager& other);
  
  	map<string, map<algo_type, algo_param_type_t_*>>  m_task_params;
  	map<string, algor_open_config_param>  m_algor_config_params;
  };