Shortcuts

video_recognizer.h

struct mmdeploy_video_recognition_t

Public Members

int label_id
float score
struct mmdeploy_video_sample_info_t

Public Members

int clip_len
int num_clips
typedef struct mmdeploy_video_recognizer *mmdeploy_video_recognizer_t
int mmdeploy_video_recognizer_create(mmdeploy_model_t model, const char *device_name, int device_id, mmdeploy_video_recognizer_t *recognizer)

Create video recognizer’s handle.

Parameters
Returns

status of creating video recognizer’s handle

int mmdeploy_video_recognizer_create_by_path(const char *model_path, const char *device_name, int device_id, mmdeploy_video_recognizer_t *recognizer)

Create a video recognizer instance.

Parameters
  • model_path[in] path to video recognition model

  • device_name[in] name of device, such as “cpu”, “cuda”, etc.

  • device_id[in] id of device.

  • recognizer[out] handle of the created video recognizer, which must be destroyed by mmdeploy_video_recognizer_destroy

Returns

status code of the operation

int mmdeploy_video_recognizer_apply(mmdeploy_video_recognizer_t recognizer, const mmdeploy_mat_t *images, const mmdeploy_video_sample_info_t *video_info, int video_count, mmdeploy_video_recognition_t **results, int **result_count)

Apply video recognizer to a batch of videos.

Parameters
Returns

status code of the operation

void mmdeploy_video_recognizer_release_result(mmdeploy_video_recognition_t *results, int *result_count, int video_count)

Release result buffer returned by mmdeploy_video_recognizer_apply.

Parameters
  • results[in] result buffer by video recognizer

  • result_count[in] results size buffer

  • video_count[in] length of result_count

void mmdeploy_video_recognizer_destroy(mmdeploy_video_recognizer_t recognizer)

destroy video recognizer

Parameters

recognizer[in] handle of video recognizer created by mmdeploy_video_recognizer_create_by_path or mmdeploy_video_recognizer_create

int mmdeploy_video_recognizer_create_v2(mmdeploy_model_t model, mmdeploy_context_t context, mmdeploy_video_recognizer_t *recognizer)

Same as mmdeploy_video_recognizer_create, but allows to control execution context of tasks via context.

int mmdeploy_video_recognizer_create_input(const mmdeploy_mat_t *images, const mmdeploy_video_sample_info_t *video_info, int video_count, mmdeploy_value_t *value)

Pack video recognizer inputs into mmdeploy_value_t.

Parameters
  • images[in] a batch of videos

  • video_info[in] video information of each video

  • video_count[in] number of videos in the batch

  • value[out] created value

Returns

status code of the operation

int mmdeploy_video_recognizer_apply_v2(mmdeploy_video_recognizer_t recognizer, mmdeploy_value_t input, mmdeploy_value_t *output)

Apply video recognizer to a batch of videos.

Parameters
  • input[in] packed input

  • output[out] inference output

Returns

status code of the operation

int mmdeploy_video_recognizer_get_result(mmdeploy_value_t output, mmdeploy_video_recognition_t **results, int **result_count)

Apply video recognizer to a batch of videos.

Parameters
  • output[in] inference output

  • results[out] structured output

  • result_count[out] number of each videos

Returns

status code of the operation

Read the Docs v: stable
Versions
latest
stable
1.x
v1.3.1
v1.3.0
v1.2.0
v1.1.0
v1.0.0
0.x
v0.14.0
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.