Apollo  6.0
Open source self driving car software
Public Member Functions | List of all members
apollo::perception::inference::OnnxObstacleDetector Class Reference

#include <onnx_obstacle_detector.h>

Inheritance diagram for apollo::perception::inference::OnnxObstacleDetector:
Inheritance graph
Collaboration diagram for apollo::perception::inference::OnnxObstacleDetector:
Collaboration graph

Public Member Functions

 OnnxObstacleDetector (const std::string &model_file, const float score_threshold, const std::vector< std::string > &outputs, const std::vector< std::string > &inputs)
 
 OnnxObstacleDetector (const std::string &model_file, const std::vector< std::string > &outputs, const std::vector< std::string > &inputs)
 
virtual ~OnnxObstacleDetector ()
 
void OnnxToTRTModel (const std::string &model_file, nvinfer1::ICudaEngine **engine_ptr)
 Convert ONNX to TensorRT model. More...
 
void inference ()
 
bool Init (const std::map< std::string, std::vector< int >> &shapes) override
 
void Infer () override
 
BlobPtr get_blob (const std::string &name) override
 
- Public Member Functions inherited from apollo::perception::inference::Inference
 Inference ()=default
 
virtual ~Inference ()=default
 
void set_max_batch_size (const int &batch_size)
 
void set_gpu_id (const int &gpu_id)
 

Additional Inherited Members

- Protected Attributes inherited from apollo::perception::inference::Inference
int max_batch_size_ = 1
 
int gpu_id_ = 0
 

Constructor & Destructor Documentation

◆ OnnxObstacleDetector() [1/2]

apollo::perception::inference::OnnxObstacleDetector::OnnxObstacleDetector ( const std::string &  model_file,
const float  score_threshold,
const std::vector< std::string > &  outputs,
const std::vector< std::string > &  inputs 
)

◆ OnnxObstacleDetector() [2/2]

apollo::perception::inference::OnnxObstacleDetector::OnnxObstacleDetector ( const std::string &  model_file,
const std::vector< std::string > &  outputs,
const std::vector< std::string > &  inputs 
)

◆ ~OnnxObstacleDetector()

virtual apollo::perception::inference::OnnxObstacleDetector::~OnnxObstacleDetector ( )
virtual

Member Function Documentation

◆ get_blob()

BlobPtr apollo::perception::inference::OnnxObstacleDetector::get_blob ( const std::string &  name)
overridevirtual

◆ Infer()

void apollo::perception::inference::OnnxObstacleDetector::Infer ( )
overridevirtual

◆ inference()

void apollo::perception::inference::OnnxObstacleDetector::inference ( )

◆ Init()

bool apollo::perception::inference::OnnxObstacleDetector::Init ( const std::map< std::string, std::vector< int >> &  shapes)
overridevirtual

◆ OnnxToTRTModel()

void apollo::perception::inference::OnnxObstacleDetector::OnnxToTRTModel ( const std::string &  model_file,
nvinfer1::ICudaEngine **  engine_ptr 
)

Convert ONNX to TensorRT model.

Parameters
[in]model_fileONNX model file path
[out]engine_ptrTensorRT model engine made out of ONNX model

Load ONNX model, and convert it to TensorRT model


The documentation for this class was generated from the following file: