Each neural network has different post-processing methods. The xnnpp post-processing library is provided in the Vitis AI Library to facilitate user calls. It supports the following neural network post-processing.
- Classification
- Face detection
- Face landmark detection
- SSD detection
- Pose detection
- Semantic segmentation
- Road line detection
- YOLOv3 detection
- YOLOv2 detection
- Openpose detection
- RefineDet detection
- ReID detection
- Multi-task
- Multi-task V3
- Face recognition
- Plate detection
- Plate recognition
- Medical segmentation
- Medical detection
- Face quality
- Hourglass
- Retinaface
- Centerpoint
- Multitaskv3
- Pointpillars_nuscenes
- Rcan
- vehicleclassification
- ofa_yolo
- efficientdet_d2
- ocr
- textmountain
- YOLOx detection
- YOLOv6 detection
There are two ways to call xnnpp
:
- Using an automatic call through
vitis::ai::<model>::create
to create the task such asvitis::ai::YOLOv3::create("yolov3_bdd", true)
. After the <model> run is complete,xnnpp
is automatically processed. You can modify the parameters through the model configuration file. - Using a manual call through
vitis::ai::DpuTask::create
to create the task. Then, create the object of the post-process and run the post-process. Use the following steps. SSD post-processing is used as an example here.- Create a configuration and set the correlating data to
control
post-process.
using DPU_conf = vitis::ai::proto::DpuModelParam; DPU_conf config;
- If it is a Caffe model, set the "is_tf" as
FALSE.
config.set_is_tf(false);
- Fill the other
parameters.
fillconfig(config);
- Create an object of
SSDPostProcess.
auto input_tensor = task->getInputTensor(); auto output_tensor = task->getOutputTensor(); auto ssd = vitis::ai::SSDPostProcess::create(input_tensor, output_tensor,config);
- Run the
post-process.
auto results = ssd->ssd_post_process();
- Create a configuration and set the correlating data to
control
post-process.
Note: For more details about the post
processing examples, see the ~/Vitis-AI/examples/vai_library/samples/dpu_task/yolov3/demo_yolov3.cpp
and ~/Vitis-AI/src/vai_library/yolov3/test/test_yolov3.cpp files in the host
system.