vitis::ai::MultiTask - 1.4.1 English

Vitis AI Library User Guide (UG1354)

Document ID
Release Date
1.4.1 English
Multitask Network Type , declaration multitask Network.

number of classes label: 0 name: "background" label: 1 name: "person" label: 2 name: "car" label: 3 name: "truck" label: 4 name: "bus" label: 5 name: "bike" label: 6 name: "sign" label: 7 name: "light"

Base class for ADAS MuiltTask from an image (cv::Mat).

Input an image (cv::Mat).

Output is a struct of MultiTaskResult include segmentation results, detection results and vehicle towards;

Sample code:

auto det = vitis::ai::MultiTask::create("multi_task");
auto image = cv::imread("sample_multitask.jpg");
auto result = det->run_8UC3(image);

Display of the model results:

Figure 1. result image
Image sample_multitask_result.jpg

Quick Function Reference

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

Table 1. Quick Function Reference
Type Name Arguments
std::unique_ptr< MultiTask > create
  • const std::string & model_name
  • bool need_preprocess
int getInputWidth
  • void
int getInputHeight
  • void
size_t get_input_batch
  • void
MultiTaskResult run_8UC1
  • const cv::Mat & image
std::vector< MultiTaskResult > run_8UC1
  • const std::vector< cv::Mat > & images
MultiTaskResult run_8UC3
  • const cv::Mat & image
std::vector< MultiTaskResult > run_8UC3
  • const std::vector< cv::Mat > & images