グループ事前事後プロセス#

group ov_prepostprocess_c_api

事前事後プロセスに関する定義と操作。

列挙

enum ov_color_format_e#

この列挙タイプには、カラー形式の列挙が含まれています。

値:

enumerator UNDEFINE#

未定義カラー形式

enumerator NV12_SINGLE_PLANE#

単一テンソルとしての NV12 形式の画像。

enumerator NV12_TWO_PLANES#

Y 平面と UV 平面の別々のテンソルとして表される NV12 形式の画像。

enumerator I420_SINGLE_PLANE#

単一テンソルとしての I420 (YUV) 形式の画像。

enumerator I420_THREE_PLANES#

Y、U、および UV 平面の別々のテンソルとして表される I420 形式の画像。

enumerator RGB#

RGB インターリーブ形式の画像 (3 チャネル)

enumerator BGR#

BGR インターリーブ形式の画像 (3 チャネル)

enumerator GRAY#

GRAY 形式の画像 (1 チャネル)

enumerator RGBX#

RGBX インターリーブ形式の画像 (4 チャネル)

enumerator BGRX#

BGRX インターリーブ形式の画像 (4 チャネル)

enum ov_preprocess_resize_algorithm_e#

この列挙タイプには、前処理におけるすべてのサイズ変更アルゴリズムのコードが含まれています。

値:

enumerator RESIZE_LINEAR#

線形アルゴリズム

enumerator RESIZE_CUBIC#

キュービック・アルゴリズム

enumerator RESIZE_NEAREST#

近傍アルゴリズム

関数

ov_preprocess_prepostprocessor_create(const ov_model_t *model, ov_preprocess_prepostprocessor_t **preprocess)#

ov_preprocess_prepostprocessor_t インスタンスを作成します。

パラメーター:
戻り値:

操作のステータスコード: 成功の場合 OK (0)。

ov_preprocess_prepostprocessor_free(ov_preprocess_prepostprocessor_t *preprocess)#

ov_preprocess_prepostprocessor_t で割り当てられたメモリーを解放します。

パラメーター:

preprocess – 解放するメモリーへのポインター ov_preprocess_prepostprocessor_t

ov_preprocess_prepostprocessor_get_input_info(const ov_preprocess_prepostprocessor_t *preprocess, ov_preprocess_input_info_t **preprocess_input_info)#

ov_preprocess_prepostprocessor_t インスタンスの入力情報を取得します。

パラメーター:
戻り値:

操作のステータスコード: 成功の場合 OK (0)。

ov_preprocess_prepostprocessor_get_input_info_by_name(const ov_preprocess_prepostprocessor_t *preprocess, const char *tensor_name, ov_preprocess_input_info_t **preprocess_input_info)#

テンソル名で ov_preprocess_prepostprocessor_t インスタンスの入力情報を取得します。

パラメーター:
戻り値:

操作のステータスコード: 成功の場合 OK (0)。

ov_preprocess_prepostprocessor_get_input_info_by_index(const ov_preprocess_prepostprocessor_t *preprocess, const size_t tensor_index, ov_preprocess_input_info_t **preprocess_input_info)#

テンソルの順番で ov_preprocess_prepostprocessor_t インスタンスの入力情報を取得します。

パラメーター:
戻り値:

操作のステータスコード: 成功の場合 OK (0)。

ov_preprocess_input_info_free(ov_preprocess_input_info_t *preprocess_input_info)#

ov_preprocess_input_info_t で割り当てられたメモリーを解放します。

パラメーター:

preprocess_input_info – 解放するメモリーへのポインター ov_preprocess_input_info_t

ov_preprocess_input_info_get_tensor_info(const ov_preprocess_input_info_t *preprocess_input_info, ov_preprocess_input_tensor_info_t **preprocess_input_tensor_info)#

ov_preprocess_input_tensor_info_t を取得。

パラメーター:
戻り値:

操作のステータスコード: 成功の場合 OK (0)。

ov_preprocess_input_tensor_info_free(ov_preprocess_input_tensor_info_t *preprocess_input_tensor_info)#

ov_preprocess_input_tensor_info_t で割り当てられたメモリーを解放します。

パラメーター:

