Skip to content

Commit c70eb12

Browse files
Minor documentation updates for Smart Traffic and Smart Route applications (open-edge-platform#1767)
Co-authored-by: Madhuri Kumari <madhuri.rai07@gmail.com>
1 parent 161d200 commit c70eb12

File tree

7 files changed

+132
-27
lines changed

7 files changed

+132
-27
lines changed

metro-ai-suite/smart-route-planning-agent/docs/user-guide/get-started.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,20 @@ source setup.sh --setup
3232
For a more granular control, run these commands:
3333

3434
```bash
35-
# Start services only (after setup)
35+
# Build service images only (without starting containers)
36+
source setup.sh --build
37+
38+
# Start services only (after build)
3639
source setup.sh --run
3740

3841
# Stop services
3942
source setup.sh --stop
4043

4144
# Restart services
4245
source setup.sh --restart
46+
47+
# Clean up containers, volumes, images, networks, and all related resources
48+
source setup.sh --clean
4349
```
4450

4551

metro-ai-suite/smart-route-planning-agent/docs/user-guide/release-notes.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Release Notes
22

3-
## Current Release: 1.0.0
3+
## Current Release: 1.0.0-rc1
44

5-
**Release Date**: 2025-08-19
5+
**Release Date**: 17 Feb 2026
66

77
### Features
88

@@ -21,9 +21,6 @@
2121
- **Enhanced Error Handling**: Comprehensive error management across MQTT, VLM, and image services
2222
- **Impact**: Improved service reliability and diagnostic capabilities
2323

24-
### Technical Specifications
25-
26-
- **Supported Languages**: Python programming version 3.10 or higher
27-
- **Architecture**: Microservice with Docker containerization
28-
- **Dependencies**: FastAPI, MQTT client, aiohttp, and structlog
29-
- **External Integrations**: MQTT brokers, VLM OpenVINO serving, and camera image streams
24+
### Known Issues
25+
- Helm is not supported
26+
- This release includes only limited testing on EMT‑S and EMT‑D, some behaviors may not yet be fully validated across all scenarios.

metro-ai-suite/smart-route-planning-agent/setup.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ show_help() {
2626
echo -e " ${GREEN}--run${NC} Start the Smart-Route-Planning-Agent container"
2727
echo -e " ${GREEN}--stop${NC} Stop the running container"
2828
echo -e " ${GREEN}--restart${NC} Restart the Smart-Route-Planning-Agent container"
29+
echo -e " ${GREEN}--clean${NC} Remove containers, volumes, images, and all related resources"
2930
echo -e " ${GREEN}--help${NC} Show this help message"
3031
echo ""
3132
echo -e "${BLUE}Quick Start:${NC}"
@@ -169,6 +170,31 @@ case "$1" in
169170
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then exit 1; else return 1; fi
170171
fi
171172
;;
173+
"--clean")
174+
echo -e "${YELLOW}Cleaning up Smart-Route-Planning-Agent resources...${NC}"
175+
176+
# Stop and remove containers
177+
echo -e "${YELLOW}Stopping and removing containers...${NC}"
178+
docker compose -f "$COMPOSE_MAIN" -p "$PROJECT_NAME" down 2>/dev/null || true
179+
echo -e "${GREEN}Containers stopped and removed.${NC}"
180+
181+
# Remove project volumes
182+
#echo -e "${YELLOW}Removing volumes...${NC}"
183+
#docker volume ls --format '{{.Name}}' | grep "$PROJECT_NAME" | xargs -r docker volume rm 2>/dev/null || true
184+
#echo -e "${GREEN}Volumes removed.${NC}"
185+
186+
# Remove project-related images
187+
echo -e "${YELLOW}Removing container images...${NC}"
188+
docker images --format '{{.Repository}}:{{.Tag}} {{.ID}}' | grep "smart-route-planning-agent" | awk '{print $2}' | xargs -r docker rmi -f 2>/dev/null || true
189+
echo -e "${GREEN}Images removed.${NC}"
190+
191+
# Remove project networks
192+
#echo -e "${YELLOW}Removing networks...${NC}"
193+
#docker network ls --format '{{.Name}}' | grep "$PROJECT_NAME" | xargs -r docker network rm 2>/dev/null || true
194+
#echo -e "${GREEN}Networks removed.${NC}"
195+
196+
echo -e "${GREEN}Clean up completed successfully. All containers, volumes, images, networks, and related resources have been removed.${NC}"
197+
;;
172198
*)
173199
echo -e "${RED}Unknown command: $1${NC}"
174200
echo -e "${YELLOW}Use '--help' for usage information${NC}"

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

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ traffic data streaming, or use the included broker.
1919
- **Docker commands and terminal usage**: You are familiar with Docker commands and using the
2020
terminal. If you are new to Docker, see [Docker Documentation](https://docs.docker.com/) for
2121
an introduction.
22+
- **Hugging Face token**: Set your token using `export HUGGINGFACE_TOKEN="<your-huggingface-token>"`
23+
- **Registry configuration**: To pull pre-built images from a specific registry, set the `REGISTRY` and `TAG` parameters. Following is the recommended default setting.
24+
```bash
25+
export REGISTRY="intel"
26+
export TAG="latest"
27+
```
28+
2229

2330
## Quick Start with Setup Script
2431

@@ -52,7 +59,31 @@ This single command will:
5259
- Build Docker images
5360
- Start services in the Smart Traffic Intersection Agent's application stack
5461

55-
### 3. Access Services
62+
### 3. Run alternative setup options
63+
64+
For a more granular control, run these commands:
65+
66+
```bash
67+
# Set environment variables without building image or starting any containers
68+
source setup.sh --setenv
69+
70+
# Build service images only (without starting containers)
71+
source setup.sh --build
72+
73+
# Start services without building the image
74+
source setup.sh --run
75+
76+
# Stop services
77+
source setup.sh --stop
78+
79+
# Restart services. The variable `service_type` can be set to `agent`, `deps`, and `all`. Run with --help to get details of each type.
80+
source setup.sh --restart [service_type]
81+
82+
# Clean up containers. Run with --help to get details of the option.
83+
source setup.sh --clean [option]
84+
```
85+
86+
### 4. Access Services
5687

5788
When the script completes, it will show the URLs to access the services. Go to these URLs so
5889
that the respective services can access them in a web browser.
@@ -162,14 +193,15 @@ To spin-up more instances - say `n number of new instances`, repeat the steps me
162193

163194
## Advanced Environment Configuration
164195

165-
For advanced users who need more control over the configuration, you can configure the
166-
following environment variables before running the setup script to override the default
167-
behaviour:
196+
For advanced users who need more control over the configuration, you can configure the following environment variables before running the setup script to override the default behaviour:
168197

169198
```bash
170199
# Set log level to debug to help in debugging issues, default value is info
171200
export LOG_LEVEL=DEBUG
172201

202+
# Select iGPU as the accelerator to perform VLM inference. By default, it is set to CPU
203+
export VLM_DEVICE=GPU
204+
173205
# Change the VLM Model name. Default value set in script.sh is microsoft/Phi-3.5-vision-instruct.
174206
export VLM_MODEL_NAME=Qwen/Qwen2.5-VL-3B-Instruct
175207

@@ -183,7 +215,12 @@ export VLM_TOP_P=0.3 # Default 0.1, range 0-1; another parame
183215
export HIGH_DENSITY_THRESHOLD=5 # Default value 10
184216
export MODERATE_DENSITY_THRESHOLD=3 # Default value 5; Make sure this is less than HIGH_DENSITY_THRESHOLD
185217
export TRAFFIC_BUFFER_DURATION=20 # Default value 30; Analysis window of traffic feeds in seconds
218+
219+
# To mock the weather data (say in airgapped deployment)
220+
export WEATHER_MOCK=True
186221
```
222+
### Customizing the video used by sample application
223+
The video used by this sample application is determined by the configuration in [Smart Intersection application](../../../metro-vision-ai-app-recipe/smart-intersection/). Refer to its documentation for further details.
187224

188225
## Accessing the Services
189226

metro-ai-suite/smart-traffic-intersection-agent/docs/user-guide/get-started/build-from-source.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ This section shows how to build the Smart Traffic Intersection Agent from source
1313
### 1. Clone the Repository
1414

1515
```bash
16-
git clone https://github.com/open-edge-platform/edge-ai-libraries.git
17-
cd edge-ai-libraries/microservices/scene-intelligence
16+
git clone https://github.com/open-edge-platform/edge-ai-suites.git
17+
cd metro-ai-suite/smart-traffic-intersection-agent/
1818
```
1919

2020
### 2. Build the Docker Image
2121

2222
Build the Traffic Intersection Agent:
2323

2424
```bash
25-
docker compose -f docker/compose.yaml build traffic-intersection-agent
25+
docker compose -f docker/agent-compose.yaml build traffic-intersection-agent
2626
```
2727

2828
### 3. Run the Service
@@ -32,7 +32,7 @@ docker compose -f docker/compose.yaml build traffic-intersection-agent
3232
source setup.sh --run
3333

3434
# Or manually with Docker Compose
35-
docker compose -f docker/compose.yaml up traffic-intersection-agent
35+
docker compose -f docker/agent-compose.yaml up traffic-intersection-agent
3636
```
3737

3838
### 4. Verify the Build
@@ -45,7 +45,7 @@ curl http://localhost:8081/health
4545
curl http://localhost:7860/
4646

4747
# View logs
48-
docker compose -f docker/compose.yaml logs traffic-intersection-agent
48+
docker compose -f docker/agent-compose.yaml logs traffic-intersection-agent
4949
```
5050

5151
### Verify API Endpoints
@@ -64,13 +64,13 @@ After you have edited the code, rebuild:
6464

6565
```bash
6666
# Rebuild the image
67-
docker compose -f docker/compose.yaml build traffic-intersection-agent
67+
docker compose -f docker/agent-compose.yaml build traffic-intersection-agent
6868

6969
# Restart the service
70-
docker compose -f docker/compose.yaml up -d traffic-intersection-agent
70+
docker compose -f docker/agent-compose.yaml up -d traffic-intersection-agent
7171

7272
# View startup logs
73-
docker compose -f docker/compose.yaml logs traffic-intersection-agent
73+
docker compose -f docker/agent-compose.yaml logs traffic-intersection-agent
7474
```
7575

7676
## Learn More
Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
11
# Release Notes
22

3-
## Current Release
3+
## Current Release: 1.0.0-rc1
44

5-
**Version**: 1.0.0\
6-
**Release Date**: TBD
5+
**Release Date**: 17 Feb 2026
76

8-
- Added Smart Traffic Intersection Agent
7+
### Features
8+
9+
- **Real-time Traffic Analysis**: Comprehensive directional traffic density monitoring with MQTT integration
10+
- **VLM Integration**: Vision Language Model (VLM)-powered traffic scene analysis with sustained traffic detection
11+
- **Sliding Window Analysis**: 15-second sliding window with 3-second sustained threshold for accurate traffic state detection
12+
- **Camera Image Management**: Intelligent camera image retention and coordination between API and VLM services
13+
- **RESTful API**: Complete HTTP API for traffic summaries, intersection monitoring, and VLM analysis retrieval
14+
15+
### Improvements
16+
17+
- **Concurrency Control**: Semaphore-based VLM worker management for optimal resource utilization
18+
- **Image Retention Logic**: Camera images persist with VLM analysis for consistent data correlation
19+
- **Enhanced Error Handling**: Comprehensive error management across MQTT, VLM, and image services
20+
- **Setup Script Enhancements**: Added `--build` option for building service images without starting containers
21+
22+
### Known Issues
23+
- Helm is not supported
24+
- This release includes only limited testing on EMT‑S and EMT‑D, some behaviors may not yet be fully validated across all scenarios.

metro-ai-suite/smart-traffic-intersection-agent/setup.sh

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ if [ "$#" -eq 0 ] || ([ "$#" -eq 1 ] && [ "$1" = "--help" ]); then
4545
echo -e "${YELLOW}USAGE: ${GREEN}source setup.sh ${BLUE}[--setenv | --setup | --run | --restart [agent|deps|all] | --stop | --clean | --help]"
4646
echo -e "${YELLOW}"
4747
echo -e " --setenv: Set environment variables without building image or starting any containers"
48+
echo -e " --build: Build the service images without starting containers"
4849
echo -e " --setup: Build and run the services"
4950
echo -e " --run: Start the services without building image (if already built)"
5051
echo -e " --restart [service_type]: Restart services"
@@ -63,7 +64,7 @@ elif [ "$#" -gt 2 ]; then
6364
echo -e "${YELLOW}Use --help for usage information${NC}"
6465
return 1
6566

66-
elif [ "$1" != "--help" ] && [ "$1" != "--setenv" ] && [ "$1" != "--run" ] && [ "$1" != "--setup" ] && [ "$1" != "--restart" ] && [ "$1" != "--stop" ] && [ "$1" != "--clean" ]; then
67+
elif [ "$1" != "--help" ] && [ "$1" != "--setenv" ] && [ "$1" != "--run" ] && [ "$1" != "--build" ] && [ "$1" != "--setup" ] && [ "$1" != "--restart" ] && [ "$1" != "--stop" ] && [ "$1" != "--clean" ]; then
6768
# Default case for unrecognized option
6869
echo -e "${RED}Unknown option: $1 ${NC}"
6970
echo -e "${YELLOW}Use --help for usage information${NC}"
@@ -167,7 +168,7 @@ check_and_setup_dependencies() {
167168
}
168169

169170
# Verify dependencies and setup (skip if stopping/cleaning services or only showing help or setting env vars)
170-
if [ "$1" != "--help" ] && [ "$1" != "--setenv" ] && [ "$1" != "--clean" ] && [ "$1" != "--stop" ]; then
171+
if [ "$1" != "--help" ] && [ "$1" != "--setenv" ] && [ "$1" != "--build" ] && [ "$1" != "--clean" ] && [ "$1" != "--stop" ]; then
171172
check_and_setup_dependencies
172173

173174
if [ $? -ne 0 ]; then
@@ -275,6 +276,25 @@ print_all_service_host_endpoints() {
275276
echo -e
276277
}
277278

279+
# Build service images without starting containers
280+
build_service() {
281+
echo -e "${BLUE}==> Building Smart-Traffic-Intersection-Agent ${RED}${PROJECT_NAME} ${BLUE}...${NC}"
282+
283+
# Build the service images
284+
if [ -L "${APP_DIR}/docker/ri-compose.yaml" ]; then
285+
docker compose --project-directory $DEPS_DIR -f "${APP_DIR}/docker/ri-compose.yaml" -f "${APP_DIR}/docker/agent-compose.yaml" -p $PROJECT_NAME build
286+
else
287+
docker compose -f "${APP_DIR}/docker/agent-compose.yaml" -p $PROJECT_NAME build
288+
fi
289+
290+
if [ $? -eq 0 ]; then
291+
echo -e "${GREEN}Smart-Traffic-Intersection-Agent images built successfully!${NC}"
292+
else
293+
echo -e "${RED}Failed to build Smart-Traffic-Intersection-Agent images${NC}"
294+
return 1
295+
fi
296+
}
297+
278298
# Build agent Backend/UI image and run its container along with all other services - to run Traffic Intersection Agent End-to-End
279299
build_and_start_service() {
280300
echo -e "${BLUE}==> Starting Smart-Traffic-Intersection-Agent ${RED}${PROJECT_NAME} ${BLUE}...${NC}"
@@ -403,6 +423,9 @@ fi
403423

404424
# Execute actions based on options provided to setup script
405425
case $1 in
426+
--build)
427+
build_service
428+
;;
406429
--setup)
407430
build_and_start_service
408431
;;

0 commit comments

Comments
 (0)