# sp500\_yolo\_params

```cpp
#include <sp500/yolo.h>

struct sp500_yolo_params
```

Model shape and thresholds.

Fill this with [sp500\_yolo\_params\_init()](<https://docs.mobilint.com/regulus/kr/v4.1/api/cpp/yolo-h/#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-w>) |  |
| [`img_h`](<#img-h>) |  |
| [`num_classes`](<#num-classes>) |  |
| [`max_detections`](<#max-detections>) |  |
| [`conf_threshold`](<#conf-threshold>) |  |
| [`iou_threshold`](<#iou-threshold>) |  |
| [`anchors_per_level`](<#anchors-per-level>) |  |
| [`anchors`](<#anchors>) |  |
| [`anchors_count`](<#anchors-count>) |  |
| [`reserved0`](<#reserved0>) |  |
| [`proto`](<#proto>) |  |
| [`mask_coeffs`](<#mask-coeffs>) |  |
| [`proto_h`](<#proto-h>) |  |
| [`proto_w`](<#proto-w>) |  |
| [`mask_threshold`](<#mask-threshold>) |  |
| [`reserved`](<#reserved>) |  |

### img\_w

```cpp
int32_t img_w
```

network input width in pixels; default 640

### img\_h

```cpp
int32_t img_h
```

network input height in pixels; default 640

### num\_classes

```cpp
int32_t num_classes
```

class count; default 80. Pose heads use 1

### max\_detections

```cpp
int32_t max_detections
```

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

### conf\_threshold

```cpp
float conf_threshold
```

scores below this are discarded; default 0.25

### iou\_threshold

```cpp
float iou_threshold
```

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

### anchors\_per\_level

```cpp
int32_t anchors_per_level
```

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

### anchors

```cpp
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

```cpp
uint32_t anchors_count
```

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

### reserved0

```cpp
uint32_t reserved0
```

must be zero

### proto

```cpp
sp500_buffer proto
```

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

### mask\_coeffs

```cpp
int32_t mask_coeffs
```

mask coefficients per detection, typically 32

### proto\_h

```cpp
int32_t proto_h
```

prototype height, typically img\_h / 4

### proto\_w

```cpp
int32_t proto_w
```

prototype width, typically img\_w / 4

### mask\_threshold

```cpp
float mask_threshold
```

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

### reserved

```cpp
uint32_t reserved[6]
```

must be zero
