diff --git a/cmake/LinkBackend.cmake b/cmake/LinkBackend.cmake index 1f38bb0..2d6cead 100644 --- a/cmake/LinkBackend.cmake +++ b/cmake/LinkBackend.cmake @@ -8,6 +8,7 @@ elseif (DEFAULT_BACKEND STREQUAL "ONNX_RUNTIME") elseif (DEFAULT_BACKEND STREQUAL "LIBTORCH") target_include_directories(${PROJECT_NAME} PRIVATE ${InferenceEngines_SOURCE_DIR}/backends/libtorch/src) target_link_libraries(${PROJECT_NAME} PRIVATE ${TORCH_LIBRARIES}) + target_compile_definitions(${PROJECT_NAME} PRIVATE C10_USE_GLOG) elseif (DEFAULT_BACKEND STREQUAL "TENSORRT") target_include_directories(${PROJECT_NAME} PRIVATE /usr/local/cuda/include ${TENSORRT_DIR}/include ${InferenceEngines_SOURCE_DIR}/backends/tensorrt/src) target_link_directories(${PROJECT_NAME} PRIVATE /usr/local/cuda/lib64 ${TENSORRT_DIR}/lib) @@ -19,3 +20,4 @@ elseif(DEFAULT_BACKEND STREQUAL "OPENVINO") target_include_directories(${PROJECT_NAME} PRIVATE ${InferenceEngine_INCLUDE_DIRS} ${InferenceEngines_SOURCE_DIR}/backends/openvino/src) target_link_libraries(${PROJECT_NAME} PRIVATE openvino::runtime ) endif() + diff --git a/detectors/src/models/Detector.hpp b/detectors/src/models/Detector.hpp index 43b4a12..f696b08 100644 --- a/detectors/src/models/Detector.hpp +++ b/detectors/src/models/Detector.hpp @@ -29,7 +29,13 @@ class Detector { network_height_ = static_cast(first_input[1]); network_width_ = static_cast(first_input[2]); LOG(INFO) << "Sizes: " << channels_ << " " << network_width_ << " " << network_height_; - } + } + else if (first_input.size() == 4) { + channels_ = static_cast(first_input[1]); + network_height_ = static_cast(first_input[2]); + network_width_ = static_cast(first_input[3]); + LOG(INFO) << "Sizes: " << channels_ << " " << network_width_ << " " << network_height_; + } else { LOG(ERROR) << "Input shape does not match expected format (CHW), Found " << first_input.size() << " inputs: "; for(auto& s : first_input)