Skip to content

Repository files navigation

🧠 NeuroSign AI — Autonomous Driver Assistance & Traffic Sign Platform

Python Flask OpenCV scikit-learn Feature Linkage TensorFlow Dataset

NeuroSign AI is a full-stack computer vision and machine learning platform designed for autonomous driving applications and Advanced Driver Assistance Systems (ADAS). It features Visual Feature Fingerprint Linkage Matching, dual-model classification engines (HOG+SVM & Deep CNN), live webcam telemetry streaming with HSV ROI pattern filtering, voice auditory alerts, full-scene multi-sign detection, and an interactive 43-class GTSRB sign directory.


✨ Features

  • 🎯 Single Image Traffic Sign Classifier: Upload photos or click quick test samples to perform high-accuracy classification across 43 GTSRB categories.
  • 🧬 Visual Feature Fingerprint Linkage Matching: Pre-caches 43 normalized GTSRB visual reference fingerprints (Meta/0.png ... Meta/42.png) and calculates cosine similarity + fused classification scores to eliminate false positives on non-GTSRB signs.
  • 📹 Real-Time Live Webcam ADAS Telemetry: Live camera feed processing with HUD overlays, FPS telemetry, and real-time fingerprint linkage verification.
  • 🛡️ Smart ROI Pattern Filter: Uses HSV color masks (Red, Blue, Yellow) and contour shape analysis to isolate real traffic signs in webcam feeds.
  • ⚖️ Dual Model Benchmark Engine: Evaluate side-by-side performance, latency (ms), and confidence between a Histogram of Oriented Gradients (HOG) + Linear SVM and a 6-Layer Deep Convolutional Neural Network (CNN).
  • 🔊 ADAS Voice Assistant: Integrated Web Speech API (speechSynthesis) providing real-time spoken warnings (e.g. "Caution: Speed limit 50 km/h ahead").
  • 🔍 Full Scene Multi-Sign Detection: OpenCV contour and color analysis to locate multiple traffic signs in uncropped road photos and draw bounding boxes.
  • 📚 GTSRB 43-Class Directory: Interactive directory with search filters and category pills (Speed Limits, Prohibition, Warning, Mandatory, Priority, End Limits).

🛠️ Technology Stack

  • Backend: Python 3.10, Flask REST API
  • Computer Vision & ML: OpenCV (cv2), scikit-learn (SVC), TensorFlow/Keras (Sequential CNN), HOG Descriptor Matrix, Joblib
  • Frontend: HTML5, Vanilla CSS3 (Glassmorphism UI), JavaScript (ES6+), WebRTC, Web Speech API, FontAwesome Icons

📊 Dataset & Model Specifications

  • Dataset: German Traffic Sign Recognition Benchmark (GTSRB)
  • Total Categories: 43 distinct traffic sign classes
  • Training Samples: 39,209 images
  • Feature Fingerprint Linkage Matrix: 43 normalized visual reference vectors pre-cached at server startup.
  • HOG Configuration:
    • Window Size: 32x32 px
    • Block Size: 16x16 px
    • Block Stride: 8x8 px
    • Cell Size: 8x8 px
    • Orientation Bins: 9
    • Feature Vector Length: 1,296 values
  • Linear SVM Model: Saved in traffic_sign_svm.pkl (Linear Kernel with Probability Estimation)
  • Keras CNN Model: Saved in traffic_sign_model.h5 (Conv2D -> MaxPool2D -> Conv2D -> Flatten -> Dense -> Softmax)

📁 Project Structure

PROJECT/
├── server.py              # Flask Web Backend REST API & Model Server
├── index.html             # Single-Page Web Frontend (UI & ADAS Features)
├── app.py                 # Desktop Tkinter GUI Application
├── build.py               # Keras CNN Architecture Builder Script
├── prepro.py              # Dataset Preprocessing & Loader Script
├── traffic_sign_svm.pkl   # Pre-trained Linear SVM Classifier (38.5 MB)
├── traffic_sign_model.h5  # Pre-trained Keras CNN Weights (3.8 MB)
├── Train.csv              # GTSRB Training Dataset Annotations
├── Test.csv               # GTSRB Testing Dataset Annotations
├── Meta.csv               # Category Metadata Annotations
├── Meta/                  # 43 Reference Traffic Sign PNG Icons (0.png - 42.png)
└── README.md              # Project Documentation

🚀 Quick Start Guide

1. Prerequisites & Dependencies

Ensure you have Python 3.8+ installed. Install the required Python packages:

pip install flask opencv-python numpy scikit-learn joblib tensorflow pillow

2. Launch the Full-Stack Web Platform

Run the Flask server:

python server.py

Open your browser and navigate to: 👉 http://localhost:5000


💻 Running the Desktop GUI (Tkinter)

If you prefer a native desktop application interface, run:

python app.py

📡 REST API Reference

Endpoint Method Description
GET / GET Serves the main web dashboard (index.html)
POST /api/predict POST Accepts uploaded image / sample ID and returns fused SVM + visual fingerprint linkage match
POST /api/predict_webcam POST Webcam endpoint with HSV color & contour pattern filter + visual fingerprint verification
POST /api/predict_dual POST Runs side-by-side evaluation comparing HOG+SVM vs. Deep CNN
POST /api/detect_scene POST Accepts full road photo, extracts ROIs, draws bounding boxes, and returns annotated image + detected signs list
GET /api/classes GET Returns list of all 43 sign categories and reference image URLs
GET /api/samples GET Returns curated sample traffic signs for 1-click testing
GET /api/stats GET Returns model and dataset metadata

📝 License

This project is open-source under the MIT License. Feel free to modify and expand for research or educational purposes.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages