Apollo
6.0
Open source self driving car software
modules
perception
camera
lib
feature_extractor
tfe
tracking_feat_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
17
18
#include <memory>
19
#include <string>
20
#include <vector>
21
22
#include "
modules/perception/base/blob.h
"
23
#include "
modules/perception/base/object.h
"
24
#include "
modules/perception/camera/common/camera_frame.h
"
25
#include "
modules/perception/camera/common/util.h
"
26
#include "modules/perception/camera/lib/feature_extractor/tfe/proto/tracking_feature.pb.h"
27
#include "
modules/perception/camera/lib/interface/base_feature_extractor.h
"
28
#include "
modules/perception/inference/operators/roipooling_layer.h
"
29
#include "
modules/perception/inference/utils/gemm.h
"
30
31
namespace
apollo
{
32
namespace
perception {
33
namespace
camera {
34
struct
FeatureExtractorLayer
{
35
std::shared_ptr<inference::Layer<float>>
pooling_layer
;
36
std::shared_ptr<base::Blob<float>>
rois_blob
;
37
std::shared_ptr<base::Blob<float>>
top_blob
;
38
};
39
class
TrackingFeatureExtractor
:
public
BaseFeatureExtractor
{
40
public
:
41
TrackingFeatureExtractor
() {}
42
~TrackingFeatureExtractor
() {}
43
44
bool
Init
(
const
FeatureExtractorInitOptions
&init_options)
override
;
45
bool
Extract(
const
FeatureExtractorOptions
&options,
46
CameraFrame
*frame)
override
;
47
std::string
Name
()
const override
{
return
"TrackingFeatureExtractor"
; }
48
49
protected
:
50
void
init_roipooling(
const
FeatureExtractorInitOptions
&init_options,
51
const
tracking_feature::ROIPoolingParam ¶m);
52
std::vector<std::shared_ptr<FeatureExtractorLayer>>
roi_poolings_
;
53
inference::GPUL2Norm
norm_
;
54
int
input_height_ = 0;
55
int
input_width_ = 0;
56
int
feat_width_ = 0;
57
int
feat_height_ = 0;
58
};
59
60
}
// namespace camera
61
}
// namespace perception
62
}
// namespace apollo
base_feature_extractor.h
apollo::perception::camera::CameraFrame
Definition:
camera_frame.h:33
object.h
apollo::perception::camera::FeatureExtractorLayer::top_blob
std::shared_ptr< base::Blob< float > > top_blob
Definition:
tracking_feat_extractor.h:37
apollo
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition:
atomic_hash_map.h:25
apollo::perception::camera::FeatureExtractorLayer
Definition:
tracking_feat_extractor.h:34
apollo::perception::camera::TrackingFeatureExtractor::roi_poolings_
std::vector< std::shared_ptr< FeatureExtractorLayer > > roi_poolings_
Definition:
tracking_feat_extractor.h:52
util.h
apollo::perception::camera::FeatureExtractorOptions
Definition:
base_feature_extractor.h:43
camera_frame.h
apollo::perception::camera::TrackingFeatureExtractor
Definition:
tracking_feat_extractor.h:39
apollo::perception::camera::FeatureExtractorLayer::rois_blob
std::shared_ptr< base::Blob< float > > rois_blob
Definition:
tracking_feat_extractor.h:36
roipooling_layer.h
apollo::cyber::Init
bool Init(const char *binary_name)
apollo::perception::camera::TrackingFeatureExtractor::TrackingFeatureExtractor
TrackingFeatureExtractor()
Definition:
tracking_feat_extractor.h:41
apollo::perception::camera::TrackingFeatureExtractor::norm_
inference::GPUL2Norm norm_
Definition:
tracking_feat_extractor.h:53
apollo::perception::inference::GPUL2Norm
Definition:
gemm.h:27
blob.h
apollo::perception::camera::FeatureExtractorLayer::pooling_layer
std::shared_ptr< inference::Layer< float > > pooling_layer
Definition:
tracking_feat_extractor.h:35
apollo::perception::camera::BaseFeatureExtractor
Definition:
base_feature_extractor.h:46
gemm.h
apollo::perception::camera::TrackingFeatureExtractor::Name
std::string Name() const override
Definition:
tracking_feat_extractor.h:47
apollo::perception::camera::FeatureExtractorInitOptions
Definition:
base_feature_extractor.h:36
apollo::perception::camera::TrackingFeatureExtractor::~TrackingFeatureExtractor
~TrackingFeatureExtractor()
Definition:
tracking_feat_extractor.h:42
Generated by
1.8.13