27 #include "modules/perception/camera/lib/traffic_light/proto/detection.pb.h" 31 namespace perception {
53 const std::vector<float> &resize_scale_list_col,
54 const std::vector<float> &resize_scale_list_row,
55 std::vector<base::TrafficLightPtr> *lights);
56 void ApplyNMS(std::vector<base::TrafficLightPtr> *lights,
57 double iou_thresh = 0.6);
58 bool Inference(std::vector<base::TrafficLightPtr> *lights,
60 std::string
Name()
const override;
62 return detected_bboxes_;
69 traffic_light::detection::DetectionParam detection_param_;
71 std::shared_ptr<inference::Inference> rt_net_ =
nullptr;
72 std::shared_ptr<base::Image8U> image_ =
nullptr;
73 std::shared_ptr<base::Blob<float>> param_blob_;
74 std::shared_ptr<base::Blob<float>> mean_buffer_;
75 std::shared_ptr<IGetBox> crop_;
76 std::vector<base::TrafficLightPtr> detected_bboxes_;
77 std::vector<base::TrafficLightPtr> selected_bboxes_;
78 std::vector<std::string> net_inputs_;
79 std::vector<std::string> net_outputs_;
81 int max_batch_size_ = 4;
82 int param_blob_length_ = 6;
84 std::vector<base::RectI> crop_box_list_;
85 std::vector<float> resize_scale_list_;
Definition: data_provider.h:30
Definition: detection.h:34
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 Detect(const TrafficLightDetectorOptions &options, CameraFrame *frame) override
Definition: data_provider.h:46
Definition: base_traffic_light_detector.h:35
bool SelectOutputBoxes(const std::vector< base::RectI > &crop_box_list, const std::vector< float > &resize_scale_list_col, const std::vector< float > &resize_scale_list_row, std::vector< base::TrafficLightPtr > *lights)
TrafficLightDetection & operator=(const TrafficLightDetection &)=delete
Definition: base_traffic_light_detector.h:37
const std::vector< base::TrafficLightPtr > & getDetectedBoxes()
Definition: detection.h:61
bool Inference(std::vector< base::TrafficLightPtr > *lights, DataProvider *data_provider)
~TrafficLightDetection()
Definition: detection.h:42
Definition: base_traffic_light_detector.h:31
void ApplyNMS(std::vector< base::TrafficLightPtr > *lights, double iou_thresh=0.6)
bool Init(const TrafficLightDetectorInitOptions &options) override
std::string Name() const override
TrafficLightDetection()
Definition: detection.h:36