NVIDIA DeepStream SDK API Reference

9.2 Release
cuSegmenter Namespace Reference

Functions

void rescaleSegmentationOutput (const cudaStream_t &stream, const float *src_mask_frame, const int src_frame_width, const int src_frame_element_size, const int dst_width, const int dst_element_size, const float4 src_roi, float *dst_mask_patch)
 Launch segmentation-mask rescaling. More...
 
void permuteTensor (const cudaStream_t &stream, const int number_of_eles, const float *src, const int *src_sizes, const int *dst_dim_order, const int nbDims, float *dst)
 Launch tensor-dimension permutation. More...
 
void broadcastAdd (const cudaStream_t &stream, const float *src_large, const float *src_small, const int large_size, const int small_size, float *dst)
 Launch broadcast addition for a tensor and vector. More...
 
void addTemporalCode2PosEmbed (const cudaStream_t &stream, float *temporal_code, float *pos_embed, float *dst, const int num_mask_mem, const int broadcast_size, const int temporal_code_size)
 Add temporal codes to positional embeddings. More...
 

Function Documentation

◆ addTemporalCode2PosEmbed()

void cuSegmenter::addTemporalCode2PosEmbed ( const cudaStream_t &  stream,
float *  temporal_code,
float *  pos_embed,
float *  dst,
const int  num_mask_mem,
const int  broadcast_size,
const int  temporal_code_size 
)

Add temporal codes to positional embeddings.

Parameters
[in]streamCUDA stream used for the operation.
[in]temporal_codeTemporal-code tensor.
[in]pos_embedPositional-embedding tensor.
[out]dstDestination tensor to populate.
[in]num_mask_memNumber of mask-memory entries.
[in]broadcast_sizeNumber of positions receiving each temporal code.
[in]temporal_code_sizeNumber of values in each temporal code.

◆ broadcastAdd()

void cuSegmenter::broadcastAdd ( const cudaStream_t &  stream,
const float *  src_large,
const float *  src_small,
const int  large_size,
const int  small_size,
float *  dst 
)

Launch broadcast addition for a tensor and vector.

Parameters
[in]streamCUDA stream used for the operation.
[in]src_largeLarger input tensor.
[in]src_smallInput vector broadcast across the larger tensor.
[in]large_sizeNumber of elements in the larger tensor.
[in]small_sizeNumber of elements in the broadcast vector.
[out]dstDestination tensor to populate.

◆ permuteTensor()

void cuSegmenter::permuteTensor ( const cudaStream_t &  stream,
const int  number_of_eles,
const float *  src,
const int *  src_sizes,
const int *  dst_dim_order,
const int  nbDims,
float *  dst 
)

Launch tensor-dimension permutation.

Parameters
[in]streamCUDA stream used for the operation.
[in]number_of_elesNumber of tensor elements.
[in]srcSource tensor.
[in]src_sizesSource tensor dimensions.
[in]dst_dim_orderDestination dimension order.
[in]nbDimsNumber of tensor dimensions.
[out]dstDestination tensor to populate.

◆ rescaleSegmentationOutput()

void cuSegmenter::rescaleSegmentationOutput ( const cudaStream_t &  stream,
const float *  src_mask_frame,
const int  src_frame_width,
const int  src_frame_element_size,
const int  dst_width,
const int  dst_element_size,
const float4  src_roi,
float *  dst_mask_patch 
)

Launch segmentation-mask rescaling.

Parameters
[in]streamCUDA stream used for the operation.
[in]src_mask_frameSource segmentation mask.
[in]src_frame_widthSource mask width.
[in]src_frame_element_sizeNumber of elements in the source mask.
[in]dst_widthDestination mask width.
[in]dst_element_sizeNumber of elements in the destination mask.
[in]src_roiSource region of interest.
[out]dst_mask_patchDestination mask patch to populate.