NVIDIA DeepStream SDK API Reference

6.4 Release
post_processor_segmentation.h
Go to the documentation of this file.
1 
23 #ifndef __POST_PROCESSOR_SEGMENTATION_HPP__
24 #define __POST_PROCESSOR_SEGMENTATION_HPP__
25 
26 #include "post_processor.h"
27 
29 
30 public:
31  SegmentationModelPostProcessor(int id, int gpuId = 0)
33 
34  ~SegmentationModelPostProcessor() override = default;
35 
37  initResource(NvDsPostProcessContextInitParams& initParams) override;
38 
39  NvDsPostProcessStatus parseEachFrame(const std::vector <NvDsInferLayerInfo>&
40  outputLayers,
41  NvDsPostProcessFrameOutput &result) override;
42 
43  void
44  attachMetadata (NvBufSurface *surf, gint batch_idx,
45  NvDsBatchMeta *batch_meta,
46  NvDsFrameMeta *frame_meta,
47  NvDsObjectMeta *object_meta,
48  NvDsObjectMeta *parent_obj_meta,
49  NvDsPostProcessFrameOutput & detection_output,
51  std::set <gint> & filterOutClassIds,
52  int32_t unique_id,
53  gboolean output_instance_mask,
54  gboolean process_full_frame,
55  float segmentationThreshold,
56  gboolean maintain_aspect_ratio) override;
57 
58 
59  void releaseFrameOutput(NvDsPostProcessFrameOutput& frameOutput) override;
60 private:
61  NvDsPostProcessStatus fillSegmentationOutput(
62  const std::vector<NvDsInferLayerInfo>& outputLayers,
64 
65  float m_SegmentationThreshold = 0.50;
67  uint32_t m_NumClasses = 0;
68 };
69 
70 #endif
SegmentationModelPostProcessor::SegmentationModelPostProcessor
SegmentationModelPostProcessor(int id, int gpuId=0)
Definition: post_processor_segmentation.h:31
NvDsPostProcessDetectionParams
Holds detection and bounding box grouping parameters.
Definition: post_processor_struct.h:216
ModelPostProcessor
Definition: post_processor.h:57
NvBufSurface
Holds information about batched buffers.
Definition: nvbufsurface.h:503
post_processor.h
NvDsPostProcessStatus
NvDsPostProcessStatus
Enum for the status codes returned by NvDsPostProcessAlgorithm.
Definition: post_processor_struct.h:84
NvDsPostProcessTensorOrder_kNCHW
@ NvDsPostProcessTensorOrder_kNCHW
Definition: post_processor_struct.h:182
SegmentationModelPostProcessor::initResource
NvDsPostProcessStatus initResource(NvDsPostProcessContextInitParams &initParams) override
_NvDsBatchMeta
Holds information about a formed batch containing frames from different sources.
Definition: nvdsmeta.h:240
_NvDsPostProcessContextInitParams
Holds the initialization parameters required for the NvDsPostProcessContext interface.
Definition: post_processor_struct.h:260
SegmentationModelPostProcessor
Copyright (c) 2022, NVIDIA CORPORATION.
Definition: post_processor_segmentation.h:28
NvDsPostProcessFrameOutput
Holds the information inferred by the network on one frame.
Definition: post_processor_struct.h:483
NvDsPostProcessNetworkType_Segmentation
@ NvDsPostProcessNetworkType_Segmentation
Specifies a segmentation network.
Definition: post_processor_struct.h:201
NvDsPostProcessSegmentationOutput
Holds information parsed from segmentation network output for one frame.
Definition: post_processor_struct.h:463
SegmentationModelPostProcessor::parseEachFrame
NvDsPostProcessStatus parseEachFrame(const std::vector< NvDsInferLayerInfo > &outputLayers, NvDsPostProcessFrameOutput &result) override
NvDsPostProcessTensorOrder
NvDsPostProcessTensorOrder
Defines UFF layer orders.
Definition: post_processor_struct.h:181
SegmentationModelPostProcessor::releaseFrameOutput
void releaseFrameOutput(NvDsPostProcessFrameOutput &frameOutput) override
_NvDsFrameMeta
Holds metadata for a frame in a batch.
Definition: nvdsmeta.h:284
SegmentationModelPostProcessor::~SegmentationModelPostProcessor
~SegmentationModelPostProcessor() override=default
SegmentationModelPostProcessor::attachMetadata
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
_NvDsObjectMeta
Holds metadata for an object in the frame.
Definition: nvdsmeta.h:342