SimaBoxDecode Class
EV74 postprocess Node that decodes detection-head tensors into object boxes (with NMS). More...
Declaration
Included Headers
Base classes
| class | Node |
| class | InputContractConfigurable |
| class | OutputSpecProvider |
| class | PreprocessMetaRequirementProvider |
| class | NodeContractProvider |
| class | NodeContractConfigurable |
Public Constructors Index
| SimaBoxDecode (BoxDecodeType decode_type, double detection_threshold=0.0, double nms_iou_threshold=0.0, int top_k=0, const std::string &element_name="", int original_width=0, int original_height=0, int model_width=0, int model_height=0, BoxDecodeTypeOption decode_type_option=BoxDecodeTypeOption::Auto) | |
|
Construct from raw geometry — for graphs without a bound Model. More... | |
| SimaBoxDecode (const simaai::neat::Model &model, BoxDecodeType decode_type, double detection_threshold=0.0, double nms_iou_threshold=0.0, int top_k=0, const std::string &element_name="", std::optional< bool > route_tess_needed=std::nullopt, std::optional< bool > route_quant_needed=std::nullopt, int original_width=0, int original_height=0, int model_width=0, int model_height=0, std::optional< ResizeMode > resize_mode_override=std::nullopt, BoxDecodeTypeOption decode_type_option=BoxDecodeTypeOption::Auto) | |
|
Construct from a bound Model — pulls geometry and routing flags from the model. More... | |
Public Member Functions Index
| std::string | kind () const override |
|
Type label for this Node kind. More... | |
| NodeCapsBehavior | caps_behavior () const override |
|
Whether the Node negotiates static or dynamic caps. More... | |
| std::string | backend_fragment (int node_index) const override |
|
GStreamer fragment this Node emits. More... | |
| std::vector< std::string > | element_names (int node_index) const override |
|
Deterministic element names this Node will create. More... | |
| OutputSpec | output_spec (const OutputSpec &input) const override |
|
Negotiated downstream caps produced by this Node. More... | |
| std::optional< PreprocessMetaRequirement > | preprocess_meta_requirement () const override |
|
Preprocess metadata fields this Node requires upstream. More... | |
| NodeContractDefinition | contract_definition () const override |
|
Structural contract definition for this Node. More... | |
| bool | compile_node_contract (const ContractCompileInput &input, CompiledNodeContract *out, std::string *err) const override |
|
Compile this Node's contract from the given input. More... | |
| void | apply_compiled_contract (const CompiledNodeContract &contract, std::string *err) override |
|
Apply a compiled contract back into this Node. More... | |
| void | apply_input_contract (const InputContract &contract, std::string *err) override |
|
Apply an input contract from upstream. More... | |
Private Member Attributes Index
| std::unique_ptr< BoxDecodeOptionsInternal > | opt_ |
| std::optional< InputContract > | input_contract_ |
Description
EV74 postprocess Node that decodes detection-head tensors into object boxes (with NMS).
Pick the constructor that matches what your application has on hand: the bare-parameter form for raw inputs, or the Model-aware form when the model carries the geometry and route flags. Decoder variants live in BoxDecodeType — pick the one matching your model family (YOLOv5, SSD, RetinaNet, etc.).
- See Also
Definition at line 53 of file SimaBoxDecode.h.
Public Constructors
SimaBoxDecode()
| explicit |
Construct from raw geometry — for graphs without a bound Model.
- Parameters
-
decode_type Decoder variant (see BoxDecodeType).
detection_threshold Score threshold; boxes below are dropped (0 = use default).
nms_iou_threshold NMS IoU threshold (0 = use default).
top_k Max boxes to keep after NMS (0 = unlimited / variant default).
element_name Optional GStreamer element name.
original_width Width of the unscaled source frame (used for box rescaling).
original_height Height of the unscaled source frame.
model_width Input width the model was trained for.
model_height Input height the model was trained for.
decode_type_option Decoder sub-variant selector (Auto to defer to the model).
Definition at line 74 of file SimaBoxDecode.h.
SimaBoxDecode()
| explicit |
Construct from a bound Model — pulls geometry and routing flags from the model.
- Parameters
-
model Source model (provides input shape, routing hints, etc.).
decode_type Decoder variant (see BoxDecodeType).
detection_threshold Score threshold (0 = use default).
nms_iou_threshold NMS IoU threshold (0 = use default).
top_k Max boxes to keep after NMS.
element_name Optional GStreamer element name.
route_tess_needed Override: does the route need a tess stage upstream?
route_quant_needed Override: does the route need a quant stage upstream?
original_width Width of the unscaled source frame.
original_height Height of the unscaled source frame.
model_width Optional override: model-input width. 0 = derive from the model pack (default). When set, the value flows through to the decoder kernel's spatial knobs; the model-managed compiled_contract still drives quant / decode-family / tensor layout, so callers can override geometry without falling off the model-managed contract path.
model_height Optional override: model-input height. Same semantics as model_width. Both must be set together (or both zero).
resize_mode_override Optional override: explicit preprocess resize mode (Stretch/Letterbox/Crop). Use when running the model without an upstream Preproc stage and the per-buffer preproc_resize_mode meta isn't being written by an upstream element. When set, the contract drops preproc_resize_mode from the required-meta list so buffers flow through cleanly; otherwise the value is sourced from per-buffer GstSimaaiPreprocessMeta as before.
decode_type_option Decoder sub-variant selector.
Definition at line 110 of file SimaBoxDecode.h.
Public Member Functions
apply_compiled_contract()
|
Apply a compiled contract back into this Node.
Definition at line 159 of file SimaBoxDecode.h.
apply_input_contract()
|
Apply an input contract from upstream.
Definition at line 161 of file SimaBoxDecode.h.
backend_fragment()
|
GStreamer fragment this Node emits.
Definition at line 146 of file SimaBoxDecode.h.
caps_behavior()
| inline |
Whether the Node negotiates static or dynamic caps.
Definition at line 142 of file SimaBoxDecode.h.
compile_node_contract()
|
Compile this Node's contract from the given input.
Definition at line 156 of file SimaBoxDecode.h.
contract_definition()
|
Structural contract definition for this Node.
Definition at line 154 of file SimaBoxDecode.h.
element_names()
|
Deterministic element names this Node will create.
Definition at line 148 of file SimaBoxDecode.h.
kind()
| inline |
Type label for this Node kind.
Definition at line 138 of file SimaBoxDecode.h.
output_spec()
|
Negotiated downstream caps produced by this Node.
Definition at line 150 of file SimaBoxDecode.h.
preprocess_meta_requirement()
|
Preprocess metadata fields this Node requires upstream.
Definition at line 152 of file SimaBoxDecode.h.
Private Member Attributes
input_contract_
|
Definition at line 186 of file SimaBoxDecode.h.
opt_
|
Definition at line 185 of file SimaBoxDecode.h.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.