Apollo  6.0
Open source self driving car software
external_feature_extractor.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2018 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 #pragma once // NOLINT
17 
18 #include <memory>
19 #include <string>
20 
21 #include "modules/perception/camera/lib/feature_extractor/tfe/proto/tracking_feature.pb.h"
24 
25 namespace apollo {
26 namespace perception {
27 namespace camera {
29  public:
30  bool Init(const FeatureExtractorInitOptions &init_options) override;
31  bool Extract(const FeatureExtractorOptions &options,
32  CameraFrame *frame) override;
33  std::string Name() const override;
34 
35  private:
36  std::shared_ptr<base::Image8U> image_ = nullptr;
37  std::shared_ptr<inference::Inference> inference_;
38  std::shared_ptr<BaseFeatureExtractor> feature_extractor_;
39  tracking_feature::ExternalParam param_;
40  int height_;
41  int width_;
42  bool InitFeatureExtractor(const std::string &root_dir);
43  int gpu_id_;
44 };
45 } // namespace camera
46 } // namespace perception
47 } // namespace apollo
Definition: external_feature_extractor.h:28
Definition: camera_frame.h:33
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
bool Extract(const FeatureExtractorOptions &options, CameraFrame *frame) override
Definition: base_feature_extractor.h:43
bool Init(const FeatureExtractorInitOptions &init_options) override
Definition: base_feature_extractor.h:46
Definition: base_feature_extractor.h:36