Apollo 10.0
自动驾驶开放平台
model_manager.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2023 The Apollo Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *****************************************************************************/
16
17#pragma once
18
19#include <string>
20#include <vector>
21#include <memory>
22#include <mutex>
23#include <map>
24#include <utility>
25
26#include "cyber/cyber.h"
28#include "modules/prediction/proto/prediction_conf.pb.h"
30
31
32namespace apollo {
33namespace prediction {
34
36 public:
39
45 bool Init();
46
55 std::shared_ptr<ModelBase> SelectModel(const Model::Backend& backend,
56 const ObstacleConf::EvaluatorType& evaluator_type,
58 obstacle_type);
59
60 private:
61 std::map<std::string, std::vector<std::shared_ptr<ModelBase>>> models_;
62 std::string to_string(const Model& model_config);
63 std::string to_string(const Model::Backend& backend,
64 const ObstacleConf::EvaluatorType& evaluator_type,
66 obstacle_type);
67 EvaluatorModelConf evaluator_model_conf_;
68};
69
70} // namespace prediction
71} // namespace apollo
std::shared_ptr< ModelBase > SelectModel(const Model::Backend &backend, const ObstacleConf::EvaluatorType &evaluator_type, const apollo::perception::PerceptionObstacle::Type &obstacle_type)
select the best model
bool Init()
init model manager add load all defined plugin
class register implement
Definition arena_queue.h:37