PreprocessRuntimeMeta Struct
Per-buffer preprocessing context — the inverse-transform breadcrumb trail. More...
Declaration
Included Headers
Public Member Functions Index
| bool | has_axis_perm () const noexcept |
|
True iff axis_perm is non-empty (a layout permutation was recorded). More... | |
Public Member Attributes Index
| int | original_width = 0 |
|
Width of the source frame in pixels before preprocess. More... | |
| int | original_height = 0 |
|
Height of the source frame in pixels before preprocess. More... | |
| int | resized_width = 0 |
|
Width after the resize step (before any padding). More... | |
| int | resized_height = 0 |
|
Height after the resize step (before any padding). More... | |
| int | scaled_width = 0 |
|
Width after scaling (resize × additional scale factor). More... | |
| int | scaled_height = 0 |
|
Height after scaling (resize × additional scale factor). More... | |
| int | pad_left = 0 |
|
Letterbox padding added on the left edge, in pixels. More... | |
| int | pad_right = 0 |
|
Letterbox padding added on the right edge, in pixels. More... | |
| int | pad_top = 0 |
|
Letterbox padding added on the top edge, in pixels. More... | |
| int | pad_bottom = 0 |
|
Letterbox padding added on the bottom edge, in pixels. More... | |
| std::string | resize_mode |
|
Resize policy token (e.g., "letterbox", "stretch"). More... | |
| std::string | color_in |
| std::string | color_out |
| std::vector< int > | axis_perm |
|
Axis permutation applied by preprocess layout_convert, if any. More... | |
| bool | normalize = false |
|
True if a normalize step (mean/scale) was applied. More... | |
| bool | quantize = false |
|
True if an INT8/INT16 quantize step was applied. More... | |
| bool | tessellate = false |
|
True if a tessellate step (tile-block layout) was applied. More... | |
| double | affine_m00 = 1.0 |
|
2×3 affine matrix element (row 0, col 0): x scale. More... | |
| double | affine_m01 = 0.0 |
|
2×3 affine matrix element (row 0, col 1): x shear. More... | |
| double | affine_m02 = 0.0 |
|
2×3 affine matrix element (row 0, col 2): x translation. More... | |
| double | affine_m10 = 0.0 |
|
2×3 affine matrix element (row 1, col 0): y shear. More... | |
| double | affine_m11 = 1.0 |
|
2×3 affine matrix element (row 1, col 1): y scale. More... | |
| double | affine_m12 = 0.0 |
|
2×3 affine matrix element (row 1, col 2): y translation. More... | |
| double | affine_scale_x = 1.0 |
|
Scalar X scale factor from original to model coordinates. More... | |
| double | affine_scale_y = 1.0 |
|
Scalar Y scale factor from original to model coordinates. More... | |
| double | affine_offset_x = 0.0 |
|
Scalar X offset (typically pad_left) in model coordinates. More... | |
| double | affine_offset_y = 0.0 |
|
Scalar Y offset (typically pad_top) in model coordinates. More... | |
Description
Per-buffer preprocessing context — the inverse-transform breadcrumb trail.
When the framework's preprocess stage resizes/letterboxes/normalizes an input image, it records what it did into this struct and attaches it as Tensor::semantic.preprocess. The downstream BoxDecode (and any user code) uses these fields to map model-space coordinates (e.g., detected boxes in 640×640) back to original image coordinates.
The affine_* fields encode the full 2×3 affine transform from original image coordinates to model input coordinates; invert this matrix to map detections back to the source frame.
Definition at line 265 of file TensorCore.h.
Public Member Functions
has_axis_perm()
| inline noexcept |
True iff axis_perm is non-empty (a layout permutation was recorded).
Definition at line 299 of file TensorCore.h.
Public Member Attributes
affine_m00
|
2×3 affine matrix element (row 0, col 0): x scale.
Definition at line 287 of file TensorCore.h.
affine_m01
|
2×3 affine matrix element (row 0, col 1): x shear.
Definition at line 288 of file TensorCore.h.
affine_m02
|
2×3 affine matrix element (row 0, col 2): x translation.
Definition at line 289 of file TensorCore.h.
affine_m10
|
2×3 affine matrix element (row 1, col 0): y shear.
Definition at line 290 of file TensorCore.h.
affine_m11
|
2×3 affine matrix element (row 1, col 1): y scale.
Definition at line 291 of file TensorCore.h.
affine_m12
|
2×3 affine matrix element (row 1, col 2): y translation.
Definition at line 292 of file TensorCore.h.
affine_offset_x
|
Scalar X offset (typically pad_left) in model coordinates.
Definition at line 295 of file TensorCore.h.
affine_offset_y
|
Scalar Y offset (typically pad_top) in model coordinates.
Definition at line 296 of file TensorCore.h.
affine_scale_x
|
Scalar X scale factor from original to model coordinates.
Definition at line 293 of file TensorCore.h.
affine_scale_y
|
Scalar Y scale factor from original to model coordinates.
Definition at line 294 of file TensorCore.h.
axis_perm
|
Axis permutation applied by preprocess layout_convert, if any.
Definition at line 281 of file TensorCore.h.
color_in
|
Input color format token (e.g., "bgr", "nv12").
Definition at line 278 of file TensorCore.h.
color_out
|
Output color format token after color-convert.
Definition at line 279 of file TensorCore.h.
normalize
|
True if a normalize step (mean/scale) was applied.
Definition at line 283 of file TensorCore.h.
original_height
|
Height of the source frame in pixels before preprocess.
Definition at line 267 of file TensorCore.h.
original_width
|
Width of the source frame in pixels before preprocess.
Definition at line 266 of file TensorCore.h.
pad_bottom
|
Letterbox padding added on the bottom edge, in pixels.
Definition at line 275 of file TensorCore.h.
pad_left
|
Letterbox padding added on the left edge, in pixels.
Definition at line 272 of file TensorCore.h.
pad_right
|
Letterbox padding added on the right edge, in pixels.
Definition at line 273 of file TensorCore.h.
pad_top
|
Letterbox padding added on the top edge, in pixels.
Definition at line 274 of file TensorCore.h.
quantize
|
True if an INT8/INT16 quantize step was applied.
Definition at line 284 of file TensorCore.h.
resize_mode
|
Resize policy token (e.g., "letterbox", "stretch").
Definition at line 277 of file TensorCore.h.
resized_height
|
Height after the resize step (before any padding).
Definition at line 269 of file TensorCore.h.
resized_width
|
Width after the resize step (before any padding).
Definition at line 268 of file TensorCore.h.
scaled_height
|
Height after scaling (resize × additional scale factor).
Definition at line 271 of file TensorCore.h.
scaled_width
|
Width after scaling (resize × additional scale factor).
Definition at line 270 of file TensorCore.h.
tessellate
|
True if a tessellate step (tile-block layout) was applied.
Definition at line 285 of file TensorCore.h.
The documentation for this struct was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.