OPTION(ENABLE_TENSORFLOW_LITE "Enable tensorflow-lite support" ON)
OPTION(ENABLE_TENSORFLOW "Enable tensorflow support" OFF)
-OPTION(ENABLE_MODEL_DOWNLOAD "Enable download the model files" ON)
OPTION(INSTALL_EXAMPLE_APP "Install example applications" OFF)
OPTION(ENABLE_TEST "Enable tests" ON)
# demo app
pkg_check_modules(cairo_pkg REQUIRED cairo)
-if(ENABLE_MODEL_DOWNLOAD)
- if(NOT EXISTS "${CMAKE_BINARY_DIR}/tflite_model_ssd/ssd_mobilenet_v2_coco.tflite")
- file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/tflite_model_ssd)
-
- message("-- [START TO DOWNLOAD REQUIRED RESOURCES: Model]")
- file(DOWNLOAD
- "https://github.com/nnsuite/testcases/raw/master/DeepLearningModels/tensorflow-lite/ssd_mobilenet_v2_coco/ssd_mobilenet_v2_coco.tflite"
- "${CMAKE_BINARY_DIR}/tflite_model_ssd/ssd_mobilenet_v2_coco.tflite"
- SHOW_PROGRESS
- )
- endif()
-
- if(NOT EXISTS "${CMAKE_BINARY_DIR}/tflite_model_ssd/coco_labels_list.txt")
- message("-- [START TO DOWNLOAD REQUIRED RESOURCES: Label]")
- file(DOWNLOAD
- "https://github.com/nnsuite/testcases/raw/master/DeepLearningModels/tensorflow-lite/ssd_mobilenet_v2_coco/coco_labels_list.txt"
- "${CMAKE_BINARY_DIR}/tflite_model_ssd/coco_labels_list.txt"
- SHOW_PROGRESS
- )
- endif()
-
-
- if(NOT EXISTS "${CMAKE_BINARY_DIR}/tflite_model_ssd/box_priors.txt")
- message("-- [START TO DOWNLOAD REQUIRED RESOURCES: Box_prior]")
- file(DOWNLOAD
- "https://github.com/nnsuite/testcases/raw/master/DeepLearningModels/tensorflow-lite/ssd_mobilenet_v2_coco/box_priors.txt"
- "${CMAKE_BINARY_DIR}/tflite_model_ssd/box_priors.txt"
- SHOW_PROGRESS
- )
- endif()
-else()
- message("-- [MODEL DOWNLOAD IS BLOCKED]")
-endif(ENABLE_MODEL_DOWNLOAD)
-
ADD_EXECUTABLE(nnstreamer_example_object_detection nnstreamer_example_object_detection.cc)
TARGET_LINK_LIBRARIES(nnstreamer_example_object_detection ${apppkgs_LIBRARIES} ${cairo_pkg_LIBRARIES})
pushd build
export GST_PLUGIN_PATH=$(pwd)
export LD_LIBRARY_PATH=$(pwd):$(pwd)/gst/tensor_filter
-%cmake .. -DGST_INSTALL_DIR=%{gstlibdir} -DENABLE_MODEL_DOWNLOAD=OFF -DINSTALL_EXAMPLE_APP=ON
+%cmake .. -DGST_INSTALL_DIR=%{gstlibdir} -DINSTALL_EXAMPLE_APP=ON
make %{?_smp_mflags}
%if 0%{?unit_test}
./tests/unittest_common