Skip to content

Commit d3f02fc

Browse files
authored
Optimization of pipeline frame latency in Smart Intersection GPU pipelines (#2025)
1 parent 54f2142 commit d3f02fc

File tree

2 files changed

+26
-16
lines changed
  • metro-ai-suite/metro-vision-ai-app-recipe/smart-intersection

2 files changed

+26
-16
lines changed

metro-ai-suite/metro-vision-ai-app-recipe/smart-intersection/init.sh

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,24 @@ echo "UID=$USER_UID" > .env
1717
echo "GID=$USER_GID" >> .env
1818

1919
if [ ! -d "${SOURCE}/dlstreamer-pipeline-server/videos" ] || [ -z "$(find "${SOURCE}/dlstreamer-pipeline-server/videos" -type f -name "*.ts" 2>/dev/null)" ]; then
20-
VIDEO_URL="https://github.com/intel/metro-ai-suite/raw/refs/heads/videos/videos"
21-
VIDEOS=("1122east.ts" "1122west.ts" "1122north.ts" "1122south.ts")
20+
VIDEO_BRANCH="main"
21+
VIDEO_URL="https://github.com/open-edge-platform/edge-ai-resources/raw/refs/heads/${VIDEO_BRANCH}/videos"
22+
VIDEOS=("1122east_h264.ts" "1122west_h264.ts" "1122north_h264.ts" "1122south_h264.ts")
2223
VIDEO_DIR="${SOURCE}/dlstreamer-pipeline-server/videos"
2324

2425
mkdir -p "${VIDEO_DIR}"
26+
27+
echo "Downloading videos in parallel..."
28+
for VIDEO in "${VIDEOS[@]}"; do
29+
curl -k -L -s "${VIDEO_URL}/${VIDEO}" -o "${VIDEO_DIR}/${VIDEO}" &
30+
done
31+
32+
# # Dummy download to potentially improve bandwidth allocation
33+
# curl -k -L -s "${VIDEO_URL}/LICENSE" -o "${VIDEO_DIR}/LICENSE" &
34+
35+
wait
36+
2537
for VIDEO in "${VIDEOS[@]}"; do
26-
echo "Downloading ${VIDEO}..."
27-
curl -L "${VIDEO_URL}/${VIDEO}" -o "${VIDEO_DIR}/${VIDEO}"
2838
if [ ! -f "${VIDEO_DIR}/${VIDEO}" ]; then
2939
echo "Error: Failed to download ${VIDEO}"
3040
exit 1

0 commit comments

Comments
 (0)