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 265 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 299 of file TensorCore.h.

299 bool has_axis_perm() const noexcept {
300 return !axis_perm.empty();
301 }

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

287 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 288 of file TensorCore.h.

288 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 289 of file TensorCore.h.

289 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 290 of file TensorCore.h.

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

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

292 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 295 of file TensorCore.h.

295 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 296 of file TensorCore.h.

296 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 293 of file TensorCore.h.

293 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 294 of file TensorCore.h.

294 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 281 of file TensorCore.h.

281 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 278 of file TensorCore.h.

278 std::string color_in;

color_out

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

Output color format token after color-convert.

Definition at line 279 of file TensorCore.h.

279 std::string color_out;

normalize

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

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

Definition at line 283 of file TensorCore.h.

283 bool normalize = false;

original_height

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

Height of the source frame in pixels before preprocess.

Definition at line 267 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 266 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 275 of file TensorCore.h.

275 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 272 of file TensorCore.h.

272 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 273 of file TensorCore.h.

273 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 274 of file TensorCore.h.

274 int pad_top = 0;

quantize

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

True if an INT8/INT16 quantize step was applied.

Definition at line 284 of file TensorCore.h.

284 bool quantize = false;

resize_mode

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

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

Definition at line 277 of file TensorCore.h.

277 std::string resize_mode;

resized_height

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

Height after the resize step (before any padding).

Definition at line 269 of file TensorCore.h.

resized_width

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

Width after the resize step (before any padding).

Definition at line 268 of file TensorCore.h.

268 int resized_width = 0;

scaled_height

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

Height after scaling (resize × additional scale factor).

Definition at line 271 of file TensorCore.h.

271 int scaled_height = 0;

scaled_width

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

Width after scaling (resize × additional scale factor).

Definition at line 270 of file TensorCore.h.

270 int scaled_width = 0;

tessellate

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

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

Definition at line 285 of file TensorCore.h.

285 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.