NVIDIA DeepStream SDK API Reference

9.2 Release
SegmenterConfigParams Class Reference

Detailed Description

Stores configuration for segmentation inference.

Definition at line 107 of file sources/libs/nvmultiobjecttracker/include/modules/Segmenter/Segmenter.hpp.

Inheritance diagram for SegmenterConfigParams:
Collaboration diagram for SegmenterConfigParams:

Public Member Functions

 SegmenterConfigParams ()
 Construct a SegmenterConfigParams instance. More...
 
 SegmenterConfigParams (const std::string &configFilePath, const std::string moduleName)
 Construct a SegmenterConfigParams instance. More...
 
 SegmenterConfigParams (const YAML::Node &fn)
 Construct a SegmenterConfigParams instance. More...
 
void read (const YAML::Node &fn) override
 Load configuration values from a YAML node. More...
 
 SegmenterConfigParams ()
 Construct a SegmenterConfigParams instance. More...
 
 SegmenterConfigParams (const std::string &configFilePath, const std::string moduleName)
 Construct a SegmenterConfigParams instance. More...
 
 SegmenterConfigParams (const YAML::Node &fn)
 Construct a SegmenterConfigParams instance. More...
 
void read (const YAML::Node &fn) override
 Load configuration values from a YAML node. More...
 

Static Public Member Functions

static std::string resolvePathRelativeToConfig (const std::string &configFilePath, const std::string &filePath)
 Resolve a configured path relative to the tracker configuration file. More...
 
static std::string resolvePathRelativeToConfig (const std::string &configFilePath, const std::string &filePath)
 Resolve a configured path relative to the tracker configuration file. More...
 
static const YAML::Node getConfigRoot (const std::string &configFilePath, const bool printMessage=false)
 Load the root YAML node from a tracker configuration file. More...
 
static const YAML::Node getConfigRoot (const std::string &configFilePath, const bool printMessage=false)
 Load the root YAML node from a tracker configuration file. More...
 

Data Fields

SEGMENTER_TYPES m_segmenterType
 Type of segmenter. More...
 
int m_hiddenDim
 Hidden feature dimension. More...
 
std::vector< int > m_inferDims
 Network input dimension. More...
 
int m_inputOrder
 Input dimension order: 0: NCHW, 1: NHWC. More...
 
int m_encoderFeatureDim
 Encoder feature dimension. More...
 
int m_maxMemVecSize_legacy
 Maximum memory vector size of the legacy work spaces. More...
 
int m_width
 Input image patch width. More...
 
int m_height
 Input image patch height. More...
 
int m_channel
 Input image patch channel. More...
 
int m_gpuId
 Gpu id. More...
 
float m_netScaleFactor
 Input normalization factor. More...
 
std::vector< float > m_offsets
 List of mean values of color components to be subtracted from input. More...
 
NvBufSurfaceColorFormat m_colorFormat
 Color format of input to segmentation network. More...
 
int m_promptType
 Prompt type. More...
 
int m_outputLabelNum
 Number of decoder output labels for each target. More...
 
bool m_useVPICropScaler
 Use VPI crop scaler instead of in built crop scaler. More...
 
std::string m_vizDir
 Dir to save visualization dumps. More...
 
bool m_saveFrameViz
 Save overlay masks for each target in each frame. More...
 
bool m_saveIDMask
 Enables saving encoded target-ID masks. More...
 
bool m_outputMask
 Output mask to tracker plugin. More...
 
bool m_useMemBank
 Use memory bank. More...
 
bool m_useCudaMemBank
 Use cuda memory bank. More...
 
bool m_updateMemBankPrompt
 Update memory bank using bbox prompt. More...
 
int m_numMaskMem
 Number of memory bank masks. More...
 
int m_debugVerboseLevel
 Debug message verbose mode level. More...
 
float m_promptBboxPaddingScale
 Padding of the bounding-box prompt as a fraction of the box height. More...
 
int m_numObjPtr
 Number of object pointers. More...
 
int m_numConditionalMem
 Number of conditional frames to use for memory bank update. More...
 
int m_maskMemoryUpdateInterval
 Frame interval to update memory bank. More...
 
float m_minIouDiff4MemoryUpdate
 IOU threshold to update memory bank. More...
 
float m_minIouPrevFrame4ProgBbox
 IOU threshold to use detection bboxes as the prompt for mask decoder. More...
 
