working install.sh
@@ -18,16 +18,13 @@ VERSION=${MODEL_MOBILENET_VERSION}
########################################################################
echo
echo "Download weights from ${PACKAGE_URL} ..."
+echo "The current version is ${VERSION}"
wget ${PACKAGE_URL}/${PACKAGE_NAME}
########################################################################
echo
-
-# Edgetpu extracts as a different name other than PACKAGE_NAME
-if ["${VERSION}" != "edgetpu" ]; then
echo "Unpack weights file ${PACKAGE_NAME} ..."
tar -zxvf ${PACKAGE_NAME}
-fi
# Exception: v2 quantized unpacks into a subdirectory.
@@ -48,17 +45,17 @@ fi
# Exception: edgetpu also unpacks into subdirectory
# note that this has multiple names when unpacking
-if ["${VERSION}" == "edgetpu" ]; then
- echo "Unpack weights file ${PACKAGE_NAME_EDGTPU_TGZ} ..."
- tar -zxvf ${PACKAGE_NAME_EDGETPU_TGZ}
-
if [[ -d ${PACKAGE_NAME_EDGETPU} ]]; then
echo
echo "Move files out of ${PACKAGE_NAME_EDGETPU}/ ..."
- mv ${PACKAGE_NAME_EDGETPU_FOLDER}/* ${PACKAGE_NAME_EDGETPU}/..
+ mv ${PACKAGE_NAME_EDGETPU}/* ${PACKAGE_NAME_EDGETPU}/..
rmdir ${PACKAGE_NAME_EDGETPU}
fi
+
+# Edgetpu modifications keep tflite with selected precision
+
+if [ "${VERSION}" == "edgetpu" ]; then
if [ "${MODEL_MOBILENET_PRECISION}" == "int8" ]; then
file1_to_remove="${PACKAGE_NAME_EDGETPU}_uint8.tflite"
file2_to_remove="${PACKAGE_NAME_EDGETPU}_float.tflite"
@@ -75,10 +72,12 @@ if ["${VERSION}" == "edgetpu" ]; then
echo "Removing file ${file1_to_remove} ${file2_to_remove}"
rm ${file1_to_remove} ${file2_to_remove}
fi
-
fi
+
+
+
########################################################################
echo
echo "Remove temporary files ..."
