Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
e035171
add NPU env var
ajagadi1 Sep 26, 2025
90a85d8
added npu and cpu pipelines
ajagadi1 Sep 28, 2025
1fc8534
added npu and cpu pipelines for all apps
ajagadi1 Sep 28, 2025
22f844d
updated woker safety docs
ajagadi1 Sep 29, 2025
27dc24b
updated weld porosity docs
ajagadi1 Sep 29, 2025
e4ff787
update weld docs
ajagadi1 Sep 29, 2025
47e4ca9
updated docs for pcb
ajagadi1 Sep 29, 2025
ab05537
added cpu, gpu and npu pipeline for smart aprking
ajagadi1 Oct 7, 2025
6930be0
updated docs for smart parking
ajagadi1 Oct 7, 2025
4cff8c9
updated smart parking pipelines
ajagadi1 Oct 7, 2025
58a1bbc
added gpu pipeline for loitering detection
ajagadi1 Oct 7, 2025
91687f6
Merge branch 'main' of https://github.com/open-edge-platform/edge-ai-…
ajagadi1 Oct 8, 2025
1e1b837
Update config.json to use the correct device for NPU pipelines (#771)
sairampillai Oct 9, 2025
a487baf
[Metro AI Suite] Update smart parking with yolov11s model (#814)
ajagadi1 Oct 15, 2025
83c618a
updated model paths (#817)
ajagadi1 Oct 16, 2025
dd584c9
Update loitering detection model from FP32 to FP16 (#822)
ajagadi1 Oct 16, 2025
984f982
Loitering detection: add cpu gpu and npu docs (#844)
ajagadi1 Oct 23, 2025
841842d
Add benchmarking mode for loitering-detection
sairampillai Oct 23, 2025
21c462d
Add benchmarking mode for smart-parking
sairampillai Oct 23, 2025
9f9cfe9
removing duplicated overlay on the final frame.. (#864)
deepaks2 Oct 24, 2025
9bc6eae
Merge branch 'magic9-manufacturing-metro-vision-apps' into sairampill…
deepaks2 Oct 24, 2025
70fcb46
Update benchmark script for looped video and benchmark payload
sairampillai Oct 24, 2025
66c032e
Add npu payload
sairampillai Oct 24, 2025
c7cf541
Update benchmarking logic inline with WSF
sairampillai Oct 27, 2025
7ade5f4
Merge main
sairampillai Oct 27, 2025
0801351
Merge branch 'main' of https://github.com/open-edge-platform/edge-ai-…
sairampillai Oct 27, 2025
7c2cfc7
Fix failing CI for docs
sairampillai Oct 27, 2025
9e8153a
Fix another CI and merge conflict reversal
sairampillai Oct 27, 2025
2760560
Merge branch 'main' into sairampillai/metro-m9-benchmarking
sairampillai Oct 27, 2025
92f10f4
Merge branch 'main' into sairampillai/metro-m9-benchmarking
sairampillai Oct 28, 2025
867d3bd
Update docs
sairampillai Oct 28, 2025
8f88005
Update how-to-use-cpu-for-inference.md to fix CI
sairampillai Oct 28, 2025
f4e8bf1
Remove benchmarking pipelines
sairampillai Oct 29, 2025
7bab047
Merge branch 'sairampillai/metro-m9-benchmarking' of https://github.c…
sairampillai Oct 29, 2025
9141720
Update and refactor payload files
sairampillai Oct 29, 2025
56f632b
Update benchmark script to take in refactored payload file and pipeline
sairampillai Oct 29, 2025
1a1b1d0
Update documentation
sairampillai Oct 29, 2025
928d5ac
Merge branch 'main' into sairampillai/metro-m9-benchmarking
sairampillai Oct 29, 2025
be1a0a5
Merge branch 'main' into sairampillai/metro-m9-benchmarking
sairampillai Oct 29, 2025
a60bf38
Merge branch 'main' into sairampillai/metro-m9-benchmarking
sairampillai Oct 30, 2025
c2c26bb
Update default pipeline parameters
deepaks2 Oct 31, 2025
ca062c9
Update smart-parking default pipeline parameters
deepaks2 Oct 31, 2025
d219dff
Update docs
deepaks2 Oct 31, 2025
119c0b6
Merge branch 'main' into sairampillai/metro-m9-benchmarking
sairampillai Oct 31, 2025
cee51f9
Merge branch 'main' into sairampillai/metro-m9-benchmarking
sairampillai Oct 31, 2025
de7797c
Add device group rules for gpu support
tejaswinijayashanker943 Oct 31, 2025
aadb4c7
Add GPU pipelines
tejaswinijayashanker943 Oct 31, 2025
d07a9d0
Update sample scripts for smart-intersection
tejaswinijayashanker943 Oct 31, 2025
2f489b8
Merge branch 'sairampillai/metro-m9-benchmarking' into sairam/metro-s…
sairampillai Oct 31, 2025
28855dd
Merge branch 'main' into sairam/metro-smart-intersection-gpu
sairampillai Nov 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,16 @@ services:
- scenescape
privileged: true
entrypoint: ["./run.sh"]
group_add:
- "109"
- "110"
- "992"
device_cgroup_rules:
- 'c 189:* rmw'
- 'c 209:* rmw'
- 'a 189:* rwm'
devices:
- "/dev/dri:/dev/dri"
- "/dev:/dev"
depends_on:
- broker
- ntpserver
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,147 @@
#!/bin/bash

DLSPS_NODE_IP="localhost"

function run_sample() {
device=$1

if [ $device == "GPU" ]; then
pipeline_suffix="_gpu"
else
pipeline_suffix=""
fi

pipeline_list=()
echo
echo -n ">>>>>Initialization..."

# Define camera names for RTSP paths
camera_names=("camera1" "camera2" "camera3" "camera4")
camera_ids=("camera1" "camera2" "camera3" "camera4")

# Start all 4 intersection camera pipelines
for cam_num in 1 2 3 4; do
pipeline_name="intersection-cam${cam_num}${pipeline_suffix}"
camera_path="${camera_names[$((cam_num-1))]}"
camera_id="${camera_ids[$((cam_num-1))]}"

payload=$(cat <<EOF
{
"destination": {
"frame": {
"type": "rtsp",
"path": "${camera_path}"
}
},
"parameters": {
"ntp_config": {
"ntpServer": "ntpserv"
},
"camera_config": {
"cameraid": "${camera_id}",
"metadatagenpolicy": "detectionPolicy"
}
}
}
EOF
)

response=$(curl -k -s "https://$DLSPS_NODE_IP/api/pipelines/user_defined_pipelines/${pipeline_name}" -X POST -H "Content-Type: application/json" -d "$payload")
if [ $? -ne 0 ]; then
echo -e "\nError: curl command failed. Check the deployment status."
return 1
fi
sleep 2
pipeline_list+=("$response")
done

running=false
while [ "$running" != true ]; do
status=$(curl -k -s --location -X GET "https://$DLSPS_NODE_IP/api/pipelines/status" | grep state | awk ' { print $2 } ' | tr -d \")
if [[ "$status" == *"QUEUED"* ]]; then
running=false
echo -n "."
sleep 1
else
running=true
echo -n "Pipelines initialized."
echo
fi
done
}

function stop_all_pipelines() {
echo
echo -n ">>>>>Stopping all running pipelines."
status=$(curl -k -s -X GET "https://$DLSPS_NODE_IP/api/pipelines/status" -H "accept: application/json")
if [ $? -ne 0 ]; then
echo -e "\nError: curl command failed. Check the deployment status."
return 1
fi
pipelines=$(echo $status | grep -o '"id": "[^"]*"' | awk ' { print $2 } ' | tr -d \" | paste -sd ',' - )
IFS=','
for pipeline in $pipelines; do
response=$(curl -k -s --location -X DELETE "https://$DLSPS_NODE_IP/api/pipelines/${pipeline}")
sleep 2
done
unset IFS
running=true
while [ "$running" == true ]; do
echo -n "."
status=$(curl -k -s --location -X GET "https://$DLSPS_NODE_IP/api/pipelines/status" | grep state | awk ' { print $2 } ' | tr -d \")
if [[ "$status" == *"RUNNING"* ]]; then
running=true
sleep 2
else
running=false
fi
done
echo -n " done."
echo
return 0
}


forcedCPU=true
forcedGPU=false

for arg in "$@"; do
if [ "$arg" == "cpu" ]; then
forcedCPU=true
forcedGPU=false
elif [ "$arg" == "gpu" ]; then
forcedGPU=true
forcedCPU=false
fi
done


stop_all_pipelines

if [ $? -ne 0 ]; then
exit 1
fi


# Check if any render device exists
if $forcedGPU; then
if ls /dev/dri/renderD* 1> /dev/null 2>&1; then
echo -e "\n>>>>>GPU device selected."
run_sample GPU
if [ $? -ne 0 ]; then
exit 1
fi
else
echo -e "\n>>>>>No GPU device found. Please check your GPU driver installation or use CPU."
exit 0
fi
elif $forcedCPU; then
echo -e "\n>>>>>CPU device selected."
run_sample CPU
if [ $? -ne 0 ]; then
exit 1
fi
fi

echo -e "\n>>>>>Results are visualized in UI at 'https://localhost' "
echo -e "\n>>>>>Pipelines status can be checked with 'curl -k --location -X GET https://localhost/api/pipelines/status' or using script 'sample_status.sh'. \n"
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/bash

DLSPS_NODE_IP="localhost"

function get_status() {

interval=10
start_time=$(date +%s)

status=$(curl -k -s --location -X GET "https://$DLSPS_NODE_IP/api/pipelines/status" | grep state | awk ' { print $2 } ' | tr -d \")
if [[ "$status" != *"RUNNING"* ]]; then
running=false
echo -e "\nNo running pipelines"
exit 0
else
running=true
echo -e "\n>>>>>Pipeline status reported every $interval seconds."
echo -e "\n>>>>>Press Ctrl+C to exit..."

while [ "$running" == true ]; do
status=$(curl -k -s --location -X GET "https://$DLSPS_NODE_IP/api/pipelines/status" | grep state | awk ' { print $2 } ' | tr -d \")
if [[ "$status" != *"RUNNING"* ]]; then
running=false
else
results_pipeline=()
elapsed_time=$(($(date +%s) - $start_time))
echo -e "\n>>>>>>>>>>>>>>> $elapsed_time seconds."
results=$(curl -k -s --location -X GET "https://$DLSPS_NODE_IP/api/pipelines/status" | grep -A 2 -B 5 RUNNING | grep fps | awk -F': ' '{print $2}' | awk -F',' '{printf" %.2f ", $1}')
results_pipeline+=("$results")
echo -e "pipelines fps: (${results_pipeline[@]})"
sleep $interval

fi
done
fi

}
# Function to handle exit
cleanup() {
echo -e "\n>>>>>Ctrl+C pressed, terminating the script..."
exit 0
}

# Set trap to catch SIGINT (Ctrl+C) and call cleanup
trap cleanup SIGINT

get_status
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash

DLSPS_NODE_IP="localhost"

function stop_all_pipelines() {
echo
echo -n ">>>>>Stopping all running pipelines."
pipelines=$(curl -k -s -X GET "https://$DLSPS_NODE_IP/api/pipelines/status" -H "accept: application/json" | grep id | awk ' { print $2 } ' | tr -d \" | tr -d '\n')
if [ $? -ne 0 ]; then
echo -e "\nError: curl command failed."
return 1
fi
IFS=','
for pipeline in $pipelines; do
response=$(curl -k -s --location -X DELETE "https://$DLSPS_NODE_IP/api/pipelines/${pipeline}")
sleep 2
done
unset IFS
running=true
while [ "$running" == true ]; do
echo -n "."
status=$(curl -k -s --location -X GET "https://$DLSPS_NODE_IP/api/pipelines/status" | grep state | awk ' { print $2 } ' | tr -d \")
if [[ "$status" == *"RUNNING"* ]]; then
running=true
sleep 2
else
running=false
fi
done
echo -n " done."
echo
return 0
}



stop_all_pipelines

if [ $? -ne 0 ]; then
exit 1
echo "Error: Check pipelines manually"
else
echo ">>>>>All running pipelines stopped."
fi
Loading