|
ReUseX
0.0.5
3D Point Cloud Processing for Building Reuse
|
SAM3 segmentation model using ONNX Runtime for CPU/GPU inference. More...
#include <Sam3.hpp>


Public Member Functions | |
| ONNXSam3 (const std::filesystem::path &model_dir, bool use_cuda=false) | |
| Construct and load a SAM3 model from a directory. | |
| std::vector< IDataset::Pair > | forward (const std::span< IDataset::Pair > &input) override |
| Run SAM3 inference on a batch of images. | |
| Public Member Functions inherited from reusex::vision::IModel | |
| virtual | ~IModel ()=default |
Static Public Member Functions | |
| static std::unique_ptr< ONNXSam3 > | create (const std::filesystem::path &model_dir, bool use_cuda=false) |
| Factory method for creating an ONNXSam3 instance. | |
| Static Public Member Functions inherited from reusex::vision::IModel | |
| static std::unique_ptr< IModel > | create (const std::filesystem::path &model_path, bool use_gpu=false) |
SAM3 segmentation model using ONNX Runtime for CPU/GPU inference.
Loads three ONNX sub-models (vision encoder, text encoder, decoder) from a directory and implements the IModel interface for use with the backend-agnostic annotation pipeline.
Optionally uses CUDA execution provider when available, with automatic fallback to CPU.
|
explicit |
Construct and load a SAM3 model from a directory.
| model_dir | Directory containing vision-encoder.onnx, text-encoder.onnx, decoder.onnx, and tokenizer.json. |
| use_cuda | Whether to attempt CUDA execution provider. |
|
static |
Factory method for creating an ONNXSam3 instance.
| model_dir | Directory with ONNX model files. |
| use_cuda | Whether to use CUDA (defaults to false). |
|
overridevirtual |
Run SAM3 inference on a batch of images.
Each input Pair must contain an ONNXSam3Data with a raw image and text prompts. Output Pairs contain the same data type with the image field set to the label image (CV_32S, -1 for background).
| input | Span of (data, index) pairs from the dataset. |
Implements reusex::vision::IModel.