preprocess_input_tensor_info – 解放するメモリーへのポインター ov_preprocess_input_tensor_info_t

ov_preprocess_input_info_get_preprocess_steps(const ov_preprocess_input_info_t *preprocess_input_info, ov_preprocess_preprocess_steps_t **preprocess_input_steps)#

ov_preprocess_preprocess_steps_t を取得。

パラメーター:
戻り値:

操作のステータスコード: 成功の場合 OK (0)。

ov_preprocess_preprocess_steps_free(ov_preprocess_preprocess_steps_t *preprocess_input_process_steps)#

ov_preprocess_preprocess_steps_t で割り当てられたメモリーを解放します。

パラメーター:

preprocess_input_steps – 解放するメモリーへのポインター ov_preprocess_preprocess_steps_t

ov_preprocess_preprocess_steps_resize(ov_preprocess_preprocess_steps_t *preprocess_input_process_steps, const ov_preprocess_resize_algorithm_e resize_algorithm)#

モデルの次元にサイズ変更操作を追加します。

パラメーター:
  • preprocess_input_process_stepsov_preprocess_preprocess_steps_t へのポインター。

  • resize_algorithm – ov_preprocess_resizeAlgorithm インスタンス

戻り値:

操作のステータスコード: 成功の場合 OK (0)。

ov_preprocess_preprocess_steps_scale(ov_preprocess_preprocess_steps_t *preprocess_input_process_steps, float value)#

スケール前処理操作を追加します。入力の各要素を指定された値で割ります。

パラメーター:
戻り値:

操作のステータスコード: 成功の場合 OK (0)。

ov_preprocess_preprocess_steps_scale_multi_channels(ov_preprocess_preprocess_steps_t *preprocess_input_process_steps, const float *values, const int32_t value_size)#

スケール前処理操作を追加します。入力の各チャネル要素を異なる指定された値で割ります。

パラメーター:
  • preprocess_input_process_stepsov_preprocess_preprocess_steps_t へのポインター。

  • values – 各チャネルのスケーリング値の配列

  • value_size – スケール値サイズ

戻り値:

操作のステータスコード: 成功の場合 OK (0)。

ov_preprocess_preprocess_steps_mean(ov_preprocess_preprocess_steps_t *preprocess_input_process_steps, float value)#

平均前処理操作を追加します。入力の各要素から指定された値を減算します。

パラメーター:
戻り値:

操作のステータスコード: 成功の場合 OK (0)。

ov_preprocess_preprocess_steps_mean_multi_channels(ov_preprocess_preprocess_steps_t *preprocess_input_process_steps, const float *values, const int32_t value_size)#

平均前処理操作を追加します。入力の各チャネル要素から異なる指定された値で減算します。

パラメーター:
  • preprocess_input_process_stepsov_preprocess_preprocess_steps_t へのポインター。

  • values – 各要素から減算する値の配列。

  • value_size – 平均値サイズ

戻り値:

操作のステータスコード: 成功の場合 OK (0)。

ov_preprocess_preprocess_steps_crop(ov_preprocess_preprocess_steps_t *preprocess_input_process_steps, int32_t *begin, int32_t begin_size, int32_t *end, int32_t end_size)#

開始座標と終了座標の間の入力テンソルを切り取ります。

パラメーター:
  • preprocess_input_process_stepsov_preprocess_preprocess_steps_t へのポインター。

  • begin – 入力テンソルの切り取りの開始インデックスへのポインター。負の値は入力テンソルの末尾からの要素のカウントを表します

  • begin_size – 開始配列のサイズ

  • end – 入力テンソルの切り取りの終了インデックスへのポインター。終了インデックスは排他的であり、終了エッジを含む値は出力スライスに含まれません。負の値は入力テンソルの末尾からの要素のカウントを表します

  • begin_size – 終了配列のサイズ

戻り値:

操作のステータスコード: 成功の場合 OK (0)。

ov_preprocess_preprocess_steps_convert_layout(ov_preprocess_preprocess_steps_t *preprocess_input_process_steps, ov_layout_t *layout)#

指定されたレイアウトに ‘レイアウト変換’ 操作を追加します。

パラメーター:
戻り値:

