vitis::ai::Segmentation3D

Quick Function Reference

The following table lists all the functions defined in the vitis::ai::Segmentation3D class:

Table 1. Quick Function Reference
TypeNameArguments
std::unique_ptr< Segmentation3D >create
  • bool need_mean_scale_process
intgetInputWidth
  • void
intgetInputHeight
  • void
size_tget_input_batch
  • void
Segmentation3DResultrun
  • std::vector< std::vector< float >> & array
std::vector< Segmentation3DResult >run
  • std::vector< std::vector< std::vector< float >>> & arrays

create

Factory function to get an instance of derived classes of class 3Dsegmentation.

Prototype

std::unique_ptr< Segmentation3D > create(const std::string &model_name, bool need_mean_scale_process=false);

Parameters

The following table lists the create function arguments.

Table 2. create Arguments
Type Name Description
bool need_mean_scale_process Normalize with mean/scale or not, true by default.

Returns

An instance of the 3Dsegmentation class.

getInputWidth

Function to get InputWidth of the 3D segmentation network.

Prototype

int getInputWidth() const =0;

Returns

InputWidth of the 3D segmentation network.

getInputHeight

Function to get InputHeight of the 3D segmentation network.

Prototype

int getInputHeight() const =0;

Returns

InputHeight of the 3D segmentation network.

get_input_batch

Function to get the number of images processed by the DPU at one time.

Note: Different DPU core the batch size may be different. This depends on the IP used.

Prototype

size_t get_input_batch() const =0;

Returns

Batch size.

run

Function of get running result of the 3D segmentation network.

Prototype


            Segmentation3DResult run(std::vector< std::vector< float >> &array)=0;

Parameters

The following table lists the run function arguments.

Table 3. run Arguments
Type Name Description
std::vector< std::vector< float >> & array Input data of 3D object data in vector<float> mode.

Returns

Segmentation3DResult.

run

Function of get running result of the 3D segmentation network in batch mode.

Prototype

std::vector< Segmentation3DResult > run(std::vector< std::vector< std::vector< float >>> &arrays)=0;

Parameters

The following table lists the run function arguments.

Table 4. run Arguments
Type Name Description
std::vector< std::vector< std::vector< float >>> & arrays A vector of Input data of 3D object data in vector<float> mode.

Returns

A vector of Segmentation3DResult.