Tracking stop sign behavior with a camera and AI
🌐 Live Demo: crestwoodstopsign.com
- Monitor a street intersection with a camera streaming video via RTSP.
- Analyze the feed in real-time using AI to detect vehicles and evaluate their stop sign behavior.
- Store processed images and metadata for each vehicle pass.
- Display recent vehicle passes and statistics on a web interface.
- Function: Captures video frames from the RTSP IP camera.
- Process:
- Connects to the RTSP stream.
- Encodes frames as JPEG.
- Pushes frames to Redis.
- Function: Processes frames from Redis, performs object detection, tracking, and stop sign behavior analysis.
- Process:
- Retrieves frames from Redis.
- Uses YOLO AI model for vehicle detection.
- Tracks detected vehicles and analyzes their stop sign behavior.
- Annotates frames and pushes to new Redis queue.
- Store data in Postgres, and images in self-hosted S3-style file store (MinIO).
- Function: Converts processed frames into an HLS video stream for web display.
- Process:
- Consumes annotated frames from Redis.
- Feeds frames into FFmpeg to generate HLS stream.
- Function: Serves the web interface and live video stream.
- Features:
- Displays live HLS video stream.
- Shows recent vehicle passes with images and scores.
- Integrates with Grafana for detailed statistics.
- Prometheus Integration:
- All services expose metrics to Prometheus for monitoring.
- Metrics include frame processing times, FPS, memory usage, and more.
- Grafana Dashboards:
- Visualize collected metrics for real-time monitoring and long-term trends.