76 lines
2.4 KiB
C
76 lines
2.4 KiB
C
#pragma once
|
|
|
|
#include "yolo_runtime_types.h"
|
|
|
|
#if defined(_WIN32)
|
|
#define YOLO_RUNTIME_API
|
|
#elif defined(__GNUC__) || defined(__clang__)
|
|
#define YOLO_RUNTIME_API __attribute__((visibility("default")))
|
|
#else
|
|
#define YOLO_RUNTIME_API
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct yolo_runtime yolo_runtime_t;
|
|
typedef struct yolo_result_set yolo_result_set_t;
|
|
|
|
YOLO_RUNTIME_API uint32_t yolo_runtime_get_abi_version(void);
|
|
YOLO_RUNTIME_API yolo_status_t yolo_runtime_create(
|
|
const char* config_path,
|
|
yolo_runtime_t** runtime,
|
|
yolo_error_info_v1_t* error);
|
|
YOLO_RUNTIME_API yolo_status_t yolo_runtime_get_info(
|
|
const yolo_runtime_t* runtime,
|
|
yolo_runtime_info_v1_t* info);
|
|
YOLO_RUNTIME_API yolo_status_t yolo_runtime_infer_image(
|
|
yolo_runtime_t* runtime,
|
|
const yolo_image_view_v1_t* image,
|
|
const yolo_infer_options_v1_t* options,
|
|
yolo_result_set_t** results,
|
|
yolo_error_info_v1_t* error);
|
|
YOLO_RUNTIME_API yolo_status_t yolo_result_set_get_count(
|
|
const yolo_result_set_t* results,
|
|
uint32_t* count);
|
|
YOLO_RUNTIME_API yolo_status_t yolo_result_set_get_performance(
|
|
const yolo_result_set_t* results,
|
|
yolo_performance_v1_t* performance);
|
|
YOLO_RUNTIME_API yolo_status_t yolo_result_set_get_common(
|
|
const yolo_result_set_t* results,
|
|
uint32_t index,
|
|
yolo_result_common_v1_t* result);
|
|
YOLO_RUNTIME_API yolo_status_t yolo_result_set_get_bbox(
|
|
const yolo_result_set_t* results,
|
|
uint32_t index,
|
|
yolo_bbox_v1_t* bbox);
|
|
YOLO_RUNTIME_API yolo_status_t yolo_result_set_get_obb(
|
|
const yolo_result_set_t* results,
|
|
uint32_t index,
|
|
yolo_rotated_rect_v1_t* obb);
|
|
YOLO_RUNTIME_API yolo_status_t yolo_result_set_get_seg_mask(
|
|
const yolo_result_set_t* results,
|
|
uint32_t index,
|
|
yolo_mask_view_v1_t* mask);
|
|
YOLO_RUNTIME_API yolo_status_t yolo_result_set_get_seg_geometry(
|
|
const yolo_result_set_t* results,
|
|
uint32_t index,
|
|
yolo_seg_geometry_v1_t* geometry);
|
|
YOLO_RUNTIME_API yolo_status_t yolo_result_set_get_pose_keypoint_count(
|
|
const yolo_result_set_t* results,
|
|
uint32_t index,
|
|
uint32_t* count);
|
|
YOLO_RUNTIME_API yolo_status_t yolo_result_set_copy_pose_keypoints(
|
|
const yolo_result_set_t* results,
|
|
uint32_t index,
|
|
yolo_keypoint_v1_t* keypoints,
|
|
uint32_t capacity,
|
|
uint32_t* count);
|
|
YOLO_RUNTIME_API void yolo_result_set_release(yolo_result_set_t* results);
|
|
YOLO_RUNTIME_API void yolo_runtime_destroy(yolo_runtime_t* runtime);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|