vitis::ai::Reid - 3.5 日本語

Vitis AI ライブラリ ユーザー ガイド (UG1354)

Document ID
UG1354
Release Date
2023-06-29
Version
3.5 日本語
イメージ (cv::Mat) から feat を取得するためのベース クラス。

入力はイメージ (cv::Mat) です。

出力はイメージの reid feat です。

サンプル コード:

if(argc < 3){
    cerr<<"need two images"<<endl;
    return -1;
}
Mat imgx = imread(argv[1]);
if(imgx.empty()){
    cerr<<"can't load image! "<<argv[1]<<endl;
    return -1;
}
Mat imgy = imread(argv[2]);
if(imgy.empty()){
    cerr<<"can't load image! "<<argv[2]<<endl;
    return -1;
}
auto det = vitis::ai::Reid::create("reid");
Mat featx = det->run(imgx).feat;
Mat featy = det->run(imgy).feat;
double dismat= cosine_distance(featx, featy);
printf("dismat : %.3lf \n", dismat);

関数クイック リファレンス

次の表に、vitis::ai::Reid クラスに定義されているすべての関数を示します。

表 1. 関数クイック リファレンス
タイプ メンバー 引数
std::unique_ptr< Reid > create
  • const std::string & model_name
  • bool need_preprocess
ReidResult run
  • const cv::Mat & image
std::vector< ReidResult > run
  • const std::vector< cv::Mat > & images
std::vector< ReidResult > run
  • const std::vector< vart::xrt_bo_t > & input_bos