float m_minMemoryUpdateConfidence
 Mask confidence to update memory bank. More...
 
int m_maskPromptUpdateInterval
 Frame interval to use detection bboxes as the prompt for mask decoder. (Memory bank is also used except in the first frame). More...
 
float m_minPromptUpdateConfidence
 Minimum confidence of detection bbox to use as the prompt for mask decoder. More...
 

Constructor & Destructor Documentation

◆ SegmenterConfigParams() [1/6]

SegmenterConfigParams::SegmenterConfigParams ( )

Construct a SegmenterConfigParams instance.

◆ SegmenterConfigParams() [2/6]

SegmenterConfigParams::SegmenterConfigParams ( const std::string &  configFilePath,
const std::string  moduleName 
)

Construct a SegmenterConfigParams instance.

Parameters
[in]configFilePathPath to the tracker configuration file.
[in]moduleNameConfiguration module name.

◆ SegmenterConfigParams() [3/6]

SegmenterConfigParams::SegmenterConfigParams ( const YAML::Node &  fn)

Construct a SegmenterConfigParams instance.

Parameters
[in]fnParsed YAML node.

◆ SegmenterConfigParams() [4/6]

SegmenterConfigParams::SegmenterConfigParams ( )

Construct a SegmenterConfigParams instance.

◆ SegmenterConfigParams() [5/6]

SegmenterConfigParams::SegmenterConfigParams ( const std::string &  configFilePath,
const std::string  moduleName 
)

Construct a SegmenterConfigParams instance.

Parameters
[in]configFilePathPath to the tracker configuration file.
[in]moduleNameConfiguration module name.

◆ SegmenterConfigParams() [6/6]

SegmenterConfigParams::SegmenterConfigParams ( const YAML::Node &  fn)

Construct a SegmenterConfigParams instance.

Parameters
[in]fnParsed YAML node.

Member Function Documentation

◆ getConfigRoot() [1/2]

static const YAML::Node NvTrackerParams::getConfigRoot ( const std::string &  configFilePath,
const bool  printMessage = false 
)
inlinestaticinherited

◆ getConfigRoot() [2/2]

static const YAML::Node NvTrackerParams::getConfigRoot ( const std::string &  configFilePath,
const bool  printMessage = false 
)
inlinestaticinherited

Load the root YAML node from a tracker configuration file.

Parameters
[in]configFilePathPath to the tracker configuration file.
[in]printMessageEnables warning output when the configuration cannot be loaded.
Returns
Loaded YAML root node, or an empty node when loading fails.

Definition at line 121 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/NvMultiObjectTracker/NvTrackerParams.hpp.

References CLOG.

◆ read() [1/2]

void SegmenterConfigParams::read ( const YAML::Node &  fn)
overridevirtual

Load configuration values from a YAML node.

Parameters
[in]fnParsed YAML node.

Implements NvTrackerParams.

◆ read() [2/2]

void SegmenterConfigParams::read ( const YAML::Node &  fn)
overridevirtual

Load configuration values from a YAML node.

Parameters
[in]fnParsed YAML node.

Implements NvTrackerParams.

◆ resolvePathRelativeToConfig() [1/2]

static std::string NvTrackerParams::resolvePathRelativeToConfig ( const std::string &  configFilePath,
const std::string &  filePath 
)
inlinestaticinherited

Resolve a configured path relative to the tracker configuration file.

Existing paths are canonicalized, while nonexistent relative paths remain joined to the configuration directory.

Parameters
[in]configFilePathPath to the tracker configuration file.
[in]filePathAbsolute or configuration-relative path to resolve.
Returns
Resolved path, or the original path when the configuration path cannot be resolved.

Definition at line 55 of file sources/libs/nvmultiobjecttracker/include/modules/NvMultiObjectTracker/NvTrackerParams.hpp.

Referenced by CommunicatorParams::CommunicatorParams(), and MqttCommunicatorParams::MqttCommunicatorParams().

◆ resolvePathRelativeToConfig() [2/2]

static std::string NvTrackerParams::resolvePathRelativeToConfig ( const std::string &  configFilePath,
const std::string &  filePath 
)
inlinestaticinherited

Resolve a configured path relative to the tracker configuration file.

Existing paths are canonicalized, while nonexistent relative paths remain joined to the configuration directory.

