Skip to content

Ds-HyunPark/Capstone_Design

Repository files navigation

AI-Based Smart Traffic Monitoring System

Overview

This project is an AI-powered traffic monitoring and analysis system that uses real-time CCTV video streams to detect, track, and count vehicles. The system provides a web-based dashboard for monitoring traffic conditions, visualizing vehicle statistics, and managing CCTV streams.

The project combines computer vision, real-time video processing, and modern web technologies to support intelligent traffic management and data-driven decision making.

Key Features

  • Real-time CCTV video streaming
  • Vehicle detection using YOLOv8
  • Vehicle tracking with DeepSORT
  • Automatic vehicle counting and traffic statistics generation
  • Interactive dashboard for traffic monitoring
  • CCTV location management and selection
  • Real-time data synchronization between frontend and backend
  • Automatic CPU fallback when CUDA is unavailable
  • Modular and scalable backend architecture

System Architecture

Frontend

  • SvelteKit
  • TypeScript
  • Interactive traffic monitoring dashboard
  • Reusable UI components
  • CCTV selection and management utilities

Backend

  • FastAPI
  • SQLAlchemy
  • PostgreSQL
  • RESTful API architecture
  • Modular structure with routers, services, schemas, and configuration modules

AI & Computer Vision

  • YOLOv8 for vehicle detection
  • DeepSORT for multi-object tracking
  • OpenCV for video processing
  • PyTorch for model inference

Project Structure

project-root/
│
├── frontend/                # SvelteKit frontend
│
├── backend/
│   ├── routers/             # API routes
│   ├── services/            # Business logic
│   ├── schemas/             # Pydantic schemas
│   ├── config/              # Configuration files
│   ├── runs/
│   │   └── detect/
│   │       └── train35/
│   │           └── weights/
│   │               └── best.pt
│   └── app_factory.py
│
└── scripts/                 # Run scripts

Vehicle Detection Pipeline

  1. Receive CCTV video stream.
  2. Extract video frames in real time.
  3. Perform vehicle detection using YOLOv8.
  4. Track detected vehicles using DeepSORT.
  5. Count unique vehicles and generate statistics.
  6. Store traffic data through backend APIs.
  7. Visualize results on the web dashboard.

Technologies Used

  • SvelteKit
  • FastAPI
  • PostgreSQL
  • SQLAlchemy
  • YOLOv8
  • DeepSORT
  • OpenCV
  • PyTorch
  • Python
  • TypeScript

Future Improvements

  • Traffic congestion prediction using machine learning
  • Real-time alert system for abnormal traffic conditions
  • Multi-camera analytics
  • Kafka-based streaming architecture
  • Historical traffic trend analysis
  • Cloud deployment and scalability support

Purpose

The goal of this project is to build a practical intelligent transportation monitoring platform that can automatically analyze traffic conditions from CCTV streams and provide meaningful insights through an easy-to-use web interface.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages