ReUseX  0.0.5
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
reusex::vision::tensor_rt Namespace Reference

Namespaces

namespace  affine
namespace  cpm
namespace  norm_image
namespace  nv
namespace  tensor
namespace  TensorRT

Classes

class  AutoDevice
struct  EngineBuildRequest
 One ONNX → TensorRT engine build job. More...
class  EngineProfileError
 A build that failed because the requested optimization profile does not fit the network's shapes (an export that bakes a dimension the profile leaves dynamic), as opposed to a resource or I/O failure. More...
struct  Sam3Input
struct  Sam3PromptUnit
class  TensorRTBackend
struct  TensorRTData
class  TensorRTDataset
class  TensorRTSam3
class  TensorRTSam3p1

Typedefs

using BoxPrompt = std::pair<std::string, std::array<float, 4>>

Functions

template<typename... Args>
void Assertf (bool cond, const char *fmt, Args &&...args)
constexpr void Asserts (bool cond, const char *s)
constexpr void Assert (bool cond)
std::filesystem::path build_engine (const EngineBuildRequest &req)
 Build a serialized TensorRT engine from an ONNX file using nvonnxparser + IBuilder, applying req.profile (precision, workspace, optimization profile).
void warp_affine_bilinear_and_normalize_plane (uint8_t *src, int src_line_size, int src_width, int src_height, float *dst, int dst_width, int dst_height, float *matrix_2_3, uint8_t const_value, const norm_image::Norm &norm, cudaStream_t stream)
void warp_affine_bilinear_single_channel_plane (float *src, int src_line_size, int src_width, int src_height, float *dst, int dst_width, int dst_height, float *matrix_2_3, float const_value, cudaStream_t stream)
void warp_affine_bilinear_single_channel_mask_plane (float *src, int src_line_size, int src_width, int src_height, uint8_t *dst, int dst_width, int dst_height, float *matrix_2_3, uint8_t const_value, cudaStream_t stream)
void sam3_postprocess_plane (const float *pred_masks_gpu, const float *pred_boxes_gpu, const float *pred_logits_gpu, const float *presence_logits_gpu, float *filtered_boxes_gpu, int *filtered_indices_gpu, float *filtered_scores_gpu, int *filtered_count_gpu, int num_queries, int mask_height, int mask_width, int original_image_width, int original_image_height, float confidence_threshold, cudaStream_t stream)
void chw_to_hwc (const float *src, float *dst, int c, int h, int w, void *stream)
double chw_to_hwc_device_roundtrip (const float *h_src, float *h_dst, int c, int h, int w, int iters=1)

Typedef Documentation

◆ BoxPrompt

using reusex::vision::tensor_rt::BoxPrompt = std::pair<std::string, std::array<float, 4>>

Definition at line 16 of file Sam3Type.hpp.

Function Documentation

◆ Assert()

void reusex::vision::tensor_rt::Assert ( bool cond)
constexpr

Definition at line 118 of file check.hpp.

References Assert(), and reusex::error().

Referenced by Assert().

◆ Assertf()

template<typename... Args>
void reusex::vision::tensor_rt::Assertf ( bool cond,
const char * fmt,
Args &&... args )
inline

Definition at line 100 of file check.hpp.

References Assertf(), and reusex::error().

Referenced by Assertf().

◆ Asserts()

void reusex::vision::tensor_rt::Asserts ( bool cond,
const char * s )
constexpr

Definition at line 110 of file check.hpp.

References Asserts(), and reusex::error().

Referenced by Asserts().

◆ build_engine()

std::filesystem::path reusex::vision::tensor_rt::build_engine ( const EngineBuildRequest & req)

Build a serialized TensorRT engine from an ONNX file using nvonnxparser + IBuilder, applying req.profile (precision, workspace, optimization profile).

This is the native, self-contained equivalent of the Python trtexec driver — it lets the C++ side build the GPU-specific engines on first use instead of shipping prebuilt (non-portable) .engine files.

The parent directory of engine_path is created if needed. Throws EngineProfileError when the profile cannot apply to the network's shapes, std::runtime_error on any other parse/build/IO failure. Returns the engine path on success.

References build_engine().

Referenced by build_engine().

◆ chw_to_hwc()

void reusex::vision::tensor_rt::chw_to_hwc ( const float * src,
float * dst,
int c,
int h,
int w,
void * stream )

References chw_to_hwc().

Referenced by chw_to_hwc().

◆ chw_to_hwc_device_roundtrip()

double reusex::vision::tensor_rt::chw_to_hwc_device_roundtrip ( const float * h_src,
float * h_dst,
int c,
int h,
int w,
int iters = 1 )

◆ sam3_postprocess_plane()

void reusex::vision::tensor_rt::sam3_postprocess_plane ( const float * pred_masks_gpu,
const float * pred_boxes_gpu,
const float * pred_logits_gpu,
const float * presence_logits_gpu,
float * filtered_boxes_gpu,
int * filtered_indices_gpu,
float * filtered_scores_gpu,
int * filtered_count_gpu,
int num_queries,
int mask_height,
int mask_width,
int original_image_width,
int original_image_height,
float confidence_threshold,
cudaStream_t stream )

◆ warp_affine_bilinear_and_normalize_plane()

void reusex::vision::tensor_rt::warp_affine_bilinear_and_normalize_plane ( uint8_t * src,
int src_line_size,
int src_width,
int src_height,
float * dst,
int dst_width,
int dst_height,
float * matrix_2_3,
uint8_t const_value,
const norm_image::Norm & norm,
cudaStream_t stream )

◆ warp_affine_bilinear_single_channel_mask_plane()

void reusex::vision::tensor_rt::warp_affine_bilinear_single_channel_mask_plane ( float * src,
int src_line_size,
int src_width,
int src_height,
uint8_t * dst,
int dst_width,
int dst_height,
float * matrix_2_3,
uint8_t const_value,
cudaStream_t stream )

◆ warp_affine_bilinear_single_channel_plane()

void reusex::vision::tensor_rt::warp_affine_bilinear_single_channel_plane ( float * src,
int src_line_size,
int src_width,
int src_height,
float * dst,
int dst_width,
int dst_height,
float * matrix_2_3,
float const_value,
cudaStream_t stream )