ReUseX
0.0.5
3D Point Cloud Processing for Building Reuse
Toggle main menu visibility
Loading...
Searching...
No Matches
IVlmClient.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
// Provider-agnostic interface for a vision-language model that describes an
8
// image crop (#373). The concrete OpenAiCompatibleVlmClient talks to any
9
// OpenAI-compatible chat/completions endpoint (local Ollama by default, or a
10
// cloud provider). The interface exists so the `describe()` stage can be driven
11
// by a fake client in tests without any network.
12
13
#include "reusex/vision/vlm_protocol.hpp"
14
15
#include <string>
16
17
// Forward-declared to keep OpenCV out of this public header (STANDARDS ยง2).
18
namespace
cv
{
19
class
Mat;
20
}
21
22
namespace
reusex::vision
{
23
29
struct
IVlmClient
{
30
virtual
~IVlmClient
() =
default
;
31
33
virtual
VlmResult
describe
(
const
cv::Mat &crop,
34
const
std::string &prompt) = 0;
35
};
36
37
}
// namespace reusex::vision
cv
Turn a 2D mask drawn on one sensor frame into a labelled 3D selection and a survey part (Segmentering...
Definition
mask_selection.hpp:25
reusex::vision
Definition
annotate.hpp:12
reusex::vision::IVlmClient
A model that, given an image crop and a text prompt, returns structured attributes.
Definition
IVlmClient.hpp:29
reusex::vision::IVlmClient::describe
virtual VlmResult describe(const cv::Mat &crop, const std::string &prompt)=0
Describe crop (a BGR CV_8UC3 image) given prompt.
reusex::vision::IVlmClient::~IVlmClient
virtual ~IVlmClient()=default
reusex::vision::VlmResult
The description + arbitrary attributes a vision-language model returned for one crop.
Definition
vlm_protocol.hpp:31
libs
reusex
include
vision
IVlmClient.hpp
Generated by
1.18.0