此基本类用于分割内窥镜疾病检测的 5 个对象和
Segmentation
数据库 (EDD2020)。输入为图像 (cv:Mat)。
输出是检测结果的结构体,名为
MedicalSegmentationResult
。
代码样本:
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.
函数快速参考
下表列出了 vitis::ai::MedicalSegmentation
类中定义的所有函数:
类型 | 成员 | 实参 |
---|---|---|
std::unique_ptr<
MedicalSegmentation
> |
create |
|
vitis::ai::MedicalSegmentationResult
|
run |
|
std::vector<
vitis::ai::MedicalSegmentationResult
> |
run |
|
int | getInputWidth |
|
int | getInputHeight |
|
size_t | get_input_batch |
|