3#ifndef LIGHTLY_EDGE_RS_BINDINGS_H
4#define LIGHTLY_EDGE_RS_BINDINGS_H
17namespace lightly_edge_rs {
19constexpr static const uint16_t SUCCESS_CODE = 0;
21constexpr static const int32_t NO_SUBCLASS = -1;
28 const char *error_message;
66struct SelectionStrategiesSelectInfo {
68 size_t diversity_buffer_size;
69 size_t *out_diversity_size;
71 size_t similarity_buffer_size;
72 size_t *out_similarity_size;
74 size_t adaptive_diversity_buffer_size;
75 size_t *out_adaptive_diversity_size;
77 size_t detection_buffer_size;
78 size_t *out_detection_size;
92void destroy(LightlyEdge * lightly_edge);
95CStatus embed_frame(
const LightlyEdge * lightly_edge,
96 uint8_t *rgb_image_data,
97 size_t rgb_image_data_size,
100 float *out_embedding_buffer);
103CStatus insert_into_embedding_database(LightlyEdge * lightly_edge,
104 const float *embedding_buffer,
105 size_t embedding_buffer_size);
108CStatus register_diversity_strategy(LightlyEdge * lightly_edge,
float min_distance);
111size_t num_diversity_strategies(
const LightlyEdge * lightly_edge);
114size_t num_patches(
const LightlyEdge * lightly_edge);
117CStatus register_similarity_strategy(LightlyEdge * lightly_edge,
118 const float *query_embedding_buffer,
119 size_t query_embedding_buffer_size,
123size_t num_similarity_strategies(
const LightlyEdge * lightly_edge);
126CStatus register_detection_strategy(LightlyEdge * lightly_edge,
132size_t num_detection_strategies(
const LightlyEdge * lightly_edge);
135CStatus register_adaptive_diversity_strategy(LightlyEdge * lightly_edge,
137 size_t max_buffer_length);
140size_t num_adaptive_diversity_strategies(
const LightlyEdge * lightly_edge);
143void clear_strategies(LightlyEdge * lightly_edge);
146CStatus should_select(LightlyEdge * lightly_edge,
147 const float *embedding_buffer,
148 size_t embedding_buffer_size,
150 size_t detection_buffer_size,
151 SelectionStrategiesSelectInfo *out_info);
154CStatus should_select_with_patches(LightlyEdge * lightly_edge,
155 const float *
const *embeddings_buffer,
156 size_t num_embeddings,
157 size_t embedding_dim,
159 size_t detection_buffer_size,
160 SelectionStrategiesSelectInfo *out_info);
163size_t embedding_dimension(
const LightlyEdge * lightly_edge);
166CStatus detect(
const LightlyEdge * lightly_edge,
167 uint8_t *rgb_image_data,
168 size_t rgb_image_data_size,
172 size_t *out_detections_len);
175CStatus detection_class_labels(
const LightlyEdge * lightly_edge,
176 const char **out_classes_buffer,
177 size_t *out_classes_len);
180CStatus detection_subclass_labels(
const LightlyEdge * lightly_edge,
182 const char **out_subclasses_buffer,
183 size_t *out_subclasses_len);
186CStatus set_embedding_patches(LightlyEdge * lightly_edge,
191void reset_embedding_patches(LightlyEdge * lightly_edge);
194CStatus embed_patches(
const LightlyEdge * lightly_edge,
195 uint8_t *rgb_image_data,
196 size_t rgb_image_data_size,
199 float **out_embedding_buffer);
202CStatus create_status_impl(uint16_t code,
const char *error_message);
205void free_status_message(CStatus * status);
Holds information whether a frame should be selected or not.
Definition lightly_edge_rs_bindings.h:54
Definition lightly_edge_rs_bindings.h:59
Holds information whether a frame should be selected or not.
Definition lightly_edge_rs_bindings.h:42
Definition lightly_edge_rs_bindings.h:31
A patch specified by relative coordinates.
Definition lightly_edge_rs_bindings.h:82
Holds information whether a frame should be selected or not.
Definition lightly_edge_rs_bindings.h:48