VART-X  0.3.0
vart Namespace Reference

VART (Vitis AI Runtime) public API namespace. More...

Classes

class  DeviceImplBase
 Abstract interface for device implementation used by Device. More...
 
class  InferResultImplBase
 Abstract base class for inference result implementation used by InferResult. More...
 
class  MemoryImplBase
 Abstract interface for memory implementation used by Memory. More...
 
class  MetaConvertImplBase
 Abstract interface for metaconvert implementation used by MetaConvert. More...
 
class  OverlayImplBase
 Abstract interface for overlay implementation used by Overlay. More...
 
class  PLKernelImplBase
 Abstract interface for PLKernel implementation used by PLKernel. More...
 
class  PostProcessImplBase
 Abstract interface for post-processing implementation used by PostProcess. More...
 
class  PreProcessImplBase
 Abstract interface for pre-processing implementation used by PreProcess. More...
 
class  VideoFrameImplBase
 Abstract base class for video frame implementation used by VideoFrame. More...
 
class  Device
 Manages the hardware context and loading of xclbin onto the device. Any module utilizing hardware acceleration requires a Device instance. Instances are not constructed directly; use the static factory get_device_hdl(), which caches results per (dev_idx, xclbin_loc). More...
 
class  InferResult
 This module is used to represent inference results. Built-in supported types are ROOT, CLASSIFICATION, DETECTION and SEGMENTATION. Custom types can be integrated by deriving from InferResultImplBase and passing the shared pointer to the pimpl constructor; the CUSTOM_RESULT_* enum values are NOT accepted by the type-enum constructor below. More...
 
struct  InferResScaleInfo
 Width and height info used to transform inference results to input frame resolution. More...
 
struct  InferResultData
 Base structure for inference result data. More...
 
struct  ClassificationResData
 Classification infer result. More...
 
struct  DetectionResData
 Detection infer result. More...
 
struct  SegmentationResData
 Segmentation infer result. More...
 
class  Memory
 This module is responsible for allocating and managing memory on the device. More...
 
class  MetaConvert
 This module facilitates the conversion of Infer metadata into a format compatible with the overlay module. Metaconvert also accepts configuration parameters as JSON string, which provide further flexibility on configuring overlay information such as line thickness, font size, font type ., etc. Please check API documentation for more information. Additionally, if users have a custom meta data then they can integrate customized functions to convert them into a format suitable for processing by the overlay module by overriding base class. More...
 
class  Overlay
 This module facilitates the overlay of annotations onto the video frame, currently overlay utilizes OpenCV library to draw on frames, which is software based. Overlay supports drawing of bounding boxes, text, lines, arrows, circles and polygons on frames. Application can also incorporate custom implementation using base class. More...
 
struct  OverlayCoordinates
 Structure representing Coordinate information. More...
 
struct  OverlayColorData
 Structure representing Color information. More...
 
struct  OverlayRectParams
 Structure representing information to draw rectangle on frame. More...
 
struct  OverlayFontData
 Structure representing Font information. More...
 
struct  OverlayTextParams
 Structure representing Text information. More...
 
struct  OverlayLineParams
 Structure representing Line information. More...
 
struct  OverlayArrowParams
 Structure representing Arrow information. More...
 
struct  OverlayCircleParams
 Structure representing Circle Information. More...
 
struct  OverlayPolygonParams
 Structure representing Polygon information. More...
 
struct  OverlayMaskParams
 Structure representing Mask information. More...
 
struct  OverlayShapeInfo
 Structure representing overlay shape information. More...
 
class  PLKernel
 PLKernel class for managing PL kernel execution. More...
 
class  ArgumentInfo
 Contains information related to an argument for the PL kernel. More...
 
class  PostProcess
 Interface class for post-processing inference results. More...
 
struct  TensorInfo
 Tensor config information. More...
 
class  PreProcess
 The preprocessing module handles data preparation tasks such as normalization, scaling, and video format conversion. This module supports software-based pre-processing as well as hardware-accelerated pre-processing for optimized performance. It ensures that input data is appropriately formatted for inference. Applications can also supply a custom pre-processing implementation via the PreProcessImplBase constructor. More...
 
struct  PreProcessInfo
 Structure storing pre-processing parameters. More...
 
