vitis::ai::Solo - 2.0 English

Vitis AI Library User Guide (UG1354)

Document ID
UG1354
Release Date
2022-01-20
Version
2.0 English
Base class for SOLO semantic segmentation from an image (cv::Mat).

Input is an image (cv::Mat).

Output is the enlarged image.

Sample code:

Note: The input image size is 640x640.
if (argc < 2) {
  cerr << "usage: " << argv[0] << "  modelname  image_file_url " << endl;
  abort();
}
Mat input_img = imread(argv[2]);
if (input_img.empty()) {
  cerr << "can't load image! " << argv[2] << endl;
  return -1;
}
auto det = vitis::ai::Solo::create(argv[1]);
Mat ret_img = det->run(input_img).feat;
imwrite("sample_solo_result.png", ret_img);

Quick Function Reference

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

Table 1. Quick Function Reference
Type Name Arguments
std::unique_ptr< Solo > create
  • const std::string & model_name
  • bool need_preprocess
SoloResult run
  • const cv::Mat & image
std::vector< SoloResult > run
  • const std::vector< cv::Mat > & images