NVIDIA DeepStream SDK API Reference

6.4 Release
SegmentationModelPostProcessor Class Reference

Detailed Description

Copyright (c) 2022, NVIDIA CORPORATION.

All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Definition at line 28 of file post_processor_segmentation.h.

Inheritance diagram for SegmentationModelPostProcessor:
Collaboration diagram for SegmentationModelPostProcessor:

Public Member Functions

 SegmentationModelPostProcessor (int id, int gpuId=0)
 
 ~SegmentationModelPostProcessor () override=default
 
NvDsPostProcessStatus initResource (NvDsPostProcessContextInitParams &initParams) override
 
NvDsPostProcessStatus parseEachFrame (const std::vector< NvDsInferLayerInfo > &outputLayers, NvDsPostProcessFrameOutput &result) override
 
void attachMetadata (NvBufSurface *surf, gint batch_idx, NvDsBatchMeta *batch_meta, NvDsFrameMeta *frame_meta, NvDsObjectMeta *object_meta, NvDsObjectMeta *parent_obj_meta, NvDsPostProcessFrameOutput &detection_output, NvDsPostProcessDetectionParams *all_params, std::set< gint > &filterOutClassIds, int32_t unique_id, gboolean output_instance_mask, gboolean process_full_frame, float segmentationThreshold, gboolean maintain_aspect_ratio) override
 
void releaseFrameOutput (NvDsPostProcessFrameOutput &frameOutput) override
 
const std::vector< std::vector< std::string > > & getLabels () const
 
void freeBatchOutput (NvDsPostProcessBatchOutput &batchOutput)
 
void setNetworkInfo (NvDsInferNetworkInfo networkInfo)
 

Protected Member Functions

NvDsPostProcessStatus parseLabelsFile (const std::string &path)
 

Protected Attributes

NvDsPostProcessNetworkType m_NetworkType = NvDsPostProcessNetworkType_Other
 
int m_UniqueID = 0
 
uint32_t m_GpuID = 0
 
NvDsInferNetworkInfo m_NetworkInfo = {0}
 
std::vector< NvDsInferLayerInfom_AllLayerInfo
 
std::vector< NvDsInferLayerInfom_OutputLayerInfo
 
std::vector< std::vector< std::string > > m_Labels
 

Constructor & Destructor Documentation

◆ SegmentationModelPostProcessor()

SegmentationModelPostProcessor::SegmentationModelPostProcessor ( int  id,
int  gpuId = 0 
)
inline

Definition at line 31 of file post_processor_segmentation.h.

◆ ~SegmentationModelPostProcessor()

SegmentationModelPostProcessor::~SegmentationModelPostProcessor ( )
overridedefault

Member Function Documentation

◆ attachMetadata()

void SegmentationModelPostProcessor::attachMetadata ( NvBufSurface surf,
gint  batch_idx,
NvDsBatchMeta batch_meta,
NvDsFrameMeta frame_meta,
NvDsObjectMeta object_meta,
NvDsObjectMeta parent_obj_meta,
NvDsPostProcessFrameOutput detection_output,
NvDsPostProcessDetectionParams all_params,
std::set< gint > &  filterOutClassIds,
int32_t  unique_id,
gboolean  output_instance_mask,
gboolean  process_full_frame,
float  segmentationThreshold,
gboolean  maintain_aspect_ratio 
)
overridevirtual

Implements ModelPostProcessor.

◆ freeBatchOutput()

void ModelPostProcessor::freeBatchOutput ( NvDsPostProcessBatchOutput batchOutput)
inherited

◆ getLabels()

const std::vector<std::vector<std::string> >& ModelPostProcessor::getLabels ( ) const
inlineinherited

Definition at line 69 of file post_processor.h.

References ModelPostProcessor::m_Labels.

◆ initResource()

NvDsPostProcessStatus SegmentationModelPostProcessor::initResource ( NvDsPostProcessContextInitParams initParams)
overridevirtual

Reimplemented from ModelPostProcessor.

◆ parseEachFrame()

NvDsPostProcessStatus SegmentationModelPostProcessor::parseEachFrame ( const std::vector< NvDsInferLayerInfo > &  outputLayers,
NvDsPostProcessFrameOutput result 
)
overridevirtual

Implements ModelPostProcessor.

◆ parseLabelsFile()

NvDsPostProcessStatus ModelPostProcessor::parseLabelsFile ( const std::string &  path)
protectedinherited

◆ releaseFrameOutput()

void SegmentationModelPostProcessor::releaseFrameOutput ( NvDsPostProcessFrameOutput frameOutput)
overridevirtual

Implements ModelPostProcessor.

◆ setNetworkInfo()

void ModelPostProcessor::setNetworkInfo ( NvDsInferNetworkInfo  networkInfo)
inlineinherited

Definition at line 74 of file post_processor.h.

References ModelPostProcessor::m_NetworkInfo.

Field Documentation

◆ m_AllLayerInfo

std::vector<NvDsInferLayerInfo> ModelPostProcessor::m_AllLayerInfo
protectedinherited

Definition at line 116 of file post_processor.h.

◆ m_GpuID

uint32_t ModelPostProcessor::m_GpuID = 0
protectedinherited

Definition at line 112 of file post_processor.h.

◆ m_Labels

std::vector<std::vector<std::string> > ModelPostProcessor::m_Labels
protectedinherited

Definition at line 120 of file post_processor.h.

Referenced by ModelPostProcessor::getLabels().

◆ m_NetworkInfo

NvDsInferNetworkInfo ModelPostProcessor::m_NetworkInfo = {0}
protectedinherited

Definition at line 115 of file post_processor.h.

Referenced by ModelPostProcessor::setNetworkInfo().

◆ m_NetworkType

NvDsPostProcessNetworkType ModelPostProcessor::m_NetworkType = NvDsPostProcessNetworkType_Other
protectedinherited

Definition at line 109 of file post_processor.h.

◆ m_OutputLayerInfo

std::vector<NvDsInferLayerInfo> ModelPostProcessor::m_OutputLayerInfo
protectedinherited

Definition at line 117 of file post_processor.h.

◆ m_UniqueID

int ModelPostProcessor::m_UniqueID = 0
protectedinherited

Definition at line 111 of file post_processor.h.


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