Parameters
[in]configFilePathPath to the tracker configuration file.
[in]filePathAbsolute or configuration-relative path to resolve.
Returns
Resolved path, or the original path when the configuration path cannot be resolved.

Definition at line 55 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/NvMultiObjectTracker/NvTrackerParams.hpp.

Field Documentation

◆ m_channel

int SegmenterConfigParams::m_channel

Input image patch channel.

Definition at line 140 of file sources/libs/nvmultiobjecttracker/include/modules/Segmenter/Segmenter.hpp.

◆ m_colorFormat

NvBufSurfaceColorFormat SegmenterConfigParams::m_colorFormat

Color format of input to segmentation network.

Definition at line 144 of file sources/libs/nvmultiobjecttracker/include/modules/Segmenter/Segmenter.hpp.

◆ m_debugVerboseLevel

int SegmenterConfigParams::m_debugVerboseLevel

Debug message verbose mode level.

Definition at line 159 of file sources/libs/nvmultiobjecttracker/include/modules/Segmenter/Segmenter.hpp.

◆ m_encoderFeatureDim

int SegmenterConfigParams::m_encoderFeatureDim

Encoder feature dimension.

Definition at line 136 of file sources/libs/nvmultiobjecttracker/include/modules/Segmenter/Segmenter.hpp.

◆ m_gpuId

int SegmenterConfigParams::m_gpuId

◆ m_height

int SegmenterConfigParams::m_height

Input image patch height.

Definition at line 139 of file sources/libs/nvmultiobjecttracker/include/modules/Segmenter/Segmenter.hpp.

◆ m_hiddenDim

int SegmenterConfigParams::m_hiddenDim

Hidden feature dimension.

Definition at line 133 of file sources/libs/nvmultiobjecttracker/include/modules/Segmenter/Segmenter.hpp.

◆ m_inferDims

std::vector< int > SegmenterConfigParams::m_inferDims

Network input dimension.

Definition at line 134 of file sources/libs/nvmultiobjecttracker/include/modules/Segmenter/Segmenter.hpp.

◆ m_inputOrder

int SegmenterConfigParams::m_inputOrder

Input dimension order: 0: NCHW, 1: NHWC.

Definition at line 135 of file sources/libs/nvmultiobjecttracker/include/modules/Segmenter/Segmenter.hpp.

◆ m_maskMemoryUpdateInterval

int SegmenterConfigParams::m_maskMemoryUpdateInterval

Frame interval to update memory bank.

Definition at line 163 of file sources/libs/nvmultiobjecttracker/include/modules/Segmenter/Segmenter.hpp.

◆ m_maskPromptUpdateInterval

int SegmenterConfigParams::m_maskPromptUpdateInterval

Frame interval to use detection bboxes as the prompt for mask decoder. (Memory bank is also used except in the first frame).

Definition at line 167 of file sources/libs/nvmultiobjecttracker/include/modules/Segmenter/Segmenter.hpp.

◆ m_maxMemVecSize_legacy

int SegmenterConfigParams::m_maxMemVecSize_legacy

Maximum memory vector size of the legacy work spaces.

Definition at line 137 of file sources/libs/nvmultiobjecttracker/include/modules/Segmenter/Segmenter.hpp.

◆ m_minIouDiff4MemoryUpdate

float SegmenterConfigParams::m_minIouDiff4MemoryUpdate

IOU threshold to update memory bank.

Definition at line 164 of file sources/libs/nvmultiobjecttracker/include/modules/Segmenter/Segmenter.hpp.

◆ m_minIouPrevFrame4ProgBbox

float SegmenterConfigParams::m_minIouPrevFrame4ProgBbox

IOU threshold to use detection bboxes as the prompt for mask decoder.

Definition at line 165 of file sources/libs/nvmultiobjecttracker/include/modules/Segmenter/Segmenter.hpp.

◆ m_minMemoryUpdateConfidence

float SegmenterConfigParams::m_minMemoryUpdateConfidence

Mask confidence to update memory bank.

Definition at line 166 of file sources/libs/nvmultiobjecttracker/include/modules/Segmenter/Segmenter.hpp.

◆ m_minPromptUpdateConfidence

float SegmenterConfigParams::m_minPromptUpdateConfidence

Minimum confidence of detection bbox to use as the prompt for mask decoder.

