The SampleUffSSD class implements the SSD sample. More...
Public Member Functions | |
SampleUffSSD (const SampleUffSSDParams ¶ms) | |
bool | build () |
Function builds the network engine. More... | |
bool | infer () |
Runs the TensorRT inference engine for this sample. More... | |
bool | teardown () |
Cleans up any state created in the sample class. More... | |
Private Types | |
template<typename T > | |
using | SampleUniquePtr = std::unique_ptr< T, samplesCommon::InferDeleter > |
Private Member Functions | |
bool | constructNetwork (SampleUniquePtr< nvinfer1::IBuilder > &builder, SampleUniquePtr< nvinfer1::INetworkDefinition > &network, SampleUniquePtr< nvinfer1::IBuilderConfig > &config, SampleUniquePtr< nvuffparser::IUffParser > &parser) |
Parses an UFF model for SSD and creates a TensorRT network. More... | |
bool | processInput (const samplesCommon::BufferManager &buffers) |
Reads the input and mean data, preprocesses, and stores the result in a managed buffer. More... | |
bool | verifyOutput (const samplesCommon::BufferManager &buffers) |
Filters output detections and verify results. More... | |
Private Attributes | |
SampleUffSSDParams | mParams |
The parameters for the sample. More... | |
nvinfer1::Dims | mInputDims |
The dimensions of the input to the network. More... | |
std::vector< samplesCommon::PPM< 3, 300, 300 > > | mPPMs |
PPMs of test images. More... | |
std::shared_ptr< nvinfer1::ICudaEngine > | mEngine |
The TensorRT engine used to run the network. More... | |
The SampleUffSSD class implements the SSD sample.
It creates the network using an UFF model
|
private |
|
inline |
bool SampleUffSSD::build | ( | ) |
Function builds the network engine.
Creates the network, configures the builder and creates the network engine.
This function creates the SSD network by parsing the UFF model and builds the engine that will be used to run SSD (mEngine)
bool SampleUffSSD::infer | ( | ) |
Runs the TensorRT inference engine for this sample.
This function is the main execution function of the sample. It allocates the buffer, sets inputs, executes the engine and verifies the detection outputs.
bool SampleUffSSD::teardown | ( | ) |
Cleans up any state created in the sample class.
Clean up the libprotobuf files as the parsing is complete
|
private |
Parses an UFF model for SSD and creates a TensorRT network.
Uses a UFF parser to create the SSD Network and marks the output layers.
network | Pointer to the network that will be populated with the SSD network |
builder | Pointer to the engine builder |
|
private |
Reads the input and mean data, preprocesses, and stores the result in a managed buffer.
|
private |
Filters output detections and verify results.
Filters output detections and verify result.
|
private |
The parameters for the sample.
|
private |
The dimensions of the input to the network.
|
private |
PPMs of test images.
|
private |
The TensorRT engine used to run the network.