ReUseX  0.0.5
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
annotate.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2025 Povl Filip Sonne-Frederiksen
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#pragma once
7
8#include <reusex/vision/annotate.hpp>
9
10#include <CLI/CLI.hpp>
11#include <cstdint>
12#include <filesystem>
13#include <memory>
14#include <string>
15
16namespace fs = std::filesystem;
17
19
20 fs::path net_path = fs::current_path() / "yolov8x-seg.torchscript";
21
22 bool isCuda{false};
23
24 // Dataloader configuration
25 size_t batch_size = 16; // Batch size for inference (recommended: 8-64)
26 bool shuffle = false; // Shuffle dataset (rarely needed for inference)
27 size_t num_workers = 4; // Number of worker threads (recommended: 2-4)
29 8; // Batches to prefetch (recommended: 2-3x workers)
30 bool skip_annotated = false; // Skip already-annotated frames (resume mode)
31 float confidence = 0.5f; // Detection confidence threshold [0,1]
32 // Open-vocabulary concept prompts = the classes to detect. --prompts is a
33 // comma-separated list; --prompts-file is one concept per line (# comments
34 // allowed). Empty leaves the model's built-in default class list.
35 std::string prompts; // comma-separated concept list
36 std::string prompts_file; // path to a file with one concept per line
37 bool video = false; // Use stateful video-tracker path (SAM 3.1). Forces
38 // ordered single-threaded processing.
39
40 // Shuffle RNG seed. Fixed by default so shuffled runs are reproducible
41 // (docs/STANDARDS.md ยง6). --random-seed opts into entropy instead.
42 uint32_t seed = 42;
43 bool random_seed = false; // Seed from std::random_device (non-deterministic)
44
45 // Glass depth filter (batch path only; ignored in --video / SAM3.1 mode).
46 bool glass_filter = false; // Detect glass/mirror pixels and emit per-frame
47 // confidence maps consumed by 'rux create clouds'.
49};
50
51// Function declarations.
53 std::shared_ptr<RuxOptions> global_opt);
55 const RuxOptions &global_opt);
void setup_subcommand_create_annotate(CLI::App &app, std::shared_ptr< RuxOptions > global_opt)
int run_subcommand_annotate(SubcommandAnnotateOptions const &opt, const RuxOptions &global_opt)
Configuration for ML annotation inference and data loading.
Definition annotate.hpp:15
float glass_threshold
Per-class confidence threshold for glass detections.
Definition annotate.hpp:39