vitis::ai::MedicalSegmentation - 2.0 English

Vitis AI Library User Guide (UG1354)

Document ID
UG1354
Release Date
2022-01-20
Version
2.0 English
Base class for segment five objects of Endoscopy Disease Detection and Segmentation database (EDD2020).

Input is an image (cv:Mat).

Output is a struct of detection results, named MedicalSegmentationResult.

Sample code :

Mat img = cv::imread("sample_medicalsegmentation.jpg");
auto medicalsegmentation =
vitis::ai::MedicalSegmentation::create("FPN_Res18_Medical_segmentation",true); 
auto results = medicalsegmentation->run(img); 
// results is  std::vector<cv::Mat>(5) for 5 classes.
// please check test samples for detail usage.

Quick Function Reference

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

Table 1. Quick Function Reference
Type Name Arguments
std::unique_ptr< MedicalSegmentation > create
  • const std::string & model_name
  • bool need_preprocess
vitis::ai::MedicalSegmentationResult run
  • const cv::Mat & img
std::vector< vitis::ai::MedicalSegmentationResult > run
  • const std::vector< cv::Mat > & imgs
int getInputWidth
  • void
int getInputHeight
  • void
size_t get_input_batch
  • void