Skip to content

Instantly share code, notes, and snippets.

@cyrusbehr
Last active September 12, 2019 22:54
Show Gist options
  • Save cyrusbehr/8c932e58ae25a9a88233926b4944a184 to your computer and use it in GitHub Desktop.
Save cyrusbehr/8c932e58ae25a9a88233926b4944a184 to your computer and use it in GitHub Desktop.
Performing inference with NCNN
cmake_minimum_required(VERSION 3.14)
project(ncnn-inference)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -fPIC -ffast-math -Ofast -fopenmp")
add_executable(ncnn_test main.cpp)
find_package( OpenCV REQUIRED )
target_include_directories(
ncnn_test
PRIVATE
${PROJECT_SOURCE_DIR}/include
${OpenCV_INCLUDE_DIRS}
)
target_link_directories(
ncnn_test
PRIVATE
${PROJECT_SOURCE_DIR}/lib
)
target_link_libraries(
ncnn_test
PUBLIC
${OpenCV_LIBS}
ncnn
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment