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 <CLI/CLI.hpp>
9#include <cstdint>
10#include <filesystem>
11#include <memory>
12#include <string>
13
14namespace fs = std::filesystem;
15
17
18 fs::path net_path = fs::current_path() / "yolov8x-seg.torchscript";
19
20 bool isCuda{false};
21
22 // Dataloader configuration
23 size_t batch_size = 16; // Batch size for inference (recommended: 8-64)
24 bool shuffle = false; // Shuffle dataset (rarely needed for inference)
25 size_t num_workers = 4; // Number of worker threads (recommended: 2-4)
27 8; // Batches to prefetch (recommended: 2-3x workers)
28 bool skip_annotated = false; // Skip already-annotated frames (resume mode)
29 float confidence = 0.5f; // Detection confidence threshold [0,1]
30 // Open-vocabulary concept prompts = the classes to detect. --prompts is a
31 // comma-separated list; --prompts-file is one concept per line (# comments
32 // allowed). Empty leaves the model's built-in default class list.
33 std::string prompts; // comma-separated concept list
34 std::string prompts_file; // path to a file with one concept per line
35 bool video = false; // Use stateful video-tracker path (SAM 3.1). Forces
36 // ordered single-threaded processing.
37
38 // Shuffle RNG seed. Fixed by default so shuffled runs are reproducible
39 // (docs/STANDARDS.md ยง6). --random-seed opts into entropy instead.
40 uint32_t seed = 42;
41 bool random_seed = false; // Seed from std::random_device (non-deterministic)
42};
43
44// Function declarations.
46 std::shared_ptr<RuxOptions> global_opt);
48 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)