From: David Escalona 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 --- .../files/tflite/launch_python_object_detection.sh | 8 +------- .../files/tflite/launch_python_object_detection_mp2.sh | 8 +------- .../tflite/launch_python_object_detection_testdata.sh | 8 +------- .../tflite/launch_python_object_detection_testdata_mp2.sh | 8 +------- 4 files changed, 4 insertions(+), 28 deletions(-) diff --git a/tflite/launch_python_object_detection.sh b/tflite/launch_python_object_detection.sh index 78764c0..5124990 100755 --- a/tflite/launch_python_object_detection.sh +++ b/tflite/launch_python_object_detection.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/object-detection/tflite/tflite_object_detection.py -m /usr/local/demo-ai/object-detection/models/coco_ssd_mobilenet/coco_ssd_mobilenet.tflite -l /usr/local/demo-ai/object-detection/models/coco_ssd_mobilenet/labels_coco_ssd_mobilenet.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_object_detection_mp2.sh b/tflite/launch_python_object_detection_mp2.sh index ac4b43b..0e39c90 100755 --- a/tflite/launch_python_object_detection_mp2.sh +++ b/tflite/launch_python_object_detection_mp2.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/object-detection/tflite/tflite_object_detection.py -m /usr/local/demo-ai/object-detection/models/yolov4-tiny/yolov4_tiny_416_quant.tflite -l /usr/local/demo-ai/object-detection/models/yolov4-tiny/labels_yolov4_tiny.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_object_detection_testdata.sh b/tflite/launch_python_object_detection_testdata.sh index fc94284..a193a95 100755 --- a/tflite/launch_python_object_detection_testdata.sh +++ b/tflite/launch_python_object_detection_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/object-detection/tflite/tflite_object_detection.py -m /usr/local/demo-ai/object-detection/models/coco_ssd_mobilenet/coco_ssd_mobilenet.tflite -l /usr/local/demo-ai/object-detection/models/coco_ssd_mobilenet/labels_coco_ssd_mobilenet.txt -i /usr/local/demo-ai/object-detection/models/coco_ssd_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 diff --git a/tflite/launch_python_object_detection_testdata_mp2.sh b/tflite/launch_python_object_detection_testdata_mp2.sh index 780325e..e5e4922 100755 --- a/tflite/launch_python_object_detection_testdata_mp2.sh +++ b/tflite/launch_python_object_detection_testdata_mp2.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/object-detection/tflite/tflite_object_detection.py -m /usr/local/demo-ai/object-detection/models/yolov4-tiny/yolov4_tiny_416_quant.tflite -l /usr/local/demo-ai/object-detection/models/yolov4-tiny/labels_yolov4_tiny.txt -i /usr/local/demo-ai/object-detection/models/yolov4-tiny/testdata/ $COMPUTE_ENGINE" -if [ "$weston_user" != "root" ]; then - echo "user : "$weston_user - script -qc "su -l $weston_user -c '$cmd'" -else - $cmd -fi +$cmd