Preprocessor for scaling and normalization of the input and conversion to network media format.
Definition at line 51 of file infer_preprocess.h.


Public Types | |
| using | PreprocessDone = std::function< void(NvDsInferStatus, SharedBatchArray)> |
Public Member Functions | |
| NetworkPreprocessor (const NvDsInferNetworkInfo &info, InferMediaFormat networkFormat, InferDataType dt, int maxBatchSize) | |
| virtual | ~NetworkPreprocessor ()=default |
| bool | setScaleOffsets (float scale, const std::vector< float > &offsets={}) |
| bool | setMeanFile (const std::string &file) |
| void | setNetworkTensorOrder (InferTensorOrder order) |
| void | setPoolSize (int size) |
| int | poolSize () const |
| void | setNetworkTensorName (std::string name) |
| const BatchSurfaceInfo & | getDstSurfaceInfo () const |
| NvDsInferStatus | allocateResource (const std::vector< int > &devIds) override |
| NvDsInferStatus | syncStream () |
| NvDsInferStatus | transform (SharedBatchArray src, SharedCuStream mainStream, PreprocessDone done) override |
| Perform the transformation on the input buffer from the buffer array, indexed using m_TransformIdx. More... | |
| void | setUniqueId (int id) |
| int | uniqueId () const |
| void | setTransformIdx (int idx) |
| void | setUniqueId (int id) |
| int | uniqueId () const |
| void | setTransformIdx (int idx) |
| void | setUniqueId (int id) |
| int | uniqueId () const |
| void | setTransformIdx (int idx) |
Protected Member Functions | |
| NvDsInferStatus | readMeanImageFile () |
| DISABLE_CLASS_COPY (NetworkPreprocessor) | |
|
inherited |
Definition at line 44 of file infer_iprocess.h.
| nvdsinferserver::NetworkPreprocessor::NetworkPreprocessor | ( | const NvDsInferNetworkInfo & | info, |
| InferMediaFormat | networkFormat, | ||
| InferDataType | dt, | ||
| int | maxBatchSize | ||
| ) |
|
virtualdefault |
|
overridevirtual |
Implements nvdsinferserver::BasePreprocessor.
|
protected |
|
inline |
Definition at line 65 of file infer_preprocess.h.
|
inline |
Definition at line 63 of file infer_preprocess.h.
|
protected |
| bool nvdsinferserver::NetworkPreprocessor::setMeanFile | ( | const std::string & | file | ) |
|
inline |
Definition at line 64 of file infer_preprocess.h.
|
inline |
Definition at line 59 of file infer_preprocess.h.
|
inline |
Definition at line 62 of file infer_preprocess.h.
| bool nvdsinferserver::NetworkPreprocessor::setScaleOffsets | ( | float | scale, |
| const std::vector< float > & | offsets = {} |
||
| ) |
|
inlineinherited |
Definition at line 92 of file infer_iprocess.h.
|
inlineinherited |
Definition at line 90 of file infer_iprocess.h.
| NvDsInferStatus nvdsinferserver::NetworkPreprocessor::syncStream | ( | ) |
|
inlineoverridevirtualinherited |
Perform the transformation on the input buffer from the buffer array, indexed using m_TransformIdx.
| [in] | src | The input batch buffer array. |
| [in] | mainStream | The main processing CUDA stream. |
| [in] | done | The call function to be called after transformation. |
Implements nvdsinferserver::IPreprocessor.
Definition at line 103 of file infer_iprocess.h.
References NVDSINFER_RESOURCE_ERROR, and NVDSINFER_SUCCESS.
|
inlineinherited |
Definition at line 91 of file infer_iprocess.h.