sp500/yolo.h Source File#
|
Mobilint REGULUS v4.1
SP500 DSP API
|
yolo.h
Go to the documentation of this file.
Mobilint SP500 DSP offload - status codes, lifecycle and shared memory.
One detection. 6 floats; the layout of a SP500_YOLO_TASK_DETECT record.
Definition yolo.h:119
One pose result. 57 floats; the layout of a SP500_YOLO_TASK_POSE record.
Definition yolo.h:155
sp500_yolo_keypoint keypoints[SP500_YOLO_POSE_KEYPOINTS]
Definition yolo.h:157
Raw head tensors as one combined tensor per level. SP500_YOLO_HEAD_ANCHOR only.
Definition yolo.h:246
One segmentation result. 11 floats; the layout of a SP500_YOLO_TASK_SEGMENT record.
Definition yolo.h:131
void sp500_yolo_raw_anchor_init(sp500_yolo_raw_anchor *raw)
Zero raw so every plane reads as unused.
sp500_status sp500_yolo_decode(int32_t head, int32_t task, const sp500_yolo_raw *raw, const sp500_yolo_params *params, sp500_yolo_output *output, sp500_yolo_result *result)
Decode a split-plane head and remove duplicates, in one DSP call.
uint32_t sp500_yolo_mask_offset(const sp500_yolo_segmentation *record)
Mask offset of a segmentation record, decoded from its float slot. Returns SP500_YOLO_MASK_NONE when ...
void sp500_yolo_raw_init(sp500_yolo_raw *raw)
Zero raw so every plane reads as unused.
uint32_t sp500_yolo_records_bytes(int32_t task, int32_t max_detections)
Bytes needed by output.records for max_detections records of task, or 0 for invalid arguments.
#define SP500_YOLO_POSE_KEYPOINTS
Keypoints in a pose record; the fixed COCO 17-point layout.
Definition yolo.h:82
void sp500_yolo_params_init(sp500_yolo_params *params)
Fill params with the defaults documented above.
void sp500_yolo_output_init(sp500_yolo_output *output)
Zero output so every buffer reads as unused.
sp500_status sp500_yolo_postprocess(int32_t head, int32_t task, const sp500_buffer *decoded, int32_t num_rows, const sp500_yolo_params *params, sp500_yolo_output *output, sp500_yolo_result *result)
Select detections from an already-decoded anchor table.
sp500_status sp500_yolo_decode_anchor(int32_t task, const sp500_yolo_raw_anchor *raw, const sp500_yolo_params *params, sp500_yolo_output *output, sp500_yolo_result *result)
Decode an anchor head and remove duplicates, in one DSP call. SP500_YOLO_HEAD_ANCHOR only.
sp500_status sp500_yolo_head_for_model(const char *model_name, int32_t *head)
Head family for a model name, so you do not have to memorise the table.
#define SP500_YOLO_LEVELS
Feature levels a YOLO head produces: strides 8, 16 and 32.
Definition yolo.h:79
int32_t sp500_yolo_grid_cells(int32_t img_w, int32_t img_h)
Grid cells summed over the three levels for a img_w x img_h input: the row count of a decoded anchor-...
int32_t sp500_yolo_record_floats(int32_t task)
Floats in one record of task, or 0 for an unknown task.
Generated by