[C API][DOC][PPP] Extend user documentation for new preproprocess api (#14008)
* [C API][DOC] correct the doxy group for ppp Signed-off-by: xuejun <Xuejun.Zhai@intel.com> * [C API][DOC] improve the C API doc with new PPP interface Signed-off-by: xuejun <Xuejun.Zhai@intel.com> Signed-off-by: xuejun <Xuejun.Zhai@intel.com>
This commit is contained in:
1 parent
094db2b3ae
commit
0bc67ce1a7
2 files changed
+11
-5
No files matched your search
@@ -18,6 +18,7 @@ int main_new() {
|
||||
ov_preprocess_prepostprocessor_t* preprocess = NULL;
|
||||
ov_preprocess_input_info_t* input_info = NULL;
|
||||
ov_preprocess_input_model_info_t* input_model = NULL;
|
||||
ov_preprocess_preprocess_steps_t* input_process = NULL;
|
||||
ov_layout_t* layout = NULL;
|
||||
ov_model_t* new_model = NULL;
|
||||
|
||||
@@ -27,12 +28,17 @@ int main_new() {
|
||||
// we only need to know where is C dimension
|
||||
ov_layout_create("...C", &layout);
|
||||
ov_preprocess_input_model_info_set_layout(input_model, layout);
|
||||
// specify scale and mean values, order of operations is important
|
||||
ov_preprocess_input_info_get_preprocess_steps(input_info, &input_process);
|
||||
ov_preprocess_preprocess_steps_mean(input_process, 116.78f);
|
||||
ov_preprocess_preprocess_steps_scale(input_process, 57.21f);
|
||||
// insert preprocessing operations to the 'model'
|
||||
ov_preprocess_prepostprocessor_build(preprocess, &new_model);
|
||||
|
||||
ov_layout_free(layout);
|
||||
ov_model_free(new_model);
|
||||
ov_preprocess_input_model_info_free(input_model);
|
||||
ov_preprocess_preprocess_steps_free(input_process);
|
||||
ov_preprocess_input_info_free(input_info);
|
||||
ov_preprocess_prepostprocessor_free(preprocess);
|
||||
//! [ov_mean_scale]
|
||||
|
||||
@@ -214,7 +214,7 @@ ov_preprocess_preprocess_steps_resize(
|
||||
|
||||
/**
|
||||
* @brief Add scale preprocess operation. Divide each element of input by specified value.
|
||||
* @ingroup prepostprocess
|
||||
* @ingroup ov_prepostprocess_c_api
|
||||
* @param preprocess_input_process_steps A pointer to ov_preprocess_preprocess_steps_t.
|
||||
* @param value Scaling value
|
||||
* @return Status code of the operation: OK(0) for success.
|
||||
@@ -224,7 +224,7 @@ ov_preprocess_preprocess_steps_scale(ov_preprocess_preprocess_steps_t* preproces
|
||||
|
||||
/**
|
||||
* @brief Add mean preprocess operation. Subtract specified value from each element of input.
|
||||
* @ingroup prepostprocess
|
||||
* @ingroup ov_prepostprocess_c_api
|
||||
* @param preprocess_input_process_steps A pointer to ov_preprocess_preprocess_steps_t.
|
||||
* @param value Value to subtract from each element.
|
||||
* @return Status code of the operation: OK(0) for success.
|
||||
@@ -234,7 +234,7 @@ ov_preprocess_preprocess_steps_mean(ov_preprocess_preprocess_steps_t* preprocess
|
||||
|
||||
/**
|
||||
* @brief Crop input tensor between begin and end coordinates.
|
||||
* @ingroup prepostprocess
|
||||
* @ingroup ov_prepostprocess_c_api
|
||||
* @param preprocess_input_process_steps A pointer to ov_preprocess_preprocess_steps_t.
|
||||
* @param begin Pointer to begin indexes for input tensor cropping.
|
||||
* Negative values represent counting elements from the end of input tensor
|
||||
@@ -251,7 +251,7 @@ ov_preprocess_preprocess_steps_crop(ov_preprocess_preprocess_steps_t* preprocess
|
||||
|
||||
/**
|
||||
* @brief Add 'convert layout' operation to specified layout.
|
||||
* @ingroup prepostprocess
|
||||
* @ingroup ov_prepostprocess_c_api
|
||||
* @param preprocess_input_process_steps A pointer to ov_preprocess_preprocess_steps_t.
|
||||
* @param layout A point to ov_layout_t
|
||||
* @return Status code of the operation: OK(0) for success.
|
||||
@@ -261,7 +261,7 @@ ov_preprocess_preprocess_steps_convert_layout(ov_preprocess_preprocess_steps_t*
|
||||
|
||||
/**
|
||||
* @brief Reverse channels operation.
|
||||
* @ingroup prepostprocess
|
||||
* @ingroup ov_prepostprocess_c_api
|
||||
* @param preprocess_input_process_steps A pointer to ov_preprocess_preprocess_steps_t.
|
||||
* @return Status code of the operation: OK(0) for success.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user