1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- #ifndef _YOLOV_H_
- #define _YOLOV_H_
- #include "eznn_api.h"
- #ifdef __cplusplus
- extern "C" {
- #endif /* __cplusplus */
- const char *yolov_labels_name[1] = {
- "face"
- };
- typedef enum ezax_yolo_model {
- EZAX_MODEL_YOLOV3,
- EZAX_MODEL_YOLOV5,
- } ezax_yolo_model_t;
- typedef struct eazx_pets_det_cfg {
- char *model_rootpath;
- int model_type;
- int width;
- int height;
- } ezax_pets_det_cfg_t;
- typedef struct ax_nna_tensor
- {
- /* vir and phy addr */
- void *pVir; unsigned pPhy;
- /* data size */
- int nDatasz;
- /* tensor width, height, channel, batch number, fraction point */
- int w; int h; int c; int n; int fl;
- /* 2: int8, 4 int16 */
- int dtype;
- /* tensor name */
- char nTensorName[32];
- /* reserved */
- int rzv;
- }ax_nna_tensor_t;
- typedef struct ax_nna_tensors
- {
- /* tensor pointer */
- ax_nna_tensor_t *nTensor;
- /* tensor number */
- int nTensorNum;
- }ax_nna_tensors_t;
- typedef enum ezax_yolo_cmd {
- EZAX_YOLO_RESET_AXFREQ,
- EZAX_YOLO_GET_AXFREQ,
- } ezax_yolo_cmd_t;
- void *nna_pets_det_open(ezax_pets_det_cfg_t *cfg);
- int nna_pets_det_cmd(void *hdl, ezax_yolo_cmd_t cmd,unsigned int args);
- int nna_pets_det_process(void *hdl,ezax_img_t *pImg,ezax_boxes_t *yolo_det_out,float conf_thresh,float iou_thresh);
- int nna_pets_det_close(void *hdl);
- #ifdef __cplusplus
- }
- #endif /* __cplusplus */
- #endif
|