ReUseX  0.0.5
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
reusex::vision::onnx::ONNXSam3Dataset Class Reference

Dataset for ONNX Runtime SAM3 model inference. More...

#include <Sam3Dataset.hpp>

Inheritance diagram for reusex::vision::onnx::ONNXSam3Dataset:
Collaboration diagram for reusex::vision::onnx::ONNXSam3Dataset:

Public Member Functions

IDataset::Pair get (const std::size_t index) const override
 Load an image at the given index into an ONNXSam3Data.
bool save (const std::span< Pair > &data) override
 Save label images from completed inference back to the database.
 IDataset (std::shared_ptr< ProjectDB > database)
 IDataset (std::filesystem::path dbPath)
Public Member Functions inherited from reusex::vision::IDataset
 IDataset (std::shared_ptr< ProjectDB > database)
 IDataset (std::filesystem::path dbPath)
virtual ~IDataset ()=default
size_t size () const

Additional Inherited Members

Public Types inherited from reusex::vision::IDataset
using Pair = std::pair<std::unique_ptr<IData>, size_t>
Protected Member Functions inherited from reusex::vision::IDataset
cv::Mat image (const std::size_t index) const
bool save_image (const std::size_t index, const cv::Mat &image)
std::shared_ptr< ProjectDBdatabase () const

Detailed Description

Dataset for ONNX Runtime SAM3 model inference.

Loads raw images from the ProjectDB and wraps them in ONNXSam3Data. Saves label images back to the database after inference.

Definition at line 15 of file Sam3Dataset.hpp.

Member Function Documentation

◆ get()

IDataset::Pair reusex::vision::onnx::ONNXSam3Dataset::get ( const std::size_t index) const
overridevirtual

Load an image at the given index into an ONNXSam3Data.

Parameters
indexDataset index (0 to size()-1).
Returns
Pair of (Sam3Data with raw image, index).

Implements reusex::vision::IDataset.

◆ IDataset() [1/2]

reusex::vision::IDataset::IDataset ( std::filesystem::path dbPath)
explicit

◆ IDataset() [2/2]

reusex::vision::IDataset::IDataset ( std::shared_ptr< ProjectDB > database)
explicit

◆ save()

bool reusex::vision::onnx::ONNXSam3Dataset::save ( const std::span< Pair > & data)
overridevirtual

Save label images from completed inference back to the database.

Parameters
dataSpan of pairs containing ONNXSam3Data with label images.
Returns
true if all saves succeeded.

Implements reusex::vision::IDataset.


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