Skip to main content

PreprocessRuntimeMeta Struct

Per-buffer preprocessing context — the inverse-transform breadcrumb trail. More...

Declaration

struct simaai::neat::PreprocessRuntimeMeta { ... }

Included Headers

#include <TensorCore.h>

Public Member Functions Index

boolhas_axis_perm () const noexcept

True iff axis_perm is non-empty (a layout permutation was recorded). More...

Public Member Attributes Index

intoriginal_width = 0

Width of the source frame in pixels before preprocess. More...

intoriginal_height = 0

Height of the source frame in pixels before preprocess. More...

intresized_width = 0

Width after the resize step (before any padding). More...

intresized_height = 0

Height after the resize step (before any padding). More...

intscaled_width = 0

Width after scaling (resize × additional scale factor). More...

intscaled_height = 0

Height after scaling (resize × additional scale factor). More...

intpad_left = 0

Letterbox padding added on the left edge, in pixels. More...

intpad_right = 0

Letterbox padding added on the right edge, in pixels. More...

intpad_top = 0

Letterbox padding added on the top edge, in pixels. More...

intpad_bottom = 0

Letterbox padding added on the bottom edge, in pixels. More...

std::stringresize_mode

Resize policy token (e.g., "letterbox", "stretch"). More...

std::stringcolor_in

Input color format token (e.g., "bgr", "nv12"). More...

std::stringcolor_out

Output color format token after color-convert. More...

std::vector< int >axis_perm

Axis permutation applied by preprocess layout_convert, if any. More...

boolnormalize = false

True if a normalize step (mean/scale) was applied. More...

boolquantize = false

True if an INT8/INT16 quantize step was applied. More...

booltessellate = false

True if a tessellate step (tile-block layout) was applied. More...

doubleaffine_m00 = 1.0

2×3 affine matrix element (row 0, col 0): x scale. More...

doubleaffine_m01 = 0.0

2×3 affine matrix element (row 0, col 1): x shear. More...

doubleaffine_m02 = 0.0

2×3 affine matrix element (row 0, col 2): x translation. More...

doubleaffine_m10 = 0.0

2×3 affine matrix element (row 1, col 0): y shear. More...

doubleaffine_m11 = 1.0

2×3 affine matrix element (row 1, col 1): y scale. More...

doubleaffine_m12 = 0.0

2×3 affine matrix element (row 1, col 2): y translation. More...

doubleaffine_scale_x = 1.0

Scalar X scale factor from original to model coordinates. More...

doubleaffine_scale_y = 1.0

Scalar Y scale factor from original to model coordinates. More...

doubleaffine_offset_x = 0.0

Scalar X offset (typically pad_left) in model coordinates. More...

doubleaffine_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 291 of file TensorCore.h.

Public Member Functions

has_axis_perm()

bool simaai::neat::PreprocessRuntimeMeta::has_axis_perm ()
inline noexcept

True iff axis_perm is non-empty (a layout permutation was recorded).

Definition at line 325 of file TensorCore.h.

325 bool has_axis_perm() const noexcept {
326 return !axis_perm.empty();
327 }

Public Member Attributes

affine_m00

double simaai::neat::PreprocessRuntimeMeta::affine_m00 = 1.0

2×3 affine matrix element (row 0, col 0): x scale.

Definition at line 313 of file TensorCore.h.

313 double affine_m00 = 1.0;

affine_m01

double simaai::neat::PreprocessRuntimeMeta::affine_m01 = 0.0

2×3 affine matrix element (row 0, col 1): x shear.

Definition at line 314 of file TensorCore.h.

314 double affine_m01 = 0.0;

affine_m02

double simaai::neat::PreprocessRuntimeMeta::affine_m02 = 0.0

2×3 affine matrix element (row 0, col 2): x translation.

Definition at line 315 of file TensorCore.h.

315 double affine_m02 = 0.0;

affine_m10

double simaai::neat::PreprocessRuntimeMeta::affine_m10 = 0.0

2×3 affine matrix element (row 1, col 0): y shear.

Definition at line 316 of file TensorCore.h.

316 double affine_m10 = 0.0;

affine_m11

double simaai::neat::PreprocessRuntimeMeta::affine_m11 = 1.0

2×3 affine matrix element (row 1, col 1): y scale.

Definition at line 317 of file TensorCore.h.

317 double affine_m11 = 1.0;

affine_m12

double simaai::neat::PreprocessRuntimeMeta::affine_m12 = 0.0

2×3 affine matrix element (row 1, col 2): y translation.

Definition at line 318 of file TensorCore.h.

318 double affine_m12 = 0.0;

