ailiaDetectorSetInputShape method

int ailiaDetectorSetInputShape(
  1. Pointer<AILIADetector> detector,
  2. int input_width,
  3. int input_height
)

~japanese @brief YoloV3またはYoloXでのモデルへの入力画像サイズを指定します。 @param detector 検出オブジェクトポインタ @param input_width モデルの入力画像幅 @param input_height モデルの入力画像高さ @return 成功した場合は \ref AILIA_STATUS_SUCCESS 、そうでなければエラーコードを返す。 @details YoloV3では単一のモデルが任意の入力解像度に対応します。(32 の倍数制限あり) YoloXでは単一のモデルが任意の入力解像度に対応します。 計算量の削減等でモデルへの入力画像サイズを指定する場合この API を実行してください。 ailiaCreateDetector() () と ailiaDetectorCompute() () の間に実行する必要があります。 この API を実行しない場合、デフォルトの 416x416 を利用します。 YOLOv3またはYOLOX 以外で実行した場合、 \ref AILIA_STATUS_INVALID_STATE を返します。

~english @brief Sets the size of the input image for YoloV3 or YoloX model. @param detector A detector instance pointer @param input_width Width of the model's input image @param input_height Height of the model's input image @return If this function is successful, it returns \ref AILIA_STATUS_SUCCESS , or an error code otherwise. @details The same YoloV3 model can be used for any input image size that is a multiple of 32. The same YoloX model can be used for any input image size. You can use this API if you want to choose the input image size, for example to reduce the calculation complexity. It must be called between ailiaCreateDetector() () and ailiaDetectorCompute() (). If this API is not used, a default size of 416x416 is assumed. If used with some model other than YoloV3 or YoloX, it will return the error status \ref AILIA_STATUS_INVALID_STATE .

Implementation

int ailiaDetectorSetInputShape(
  ffi.Pointer<AILIADetector> detector,
  int input_width,
  int input_height,
) {
  return _ailiaDetectorSetInputShape(
    detector,
    input_width,
    input_height,
  );
}