ReUseX
0.0.5
3D Point Cloud Processing for Building Reuse
Toggle main menu visibility
Loading...
Searching...
No Matches
describe.hpp
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2026 Povl Filip Sonne-Frederiksen
2
//
3
// SPDX-License-Identifier: GPL-3.0-or-later
4
5
#pragma once
6
7
// The `rux create attributes` pipeline stage (#373): for each MATERIAL passport
8
// in the project, resolve its linked instance(s), crop the best sensor view of
9
// their points, ask a vision-language model to describe the material, and store
10
// a free-text description + arbitrary key/value attributes in ProjectDB keyed
11
// by the material GUID (for MaterialPassport use).
12
13
#include <cstddef>
14
#include <filesystem>
15
#include <string>
16
17
namespace
reusex::vision
{
18
19
struct
IVlmClient
;
20
23
struct
DescribeConfig
{
26
std::string
api_url
=
"http://localhost:11434/v1"
;
28
std::string
model
=
"qwen2.5vl"
;
30
std::string
api_key
;
33
std::string
instances_cloud
=
"instances"
;
35
std::string
point_cloud
=
"cloud"
;
38
std::string
prompt
;
40
bool
skip_existing
=
false
;
42
int
crop_padding
= 8;
44
int
min_view_points
= 20;
46
std::size_t
max_points_per_frame
= 5000;
49
int
connect_timeout_s
= 10;
52
int
total_timeout_s
= 120;
53
};
54
59
std::string
default_describe_prompt
();
60
65
int
describe
(
const
std::filesystem::path &dbPath,
const
DescribeConfig
&config);
66
70
int
describe_with_client
(
const
std::filesystem::path &dbPath,
71
const
DescribeConfig
&config,
IVlmClient
&client);
72
73
}
// namespace reusex::vision
reusex::vision
Definition
annotate.hpp:12
reusex::vision::describe_with_client
int describe_with_client(const std::filesystem::path &dbPath, const DescribeConfig &config, IVlmClient &client)
Testable core: run the stage with an injected client (no network).
reusex::vision::describe
int describe(const std::filesystem::path &dbPath, const DescribeConfig &config)
Run the attribute stage against the project at dbPath, constructing the concrete OpenAI-compatible cl...
reusex::vision::default_describe_prompt
std::string default_describe_prompt()
The default instruction: asks for a JSON object with a free-text description and an arbitrary attribu...
reusex::vision::DescribeConfig
Options for the VLM attribute-extraction stage.
Definition
describe.hpp:23
reusex::vision::DescribeConfig::instances_cloud
std::string instances_cloud
Name of the instance-label cloud used to resolve a material's points.
Definition
describe.hpp:33
reusex::vision::DescribeConfig::skip_existing
bool skip_existing
Skip materials that already have a stored annotation (resume runs).
Definition
describe.hpp:40
reusex::vision::DescribeConfig::min_view_points
int min_view_points
Minimum projected in-bounds points for a frame to be a usable view.
Definition
describe.hpp:44
reusex::vision::DescribeConfig::api_url
std::string api_url
OpenAI-compatible chat/completions base URL.
Definition
describe.hpp:26
reusex::vision::DescribeConfig::api_key
std::string api_key
Optional bearer token (cloud providers). Empty = no Authorization header.
Definition
describe.hpp:30
reusex::vision::DescribeConfig::max_points_per_frame
std::size_t max_points_per_frame
Max points to reproject per frame (subsample large instances for speed).
Definition
describe.hpp:46
reusex::vision::DescribeConfig::point_cloud
std::string point_cloud
Name of the XYZRGB cloud index-aligned with instances_cloud.
Definition
describe.hpp:35
reusex::vision::DescribeConfig::crop_padding
int crop_padding
Pixels of padding around the projected instance bbox before cropping.
Definition
describe.hpp:42
reusex::vision::DescribeConfig::model
std::string model
Model name the endpoint routes to.
Definition
describe.hpp:28
reusex::vision::DescribeConfig::total_timeout_s
int total_timeout_s
CURL total request timeout in seconds (covers connect + send + receive).
Definition
describe.hpp:52
reusex::vision::DescribeConfig::connect_timeout_s
int connect_timeout_s
CURL TCP connect timeout in seconds.
Definition
describe.hpp:49
reusex::vision::DescribeConfig::prompt
std::string prompt
Instruction sent alongside each crop.
Definition
describe.hpp:38
reusex::vision::IVlmClient
A model that, given an image crop and a text prompt, returns structured attributes.
Definition
IVlmClient.hpp:29
libs
reusex
include
vision
describe.hpp
Generated by
1.18.0