struct  RegionOfInterest
 Defines a rectangular region of interest within a frame. More...
 
struct  PreProcessOp
 Describes a single pre-processing operation, pairing an input frame and its ROI with an output frame and its ROI. More...
 
class  VideoFrame
 This module simplifies the management of video frame memory and provides APIs for mapping and unmapping frame data to user space to read and write. The VideoFrame class offers flexibility for applications to encapsulate their own memory into the VideoFrame class. In such instances, the application bears the responsibility for deallocating the frame memory. More...
 
struct  VideoAlignment
 Contains video alignment information. More...
 
struct  VideoInfo
 Contains information related to a video frame. More...
 
struct  VideoPlaneInfo
 Structure containing information specific to a video frame plane. More...
 
struct  VideoFrameMapInfo
 Structure encapsulating details of a video frame after a map operation. More...
 

Enumerations

enum class  TraversalOrder { PREORDER , INORDER , POSTORDER }
 
enum class  InferResultType {
  ROOT , CLASSIFICATION , DETECTION , SEGMENTATION ,
  CUSTOM_RESULT_1 = 100 , CUSTOM_RESULT_2 , CUSTOM_RESULT_3
}
 
enum class  SegmentationType { SEMANTIC = 0 , MEDICAL , SEG3D }
 
enum class  DataMapFlags { NONE = 0 , READ = 1 << 0 , WRITE = 1 << 1 }
 
enum class  MemoryImplType { XRT , NON_CMA }
 
enum class  OverlayImplType { OPENCV }
 
enum  OverlayArrowDirection { ARROW_DIRECTION_START , ARROW_DIRECTION_END , ARROW_DIRECTION_BOTH_ENDS }
 Enum representing arrow direction information. More...
 
enum class  OverlayMaskType { MASK_TYPE_LABELMAP , MASK_TYPE_COLORMAP }
 Enum representing mask type information. More...
 
enum class  PLKernelImplType { PL_KERNEL_XRT }
 
enum class  TensorDataType {
  INT8 , BF16 , FP16 , FLOAT32 ,
  UNKNOWN
}
 Specifies the data type of a tensor. More...
 
enum class  TensorDataDirection { INPUT , OUTPUT }
 Specifies the direction of a tensor (input or output). More...
 
enum class  PostProcessType {
  RESNET50 , YOLOV2 , SSDRESNET34 , SOFTMAX ,
  ARGMAX , TOPK , NMS , THRESHOLD ,
  LABEL_MAPPING , NORMALIZATION , ANCHOR_ADJUSTMENT , CALIBRATION_TEMPERATURE ,
  CALIBRATION_PLATT , BIAS_CORRECTION , OUTLIER_DETECTION , UNCERTAINTY_ESTIMATION ,
  DISTANCE_IOU_NMS , SOFT_NMS , CLASSWISE_NMS , OBJECT_COUNT ,
  SOFTMAXSEG , SIGMOIDSEG , ARGMAXSEG
}
 
enum class  PreProcessImplType { IMAGE_PROCESSING_HLS , IMAGE_PROCESSING_SW }
 Selects the pre-processing backend implementation to use. More...
 
enum class  PreProcessType { DEFAULT , LETTERBOX }
 Controls whether aspect ratio is preserved during resize. More...
 
enum class  VideoFrameImplType { XRT , NON_CMA }
 Video Frame implementation type. More...
 
enum class  VideoFormat {
  UNKNOWN = 0 , Y_UV8_420 , RGBx , r210 ,
  Y410 , BGRx , BGRA , RGBA ,
  YUY2 , NV16 , RGB , v308 ,
  BGR , I422_10LE , NV12_10LE32 , GRAY8 ,
  GRAY10_LE32 , I420 , RGBP , BGR_FLOAT ,
  RGB_FLOAT , RGBP_FLOAT , GRAY32_FLOAT , RGBx_BF16 ,
  BGRx_BF16 , GRAY_BF16 , RGBx_FP16 , BGRx_FP16 ,
  GRAY_FP16 , RGB_FP16 , BGR_FP16 , RGB_BF16 ,
  BGR_BF16 , RGBP_FP16 , RGBP_BF16 , BGRP ,
  BGRP_FP16 , BGRP_BF16 , BGRP_FLOAT
}
 Represents video color formats supported by VART core APIs. More...
 

