Skip to content

Commit 57c03e7

Browse files
[Smart Traffic Agent] RI Dependencies and Deployment setup (open-edge-platform#1537)
Signed-off-by: Krishna Murti <krishna.murti@intel.com> Co-authored-by: Madhuri Kumari <madhuri.rai07@gmail.com>
1 parent d8e3a23 commit 57c03e7

File tree

20 files changed

+533
-1852
lines changed

20 files changed

+533
-1852
lines changed

.gitmodules

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,8 @@
3737
[submodule "robotics-ai-suite/pipelines/mpc-demo/ocs2/ocs2"]
3838
path = robotics-ai-suite/pipelines/mpc-demo/ocs2/ocs2
3939
url = https://github.com/leggedrobotics/ocs2.git
40+
[submodule "metro-ai-suite/smart-traffic-intersection-agent/deps/metro-vision"]
41+
path = metro-ai-suite/smart-traffic-intersection-agent/deps/metro-vision
42+
url = https://github.com/open-edge-platform/edge-ai-suites.git
43+
branch = exp/smart-traffic-adapter
44+
shallow = true

metro-ai-suite/smart-traffic-intersection-agent/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,4 @@ share/python-wheels/
8686
*.egg
8787
MANIFEST
8888

89-
**/edge-ai-suites/
89+
**/docker/ri-compose.yaml
Submodule metro-vision added at d79acca

metro-ai-suite/smart-traffic-intersection-agent/docker/compose.yaml renamed to metro-ai-suite/smart-traffic-intersection-agent/docker/agent-compose.yaml

Lines changed: 31 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
11
# Copyright (C) 2025 Intel Corporation
22
# SPDX-License-Identifier: Apache-2.0
33

4-
name: scene-intelligence
5-
64
secrets:
75
root-cert:
8-
file: ../edge-ai-suites/metro-ai-suite/metro-vision-ai-app-recipe/smart-intersection/src/secrets/certs/scenescape-ca.pem
6+
file: ${RI_DIR}/src/secrets/certs/scenescape-ca.pem
97

108
services:
11-
# VLM OpenVINO Serving Service
129
vlm-openvino-serving:
13-
image: intel/vlm-openvino-serving:1.3.1
10+
image: intel/vlm-openvino-serving:1.3.2
1411
ports:
15-
- "${VLM_SERVICE_PORT:-9764}:8000"
12+
- "8000"
1613
ipc: host
1714
networks:
1815
- scenescape
1916
environment:
2017
# Proxy settings
21-
no_proxy_env: ${no_proxy_env},${HOST_IP}
22-
no_proxy: ${no_proxy_env},${HOST_IP}
18+
no_proxy_env: ${no_proxy:-${NO_PROXY:-}},${HOST_IP}
19+
no_proxy: ${no_proxy:-${NO_PROXY:-}},${HOST_IP}
2320
http_proxy: ${http_proxy}
2421
https_proxy: ${https_proxy}
2522
# VLM Model configuration
@@ -30,7 +27,7 @@ services:
3027
WORKERS: ${VLM_WORKERS:-1}
3128
VLM_MAX_COMPLETION_TOKENS: ${VLM_MAX_COMPLETION_TOKENS:-1500}
3229
HUGGINGFACE_TOKEN: ${HUGGINGFACE_TOKEN}
33-
OV_CONFIG: ${OV_CONFIG}
30+
OV_CONFIG: ${OV_CONFIG:-}
3431
VLM_LOG_LEVEL: ${VLM_LOG_LEVEL:-info}
3532
OPENVINO_LOG_LEVEL: ${VLM_OPENVINO_LOG_LEVEL:-1}
3633
VLM_ACCESS_LOG_FILE: ${VLM_ACCESS_LOG_FILE:-/dev/null}
@@ -51,62 +48,59 @@ services:
5148
- ov-models:/root/.cache/huggingface
5249
- ov-models:/app/ov-model
5350

54-
# Smart Traffic Intersection Agent Service
55-
traffic-intersection-agent:
51+
traffic-agent:
5652
build:
57-
context: ../src
53+
context: ${APP_DIR:-..}/src
5854
dockerfile: Dockerfile
59-
image: ${REGISTRY:-}traffic-intersection-agent:${TAG:-latest}
55+
image: ${REGISTRY:-}smart-traffic-intersection-agent:${TAG:-latest}
6056
ports:
61-
- "${TRAFFIC_INTERSECTION_AGENT_PORT:-8081}:8081"
62-
- "${TRAFFIC_INTERSECTION_AGENT_UI_PORT:-7860}:7860"
57+
- "${AGENT_BACKEND_PORT:-}:8081"
58+
- "${AGENT_UI_PORT:-}:7860"
6359
networks:
6460
- scenescape
6561
depends_on:
6662
vlm-openvino-serving:
6763
condition: service_healthy
6864
environment:
69-
# Service configuration
70-
TRAFFIC_INTERSECTION_AGENT_HOST: 0.0.0.0
71-
TRAFFIC_INTERSECTION_AGENT_PORT: ${TRAFFIC_INTERSECTION_AGENT_PORT:-8081}
7265
LOG_LEVEL: ${LOG_LEVEL:-INFO}
73-
74-
# UI configuration
75-
TRAFFIC_INTERSECTION_AGENT_UI_PORT: ${TRAFFIC_INTERSECTION_AGENT_UI_PORT:-7860}
7666
USE_API: "true"
77-
API_URL: http://localhost:${TRAFFIC_INTERSECTION_AGENT_PORT:-8081}/api/v1/traffic/current
7867
REFRESH_INTERVAL: ${REFRESH_INTERVAL:-15}
7968

8069
# Proxy settings
8170
http_proxy: ${http_proxy}
82-
https_proxy: ${https_proxy}
83-
no_proxy: ${no_proxy_env},.scenescape.intel.com,${HOST_IP},broker.scenescape.intel.com,vlm-openvino-serving
84-
NO_PROXY: ${no_proxy_env},.scenescape.intel.com,${HOST_IP},broker.scenescape.intel.com,vlm-openvino-serving
8571
HTTP_PROXY: ${http_proxy}
72+
https_proxy: ${https_proxy}
8673
HTTPS_PROXY: ${https_proxy}
74+
no_proxy: ${no_proxy:-${NO_PROXY:-}},.scenescape.intel.com,${HOST_IP},broker.scenescape.intel.com,vlm-openvino-serving
75+
NO_PROXY: ${no_proxy:-${NO_PROXY:-}},.scenescape.intel.com,${HOST_IP},broker.scenescape.intel.com,vlm-openvino-serving
8776

8877
# MQTT configuration (connects to broker service)
8978
MQTT_HOST: ${MQTT_HOST:-broker.scenescape.intel.com}
9079
MQTT_PORT: ${MQTT_PORT:-1883}
9180

92-
# Intersection configuration (overrides config/traffic_agent.json)
93-
INTERSECTION_NAME: ${INTERSECTION_NAME:-Intersection-1}
94-
INTERSECTION_LATITUDE: ${INTERSECTION_LATITUDE:-37.7049108}
95-
INTERSECTION_LONGITUDE: ${INTERSECTION_LONGITUDE:--121.9096158}
81+
# Intersection configuration (overrides src/config/deployment_instance.json)
82+
INTERSECTION_NAME: ${INTERSECTION_NAME:-}
83+
INTERSECTION_LATITUDE: ${INTERSECTION_LATITUDE:-}
84+
INTERSECTION_LONGITUDE: ${INTERSECTION_LONGITUDE:-}
9685

97-
# Weather configuration (overrides config/traffic_agent.json)
86+
# Weather configuration (overrides src/config/traffic_agent.json)
9887
WEATHER_MOCK: ${WEATHER_MOCK:-false}
9988

100-
# VLM configuration (overrides config/traffic_agent.json)
101-
VLM_MODEL: ${VLM_MODEL_NAME:-Qwen/Qwen2.5-VL-3B-Instruct}
89+
# VLM configuration (overrides src/config/traffic_agent.json)
90+
VLM_MODEL_NAME: ${VLM_MODEL_NAME:-Qwen/Qwen2.5-VL-3B-Instruct}
91+
VLM_TIMEOUT_SECONDS: ${VLM_TIMEOUT_SECONDS:-}
92+
VLM_MAX_COMPLETION_TOKENS: ${VLM_MAX_COMPLETION_TOKENS:-}
93+
VLM_TEMPERATURE: ${VLM_TEMPERATURE:-}
94+
VLM_TOP_P: ${VLM_TOP_P:-}
10295

103-
# Traffic analysis configuration (overrides config/traffic_agent.json)
96+
# Traffic analysis configuration (overrides src/config/traffic_agent.json)
10497
HIGH_DENSITY_THRESHOLD: ${HIGH_DENSITY_THRESHOLD:-10}
105-
MODERATE_DENSITY_THRESHOLD: ${MODERATE_DENSITY_THRESHOLD:-5}
98+
MODERATE_DENSITY_THRESHOLD: ${MODERATE_DENSITY_THRESHOLD:-}
99+
TRAFFIC_BUFFER_DURATION: ${TRAFFIC_BUFFER_DURATION:-}
106100

107101
volumes:
108-
- ../src/config:/app/config:ro
109-
- traffic-intelligence-data:/app/data
102+
- ${APP_DIR:-..}/src/config:/app/config:ro
103+
- traffic-agent-data:/app/data
110104
secrets:
111105
- source: root-cert
112106
target: /app/secrets/certs/scenescape-ca.pem
@@ -120,9 +114,7 @@ services:
120114

121115
volumes:
122116
ov-models:
123-
traffic-intelligence-data:
117+
traffic-agent-data:
124118

125119
networks:
126120
scenescape:
127-
external: true
128-
name: metro-vision-ai-app-recipe_scenescape

metro-ai-suite/smart-traffic-intersection-agent/docs/user-guide/Overview.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,46 @@
1-
# Scene Intelligence microservice
1+
# Smart Traffic Intersection Agent
22

3-
The Scene Intelligence microservice is a comprehensive traffic analysis service that provides real-time intersection monitoring, directional traffic density analysis, and Vision Language Model (VLM) powered traffic insights. It processes MQTT traffic data, manages camera images, and delivers intelligent traffic analysis through RESTful APIs.
3+
The Smart Traffic Intersection Agent is a comprehensive traffic analysis service that provides real-time intersection monitoring, directional traffic density analysis, and Vision Language Model (VLM) powered traffic insights. It processes MQTT traffic data, manages camera images, and delivers intelligent traffic analysis through RESTful APIs.
44

55
## Overview
66

77
The microservice processes real-time traffic data from MQTT streams and provides advanced analytics including directional traffic density monitoring, VLM-powered traffic scene analysis, and comprehensive traffic summaries. It supports sliding window analysis, sustained traffic detection, and intelligent camera image management for enhanced traffic insights.
88

9+
## How It Works
10+
11+
The diagram below illustrates the high-level architecture of the Smart Traffic Intelligence Agent, showcasing its core components and their interactions with external systems.
12+
913
<p align="center">
1014
<img src="./_images/ITT_architecture.png" alt="Architecture" />
1115
</p>
1216

17+
The Smart Traffic UI below shows how traffic, weather data is analyzed and summary, alerts are shown to the user.
18+
19+
<p align="center">
20+
<img src="./_images/traffic_agent_ui.png" alt="Traffic Intersection Agent UI" />
21+
</p>
22+
23+
## Components
24+
25+
The Smart Traffic Intelligence stack includes these containerized services:
26+
27+
- **MQTT Broker** (Eclipse Mosquitto) - Message broker for traffic data
28+
- **DL Streamer Pipeline Server** - Video analytics and AI inference
29+
- **SceneScape Database** - Configuration and metadata storage
30+
- **SceneScape Web Server** - Management interface
31+
- **SceneScape Controller** - Orchestration service
32+
- **VLM OpenVINO Serving** - Vision Language Model inference
33+
- **Traffic Intelligence** - Real-time traffic analysis with dual interface (API + UI)
34+
35+
### Key Integration Points
36+
37+
- **MQTT Communication**: All services communicate via the shared MQTT broker
38+
- **Docker Network**: Services discover each other via Docker service names
39+
- **Shared Secrets**: TLS certificates and auth files mounted from `src/secrets/`
40+
- **Persistent Storage**: Traffic data stored in Docker volume `traffic-intelligence-data`
41+
- **Health Monitoring**: All services include health check endpoints
42+
43+
1344
## Supporting Resources
1445

1546
- [Get Started Guide](get-started.md)
488 KB
Loading
178 KB
Loading
288 KB
Loading

0 commit comments

Comments
 (0)