* mobilenet_v2_1.0_224.tflite is also installed for using TFLite with 
ArmnnExamples

Signed-off-by: Hongmei Gou <a0271...@ti.com>
---
 ...sioned-library-for-armnnTfLiteParser.patch | 25 +++++++++++++++++++
 .../recipes-support/armnn/armnn_git.bb        | 14 +++++++++--
 2 files changed, 37 insertions(+), 2 deletions(-)
 create mode 100644 
meta-arago-extras/recipes-support/armnn/armnn/0011-Generate-versioned-library-for-armnnTfLiteParser.patch

diff --git 
a/meta-arago-extras/recipes-support/armnn/armnn/0011-Generate-versioned-library-for-armnnTfLiteParser.patch
 
b/meta-arago-extras/recipes-support/armnn/armnn/0011-Generate-versioned-library-for-armnnTfLiteParser.patch
new file mode 100644
index 00000000..a504aa76
--- /dev/null
+++ 
b/meta-arago-extras/recipes-support/armnn/armnn/0011-Generate-versioned-library-for-armnnTfLiteParser.patch
@@ -0,0 +1,25 @@
+From 1f5670c6ef8669d7d25621d9c97d66178800dcf9 Mon Sep 17 00:00:00 2001
+From: Hongmei Gou <a0271...@ti.com>
+Date: Tue, 17 Sep 2019 17:58:39 -0400
+Subject: [PATCH] Generate versioned library for armnnTfLiteParser
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Hongmei Gou <a0271...@ti.com>
+---
+ src/armnnTfLiteParser/CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/armnnTfLiteParser/CMakeLists.txt 
b/src/armnnTfLiteParser/CMakeLists.txt
+index 17d4cf68..c83f7059 100755
+--- a/src/armnnTfLiteParser/CMakeLists.txt
++++ b/src/armnnTfLiteParser/CMakeLists.txt
+@@ -24,4 +24,5 @@ if(BUILD_TF_LITE_PARSER)
+     install(TARGETS armnnTfLiteParser
+             LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+             RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
++    set_target_properties(armnnTfLiteParser PROPERTIES VERSION 
${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} )
+ endif()
+-- 
+2.17.1
+
diff --git a/meta-arago-extras/recipes-support/armnn/armnn_git.bb 
b/meta-arago-extras/recipes-support/armnn/armnn_git.bb
index e8d16944..261d4f63 100644
--- a/meta-arago-extras/recipes-support/armnn/armnn_git.bb
+++ b/meta-arago-extras/recipes-support/armnn/armnn_git.bb
@@ -5,7 +5,7 @@ LICENSE = "MIT & Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=3e14a924c16f7d828b8335a59da64074 \
                     
file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
 
-PR = "r1"
+PR = "r2"
 PV = "19.08"
 PV_MAJOR = "${@d.getVar('PV',d,1).split('.')[0]}"
 
@@ -32,12 +32,16 @@ SRC_URI = " \
     file://0007-enable-use-of-arm-compute-shared-library.patch \
     file://0009-command-line-options-for-video-port-selection.patch \
     file://0010-armnnexamples-update-for-19.08-modifications.patch \
+    file://0011-Generate-versioned-library-for-armnnTfLiteParser.patch \
     
http://download.tensorflow.org/models/mobilenet_v1_2018_02_22/mobilenet_v1_1.0_224.tgz;name=mobilenet;subdir=${WORKDIR}/tfmodel;destsuffix=tfmodel
 \
+    
https://storage.googleapis.com/mobilenet_v2/checkpoints/mobilenet_v2_1.0_224.tgz;name=mobilenetv2;subdir=${WORKDIR}/tfmodel;destsuffix=tfmodel
 \
     
git://git.ti.com/tidl/tidl-api.git;name=tidl-api;branch=${BRANCH_tidl-api};subdir=${WORKDIR}/tidl-api;destsuffix=tidl-api
 \
 "
 
 SRC_URI[mobilenet.md5sum] = "d5f69cef81ad8afb335d9727a17c462a"
 SRC_URI[mobilenet.sha256sum] = 
"1ccb74dbd9c5f7aea879120614e91617db9534bdfaa53dfea54b7c14162e126b"
+SRC_URI[mobilenetv2.md5sum] = "519bba7052fd279c66d2a28dc3f51f46"
+SRC_URI[mobilenetv2.sha256sum] = 
"318084bc1b63d6d7b854553e09cdf77078b1c0168be27c59a0d44253b5ed49dc"
 
 DEPENDS = " \
     boost \
@@ -47,6 +51,8 @@ DEPENDS = " \
     armnn-caffe \
     armnn-tensorflow \
     armnn-onnx \
+    tensorflow-lite \
+    flatbuffers \
     opencv \
 "
 
@@ -58,7 +64,10 @@ EXTRA_OECMAKE=" \
     -DCAFFE_GENERATED_SOURCES=${STAGING_DIR_HOST}${datadir}/armnn-caffe \
     -DTF_GENERATED_SOURCES=${STAGING_DIR_HOST}${datadir}/armnn-tensorflow \
     -DONNX_GENERATED_SOURCES=${STAGING_DIR_HOST}${datadir}/armnn-onnx \
-    -DBUILD_CAFFE_PARSER=1 -DBUILD_TF_PARSER=1 -DBUILD_ONNX_PARSER=1 \
+    -DBUILD_CAFFE_PARSER=1 -DBUILD_TF_PARSER=1 -DBUILD_ONNX_PARSER=1 
-DBUILD_TF_LITE_PARSER=1 \
+    
-DTF_LITE_GENERATED_PATH=${STAGING_DIR_HOST}${includedir}/tensorflow/contrib/lite/schema
 \
+    -DFLATBUFFERS_ROOT=${STAGING_DIR_HOST}${includedir}/flatbuffers \
+    -DFLATBUFFERS_LIBRARY=${STAGING_DIR_HOST}${libdir}/libflatbuffers.a \
     -DARMCOMPUTENEON=1 \
     -DBUILD_TESTS=1 -DPROFILING=1 \
     -DTHIRD_PARTY_INCLUDE_DIRS=${STAGING_DIR_HOST}${includedir} \
@@ -75,6 +84,7 @@ do_install_append() {
     cp $CP_ARGS ${WORKDIR}/build/UnitTests  ${D}${bindir}
     install -d ${D}${TESTVECS_INSTALL_DIR}/models
     cp ${WORKDIR}/tfmodel/mobilenet_v1_1.0_224_frozen.pb  
${D}${TESTVECS_INSTALL_DIR}/models
+    cp ${WORKDIR}/tfmodel/mobilenet_v2_1.0_224.tflite 
${D}${TESTVECS_INSTALL_DIR}/models
     cp ${WORKDIR}/git/tests/TfMobileNet-Armnn/labels.txt  
${D}${TESTVECS_INSTALL_DIR}/models
     install -d ${D}${TESTVECS_INSTALL_DIR}/testvecs
     cp ${WORKDIR}/tidl-api/examples/classification/clips/*.mp4  
${D}${TESTVECS_INSTALL_DIR}/testvecs
-- 
2.17.1

_______________________________________________
meta-arago mailing list
meta-arago@arago-project.org
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

Reply via email to