Programming Examples - 3.0 English

Vitis AI Library User Guide (UG1354)

Document ID
UG1354
Release Date
2023-01-12
Version
3.0 English

Application requirements can be categorized into three categories:

  • Using the models that are provided by the Vitis™ AI Library to build your own application.
  • Using your own custom models which are similar to the models in the Vitis AI Library.
  • Using new models that are totally different from the models in the Vitis AI Library.

This chapter describes the development steps for the first two cases. For the third case, you can use the Vitis AI Library samples and implementation for reference. This chapter provides information on:

  • Customizing preprocessing
  • Using the configuration file to specify the preprocessing and postprocessing parameters
  • Using the Vitis AI Library's postprocessing library
  • Implementing user postprocessing code
  • Working with the xdputil tool

The following figure shows the relationship between the Vitis AI Library APIs and their corresponding examples. There are four kinds of APIs in this release:

  • Vitis AI Library API_0 based on VART
  • Vitis AI Library API_1 based on AI Library
  • Vitis AI Library API_2 based on DpuTask
  • Vitis AI Library API_3 based on Graph_runner
Figure 1. The Diagram of AI Library API

Choosing an API for Your Application

Use the following recommendations to choose an API for your application.

  • If the model has been split into several subgraphs, API_3 Graph_runner is recommended for model deployment.
  • If the model has a custom op, API_3 Graph_runner is recommended for model deployment.
  • If you want to get the best performance and you are a beginner at using AI algorithms, such as model, preprocessing, and postprocessing, API_1 AI_Library is recommended.
  • If you want to use Xilinx models to quickly build applications, API_1 AI_Library is recommended.
  • If you have your own models that are retrained using your own data under the Vitis AI library support network list, API_1 AI_Library is recommended.
  • If you want to use your custom preprocessing or postprocessing algorithms, API_2 DpuTask is recommended.
  • If you want to develop and apply AI algorithms on multiple platforms and you are an advanced user of AI algorithms, API_0 VART is recommended.