PreprocOptions Struct
Construction options for a Preproc Node. More...
Declaration
Included Headers
Public Constructors Index
| PreprocOptions ()=default | |
|
Default-construct with framework-default values; tune fields after construction. More... | |
| PreprocOptions (const simaai::neat::Model &model) | |
|
Initialize options from a loaded Model (pulls input/output shapes, dtype, scale/zp). More... | |
Public Member Functions Index
| void | set_input_shape (std::vector< int > shape) |
|
Replace the input image shape (H, W, C). More... | |
| void | set_output_shape (std::vector< int > shape) |
|
Replace the output tensor shape. More... | |
| void | set_slice_shape (std::vector< int > shape) |
|
Replace the slice/tile shape used for batched processing. More... | |
| int | input_height () const |
| int | input_width () const |
| int | input_channels () const |
| int | output_height () const |
| int | output_width () const |
| int | output_channels () const |
| int | slice_height () const |
|
Slice height. More... | |
| int | slice_width () const |
|
Slice width. More... | |
| int | slice_channels () const |
|
Slice channel count. More... | |
| bool | has_input_shape () const |
|
True if input_shape is fully populated. More... | |
| bool | has_output_shape () const |
|
True if output_shape is fully populated. More... | |
| bool | has_slice_shape () const |
|
True if slice_shape is fully populated. More... | |
Public Member Attributes Index
| std::vector< int > | input_shape |
| std::vector< int > | output_shape |
| std::vector< int > | slice_shape |
|
Optional slice/tile shape used for batched processing. More... | |
| int | scaled_width = 0 |
|
Intermediate scaled width (before crop/pad), pixels. More... | |
| int | scaled_height = 0 |
|
Intermediate scaled height (before crop/pad), pixels. More... | |
| int | batch_size = 1 |
|
Batch size processed per invocation. More... | |
| bool | normalize = true |
|
Apply mean/stddev normalization. More... | |
| bool | aspect_ratio = true |
|
Preserve aspect ratio during resize (letterbox). More... | |
| bool | tessellate = true |
|
Tessellate output into MLA tile geometry. More... | |
| bool | dynamic_input_dims = true |
|
Allow dynamic input dimensions at runtime. More... | |
| bool | single_output_handoff = true |
|
Hand off a single output buffer per cycle (vs. ping-pong). More... | |
| int | input_offset = 0 |
|
Byte offset into the input buffer. More... | |
| int | input_stride = 1 |
|
Element stride for input addressing. More... | |
| int | output_stride = 1 |
|
Element stride for output addressing. More... | |
| std::optional< std::int64_t > | q_zp |
|
Output quantization zero-point (when emitting INT8/INT16). More... | |
| std::optional< double > | q_scale |
|
Output quantization scale (when emitting INT8/INT16). More... | |
| std::vector< float > | channel_mean = {0.0f, 0.0f, 0.0f} |
|
Per-channel mean used by normalize. More... | |
| std::vector< float > | channel_stddev = {1.0f, 1.0f, 1.0f} |
|
Per-channel stddev used by normalize. More... | |
| std::string | input_img_type |
| std::string | output_img_type = "RGB" |
| std::string | output_dtype = "INT16" |
| std::string | scaling_type = "BILINEAR" |
|
Resize interpolation ("BILINEAR", "NEAREST"). More... | |
| std::string | padding_type = "CENTER" |
|
Letterbox padding mode ("CENTER", "TOPLEFT"). More... | |
| int | pad_value = 0 |
|
Raw image-space letterbox pad fill value. More... | |
| std::string | graph_name = "preproc" |
|
CVU graph name in the kernel config. More... | |
| std::string | node_name = "preproc" |
|
CVU node name in the kernel config. More... | |
| std::string | element_name |
|
Optional GStreamer element name. More... | |
| std::string | cpu = "CVU" |
|
CPU/accelerator this stage runs on. More... | |
| std::string | next_cpu = "CVU" |
|
CPU/accelerator the downstream stage runs on. More... | |
| std::string | debug = "EVXX_DBG_DISABLED" |
|
Debug-output flag passed to the CVU kernel. More... | |
| std::string | upstream_name = "decoder" |
|
Name of the upstream element for tag wiring. More... | |
| std::string | graph_input_name = "input_image" |
| int | num_buffers = 0 |
|
Override for the element's buffer pool size. More... | |
| int | num_buffers_model = 0 |
|
Buffer count derived from the bound model. More... | |
| bool | num_buffers_locked = false |
|
If true, planner won't override num_buffers. More... | |
| bool | model_managed_contract = false |
|
If true, the model owns the node contract resolution. More... | |
Public Static Functions Index
| static int | shape_dim (const std::vector< int > &shape, std::size_t index) |
|
Safe accessor: return shape[index] or 0 if out of bounds. More... | |
| static int | shape_channels (const std::vector< int > &shape) |
|
Last-axis channel count for an HWC-style shape, or 0 if rank < 3. More... | |
Description
Construction options for a Preproc Node.
Most fields are derived from the bound Model when the constructor that takes a Model is used; explicit setters are provided for graphs that don't have a model yet at Node-construction time.
Definition at line 44 of file Preproc.h.
Public Constructors
PreprocOptions()
| default |
Default-construct with framework-default values; tune fields after construction.
Definition at line 46 of file Preproc.h.
PreprocOptions()
| explicit |
Public Member Functions
has_input_shape()
| inline |
True if input_shape is fully populated.
Definition at line 171 of file Preproc.h.
has_output_shape()
| inline |
True if output_shape is fully populated.
Definition at line 176 of file Preproc.h.
has_slice_shape()
| inline |
True if slice_shape is fully populated.
Definition at line 181 of file Preproc.h.
input_channels()
| inline |
input_height()
| inline |