53 lines
2.4 KiB
Diff
53 lines
2.4 KiB
Diff
From: David Escalona <david.escalona@digi.com>
|
|
Date: Mon, 16 Sep 2024 18:44:24 +0200
|
|
Subject: [PATCH 1/3] object-detection: remove weston user check from launch
|
|
|
|
Signed-off-by: David Escalona <david.escalona@digi.com>
|
|
---
|
|
.../files/stai-mpu/launch_python_object_detection.sh | 8 +-------
|
|
.../stai-mpu/launch_python_object_detection_testdata.sh | 8 +-------
|
|
2 files changed, 2 insertions(+), 14 deletions(-)
|
|
|
|
diff --git a/stai-mpu/launch_python_object_detection.sh b/stai-mpu/launch_python_object_detection.sh
|
|
index d0332dc..54f5e54 100755
|
|
--- a/stai-mpu/launch_python_object_detection.sh
|
|
+++ b/stai-mpu/launch_python_object_detection.sh
|
|
@@ -7,15 +7,9 @@
|
|
# in the root directory of this software component.
|
|
# If no LICENSE file comes with this software, it is provided AS-IS.
|
|
|
|
-weston_user=$(ps aux | grep '/usr/bin/weston '|grep -v 'grep'|awk '{print $1}')
|
|
FRAMEWORK=$1
|
|
echo "stai_mpu wrapper used : "$FRAMEWORK
|
|
source /usr/local/x-linux-ai/resources/config_board.sh
|
|
cmd="/usr/local/x-linux-ai/object-detection/stai_mpu_object_detection.py -m /usr/local/x-linux-ai/object-detection/models/$OBJ_DETEC_MODEL -l /usr/local/x-linux-ai/object-detection/models/$OBJ_DETEC_MODEL_LABEL.txt --framerate $DFPS --frame_width $DWIDTH --frame_height $DHEIGHT $OPTIONS"
|
|
|
|
-if [ "$weston_user" != "root" ]; then
|
|
- echo "user : "$weston_user
|
|
- script -qc "su -l $weston_user -c '$cmd'"
|
|
-else
|
|
- $cmd
|
|
-fi
|
|
+$cmd
|
|
diff --git a/stai-mpu/launch_python_object_detection_testdata.sh b/stai-mpu/launch_python_object_detection_testdata.sh
|
|
index c8e4d5b..bd9a9b9 100755
|
|
--- a/stai-mpu/launch_python_object_detection_testdata.sh
|
|
+++ b/stai-mpu/launch_python_object_detection_testdata.sh
|
|
@@ -7,15 +7,9 @@
|
|
# in the root directory of this software component.
|
|
# If no LICENSE file comes with this software, it is provided AS-IS.
|
|
|
|
-weston_user=$(ps aux | grep '/usr/bin/weston '|grep -v 'grep'|awk '{print $1}')
|
|
FRAMEWORK=$1
|
|
echo "stai_mpu wrapper used : "$FRAMEWORK
|
|
source /usr/local/x-linux-ai/resources/config_board.sh
|
|
cmd="/usr/local/x-linux-ai/object-detection/stai_mpu_object_detection.py -m /usr/local/x-linux-ai/object-detection/models/$OBJ_DETEC_MODEL -l /usr/local/x-linux-ai/object-detection/models/$OBJ_DETEC_MODEL_LABEL.txt -i /usr/local/x-linux-ai/object-detection/models/$OBJ_DETECT_DATA"
|
|
|
|
-if [ "$weston_user" != "root" ]; then
|
|
- echo "user : "$weston_user
|
|
- script -qc "su -l $weston_user -c '$cmd'"
|
|
-else
|
|
- $cmd
|
|
-fi
|
|
+$cmd
|