[CMake] Do not download anything during build.
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Mon, 26 Nov 2018 07:41:53 +0000 (16:41 +0900)
committerGeunsik Lim <leemgs@users.noreply.github.com>
Tue, 27 Nov 2018 22:15:19 +0000 (07:15 +0900)
Let the user download the model at run-time with the given scripts.
They will be able to do so after #909

With #909, this concludes #866

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
CMakeLists.txt
nnstreamer_example/example_object_detection/CMakeLists.txt
packaging/nnstreamer.spec

index 0acc938..159f22a 100644 (file)
@@ -4,7 +4,6 @@ PROJECT(nnstreamer C CXX)
 
 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)
 
index 1968c06..69fa6bc 100644 (file)
@@ -1,40 +1,6 @@
 # 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})
index a79aab5..30b86c6 100644 (file)
@@ -89,7 +89,7 @@ mkdir -p build
 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