ORT_HOME=${PATH_TO_ONNXRUNTIME}
# Note: Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set
# "OpenCV_DIR" to a directory containing one of the following names:
# OpenCVConfig.cmake
# opencv-config.cmake
OPENCV_DIR=${PATH_TO_OPENCV_CMAKE_DIR}
mkdir build && pushd build
cmake .. -DORT_HOME=${ORT_HOME} -DOpenCV_DIR=${OPENCV_DIR} -DCMAKE_BUILD_TYPE=Debug -DTEST=OFF -DDEMO=ON
make install -j`nproc`
popd
# Or with cross compiler:
CROSS_TOOL=${PATH_TO_COMPILER_PREFIX}-
SYSROOT=${PATH_TO_SYSROOT}
cmake .. -DORT_HOME=${ORT_HOME} -DOpenCV_DIR=${OPENCV_DIR} \
-DCMAKE_C_COMPILER=${CROSS_TOOL}gcc -DCMAKE_CXX_COMPILER=${CROSS_TOOL}g++ -DCMAKE_SYSROOT=${SYSROOT}
support
Getting started
install dependence
gcc version: 14
prepare opencv (at least version 4.2.0)
prepare onnxruntime
visit onnxruntime release and download proper version.
build demo with bash followed
run demo
Using environment variables to implement functions
Description of formats related to label files, configuration files, and model files
Model files format: ONNX(Open Neural Network Exchange)
label files format: using text document, here is a recommended example
configuration files format: using json, the recommended configuration file content is as here
Python Support
See README.md for more details.