Files
dora-zed/CMakeLists.txt
T
cristhian aguilera fd6993e294 add open-vocab YOLO-World engine with CLIP text encoder
- 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
2026-03-28 10:41:11 -03:00

66 lines
1.7 KiB
CMake

cmake_minimum_required(VERSION 3.21)
project(dora_zed LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS "-fPIC")
include(DoraTargets.cmake)
set(ZED_DIR "/usr/local/zed" CACHE PATH "Path to the ZED SDK")
set(ZED_PATH ${ZED_DIR})
find_package(CUDAToolkit REQUIRED)
find_package(zed REQUIRED)
find_package(OpenCV REQUIRED)
find_package(onnxruntime REQUIRED)
set(ONNXRUNTIME_INCLUDE_DIRS "") # propagated via imported target
set(ONNXRUNTIME_LIBRARIES onnxruntime::onnxruntime)
link_directories(${dora_link_dirs})
link_directories(${ZED_LIBRARY_DIR})
add_executable(dora_zed
src/main.cc
src/zed/camera.cc
src/engines/zed_native.cc
src/engines/open_vocab.cc
${node_bridge}
)
add_dependencies(dora_zed Dora_cxx)
target_include_directories(
dora_zed
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src
${dora_cxx_include_dir}
${dora_c_include_dir}
${ZED_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
${CUDAToolkit_INCLUDE_DIRS}
${ONNXRUNTIME_INCLUDE_DIRS}
)
target_link_libraries(dora_zed dora_node_api_cxx ${ZED_LIBRARIES} ${OpenCV_LIBS} ${ONNXRUNTIME_LIBRARIES})
install(TARGETS dora_zed DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/bin)
# Standalone detector test — no dora, no live camera required
add_executable(test_open_vocab
src/test_open_vocab.cc
src/engines/open_vocab.cc
)
target_include_directories(test_open_vocab PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src
${ZED_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
${CUDAToolkit_INCLUDE_DIRS}
${ONNXRUNTIME_INCLUDE_DIRS}
)
target_link_libraries(test_open_vocab PRIVATE
${ZED_LIBRARIES}
${OpenCV_LIBS}
${ONNXRUNTIME_LIBRARIES}
)
install(TARGETS test_open_vocab DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/bin)