59 lines
2.5 KiB
Diff
59 lines
2.5 KiB
Diff
From: David Escalona <david.escalona@digi.com>
|
|
Date: Mon, 16 Sep 2024 18:45:59 +0200
|
|
Subject: [PATCH 1/3] pose-estimation: remove weston user check from launch
|
|
|
|
Signed-off-by: David Escalona <david.escalona@digi.com>
|
|
---
|
|
.../files/stai-mpu/launch_python_pose_estimation.sh | 8 +-------
|
|
.../stai-mpu/launch_python_pose_estimation_testdata.sh | 8 +-------
|
|
2 files changed, 2 insertions(+), 14 deletions(-)
|
|
|
|
diff --git a/stai-mpu/launch_python_pose_estimation.sh b/stai-mpu/launch_python_pose_estimation.sh
|
|
index 61952cf..6c8b5b8 100644
|
|
--- a/stai-mpu/launch_python_pose_estimation.sh
|
|
+++ b/stai-mpu/launch_python_pose_estimation.sh
|
|
@@ -5,17 +5,11 @@
|
|
#
|
|
# This software is licensed under terms that can be found in the LICENSE file
|
|
# 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 wrapper used : "$FRAMEWORK
|
|
source /usr/local/x-linux-ai/resources/config_board_npu.sh
|
|
cmd="python3 /usr/local/x-linux-ai/pose-estimation/stai_mpu_pose_estimation.py -m /usr/local/x-linux-ai/pose-estimation/models/$POSE_ESTIMATION_MODEL --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
|
|
\ No newline at end of file
|
|
+$cmd
|
|
diff --git a/stai-mpu/launch_python_pose_estimation_testdata.sh b/stai-mpu/launch_python_pose_estimation_testdata.sh
|
|
index 6ba035b..9a4448e 100644
|
|
--- a/stai-mpu/launch_python_pose_estimation_testdata.sh
|
|
+++ b/stai-mpu/launch_python_pose_estimation_testdata.sh
|
|
@@ -5,17 +5,11 @@
|
|
#
|
|
# This software is licensed under terms that can be found in the LICENSE file
|
|
# 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 wrapper used : "$FRAMEWORK
|
|
source /usr/local/x-linux-ai/resources/config_board_npu.sh
|
|
cmd="python3 /usr/local/x-linux-ai/pose-estimation/stai_mpu_pose_estimation.py -m /usr/local/x-linux-ai/pose-estimation/models/$POSE_ESTIMATION_MODEL -i /usr/local/x-linux-ai/pose-estimation/models/$POSE_ESTIMATION_DATA"
|
|
|
|
-if [ "$weston_user" != "root" ]; then
|
|
- echo "user : "$weston_user
|
|
- script -qc "su -l $weston_user -c '$cmd'"
|
|
-else
|
|
- $cmd
|
|
-fi
|
|
\ No newline at end of file
|
|
+$cmd
|