Base class for ADAS MuiltTask from an image (cv::Mat).
Input an image (cv::Mat).
Output is a struct of
MultiTaskResult
includes 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);
cv::imwrite("sample_multitask_result.jpg",result.segmentation);
Display of the model results:
Figure 1. result image
Quick Function Reference
The following table lists all the functions defined in the vitis::ai::MultiTask
class:
Type | Member | Arguments |
---|---|---|
std::unique_ptr<
MultiTask
> |
create |
|
int | getInputWidth |
|
int | getInputHeight |
|
size_t | get_input_batch |
|
MultiTaskResult
|
run_8UC1 |
|
std::vector<
MultiTaskResult
> |
run_8UC1 |
|
MultiTaskResult
|
run_8UC3 |
|
std::vector<
MultiTaskResult
> |
run_8UC3 |
|