- Add OpenVocab engine: YOLO-World ONNX detection with runtime vocabulary via CLIP text embeddings (two-input model support) - Add header-only C++ CLIP BPE tokenizer (no external deps) - Add detect(cv::Mat) overload to OpenVocab for camera-free testing - Add standalone test binary (test_open_vocab) using test/assets images - Add export scripts for YOLO-World and CLIP text encoder (uv/PEP 723) - Add installation scripts for Linux x64, ARM (Jetson), and Windows - Update CMakeLists to use find_package(onnxruntime) instead of FetchContent - Update README and AGENTS with env vars, setup workflow, and test usage
35 lines
813 B
C++
35 lines
813 B
C++
#pragma once
|
|
|
|
#include "engines/engine.h"
|
|
|
|
#include <string>
|
|
|
|
namespace engines {
|
|
|
|
struct DetectionConfig {
|
|
std::string model = "MULTI_CLASS_BOX_MEDIUM";
|
|
float confidence_threshold = 40.0f;
|
|
bool tracking = false;
|
|
|
|
static DetectionConfig from_env();
|
|
};
|
|
|
|
class ZedNative : public Engine {
|
|
public:
|
|
explicit ZedNative(const DetectionConfig& config);
|
|
|
|
void enable(sl::Camera& camera) override;
|
|
void detect(sl::Camera& camera) override;
|
|
const std::vector<DetectedObject>& objects() const override;
|
|
std::string label_names() const override;
|
|
|
|
private:
|
|
DetectionConfig config_;
|
|
sl::ObjectDetectionParameters det_params_;
|
|
sl::ObjectDetectionRuntimeParameters det_rt_params_;
|
|
sl::Objects raw_objects_;
|
|
std::vector<DetectedObject> detected_;
|
|
};
|
|
|
|
} // namespace engines
|