Apollo 10.0
自动驾驶开放平台
fused_classifier.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 <memory>
20#include <string>
21
22#include "gtest/gtest_prod.h"
23
24#include "modules/perception/radar4d_detection/lib/classifier/proto/fused_classifier_config.pb.h"
25
30
31namespace apollo {
32namespace perception {
33namespace radar4d {
34
36 public:
37 FusedClassifier() = default;
38 ~FusedClassifier() = default;
46 bool Init(
47 const ClassifierInitOptions& options = ClassifierInitOptions()) override;
56 bool Classify(const ClassifierOptions& options, RadarFrame* frame) override;
62 std::string Name() const override { return "FusedClassifier"; }
63
64 private:
65 FRIEND_TEST(FusedClassifierTest, test_one_shot_fusion);
66 FRIEND_TEST(FusedClassifierTest, test_one_sequence_fusion);
67 FRIEND_TEST(FusedClassifierTest, test_one_sequence_fusion_bad_timestamp);
68 ObjectSequence sequence_;
69 double temporal_window_ = 20.0;
70 bool enable_temporal_fusion_ = true;
71 bool use_tracked_objects_ = true;
72
73 std::string one_shot_fusion_method_;
74 std::string sequence_fusion_method_;
75
76 BaseOneShotTypeFusion* one_shot_fuser_;
77 BaseSequenceTypeFusion* sequence_fuser_;
78
79 std::unique_ptr<BaseOneShotTypeFusion> one_shot_fuser_ptr_;
80 std::unique_ptr<BaseSequenceTypeFusion> sequence_fuser_ptr_;
81
82 TypeFusionOption option_;
83 TypeFusionInitOption init_option_;
84
85 FusedClassifierConfig fused_classifier_config_;
86}; // class FusedClassifier
87
88} // namespace radar4d
89} // namespace perception
90} // namespace apollo
bool Classify(const ClassifierOptions &options, RadarFrame *frame) override
Classify objects and update type info
std::string Name() const override
Get class name
bool Init(const ClassifierInitOptions &options=ClassifierInitOptions()) override
Init fused classifier
class register implement
Definition arena_queue.h:37