操作のステータスコード: 成功の場合 OK (0)。

ov_preprocess_preprocess_steps_reverse_channels(ov_preprocess_preprocess_steps_t *preprocess_input_process_steps)#

チャネル反転操作。

パラメーター:

preprocess_input_process_stepsov_preprocess_preprocess_steps_t へのポインター。

戻り値:

操作のステータスコード: 成功の場合 OK (0)。

ov_preprocess_input_tensor_info_set_element_type(ov_preprocess_input_tensor_info_t *preprocess_input_tensor_info, const ov_element_type_e element_type)#

ov_preprocess_input_tensor_info_t の精度を設定します。

パラメーター:
戻り値:

操作のステータスコード: 成功の場合 OK (0)。

ov_preprocess_input_tensor_info_set_color_format(ov_preprocess_input_tensor_info_t *preprocess_input_tensor_info, const ov_color_format_e colorFormat)#

Ov_preprocess_input_tensor_info_t のカラー形式を設定。

パラメーター:
戻り値:

操作のステータスコード: 成功の場合 OK (0)。

ov_preprocess_input_tensor_info_set_color_format_with_subname(ov_preprocess_input_tensor_info_t *preprocess_input_tensor_info, const ov_color_format_e colorFormat, const size_t sub_names_size, ...)#

サブネームを使用して ov_preprocess_input_tensor_info_t のカラー形式を設定。

パラメーター:
  • preprocess_input_tensor_infoov_preprocess_input_tensor_info_t へのポインター。

  • colorFormat – colorFormat の列挙

  • sub_names_size – sub_names のサイズ

  • ... – 可変パラメーター sub_names 各プレーンに割り当てられたサブネームのオプションのリスト (例: “Y”、“UV”)。

戻り値:

操作のステータスコード: 成功の場合 OK (0)。

ov_preprocess_input_tensor_info_set_spatial_static_shape(ov_preprocess_input_tensor_info_t *preprocess_input_tensor_info, const size_t input_height, const size_t input_width)#

ov_preprocess_input_tensor_info_t の spatial_static_shape を設定します。

パラメーター:
戻り値:

操作のステータスコード: 成功の場合 OK (0)。

ov_preprocess_preprocess_steps_convert_element_type(ov_preprocess_preprocess_steps_t *preprocess_input_process_steps, const ov_element_type_e element_type)#

Ov_preprocess_preprocess_steps_t 要素タイプを変換します。

パラメーター:
戻り値:

操作のステータスコード: 成功の場合 OK (0)。

ov_preprocess_preprocess_steps_convert_color(ov_preprocess_preprocess_steps_t *preprocess_input_process_steps, const ov_color_format_e colorFormat)#

ov_preprocess_preprocess_steps_t カラーを変換。

パラメーター:
戻り値:

操作のステータスコード: 成功の場合 OK (0)。

ov_preprocess_input_tensor_info_set_from(ov_preprocess_input_tensor_info_t *preprocess_input_tensor_info, const ov_tensor_t *tensor)#

ユーザーが作成したテンソルから要素タイプと形状を再利用するためのヘルパー関数。

パラメーター:
戻り値:

操作のステータスコード: 成功の場合 OK (0)。

ov_preprocess_input_tensor_info_set_layout(ov_preprocess_input_tensor_info_t *preprocess_input_tensor_info, ov_layout_t *layout)#

ov_preprocess_input_tensor_info_t のレイアウトを設定します。

パラメーター:
戻り値:

操作のステータスコード: 成功の場合 OK (0)。

ov_preprocess_prepostprocessor_get_output_info(const ov_preprocess_prepostprocessor_t *preprocess, ov_preprocess_output_info_t **preprocess_output_info)#

ov_preprocess_output_info_t インスタンスの出力情報を取得します。

パラメーター:
戻り値:

操作のステータスコード: 成功の場合 OK (0)。

ov_preprocess_prepostprocessor_get_output_info_by_index(const ov_preprocess_prepostprocessor_t *preprocess, const size_t tensor_index, ov_preprocess_output_info_t **preprocess_output_info)#

ov_preprocess_output_info_t インスタンスの出力情報を取得します。

パラメーター:
戻り値:

操作のステータスコード: 成功の場合 OK (0)。

