vitis::ai::Unet2D - 3.5 English

Vitis AI Library User Guide (UG1354)

Document ID
UG1354
Release Date
2023-06-29
Version
3.5 English
Base class for Unet2D .

Input is an 4 channel binary data: NxNx4

Output is a struct of segmentation results, named Unet2DResult.

Sample code:

std::vector<float> vf = get_binary_data();
auto Unet2D = vitis::ai::Unet2D::create("unet2d_tf");
auto result = Unet2D->run(vf.data(), vf.size());
std::cout << result.data.size() << "\n";

Quick Function Reference

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

Table 1. Quick Function Reference
Type Member Arguments
std::unique_ptr< Unet2D > create
  • const std::string & model_name
  • bool need_preprocess
vitis::ai::Unet2DResult run
  • float * img
  • int len
vitis::ai::Unet2DResult run
  • const std::vector< float > & img
std::vector< vitis::ai::Unet2DResult > run
  • const std::vector< float * > & imgs
  • int len
std::vector< vitis::ai::Unet2DResult > run
  • const std::vector< std::vector< float > > & imgs
int getInputWidth
  • void
int getInputHeight
  • void
size_t get_input_batch
  • void