affine_offset_x

double simaai::neat::PreprocessRuntimeMeta::affine_offset_x = 0.0

Scalar X offset (typically pad_left) in model coordinates.

Definition at line 321 of file TensorCore.h.

321 double affine_offset_x = 0.0;

affine_offset_y

double simaai::neat::PreprocessRuntimeMeta::affine_offset_y = 0.0

Scalar Y offset (typically pad_top) in model coordinates.

Definition at line 322 of file TensorCore.h.

322 double affine_offset_y = 0.0;

affine_scale_x

double simaai::neat::PreprocessRuntimeMeta::affine_scale_x = 1.0

Scalar X scale factor from original to model coordinates.

Definition at line 319 of file TensorCore.h.

319 double affine_scale_x = 1.0;

affine_scale_y

double simaai::neat::PreprocessRuntimeMeta::affine_scale_y = 1.0

Scalar Y scale factor from original to model coordinates.

Definition at line 320 of file TensorCore.h.

320 double affine_scale_y = 1.0;

axis_perm

std::vector<int> simaai::neat::PreprocessRuntimeMeta::axis_perm

Axis permutation applied by preprocess layout_convert, if any.

Definition at line 307 of file TensorCore.h.

307 std::vector<int> axis_perm;

color_in

std::string simaai::neat::PreprocessRuntimeMeta::color_in

Input color format token (e.g., "bgr", "nv12").

Definition at line 304 of file TensorCore.h.

304 std::string color_in;

color_out

std::string simaai::neat::PreprocessRuntimeMeta::color_out

Output color format token after color-convert.

Definition at line 305 of file TensorCore.h.

305 std::string color_out;

normalize

bool simaai::neat::PreprocessRuntimeMeta::normalize = false

True if a normalize step (mean/scale) was applied.

Definition at line 309 of file TensorCore.h.

309 bool normalize = false;

original_height

int simaai::neat::PreprocessRuntimeMeta::original_height = 0

Height of the source frame in pixels before preprocess.

Definition at line 293 of file TensorCore.h.

original_width

int simaai::neat::PreprocessRuntimeMeta::original_width = 0

Width of the source frame in pixels before preprocess.

Definition at line 292 of file TensorCore.h.

pad_bottom

int simaai::neat::PreprocessRuntimeMeta::pad_bottom = 0

Letterbox padding added on the bottom edge, in pixels.

Definition at line 301 of file TensorCore.h.

301 int pad_bottom = 0;

pad_left

int simaai::neat::PreprocessRuntimeMeta::pad_left = 0

Letterbox padding added on the left edge, in pixels.

Definition at line 298 of file TensorCore.h.

298 int pad_left = 0;

pad_right

int simaai::neat::PreprocessRuntimeMeta::pad_right = 0

Letterbox padding added on the right edge, in pixels.

Definition at line 299 of file TensorCore.h.

299 int pad_right = 0;

pad_top

int simaai::neat::PreprocessRuntimeMeta::pad_top = 0

Letterbox padding added on the top edge, in pixels.

Definition at line 300 of file TensorCore.h.

300 int pad_top = 0;

quantize

bool simaai::neat::PreprocessRuntimeMeta::quantize = false

True if an INT8/INT16 quantize step was applied.

Definition at line 310 of file TensorCore.h.

310 bool quantize = false;

resize_mode

std::string simaai::neat::PreprocessRuntimeMeta::resize_mode

Resize policy token (e.g., "letterbox", "stretch").

Definition at line 303 of file TensorCore.h.

303 std::string resize_mode;

resized_height

int simaai::neat::PreprocessRuntimeMeta::resized_height = 0

Height after the resize step (before any padding).

Definition at line 295 of file TensorCore.h.

resized_width

int simaai::neat::PreprocessRuntimeMeta::resized_width = 0

Width after the resize step (before any padding).

Definition at line 294 of file TensorCore.h.

294 int resized_width = 0;

scaled_height

int simaai::neat::PreprocessRuntimeMeta::scaled_height = 0

Height after scaling (resize × additional scale factor).

Definition at line 297 of file TensorCore.h.

297 int scaled_height = 0;

scaled_width

int simaai::neat::PreprocessRuntimeMeta::scaled_width = 0

Width after scaling (resize × additional scale factor).

Definition at line 296 of file TensorCore.h.

296 int scaled_width = 0;

tessellate

bool simaai::neat::PreprocessRuntimeMeta::tessellate = false

True if a tessellate step (tile-block layout) was applied.

Definition at line 311 of file TensorCore.h.

311 bool tessellate = false;

The documentation for this struct was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.