Detailed Description

VART (Vitis AI Runtime) public API namespace.

Enumeration Type Documentation

◆ DataMapFlags

enum vart::DataMapFlags
strong
  • Map flags.

These values are bit flags and may be combined with bitwise OR (e.g. READ|WRITE) when calling map() to request read/write mappings.

Enumerator
NONE 

Default value; no specific access mode requested.

READ 

Map data in read mode.

WRITE 

Map data in write mode.

◆ InferResultType

enum vart::InferResultType
strong
  • ML Network type
Enumerator
ROOT 

Root node of the tree structure.

CLASSIFICATION 

Classification network.

DETECTION 

Detection network.

SEGMENTATION 

Segmentation network (per-pixel class maps).

CUSTOM_RESULT_1 

Defined for user specific result type.

CUSTOM_RESULT_2 

Defined for user specific result type.

CUSTOM_RESULT_3 

Defined for user specific result type.

◆ MemoryImplType

enum vart::MemoryImplType
strong
Enumerator
XRT 

XRT allocation type.

NON_CMA 

Non CMA allocation type.

◆ OverlayArrowDirection

Enum representing arrow direction information.

Enumerator
ARROW_DIRECTION_START 

Arrow head drawn at the start point.

ARROW_DIRECTION_END 

Arrow head drawn at the end point.

ARROW_DIRECTION_BOTH_ENDS 

Arrow heads drawn at both ends.

◆ OverlayImplType

enum vart::OverlayImplType
strong
Enumerator
OPENCV 

OpenCV-based implementation.

◆ OverlayMaskType

enum vart::OverlayMaskType
strong

Enum representing mask type information.

Enumerator
MASK_TYPE_LABELMAP 

Mask type label map.

MASK_TYPE_COLORMAP 

Mask type color map.

◆ PLKernelImplType

  • PL Kernel Implementation type
Enumerator
PL_KERNEL_XRT 

PL kernel implementation using XRT APIs.

◆ PostProcessType

enum vart::PostProcessType
strong
  • post-processing algorithm types
Enumerator
RESNET50 

Resnet50 model.

YOLOV2 

Yolov2 model.

SSDRESNET34 

ssdresnet34 model

SOFTMAX 

Softmax activation function.

ARGMAX 

Argmax function to find index of maximum value.

TOPK 

TopK function to find k largest elements.

NMS 

Non-Maximum Suppression.

THRESHOLD 

Thresholding function.

LABEL_MAPPING 

Map class indices to labels.

NORMALIZATION 

Normalize values.

ANCHOR_ADJUSTMENT 

Adjust bounding boxes based on anchors.

CALIBRATION_TEMPERATURE 

Temperature scaling calibration.

CALIBRATION_PLATT 

Platt scaling calibration.

BIAS_CORRECTION 

Bias correction.

OUTLIER_DETECTION 

Outlier detection.

UNCERTAINTY_ESTIMATION 

Uncertainty estimation.

DISTANCE_IOU_NMS 

Distance intersection over union NMS.

SOFT_NMS 

Soft NMS.

CLASSWISE_NMS 

Class-wise NMS.

OBJECT_COUNT 

Object counting.

SOFTMAXSEG 

Softmax for segmentation.

SIGMOIDSEG 

Sigmoid for segmentation.

ARGMAXSEG 

Argmax for segmentation.

◆ PreProcessImplType

Selects the pre-processing backend implementation to use.

Enumerator
IMAGE_PROCESSING_HLS 

Implementation using the Image Processing HLS kernel.

IMAGE_PROCESSING_SW 

Implementation using the Image Processing software kernel.

◆ PreProcessType

enum vart::PreProcessType
strong

Controls whether aspect ratio is preserved during resize.

Enumerator
DEFAULT 

Resizes the image without maintaining aspect ratio.

LETTERBOX 

Resizes the image while maintaining aspect ratio (letterbox padding).

◆ SegmentationType

  • Segmentation type
Enumerator
SEMANTIC 

Semantic segmentation.

MEDICAL 

Medical segmentation.

SEG3D 

3D segmentation

