Skip to main content

BoxDecodeType.h File

Typed decode-family selection for BoxDecode stages. More...

Included Headers

#include <cstdint>

Namespaces Index

namespacesimaai
namespaceneat

Description

Typed decode-family selection for BoxDecode stages.

The BoxDecodeType enum picks the head-decoding contract used by the SimaBoxDecode postprocess stage: which YOLO variant, DETR, EffDet, RCNN stage-1 or CenterNet head layout the planner should expect. The companion BoxDecodeTypeOption enum selects the tensor-packing variant within a family. Helpers in this header stringify the enums and summarise each decode family's tensor contract for diagnostics and docs.

See Also

nodes/sima/SimaBoxDecode.h for the consuming postprocess node.

See Also

DetectionTypes.h for the decoded detection payload.

File Listing

The file content with the documentation metadata removed is:

1
16#pragma once
17
18#include <cstdint>
19
20namespace simaai::neat {
21
33enum class BoxDecodeType : std::int32_t {
34 // Internal sentinel; runtime decode requires a concrete value.
35 Unspecified = 0,
36 // YOLO-family (generic token).
37 Yolo = 1,
38 YoloV5 = 2,
39 YoloV5Seg = 3,
40 YoloV7 = 4,
41 YoloV7Seg = 5,
42 YoloV8 = 6,
43 YoloV8Seg = 7,
44 YoloV8Pose = 8,
45 YoloV9 = 9,
46 YoloV9Seg = 10,
47 YoloV10 = 11,
48 YoloV10Seg = 12,
49 Detr = 13,
50 EffDet = 14,
51 RcnnStage1 = 15,
52 Centernet = 16,
53 YoloV26 = 17,
54};
55
66enum class BoxDecodeTypeOption : std::int32_t {
67 Auto = 0,
68 PackedPerHead = 1,
70 GroupedByRole = 3,
72 Split3Grouped = 5,
77};
78
80constexpr const char* box_decode_type_token(BoxDecodeType type) {
81 switch (type) {
83 return "yolo";
85 return "yolov5";
87 return "yolov5-seg";
89 return "yolov7";
91 return "yolov7-seg";
93 return "yolov8";
95 return "yolov8-seg";
97 return "yolov8-pose";
99 return "yolov9";
101 return "yolov9-seg";
103 return "yolov10";
105 return "yolov10-seg";
107 return "yolo26";
109 return "detr";
111 return "effdet";
113 return "rcnn-stage1";
115 return "centernet";
117 default:
118 return "unspecified";
119 }
120}
121
124 switch (option) {
126 return "auto";
128 return "packed-per-head";
130 return "interleaved-by-head";
132 return "grouped-by-role";
134 return "split3-interleaved";
136 return "split3-grouped";
138 return "interleaved-by-head-probability";
140 return "interleaved-by-head-logit";
142 return "grouped-by-role-probability";
144 return "grouped-by-role-logit";
145 default:
146 return "auto";
147 }
148}
149
152 switch (type) {
166 return true;
172 default:
173 return false;
174 }
175}
176
179 switch (type) {
185 return true;
199 default:
200 return false;
201 }
202}
203
206 switch (type) {
214 return "YOLO tensor contract: decoupled class heads (>4 channels, repeated across heads) or "
215 "packed heads (depth=3*(num_classes+5), consistent across heads).";
217 return "YOLO26 tensor contract: grouped raw l/t/r/b bbox heads (4 channels) paired "
218 "with repeated class-score heads (>4 channels).";
224 return "YOLO-seg contract: same class-depth rules as YOLO plus segmentation decode path.";
226 return "DETR contract: class channels inferred from max depth across heads; max depth must be "
227 ">4.";
231 return "Non-YOLO fallback contract: class channels inferred from max depth across heads; "
232 "max depth must be >4.";
234 default:
235 return "Unset decode type; runtime decode must fail fast until a concrete decode family is "
236 "selected.";
237 }
238}
239
240} // namespace simaai::neat

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.