Skip to content

lead-with-data/AutoTheftDetection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Auto Theft Detection System

Overview

Auto Theft Detection is an intelligent real-time computer vision application that detects stolen vehicles. It utilizes advanced deep learning models to perform object detection, object tracking, and optical character recognition (OCR) on video streams or uploaded files to identify license plates and match them against a database of stolen vehicles.

Core Features

  • Real-time Vehicle Detection: Identifies vehicles (cars, motorcycles, buses, trucks) in video streams.
  • License Plate Recognition: Accurately detects and reads license plates using OCR.
  • Theft Alertging: Matches recognized plates against a specific registry of stolen plates and instantly logs thefts with timestamped image captures.
  • Web Dashboard: A split-stack modern web interface built with Flask (Frontend UI) and FastAPI (Backend API engine).

How It's Made

The system is built on a robust, multi-layered architecture:

  1. Backend API (FastAPI): High-performance backend handling video uploads, stream ingestion, and inference routing.
  2. Frontend UI (Flask): User-friendly dashboard to manage uploads, connect live streams (RTSP/HTTP), and view stolen vehicle alerts.
  3. Object Detection (YOLOv8): Uses two trained YOLO models:
    • yolov8n.pt: For general vehicle detection.
    • license_plate_detector.pt: For isolated license plate bounding boxes.
  4. Object Tracking (SORT): The Simple Online and Realtime Tracking (SORT) algorithm is utilized to track specific vehicles consistently across multiple video frames.
  5. OCR Engine (EasyOCR): Extracts text from the cropped license plate images. A set of customized heuristics and character mapping rules (in util.py) ensures higher accuracy by correcting common OCR misreadings (e.g., confusing 'O' with '0').
  6. Data Matching (Pandas): Continuously checks scanned plates against a CSV-based database of stolen plates.

Core Skills & Technologies Used

  • Deep Learning & Computer Vision: Ultralytics YOLOv8, OpenCV
  • Object Tracking: SORT (Simple Online and Realtime Tracking) algorithm
  • Optical Character Recognition (OCR): EasyOCR
  • Backend Frameworks: FastAPI, Flask, Uvicorn, Werkzeug WSGI
  • Data Manipulation: NumPy, Pandas, SciPy
  • Programming Languages: Python, HTML/CSS/JS (Templates)

Getting Started

Prerequisites

Make sure you have Python 3.8+ installed.

Installation

  1. Clone this repository:
    git clone https://github.com/ahmad-bsds/AutoTheftDetection.git
    cd AutoTheftDetection
  2. Install the required dependencies:
    pip install -r requirements.txt

Running the Application

To run the combined FastAPI and Flask server, use the entry point script:

python run.py

Then navigate to http://127.0.0.1:8000/app in your browser.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors