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... | |
| 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 |
PreprocOptions()
| explicit |
Public Member Functions
has_input_shape()
| inline |
True if input_shape is fully populated.
Definition at line 170 of file Preproc.h.
has_output_shape()
| inline |
True if output_shape is fully populated.
Definition at line 175 of file Preproc.h.
has_slice_shape()
| inline |
True if slice_shape is fully populated.
Definition at line 180 of file Preproc.h.
input_channels()
| inline |
Input channel count.
input_height()
| inline |
Input image height (axis 0 of input_shape).
input_width()
| inline |
Input image width (axis 1 of input_shape).
output_channels()
| inline |
Output channel count.
output_height()
| inline |
Output tensor height.
output_width()
| inline |
Output tensor width.
set_input_shape()
| inline |
Replace the input image shape (H, W, C).
set_output_shape()
| inline |
Replace the output tensor shape.
set_slice_shape()
| inline |
Replace the slice/tile shape used for batched processing.
slice_channels()
| inline |
Slice channel count.
slice_height()
| inline |
Slice height.
slice_width()
| inline |
Slice width.
Public Member Attributes
aspect_ratio
|
Preserve aspect ratio during resize (letterbox).
Definition at line 60 of file Preproc.h.
batch_size
|
Batch size processed per invocation.
Definition at line 57 of file Preproc.h.
channel_mean
|
Per-channel mean used by normalize.
Definition at line 72 of file Preproc.h.
channel_stddev
|
Per-channel stddev used by normalize.
Definition at line 73 of file Preproc.h.
cpu
|
debug
|
dynamic_input_dims
|
Allow dynamic input dimensions at runtime.
Definition at line 62 of file Preproc.h.
element_name
|
Optional GStreamer element name.
Definition at line 83 of file Preproc.h.
graph_input_name
|
Input tensor name within the CVU graph.
Definition at line 89 of file Preproc.h.
graph_name
|
CVU graph name in the kernel config.
Definition at line 81 of file Preproc.h.
input_img_type
|
Input pixel format (e.g. "NV12", "RGB").
Definition at line 75 of file Preproc.h.
input_offset
|
Byte offset into the input buffer.
Definition at line 65 of file Preproc.h.
input_shape
|
Input image shape (H, W, C).
Definition at line 50 of file Preproc.h.
input_stride
|
Element stride for input addressing.
Definition at line 66 of file Preproc.h.
model_managed_contract
|
If true, the model owns the node contract resolution.
Definition at line 94 of file Preproc.h.
next_cpu
|
node_name
|
normalize
|
num_buffers
|
Override for the element's buffer pool size.
Definition at line 91 of file Preproc.h.
num_buffers_locked
|
If true, planner won't override num_buffers.
Definition at line 93 of file Preproc.h.
num_buffers_model
|
Buffer count derived from the bound model.
Definition at line 92 of file Preproc.h.
output_dtype
|
Output element dtype (e.g. "INT16", "BF16").
Definition at line 77 of file Preproc.h.
output_img_type
|
Output color space.
Definition at line 76 of file Preproc.h.
output_shape
|
Output tensor shape after resize/normalize.
Definition at line 51 of file Preproc.h.
output_stride
|
Element stride for output addressing.
Definition at line 67 of file Preproc.h.
padding_type
|
Letterbox padding mode ("CENTER", "TOPLEFT").
Definition at line 79 of file Preproc.h.
q_scale
|
q_zp
|
scaled_height
|
Intermediate scaled height (before crop/pad), pixels.
Definition at line 55 of file Preproc.h.
scaled_width
|
Intermediate scaled width (before crop/pad), pixels.
Definition at line 54 of file Preproc.h.
scaling_type
|
Resize interpolation ("BILINEAR", "NEAREST").
Definition at line 78 of file Preproc.h.
single_output_handoff
|
Hand off a single output buffer per cycle (vs. ping-pong).
Definition at line 63 of file Preproc.h.
slice_shape
|
Optional slice/tile shape used for batched processing.
Definition at line 52 of file Preproc.h.
tessellate
|
Tessellate output into MLA tile geometry.
Definition at line 61 of file Preproc.h.
upstream_name
|
Name of the upstream element for tag wiring.
Definition at line 88 of file Preproc.h.
Public Static Functions
shape_channels()
| inline static |
Last-axis channel count for an HWC-style shape, or 0 if rank < 3.
Definition at line 120 of file Preproc.h.
shape_dim()
| inline static |
The documentation for this struct was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.