Skip to content

Vinayak-Chinchakhandi/Metro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

61 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš‡ Metro AI – Intelligent Metro Ticketing & Analytics Platform

πŸ“Œ Overview

Metro AI is an AI-powered intelligent metro ticketing and analytics platform designed to improve passenger experience, operational efficiency, and security in urban metro systems.

The platform combines machine learning, intelligent routing, fraud detection, QR-based ticketing, analytics, and AI-powered metro assistance to create a smarter metro ecosystem.


🎯 Key Features

🎫 Smart QR Ticketing

  • QR-based ticket generation
  • Entry and exit gate validation
  • Automatic journey distance calculation
  • Travel time estimation
  • Secure ticket verification

πŸ€– Passenger Demand Prediction (V2)

Predicts station-level passenger demand using machine learning.

Features Used

  • Station
  • Hour of day
  • Weather conditions
  • Event factor
  • Month
  • Weekend indicator
  • Weekday number
  • Interchange station indicator

Outputs

  • Predicted passenger count
  • Current station load
  • Crowd level (Low / Medium / High)

🚨 Fraud Detection (V2)

Detects suspicious travel behavior using machine learning and backend validation.

Features Used

  • Entry station
  • Exit station
  • Travel distance
  • Expected travel time
  • Actual travel time
  • Travel ratio
  • Time difference
  • Interchange count
  • Repeat usage

Outputs

  • Fraud probability
  • Alert status
  • Fraud reason

🧠 Metro AI Assistant

Gemini-powered metro assistant capable of:

  • Route guidance
  • Journey assistance
  • Interchange navigation
  • Platform guidance
  • Bengaluru Metro support

πŸ—ΊοΈ Intelligent Route Engine

Supports:

  • Direct journeys
  • Single interchange journeys
  • Double interchange journeys

Current interchange support:

  • Nadaprabhu Kempegowda Station Majestic
  • Rashtreeya Vidyalaya Road

Features:

  • Route segmentation
  • Distance calculation
  • Journey time estimation
  • Interchange detection

πŸ“Š Analytics Dashboard

Provides operational insights including:

  • Total tickets issued
  • Fraud alerts
  • Passenger demand analytics
  • Top stations
  • Fraud-prone stations
  • Live prediction monitoring

🧠 Machine Learning Pipeline

Demand Prediction

Feature Engineering

  • Month
  • Weekend indicator
  • Weekday number
  • Interchange station indicator

Algorithms Evaluated

  • Random Forest Regressor
  • Gradient Boosting Regressor
  • Extra Trees Regressor
  • XGBoost Regressor

Selected Model

  • Gradient Boosting Regressor

Fraud Detection

Feature Engineering

  • Travel ratio
  • Time difference
  • Interchange count

Algorithms Evaluated

  • Random Forest Classifier
  • Gradient Boosting Classifier
  • Extra Trees Classifier
  • XGBoost Classifier

Selected Model

  • Extra Trees Classifier

πŸ—οΈ System Architecture

Frontend

  • React.js
  • Tailwind CSS
  • React Router
  • Recharts
  • React Leaflet

Backend

  • Node.js
  • Express.js
  • PostgreSQL

AI Service

  • FastAPI
  • Scikit-learn
  • Pandas
  • NumPy
  • Joblib

AI Assistant

  • Google Gemini

πŸ“‚ Project Structure

METRO/
β”‚
β”œβ”€β”€ Frontend/          
β”œβ”€β”€ Backend/           
β”œβ”€β”€ ai-service/        
β”œβ”€β”€ database/          
β”œβ”€β”€ datasets/          
β”œβ”€β”€ docs/              
└── README.md

βš™οΈ How to Run

1. Clone Repository

git clone <repository-url>
cd METRO

2. Backend Setup

cd Backend
npm install
npm run dev

3. Frontend Setup

cd Frontend
npm install
npm run dev

4. AI Service Setup

cd ai-service

pip install -r requirements.txt

uvicorn app.main:app --reload

5. Database Setup

Configure PostgreSQL and update environment variables before starting the backend.


πŸ”„ Core Workflows

Ticket Booking Flow

Passenger
   ↓
Book Ticket
   ↓
Demand Prediction
   ↓
QR Generation
   ↓
Ticket Issued

Fraud Detection Flow

Entry Scan
   ↓
Journey Tracking
   ↓
Exit Scan
   ↓
Fraud Detection Model
   ↓
Alert Generation

AI Assistant Flow

User Query
   ↓
Journey Context
   ↓
Gemini Processing
   ↓
Metro Guidance Response

πŸš€ Metro AI V2 Highlights

  • PostgreSQL Migration
  • Enhanced Demand Prediction Pipeline
  • Enhanced Fraud Detection Pipeline
  • Feature Engineering & Model Benchmarking
  • Intelligent Route Engine
  • Gemini-Powered Metro Assistant
  • Backend Optimization
  • AI Service Integration
  • End-to-End Prediction Pipeline
  • Real-Time Analytics Dashboard

About

AI-powered Smart Metro Operations & Passenger Navigation Platform featuring QR ticketing, demand prediction, fraud detection, real-time analytics, and intelligent interchange guidance for Bengaluru Metro.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors