Endoscopy Disease Detection and
Segmentation
データベース (EDD2020) の 5 つのオブジェクトを検出するためのベース クラス。入力はイメージ (cv:Mat) です。
出力は、
MedicalDetectionResult
という名前の検出結果の構造体です。
サンプル コード:
Mat img = cv::imread("sample_medicaldetection.jpg");
auto medicaldetection = vitis::ai::MedicalDetection::create
("RefineDet-Medical_EDD_tf",true);
auto results = medicaldetection->run(img);
for(const auto &r : results.bboxes){
auto label = r.label;
auto x = r.x * img.cols;
auto y = r.y * img.rows;
auto width = r.width * img.cols;
auto height = r.height * img.rows;
auto score = r.score;
std::cout << "RESULT: " << label << "\t" << x << "\t" << y << "\t" << width
<< "\t" << height << "\t" << score << std::endl;
}
モデルの結果を次に示します。
図 1. 検出結果

関数クイック リファレンス
次の表に、vitis::ai::MedicalDetection
クラスに定義されているすべての関数を示します。
タイプ | メンバー | 引数 |
---|---|---|
std::unique_ptr< MedicalDetection > | create |
|
vitis::ai::MedicalDetectionResult
|
run |
|
std::vector<
vitis::ai::MedicalDetectionResult
> |
run |
|
int | getInputWidth |
|
int | getInputHeight |
|
size_t | get_input_batch |
|