ov_preprocess_prepostprocessor_get_output_info_by_name(const ov_preprocess_prepostprocessor_t *preprocess, const char *tensor_name, ov_preprocess_output_info_t **preprocess_output_info)#

ov_preprocess_output_info_t インスタンスの出力情報を取得します。

パラメーター:
戻り値:

操作のステータスコード: 成功の場合 OK (0)。

ov_preprocess_output_info_free(ov_preprocess_output_info_t *preprocess_output_info)#

ov_preprocess_output_info_t で割り当てられたメモリーを解放します。

パラメーター:

preprocess_output_info – 解放するメモリーへのポインター ov_preprocess_output_info_t

ov_preprocess_output_info_get_tensor_info(const ov_preprocess_output_info_t *preprocess_output_info, ov_preprocess_output_tensor_info_t **preprocess_output_tensor_info)#

ov_preprocess_input_tensor_info_t を取得。

パラメーター:
戻り値:

操作のステータスコード: 成功の場合 OK (0)。

ov_preprocess_output_tensor_info_free(ov_preprocess_output_tensor_info_t *preprocess_output_tensor_info)#

ov_preprocess_output_tensor_info_t で割り当てられたメモリーを解放します。

パラメーター:

preprocess_output_tensor_info – 解放するメモリーへのポインター ov_preprocess_output_tensor_info_t

ov_preprocess_output_set_element_type(ov_preprocess_output_tensor_info_t *preprocess_output_tensor_info, const ov_element_type_e element_type)#

ov_preprocess_input_tensor_info_t の精度を設定します。

パラメーター:
戻り値:

操作のステータスコード: 成功の場合 OK (0)。

ov_preprocess_input_info_get_model_info(const ov_preprocess_input_info_t *preprocess_input_info, ov_preprocess_input_model_info_t **preprocess_input_model_info)#

現在の入力モデル情報を取得します。

パラメーター:
戻り値:

操作のステータスコード: 成功の場合 OK (0)。

ov_preprocess_input_model_info_free(ov_preprocess_input_model_info_t *preprocess_input_model_info)#

ov_preprocess_input_model_info_t で割り当てられたメモリーを解放します。

パラメーター:

preprocess_input_model_info – 解放するメモリーへのポインター ov_preprocess_input_model_info_t

ov_preprocess_input_model_info_set_layout(ov_preprocess_input_model_info_t *preprocess_input_model_info, ov_layout_t *layout)#

モデルの入力テンソルのレイアウトを設定します。

パラメーター:
戻り値:

操作のステータスコード: 成功の場合 OK (0)。

ov_preprocess_prepostprocessor_build(const ov_preprocess_prepostprocessor_t *preprocess, ov_model_t **model)#

コンストラクターで渡された関数に前処理/後処理操作を追加します。

パラメーター:
戻り値:

操作のステータスコード: 成功の場合 OK (0)。

struct ov_preprocess_prepostprocessor_t#
#include <ov_prepostprocess.h>

ov_preprocess_prepostprocessor から ov_preprocess_prepostprocessor_t タイプを定義します

struct ov_preprocess_input_info_t#
#include <ov_prepostprocess.h>

ov_preprocess_input_info から ov_preprocess_input_info_t タイプを定義します

struct ov_preprocess_input_tensor_info_t#
#include <ov_prepostprocess.h>

ov_preprocess_input_tensor_info から ov_preprocess_input_tensor_info_t タイプを定義します

struct ov_preprocess_output_info_t#
#include <ov_prepostprocess.h>

ov_preprocess_output_info から ov_preprocess_output_info_t タイプを定義します

struct ov_preprocess_output_tensor_info_t#
#include <ov_prepostprocess.h>

ov_preprocess_output_tensor_info から ov_preprocess_output_tensor_info_t タイプを定義します

struct ov_preprocess_input_model_info_t#
#include <ov_prepostprocess.h>

ov_preprocess_input_model_info から ov_preprocess_input_model_info_t タイプを定義します

struct ov_preprocess_preprocess_steps_t#
#include <ov_prepostprocess.h>

ov_preprocess_preprocess_steps から ov_preprocess_preprocess_steps_t タイプを定義します