Definition at line 168 of file sources/libs/nvmultiobjecttracker/include/modules/Segmenter/Segmenter.hpp.

◆ m_netScaleFactor

float SegmenterConfigParams::m_netScaleFactor

Input normalization factor.

Definition at line 142 of file sources/libs/nvmultiobjecttracker/include/modules/Segmenter/Segmenter.hpp.

◆ m_numConditionalMem

int SegmenterConfigParams::m_numConditionalMem

Number of conditional frames to use for memory bank update.

Definition at line 162 of file sources/libs/nvmultiobjecttracker/include/modules/Segmenter/Segmenter.hpp.

◆ m_numMaskMem

int SegmenterConfigParams::m_numMaskMem

Number of memory bank masks.

Definition at line 158 of file sources/libs/nvmultiobjecttracker/include/modules/Segmenter/Segmenter.hpp.

◆ m_numObjPtr

int SegmenterConfigParams::m_numObjPtr

Number of object pointers.

Definition at line 161 of file sources/libs/nvmultiobjecttracker/include/modules/Segmenter/Segmenter.hpp.

◆ m_offsets

std::vector< float > SegmenterConfigParams::m_offsets

List of mean values of color components to be subtracted from input.

Definition at line 143 of file sources/libs/nvmultiobjecttracker/include/modules/Segmenter/Segmenter.hpp.

◆ m_outputLabelNum

int SegmenterConfigParams::m_outputLabelNum

Number of decoder output labels for each target.

Each label corresponds to a mask, and the implementation currently uses only label 0.

Definition at line 147 of file sources/libs/nvmultiobjecttracker/include/modules/Segmenter/Segmenter.hpp.

◆ m_outputMask

bool SegmenterConfigParams::m_outputMask

Output mask to tracker plugin.

Definition at line 154 of file sources/libs/nvmultiobjecttracker/include/modules/Segmenter/Segmenter.hpp.

◆ m_promptBboxPaddingScale

float SegmenterConfigParams::m_promptBboxPaddingScale

Padding of the bounding-box prompt as a fraction of the box height.

Definition at line 160 of file sources/libs/nvmultiobjecttracker/include/modules/Segmenter/Segmenter.hpp.

◆ m_promptType

int SegmenterConfigParams::m_promptType

Prompt type.

A value of 0 uses a foreground point, while 1 uses a box.

Definition at line 145 of file sources/libs/nvmultiobjecttracker/include/modules/Segmenter/Segmenter.hpp.

◆ m_saveFrameViz

bool SegmenterConfigParams::m_saveFrameViz

Save overlay masks for each target in each frame.

Definition at line 151 of file sources/libs/nvmultiobjecttracker/include/modules/Segmenter/Segmenter.hpp.

◆ m_saveIDMask

bool SegmenterConfigParams::m_saveIDMask

Enables saving encoded target-ID masks.

Each frame stores all targets in one four-channel RGBA image with one four-byte target ID per pixel.

Definition at line 152 of file sources/libs/nvmultiobjecttracker/include/modules/Segmenter/Segmenter.hpp.

◆ m_segmenterType

SEGMENTER_TYPES SegmenterConfigParams::m_segmenterType

◆ m_updateMemBankPrompt

bool SegmenterConfigParams::m_updateMemBankPrompt

Update memory bank using bbox prompt.

Definition at line 157 of file sources/libs/nvmultiobjecttracker/include/modules/Segmenter/Segmenter.hpp.

◆ m_useCudaMemBank

bool SegmenterConfigParams::m_useCudaMemBank

◆ m_useMemBank

bool SegmenterConfigParams::m_useMemBank

◆ m_useVPICropScaler

bool SegmenterConfigParams::m_useVPICropScaler

Use VPI crop scaler instead of in built crop scaler.

Definition at line 149 of file sources/libs/nvmultiobjecttracker/include/modules/Segmenter/Segmenter.hpp.

◆ m_vizDir

std::string SegmenterConfigParams::m_vizDir

Dir to save visualization dumps.

Definition at line 150 of file sources/libs/nvmultiobjecttracker/include/modules/Segmenter/Segmenter.hpp.

◆ m_width

int SegmenterConfigParams::m_width

Input image patch width.

Definition at line 138 of file sources/libs/nvmultiobjecttracker/include/modules/Segmenter/Segmenter.hpp.


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