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

Namespaces

namespace  common
namespace  libtorch
namespace  onnx
namespace  osd
namespace  tensor_rt

Classes

struct  AnnotationConfig
 Configuration for ML annotation inference and data loading. More...
class  BackendFactory
class  Dataloader
struct  IData
class  IDataset
class  IMLBackend
class  IModel

Enumerations

enum class  Backend {
  opencv , tensor_rt , libtorch , dnn ,
  onnx_runtime , openvino , unknown
}
enum class  Model { yolo , sam3 }

Functions

auto annotate (const std::filesystem::path &dbPath, const std::filesystem::path &modelPath, const AnnotationConfig &config=AnnotationConfig{}) -> int
 Run semantic annotation on sensor frames using ML models.
torch::Tensor xyxy_to_xywh (const torch::Tensor &x)
 Convert bounding boxes from (x1,y1,x2,y2) to (cx,cy,w,h) format.
torch::Tensor xywh_to_xyxy (const torch::Tensor &x)
 Convert bounding boxes from (cx,cy,w,h) to (x1,y1,x2,y2) format.
torch::Tensor nms (const torch::Tensor &bboxes, const torch::Tensor &scores, float iou_threshold=0.45)
 Non-maximum suppression on bounding boxes.
torch::Tensor non_max_suppression (torch::Tensor predictions, float confThreshold=0.25, float iouThreshold=0.45, int maxDetections=300)
 YOLO-style non-maximum suppression with class-aware filtering.
auto project (ProjectDB &db, CloudConstPtr cloud) -> CloudLPtr
 Project the labels stored in the database on tho the assebled point cloud.
float generate_scale (cv::Mat &image, const cv::Size &target_size, bool scale_up=false)
float letterbox (cv::Mat &input_image, cv::Mat &output_image, const cv::Size &target_size)
float cropbox (cv::Mat &input_image, cv::Mat &output_image, const cv::Size &target_size)

Variables

std::vector< std::string > Yolov8_className
 YOLO v8 class names for object detection.

Enumeration Type Documentation

◆ Backend

enum class reusex::vision::Backend
strong
Enumerator
opencv 
tensor_rt 
libtorch 
dnn 
onnx_runtime 
openvino 
unknown 

Definition at line 28 of file BackendFactory.hpp.

◆ Model

enum class reusex::vision::Model
strong
Enumerator
yolo 
sam3 

Definition at line 9 of file IMLBackend.hpp.

Function Documentation

◆ annotate()

auto reusex::vision::annotate ( const std::filesystem::path & dbPath,
const std::filesystem::path & modelPath,
const AnnotationConfig & config = AnnotationConfig{} ) -> int

Run semantic annotation on sensor frames using ML models.

Parameters
dbPathPath to project database containing sensor frames
modelPathPath to ML model (.pt, .engine, .onnx)
configConfiguration for inference and data loading
Returns
0 on success, error code on failure

◆ cropbox()

float reusex::vision::cropbox ( cv::Mat & input_image,
cv::Mat & output_image,
const cv::Size & target_size )

◆ generate_scale()

float reusex::vision::generate_scale ( cv::Mat & image,
const cv::Size & target_size,
bool scale_up = false )

◆ letterbox()

float reusex::vision::letterbox ( cv::Mat & input_image,
cv::Mat & output_image,
const cv::Size & target_size )

◆ nms()

torch::Tensor reusex::vision::nms ( const torch::Tensor & bboxes,
const torch::Tensor & scores,
float iou_threshold = 0.45 )

Non-maximum suppression on bounding boxes.

Parameters
bboxesBounding boxes tensor [N, 4] in xyxy format.
scoresConfidence scores tensor [N].
iou_thresholdIoU threshold for suppression.
Returns
Indices of kept boxes.

◆ non_max_suppression()

torch::Tensor reusex::vision::non_max_suppression ( torch::Tensor predictions,
float confThreshold = 0.25,
float iouThreshold = 0.45,
int maxDetections = 300 )

YOLO-style non-maximum suppression with class-aware filtering.

Parameters
predictionsRaw model output [batch_size, 116, 8400].
confThresholdConfidence threshold for filtering.
iouThresholdIoU threshold for NMS.
maxDetectionsMaximum detections to keep per image.
Returns
Filtered detections [batch_size, maxDetections, 6+32].

◆ project()

auto reusex::vision::project ( ProjectDB & db,
CloudConstPtr cloud ) -> CloudLPtr

Project the labels stored in the database on tho the assebled point cloud.

For each view in the database this constructs a croped point cloud, computes a z-buffer and the assigns the precomputed labels to the closses point in the point cloud.

◆ xywh_to_xyxy()

torch::Tensor reusex::vision::xywh_to_xyxy ( const torch::Tensor & x)

Convert bounding boxes from (cx,cy,w,h) to (x1,y1,x2,y2) format.

◆ xyxy_to_xywh()

torch::Tensor reusex::vision::xyxy_to_xywh ( const torch::Tensor & x)

Convert bounding boxes from (x1,y1,x2,y2) to (cx,cy,w,h) format.

Variable Documentation

◆ Yolov8_className

std::vector<std::string> reusex::vision::Yolov8_className
extern

YOLO v8 class names for object detection.

Contains the list of class names that can be detected by YOLO v8 model.