The SampleFasterRCNN class implements the FasterRCNN sample.
More...
|
void | constructNetwork (SampleUniquePtr< nvcaffeparser1::ICaffeParser > &parser, SampleUniquePtr< nvinfer1::IBuilder > &builder, SampleUniquePtr< nvinfer1::INetworkDefinition > &network, SampleUniquePtr< nvinfer1::IBuilderConfig > &config) |
| Parses a Caffe model for FasterRCNN 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, handles post-processing of bounding boxes and verify results. More...
|
|
void | bboxTransformInvAndClip (const float *rois, const float *deltas, float *predBBoxes, const float *imInfo, const int N, const int nmsMaxOut, const int numCls) |
| Performs inverse bounding box transform and clipping. More...
|
|
std::vector< int > | nonMaximumSuppression (std::vector< std::pair< float, int >> &scoreIndex, float *bbox, const int classNum, const int numClasses, const float nmsThreshold) |
| Performs non maximum suppression on final bounding boxes. More...
|
|
The SampleFasterRCNN class implements the FasterRCNN sample.
It creates the network using a caffe model
◆ SampleUniquePtr
◆ SampleFasterRCNN()
◆ build()
bool SampleFasterRCNN::build |
( |
| ) |
|
Function builds the network engine.
Creates the network, configures the builder and creates the network engine.
This function creates the FasterRCNN network by parsing the caffe model and builds the engine that will be used to run FasterRCNN (mEngine)
- Returns
- Returns true if the engine was created successfully and false otherwise
◆ infer()
bool SampleFasterRCNN::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 and executes the engine.
◆ teardown()
bool SampleFasterRCNN::teardown |
( |
| ) |
|
Cleans up any state created in the sample class.
Clean up the libprotobuf files as the parsing is complete
- Note
- It is not safe to use any other part of the protocol buffers library after ShutdownProtobufLibrary() has been called.
◆ constructNetwork()
Parses a Caffe model for FasterRCNN and creates a TensorRT network.
Uses a caffe parser to create the FasterRCNN network and marks the output layers.
- Parameters
-
network | Pointer to the network that will be populated with the FasterRCNN network |
builder | Pointer to the engine builder |
◆ processInput()
Reads the input and mean data, preprocesses, and stores the result in a managed buffer.
◆ verifyOutput()
Filters output detections, handles post-processing of bounding boxes and verify results.
Filters output detections and handles post-processing of bounding boxes, verify result.
- Returns
- whether the detection output matches expectations
◆ bboxTransformInvAndClip()
void SampleFasterRCNN::bboxTransformInvAndClip |
( |
const float * |
rois, |
|
|
const float * |
deltas, |
|
|
float * |
predBBoxes, |
|
|
const float * |
imInfo, |
|
|
const int |
N, |
|
|
const int |
nmsMaxOut, |
|
|
const int |
numCls |
|
) |
| |
|
private |
Performs inverse bounding box transform and clipping.
Performs inverse bounding box transform.
◆ nonMaximumSuppression()
std::vector< int > SampleFasterRCNN::nonMaximumSuppression |
( |
std::vector< std::pair< float, int >> & |
scoreIndex, |
|
|
float * |
bbox, |
|
|
const int |
classNum, |
|
|
const int |
numClasses, |
|
|
const float |
nmsThreshold |
|
) |
| |
|
private |
Performs non maximum suppression on final bounding boxes.
◆ mParams
The parameters for the sample.
◆ mInputDims
The dimensions of the input to the network.
◆ kIMG_CHANNELS
const int SampleFasterRCNN::kIMG_CHANNELS = 3 |
|
staticprivate |
◆ kIMG_H
const int SampleFasterRCNN::kIMG_H = 375 |
|
staticprivate |
◆ kIMG_W
const int SampleFasterRCNN::kIMG_W = 500 |
|
staticprivate |
◆ mPPMs
◆ mEngine
The TensorRT engine used to run the network.
The documentation for this class was generated from the following file: