Shortcuts

rotated_detector.h

struct mmdeploy_rotated_detection_t

Public Members

int label_id
float score
float rbbox[5]
typedef struct mmdeploy_rotated_detector *mmdeploy_rotated_detector_t
int mmdeploy_rotated_detector_create(mmdeploy_model_t model, const char *device_name, int device_id, mmdeploy_rotated_detector_t *detector)

Create rotated detector’s handle.

Parameters
  • model[in] an instance of mmrotate sdk model created by mmdeploy_model_create_by_path or mmdeploy_model_create in model.h

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

  • device_id[in] id of device.

  • detector[out] instance of a rotated detector

Returns

status of creating rotated detector’s handle

int mmdeploy_rotated_detector_create_by_path(const char *model_path, const char *device_name, int device_id, mmdeploy_rotated_detector_t *detector)

Create rotated detector’s handle.

Parameters
  • model_path[in] path of mmrotate sdk model exported by mmdeploy model converter

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

  • device_id[in] id of device.

  • detector[out] instance of a rotated detector

Returns

status of creating rotated detector’s handle

int mmdeploy_rotated_detector_apply(mmdeploy_rotated_detector_t detector, const mmdeploy_mat_t *mats, int mat_count, mmdeploy_rotated_detection_t **results, int **result_count)

Apply rotated detector to batch images and get their inference results.

Parameters
Returns

status of inference

void mmdeploy_rotated_detector_release_result(mmdeploy_rotated_detection_t *results, const int *result_count)

Release the inference result buffer created by mmdeploy_rotated_detector_apply.

Parameters
  • results[in] rotated detection results buffer

  • result_count[in] results size buffer

void mmdeploy_rotated_detector_destroy(mmdeploy_rotated_detector_t detector)

Destroy rotated detector’s handle.

Parameters

detector[in] rotated detector’s handle created by mmdeploy_rotated_detector_create_by_path or by mmdeploy_rotated_detector_create

int mmdeploy_rotated_detector_create_v2(mmdeploy_model_t model, mmdeploy_context_t context, mmdeploy_rotated_detector_t *detector)

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

int mmdeploy_rotated_detector_create_input(const mmdeploy_mat_t *mats, int mat_count, mmdeploy_value_t *input)

Pack rotated detector inputs into mmdeploy_value_t.

Parameters
  • mats[in] a batch of images

  • mat_count[in] number of images in the batch

Returns

the created value

int mmdeploy_rotated_detector_apply_v2(mmdeploy_rotated_detector_t detector, mmdeploy_value_t input, mmdeploy_value_t *output)

Same as mmdeploy_rotated_detector_apply, but input and output are packed in mmdeploy_value_t.

int mmdeploy_rotated_detector_apply_async(mmdeploy_rotated_detector_t detector, mmdeploy_sender_t input, mmdeploy_sender_t *output)

Apply rotated detector asynchronously.

Parameters
  • detector[in] handle to the detector

  • input[in] input sender

Returns

output sender

int mmdeploy_rotated_detector_get_result(mmdeploy_value_t output, mmdeploy_rotated_detection_t **results, int **result_count)

Unpack rotated detector output from a mmdeploy_value_t.

Parameters
  • output[in] output obtained by applying a detector

  • results[out] a linear buffer to save detection results of each image. It must be released by mmdeploy_detector_release_result

  • result_count[out] a linear buffer with length number of input images to save the number of detection results of each image. Must be released by mmdeploy_detector_release_result

Returns

status 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.