48 lines
2.2 KiB
Diff
48 lines
2.2 KiB
Diff
From: David Escalona <david.escalona@digi.com>
|
|
Date: Mon, 16 Sep 2024 18:42:29 +0200
|
|
Subject: [PATCH 1/3] image-classification: remove weston user check from
|
|
launch
|
|
|
|
Signed-off-by: David Escalona <david.escalona@digi.com>
|
|
---
|
|
.../files/tflite/launch_python_image_classification.sh | 8 +-------
|
|
.../tflite/launch_python_image_classification_testdata.sh | 8 +-------
|
|
2 files changed, 2 insertions(+), 14 deletions(-)
|
|
|
|
diff --git a/tflite/launch_python_image_classification.sh b/tflite/launch_python_image_classification.sh
|
|
index 647091d..1b8b75b 100755
|
|
--- a/tflite/launch_python_image_classification.sh
|
|
+++ b/tflite/launch_python_image_classification.sh
|
|
@@ -1,12 +1,6 @@
|
|
#!/bin/sh
|
|
-weston_user=$(ps aux | grep '/usr/bin/weston '|grep -v 'grep'|awk '{print $1}')
|
|
|
|
source /usr/local/demo-ai/resources/config_board.sh
|
|
cmd="python3 /usr/local/demo-ai/image-classification/tflite/tflite_image_classification.py -m /usr/local/demo-ai/image-classification/models/mobilenet/$IMAGE_CLASSIFICATION_MODEL.tflite -l /usr/local/demo-ai/image-classification/models/mobilenet/$IMAGE_CLASSIFICATION_LABEL.txt --framerate $DFPS --frame_width $DWIDTH --frame_height $DHEIGHT $COMPUTE_ENGINE"
|
|
|
|
-if [ "$weston_user" != "root" ]; then
|
|
- echo "user : "$weston_user
|
|
- script -qc "su -l $weston_user -c '$cmd'"
|
|
-else
|
|
- $cmd
|
|
-fi
|
|
+$cmd
|
|
diff --git a/tflite/launch_python_image_classification_testdata.sh b/tflite/launch_python_image_classification_testdata.sh
|
|
index e6bfb2f..cf4a191 100755
|
|
--- a/tflite/launch_python_image_classification_testdata.sh
|
|
+++ b/tflite/launch_python_image_classification_testdata.sh
|
|
@@ -1,12 +1,6 @@
|
|
#!/bin/sh
|
|
-weston_user=$(ps aux | grep '/usr/bin/weston '|grep -v 'grep'|awk '{print $1}')
|
|
|
|
source /usr/local/demo-ai/resources/config_board.sh
|
|
cmd="python3 /usr/local/demo-ai/image-classification/tflite/tflite_image_classification.py -m /usr/local/demo-ai/image-classification/models/mobilenet/$IMAGE_CLASSIFICATION_MODEL.tflite -l /usr/local/demo-ai/image-classification/models/mobilenet/$IMAGE_CLASSIFICATION_LABEL.txt -i /usr/local/demo-ai/image-classification/models/mobilenet/testdata/ $COMPUTE_ENGINE"
|
|
|
|
-if [ "$weston_user" != "root" ]; then
|
|
- echo "user : "$weston_user
|
|
- script -qc "su -l $weston_user -c '$cmd'"
|
|
-else
|
|
- $cmd
|
|
-fi
|
|
+$cmd
|