◆ TensorDataDirection

Specifies the direction of a tensor (input or output).

Enumerator
INPUT 

Represents an input tensor.

OUTPUT 

Represents an output tensor.

◆ TensorDataType

enum vart::TensorDataType
strong

Specifies the data type of a tensor.

Enumerator
INT8 

Represents an 8-bit integer data type.

BF16 

Represents a brain floating-point 16-bit data type.

FP16 

Represents a standard 16-bit floating-point data type.

FLOAT32 

Represents a 32-bit floating-point data type.

UNKNOWN 

Sentinel value for an unrecognized or unset data type; used to detect misconfigured tensors and reject them early (e.g. in set_config).

◆ TraversalOrder

enum vart::TraversalOrder
strong
  • Tree traversal order for infer result tree
Enumerator
PREORDER 

Traversal order where the parent node is processed before its children.

INORDER 

Traversal order where the parent node is processed between its children.

POSTORDER 

Traversal order where the parent node is processed after its children.

◆ VideoFormat

enum vart::VideoFormat
strong

Represents video color formats supported by VART core APIs.

Enumerator
UNKNOWN 

Unknown color format.

Y_UV8_420 

Planar 4:2:0 YUV with interleaved UV plane.

RGBx 

Packed RGB, 4 bytes per pixel.

r210 

Packed 4:4:4 RGB, 10 bits per channel.

Y410 

Packed 4:4:4 YUV, 10 bits per channel.

BGRx 

Packed BGR, 4 bytes per pixel.

BGRA 

Packed BGR with alpha channel last.

RGBA 

Packed RGB with alpha channel last.

YUY2 

Packed 4:2:2 YUV (Y0-U0-Y1-V0, Y2-U2-Y3-V2...)

NV16 

Planar 4:2:2 YUV with interleaved UV plane.

RGB 

RGB packed into 24 bits without padding.

v308 

Packed 4:4:4 YUV.

BGR 

BGR packed into 24 bits without padding.

I422_10LE 

Planar 4:2:2 YUV, 10 bits per channel.

NV12_10LE32 

10-bit variant of NV12, packed into 32bit words (MSB 2 bits padding)

GRAY8 

8-bit grayscale

GRAY10_LE32 

10-bit grayscale, packed into 32bit words (2 bits padding)

I420 

Planar 4:2:0 YUV.

RGBP 

Planar RGB.

BGR_FLOAT 

BGR float, 96 bits without padding (32 bits per component)

RGB_FLOAT 

RGB float, 96 bits without padding (32 bits per component)

RGBP_FLOAT 

RGB float, planar (32 bits per component)

GRAY32_FLOAT 

Grayscale with 32-bit float data.

RGBx_BF16 

Packed RGB (Brain Float), 8 bytes per pixel.

BGRx_BF16 

Packed BGR (Brain Float), 8 bytes per pixel.

GRAY_BF16 

Grayscale with 16-bit Brain Float data.

RGBx_FP16 

Packed RGB (Half Precision Float), 8 bytes per pixel.

BGRx_FP16 

Packed BGR (Half Precision Float), 8 bytes per pixel.

GRAY_FP16 

Grayscale with 16-bit Half Precision Float data.

RGB_FP16 

RGB packed (Half Precision Float), 6 bytes per pixel.

BGR_FP16 

BGR packed (Half Precision Float), 6 bytes per pixel.

RGB_BF16 

RGB packed (Brain Float), 6 bytes per pixel.

BGR_BF16 

BGR packed (Brain Float), 6 bytes per pixel.

RGBP_FP16 

RGB planar (Half Precision Float), 16 bits per component.

RGBP_BF16 

RGB planar (Brain Float), 16 bits per component.

BGRP 

Planar BGR, 8 bits per component.

BGRP_FP16 

BGR planar (Half Precision Float), 16 bits per component.

BGRP_BF16 

BGR planar (Brain Float), 16 bits per component.

BGRP_FLOAT 

BGR float, planar (32 bits per component)

◆ VideoFrameImplType

Video Frame implementation type.

Enumerator
XRT 

Allocate memory using Xilinx Run Time (XRT) framework. Allocates physically contiguous memory.

NON_CMA 

Non-contiguous memory type.