To be able to use the library, you need to prepare the development board and
cross-compilation environment. During the development, you need to pay attention to the
header files, library files and the model library files.
Note: The files in the
development environment must match the version provided in the Vitis Unified Software Development
Environment. These libraries can be executed on ZCU102, ZCU104, and Xilinx
Alveo U50, U50lv and U280 Data
Center accelerator cards.
- Select an image. For example,
cv::Mat
. - Call the
create
method provided by the corresponding library to get a class instance. If you set theneed_preprocess
variable tofalse
, the model will not minus its mean and scale. - Call the
getInputWidth()
and thegetInputHeight()
functions to get the network needed column and row values of the input image. - Resize image to
inputWidth x inputHeight
. - Call
run()
to get the result of the network.
Also, for the Vitis AI APIs, see the Vitis AI User Guide in the Vitis AI User Documentation (UG1431). You can download it from the Xilinx website https://www.xilinx.com/products/design-tools/vitis/vitis-ai.html.