Computer Vision / AI • Completed

AI Smart City Issue Detection System

AI-powered smart city monitoring system that detects potholes and garbage using a custom-trained YOLOv8 model. Built with Flask, SQLite, and analytics dashboards for automated issue reporting and infrastructure monitoring.

GitHub Repo Back to Home

Project Overview

AI-powered smart city monitoring system that detects potholes and garbage using a custom-trained YOLOv8 model. Built with Flask, SQLite, and analytics dashboards for automated issue reporting and infrastructure monitoring.

The Problem

Urban infrastructure issues such as road potholes and garbage accumulation negatively impact public safety, cleanliness, and quality of life. Traditional reporting systems rely on manual inspections and citizen complaints, making them slow, inconsistent, and difficult to scale. Cities need an automated solution capable of detecting and tracking infrastructure problems efficiently.

The Solution

Developed an AI-powered computer vision application that automatically detects potholes and garbage from uploaded images using a custom-trained YOLOv8 model. The system provides severity analysis, report history, analytics dashboards, and centralized issue tracking through a Flask-based web application integrated with SQLite.

Architecture & System Flow

1. Images are uploaded through the Flask web interface or captured using a camera. 2. The YOLOv8 model processes the image and detects potholes and garbage. 3. Bounding boxes and confidence scores are generated. 4. Issue counts and severity levels are calculated automatically. 5. Detection reports are stored in an SQLite database. 6. Analytics dashboards visualize report statistics using Chart.js. 7. Historical reports can be reviewed and managed through the web application.

Key Features

  • Custom-trained YOLOv8 object detection model
  • Pothole detection
  • Garbage detection
  • Image upload support
  • Live camera capture
  • Automatic severity scoring
  • Confidence-based filtering
  • SQLite database integration
  • Report history management
  • Analytics dashboard
  • Chart.js visualizations
  • Responsive Bootstrap UI
  • Detection summary generation
  • Automated issue tracking

Challenges Faced

Challenge 1: High variation in pothole shapes, lighting conditions, and image quality. Solution: Applied extensive data augmentation including flipping, rotation, brightness adjustments, and blur transformations. Challenge 2: Class imbalance between pothole and garbage samples. Solution: Expanded dataset diversity and balanced training samples. Challenge 3: Limited annotated data availability. Solution: Built a custom dataset using Roboflow and performed manual annotation and labeling. Challenge 4: CPU-based inference performance limitations. Solution: Optimized the inference pipeline and deployed a lightweight production-ready Flask application.

Results & Metrics

• Custom YOLOv8m object detection model trained on 2,000+ annotated images • Precision: ~62% • Recall: ~58% • mAP@0.5: ~60% • Automated issue detection and reporting pipeline • Real-time analytics dashboard with report tracking • Reduced manual effort required for infrastructure issue identification

Project Gallery

Thumbnail

Thumbnail

Gallery image

Screenshot 1

Gallery image

Screenshot 2

Gallery image

Screenshot 3

Gallery image

Screenshot 4

Gallery image

Screenshot 5

Gallery image

Screenshot 6

Tech Stack

Python YOLOv8 Flask SQLite OpenCV Roboflow Bootstrap 5 Chart.js Google Colab

Interested in this project?

Let's discuss how we can leverage these technologies and methods to build scalable systems for your engineering needs.

Get In Touch Download Resume