Skip to content

sp500_yolo_params

#include <sp500/yolo.h>

struct sp500_yolo_params

Model shape and thresholds.

Fill this with sp500_yolo_params_init(). The defaults fit a 640x640, 80-class detection model, so a plain detector needs no field set at all. img_w, img_h, num_classes and max_detections must be in 1..65535.

Attributes

Member Description
img_w
img_h
num_classes
max_detections
conf_threshold
iou_threshold
anchors_per_level
anchors
anchors_count
reserved0
proto
mask_coeffs
proto_h
proto_w
mask_threshold
reserved

img_w

int32_t img_w

network input width in pixels; default 640

img_h

int32_t img_h

network input height in pixels; default 640

num_classes

int32_t num_classes

class count; default 80. Pose heads use 1

max_detections

int32_t max_detections

upper bound on returned records; default 100. Also sizes output.records

conf_threshold

float conf_threshold

scores below this are discarded; default 0.25

iou_threshold

float iou_threshold

NMS overlap threshold; default 0.7. Ignored by the top-k families (NMSFREE, DFLFREE)

anchors_per_level

int32_t anchors_per_level

anchor boxes per feature level, 1..3; default 3

anchors

const float * anchors

anchors_per_level * 3 (w,h) pixel pairs, level-major for strides 8, 16 and 32. NULL selects the COCO v5 defaults, which requires anchors_per_level == 3. Read only during the call. Default NULL

anchors_count

uint32_t anchors_count

floats in anchors; must be anchors_per_level * 6 when set, else 0

reserved0

uint32_t reserved0

must be zero

proto

sp500_buffer proto

prototype masks, [proto_h][proto_w][mask_coeffs] float

mask_coeffs

int32_t mask_coeffs

mask coefficients per detection, typically 32

proto_h

int32_t proto_h

prototype height, typically img_h / 4

proto_w

int32_t proto_w

prototype width, typically img_w / 4

mask_threshold

float mask_threshold

a mask pixel is set when its logit exceeds this; default 0

reserved

uint32_t reserved[6]

must be zero