Files
autopilot/misc/rtsp_ai_player/rtsp_ai_player.pro
T
Tuomas Järvinen 022e4a1200 Add compile option to use YOLOv8 ONNX models for testing.
- added qmake option yolo_onnx to use normal YOLOv8 ONNX models. This makes possible to test
  gimbals camera inside without real model.
- reduced confidence threshold requirement in AiEngineInferencevOnnxRuntime from 0.5 to 0.2
- make printing prettier with ONNX Runtime
- removed unnecessary cv::Mat::clone()

Type: Improvement
Issue: https://denyspopov.atlassian.net/browse/AZ-39
2024-08-18 17:17:40 +03:00

61 lines
1.8 KiB
Prolog

QT += core network serialport
QT -= gui
CONFIG += c++11 concurrent console
MOC_DIR = moc
OBJECTS_DIR = obj
SOURCES = $$PWD/*.cpp
HEADERS = $$PWD/*.h
gimbal {
message("Using real gimbal camera.")
QMAKE_CXXFLAGS += -DGIMBAL
}
else {
message("Not using real gimbal camera.")
}
yolo_onnx {
QMAKE_CXXFLAGS += -DYOLO_ONNX
}
opi5 {
message("OPI5 build")
CONFIG += link_pkgconfig
PKGCONFIG += opencv4 librga stb libturbojpeg
INCLUDEPATH += /usr/include/rga
QMAKE_CXXFLAGS += -DOPI5_BUILD
LIBS += /usr/local/lib/librknnrt.so
SOURCES += $$PWD/src-opi5/*.c $$PWD/src-opi5/*.cpp $$PWD/src-opi5/*.cc
HEADERS += $$PWD/src-opi5/*.h
}
else:opencv {
message("OpenCV build")
message("You must use YOLOv8 ONNX files. Azaion model does not work!")
message("OpenCV must be version 4.10.0 installed to /usr/local/")
INCLUDEPATH += /opt/opencv-4.10.0/include/opencv4/
LIBS += /opt/opencv-4.10.0/lib/libopencv_world.so
QMAKE_LFLAGS += -Wl,-rpath,/opt/opencv-4.10.0/lib
QMAKE_CXXFLAGS += -DOPENCV_BUILD
SOURCES += $$PWD/src-opencv-onnx/*.cpp
HEADERS += $$PWD/src-opencv-onnx/*.h
}
else {
message("ONNX build")
message("You must use YOLOv8 ONNX files. Azaion ONNX model also works fine.")
QMAKE_CXXFLAGS += -DONNX_BUILD
# ONNX-runtime
INCLUDEPATH += /opt/onnxruntime-linux-x64-1.18.0/include
QMAKE_LFLAGS += -Wl,-rpath,/opt/onnxruntime-linux-x64-1.18.0/lib
LIBS += /opt/onnxruntime-linux-x64-1.18.0/lib/libonnxruntime.so.1.18.0
# OpenCV 4.10.0
INCLUDEPATH += /opt/opencv-4.10.0/include/opencv4/
QMAKE_LFLAGS += -Wl,-rpath,/opt/opencv-4.10.0/lib
LIBS += /opt/opencv-4.10.0/lib/libopencv_world.so
SOURCES += $$PWD/src-onnx-runtime/*.cpp
HEADERS += $$PWD/src-onnx-runtime/*.h
}